diff options
author | sidorovaa <sidorovaa@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
commit | 09f39deb02382f740cd19dee5511ba781fd2f9d5 (patch) | |
tree | 19f064d2f5a2aa9c2fb80049de4eec87c721a503 /build/plugins/llvm_bc.py | |
parent | b05913d1c3c02a773578bceb7285084d2933ae86 (diff) | |
download | ydb-09f39deb02382f740cd19dee5511ba781fd2f9d5.tar.gz |
Restoring authorship annotation for <sidorovaa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins/llvm_bc.py')
-rw-r--r-- | build/plugins/llvm_bc.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/build/plugins/llvm_bc.py b/build/plugins/llvm_bc.py index 2cfe43884c..fa36e728ca 100644 --- a/build/plugins/llvm_bc.py +++ b/build/plugins/llvm_bc.py @@ -4,25 +4,25 @@ from _common import rootrel_arc_src, sort_by_keywords, skip_build_root, stripext def onllvm_bc(unit, *args): - free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1, 'NO_COMPILE': 0}, args) + free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1, 'NO_COMPILE': 0}, args) name = kwds['NAME'][0] symbols = kwds.get('SYMBOLS') obj_suf = unit.get('OBJ_SUF') - skip_compile_step = 'NO_COMPILE' in kwds + skip_compile_step = 'NO_COMPILE' in kwds merged_bc = name + '_merged' + obj_suf + '.bc' out_bc = name + '_optimized' + obj_suf + '.bc' bcs = [] for x in free_args: rel_path = rootrel_arc_src(x, unit) bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + obj_suf + '.bc' - if not skip_compile_step: - if x.endswith('.c'): - llvm_compile = unit.onllvm_compile_c - elif x.endswith('.ll'): - llvm_compile = unit.onllvm_compile_ll - else: - llvm_compile = unit.onllvm_compile_cxx - llvm_compile([rel_path, bc_path]) + if not skip_compile_step: + if x.endswith('.c'): + llvm_compile = unit.onllvm_compile_c + elif x.endswith('.ll'): + llvm_compile = unit.onllvm_compile_ll + else: + llvm_compile = unit.onllvm_compile_cxx + llvm_compile([rel_path, bc_path]) bcs.append(bc_path) unit.onllvm_link([merged_bc] + bcs) opt_opts = ['-O2', '-globalopt', '-globaldce'] |