ya.make 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. LIBRARY()
  2. PROVIDES(
  3. yql_pg_runtime
  4. )
  5. CXXFLAGS(-DMKQL_DISABLE_CODEGEN)
  6. YQL_LAST_ABI_VERSION()
  7. ADDINCL(
  8. contrib/libs/lz4
  9. yql/essentials/parser/pg_wrapper/postgresql/src/backend/bootstrap
  10. yql/essentials/parser/pg_wrapper/postgresql/src/backend/parser
  11. yql/essentials/parser/pg_wrapper/postgresql/src/backend/replication
  12. yql/essentials/parser/pg_wrapper/postgresql/src/backend/replication/logical
  13. yql/essentials/parser/pg_wrapper/postgresql/src/backend/utils/adt
  14. yql/essentials/parser/pg_wrapper/postgresql/src/backend/utils/misc
  15. yql/essentials/parser/pg_wrapper/postgresql/src/backend/utils/sort
  16. yql/essentials/parser/pg_wrapper/postgresql/src/common
  17. yql/essentials/parser/pg_wrapper/postgresql/src/include
  18. yql/essentials/parser/pg_wrapper/postgresql/src/port
  19. )
  20. IF (NOT BUILD_POSTGRES_ONLY)
  21. SRCS(
  22. arena_ctx.cpp
  23. arrow.cpp
  24. arrow_impl.cpp
  25. conversion.cpp
  26. parser.cpp
  27. thread_inits.c
  28. comp_factory.cpp
  29. type_cache.cpp
  30. pg_aggs.cpp
  31. read_table.cpp
  32. recovery.cpp
  33. superuser.cpp
  34. config.cpp
  35. cost_mocks.cpp
  36. syscache.cpp
  37. pg_utils_wrappers.cpp
  38. utils.cpp
  39. ctors.cpp
  40. )
  41. ENDIF()
  42. IF (ARCH_X86_64)
  43. CFLAGS(
  44. -DHAVE__GET_CPUID=1
  45. -DUSE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
  46. )
  47. SRCS(
  48. postgresql/src/port/pg_crc32c_sse42.c
  49. postgresql/src/port/pg_crc32c_sse42_choose.c
  50. )
  51. ENDIF()
  52. INCLUDE(pg_sources.inc)
  53. IF (NOT BUILD_POSTGRES_ONLY)
  54. INCLUDE(pg_kernel_sources.inc)
  55. ENDIF()
  56. IF (NOT OS_WINDOWS AND NOT SANITIZER_TYPE AND NOT BUILD_TYPE == "DEBUG")
  57. IF (NOT BUILD_POSTGRES_ONLY)
  58. IF (YQL_USE_PG_BC)
  59. USE_LLVM_BC14()
  60. INCLUDE(pg_bc.all.inc)
  61. ENDIF()
  62. ENDIF()
  63. ELSE()
  64. CFLAGS(-DUSE_SLOW_PG_KERNELS)
  65. ENDIF()
  66. IF (BUILD_TYPE == "DEBUG")
  67. CFLAGS(-DDISABLE_COMPLEX_MACRO)
  68. ENDIF()
  69. PEERDIR(
  70. library/cpp/resource
  71. library/cpp/yson
  72. yql/essentials/core
  73. yql/essentials/minikql/arrow
  74. yql/essentials/minikql/computation
  75. yql/essentials/parser/pg_catalog
  76. yql/essentials/parser/pg_wrapper/interface
  77. yql/essentials/providers/common/codec
  78. yql/essentials/public/issue
  79. yql/essentials/public/udf
  80. yql/essentials/utils
  81. yql/essentials/public/decimal
  82. yql/essentials/public/result_format
  83. yql/essentials/types/binary_json
  84. yql/essentials/types/dynumber
  85. yql/essentials/types/uuid
  86. contrib/libs/icu
  87. contrib/libs/libc_compat
  88. contrib/libs/libxml
  89. contrib/libs/lz4
  90. contrib/libs/openssl
  91. )
  92. INCLUDE(cflags.inc)
  93. IF (OS_LINUX)
  94. SRCS(
  95. postgresql/src/port/strlcat.c
  96. postgresql/src/port/strlcpy.c
  97. )
  98. ENDIF()
  99. IF (OS_LINUX OR OS_DARWIN)
  100. SRCS(
  101. postgresql/src/backend/port/posix_sema.c
  102. postgresql/src/backend/port/sysv_shmem.c
  103. )
  104. ELSEIF (OS_WINDOWS)
  105. ADDINCL(
  106. yql/essentials/parser/pg_wrapper/postgresql/src/include
  107. yql/essentials/parser/pg_wrapper/postgresql/src/include/port/win32
  108. yql/essentials/parser/pg_wrapper/postgresql/src/include/port/win32_msvc
  109. )
  110. SRCS(
  111. postgresql/src/backend/port/win32/crashdump.c
  112. postgresql/src/backend/port/win32/signal.c
  113. postgresql/src/backend/port/win32/socket.c
  114. postgresql/src/backend/port/win32/timer.c
  115. postgresql/src/backend/port/win32_sema.c
  116. postgresql/src/backend/port/win32_shmem.c
  117. postgresql/src/port/dirmod.c
  118. postgresql/src/port/getopt.c
  119. postgresql/src/port/inet_aton.c
  120. postgresql/src/port/kill.c
  121. postgresql/src/port/open.c
  122. postgresql/src/port/pwritev.c
  123. postgresql/src/port/system.c
  124. postgresql/src/port/win32common.c
  125. postgresql/src/port/win32dlopen.c
  126. postgresql/src/port/win32env.c
  127. postgresql/src/port/win32error.c
  128. postgresql/src/port/win32fseek.c
  129. postgresql/src/port/win32gai_strerror.c
  130. postgresql/src/port/win32gettimeofday.c
  131. postgresql/src/port/win32getrusage.c
  132. postgresql/src/port/win32ntdll.c
  133. postgresql/src/port/win32pread.c
  134. postgresql/src/port/win32pwrite.c
  135. postgresql/src/port/win32security.c
  136. postgresql/src/port/win32setlocale.c
  137. postgresql/src/port/win32stat.c
  138. )
  139. ENDIF()
  140. # Service files must be listed as dependencies to be included in export
  141. FILES(
  142. copy_src.py
  143. copy_src.sh
  144. generate_kernels.py
  145. source.patch
  146. vars.txt
  147. verify.sh
  148. )
  149. END()
  150. RECURSE(
  151. interface
  152. )
  153. RECURSE_FOR_TESTS(
  154. ut
  155. test
  156. )