Skip to content

Commit 9275a9e

Browse files
authored
Less harcode in copy_src.py (#6938)
1 parent 7b9033a commit 9275a9e

File tree

95 files changed

+3654
-1904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3654
-1904
lines changed

ydb/library/yql/parser/pg_wrapper/copy_src.py

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -50,48 +50,11 @@ def is_inside_source_dirs(filename):
5050
return False
5151

5252
no_copy_sources = [
53-
# not used (and linux/darwin-only)
54-
"postgresql/src/backend/port/posix_sema.c",
55-
"postgresql/src/backend/port/sysv_shmem.c",
56-
# not used, was excluded earlier
57-
"postgresql/src/include/utils/help_config.h",
58-
"postgresql/src/backend/utils/misc/help_config.c",
59-
# provided in libc_compat
60-
"postgresql/src/port/strlcat.c",
61-
"postgresql/src/port/strlcpy.c",
62-
63-
# unneded headers
64-
"postgresql/src/common/md5_int.h",
65-
"postgresql/src/common/sha1_int.h",
66-
"postgresql/src/common/sha2_int.h",
67-
"postgresql/src/include/common/connect.h",
68-
"postgresql/src/include/common/logging.h",
69-
"postgresql/src/include/common/restricted_token.h",
70-
"postgresql/src/include/fe_utils/",
71-
"postgresql/src/include/getopt_long.h",
72-
"postgresql/src/include/jit/llvmjit.h",
73-
"postgresql/src/include/jit/llvmjit_emit.h",
74-
"postgresql/src/include/libpq/be-gssapi-common.h",
75-
"postgresql/src/include/port/aix.h",
76-
"postgresql/src/include/port/atomics/arch-hppa.h",
77-
"postgresql/src/include/port/atomics/arch-ia64.h",
78-
"postgresql/src/include/port/atomics/arch-ppc.h",
79-
"postgresql/src/include/port/atomics/generic-acc.h",
80-
"postgresql/src/include/port/atomics/generic-sunpro.h",
81-
"postgresql/src/include/port/cygwin.h",
82-
"postgresql/src/include/port/darwin.h",
83-
"postgresql/src/include/port/freebsd.h",
84-
"postgresql/src/include/port/hpux.h",
85-
"postgresql/src/include/port/linux.h",
86-
"postgresql/src/include/port/netbsd.h",
87-
"postgresql/src/include/port/openbsd.h",
88-
"postgresql/src/include/port/pg_pthread.h",
89-
"postgresql/src/include/port/solaris.h",
53+
"postgresql/src/include/port/win32/sys/un.h",
54+
"postgresql/src/include/port/win32/netinet/tcp.h",
55+
"postgresql/src/include/port/win32/sys/resource.h",
56+
"postgresql/src/include/port/win32/sys/select.h",
9057
"postgresql/src/include/port/win32/dlfcn.h",
91-
"postgresql/src/include/port/win32.h",
92-
"postgresql/src/include/replication/pgoutput.h",
93-
"postgresql/src/include/snowball/",
94-
"postgresql/src/port/pthread-win32.h",
9558
]
9659

9760
def need_copy(filename):
@@ -106,6 +69,10 @@ def need_copy(filename):
10669
# platform-specific, explicitly added in ya.make
10770
"postgresql/src/port/pg_crc32c_sse42.c",
10871
"postgresql/src/port/pg_crc32c_sse42_choose.c",
72+
"postgresql/src/backend/port/posix_sema.c",
73+
"postgresql/src/backend/port/sysv_shmem.c",
74+
"postgresql/src/port/strlcat.c",
75+
"postgresql/src/port/strlcpy.c",
10976
])
11077

11178
def fix_line(line, all_lines, pos):
@@ -360,9 +327,6 @@ def get_vars(build_dir):
360327
all_vars.remove("BlockSig")
361328
all_vars.remove("StartupBlockSig")
362329
all_vars.remove("UnBlockSig")
363-
all_vars.remove("on_proc_exit_index")
364-
all_vars.remove("on_shmem_exit_index")
365-
all_vars.remove("before_shmem_exit_index")
366330

367331
all_vars.add("yychar")
368332
all_vars.add("yyin")
@@ -373,11 +337,6 @@ def get_vars(build_dir):
373337
all_vars.add("yy_flex_debug")
374338
all_vars.add("yylineno")
375339

376-
all_vars.remove("UsedShmemSegID")
377-
all_vars.remove("UsedShmemSegAddr")
378-
all_vars.remove("local_my_wait_event_info")
379-
all_vars.remove("my_wait_event_info")
380-
381340
with open("vars.txt","w") as f:
382341
for a in sorted(all_vars):
383342
print(a, file=f)

0 commit comments

Comments
 (0)