aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/link_exe.py
diff options
context:
space:
mode:
authordvshkurko <dvshkurko@yandex-team.ru>2022-02-10 16:45:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:52 +0300
commitc768a99151e47c3a4bb7b92c514d256abd301c4d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /build/scripts/link_exe.py
parent321ee9bce31ec6e238be26dbcbe539cffa2c3309 (diff)
downloadydb-c768a99151e47c3a4bb7b92c514d256abd301c4d.tar.gz
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/link_exe.py')
-rw-r--r--build/scripts/link_exe.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
index d89528b6fa..f469e3b442 100644
--- a/build/scripts/link_exe.py
+++ b/build/scripts/link_exe.py
@@ -1,6 +1,6 @@
import sys
import subprocess
-import optparse
+import optparse
from process_whole_archive_option import ProcessWholeArchiveOption
@@ -15,19 +15,19 @@ def get_leaks_suppressions(cmd):
return supp, newcmd
-musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
-
-
-def fix_cmd(musl, c):
+musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
+
+
+def fix_cmd(musl, c):
return [i for i in c if (not musl or i not in musl_libs) and not i.endswith('.ios.interface') and not i.endswith('.pkg.fake')]
-
-
+
+
def gen_default_suppressions(inputs, output, source_root):
import collections
import os
supp_map = collections.defaultdict(set)
- for filename in inputs:
+ for filename in inputs:
sanitizer = os.path.basename(filename).split('.', 1)[0]
with open(os.path.join(source_root, filename)) as src:
for line in src:
@@ -36,17 +36,17 @@ def gen_default_suppressions(inputs, output, source_root):
continue
supp_map[sanitizer].add(line)
- with open(output, "wb") as dst:
+ with open(output, "wb") as dst:
for supp_type, supps in supp_map.items():
dst.write('extern "C" const char *__%s_default_suppressions() {\n' % supp_type)
dst.write(' return "{}";\n'.format('\\n'.join(sorted(supps))))
dst.write('}\n')
-def parse_args():
- parser = optparse.OptionParser()
- parser.disable_interspersed_args()
- parser.add_option('--musl', action='store_true')
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--musl', action='store_true')
parser.add_option('--custom-step')
parser.add_option('--python')
parser.add_option('--source-root')
@@ -54,13 +54,13 @@ def parse_args():
parser.add_option('--linker-output')
parser.add_option('--whole-archive-peers', action='append')
parser.add_option('--whole-archive-libs', action='append')
- return parser.parse_args()
-
-
+ return parser.parse_args()
+
+
if __name__ == '__main__':
- opts, args = parse_args()
+ opts, args = parse_args()
- cmd = fix_cmd(opts.musl, args)
+ cmd = fix_cmd(opts.musl, args)
cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
if opts.custom_step: