aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins
diff options
context:
space:
mode:
authorignat <ignat@yandex-team.com>2023-11-29 20:51:17 +0300
committerignat <ignat@yandex-team.com>2023-11-29 21:23:02 +0300
commit30f30da73cc5bb3d45bf1726275921ec159e9abb (patch)
treeb773148706040ee9177d66985e2dbb8a0ab94f6b /build/plugins
parenta822d36fa56ca37d73ad30bd7adf0285a8b9f8c5 (diff)
downloadydb-30f30da73cc5bb3d45bf1726275921ec159e9abb.tar.gz
Use new pass manager in opt to support clang-16 in cmake build
Diffstat (limited to 'build/plugins')
-rw-r--r--build/plugins/llvm_bc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/plugins/llvm_bc.py b/build/plugins/llvm_bc.py
index ded53673c9..ddb4bbd84d 100644
--- a/build/plugins/llvm_bc.py
+++ b/build/plugins/llvm_bc.py
@@ -23,10 +23,13 @@ def onllvm_bc(unit, *args):
llvm_compile([rel_path, bc_path])
bcs.append(bc_path)
unit.onllvm_link([merged_bc] + bcs)
- opt_opts = ['-O2', '-globalopt', '-globaldce']
+ passes = ['default<O2>', 'globalopt', 'globaldce']
+ opt_opts = []
if symbols:
+ passes += ['internalize']
# XXX: '#' used instead of ',' to overcome ymake tendency to split everything by comma
- opt_opts += ['-internalize', '-internalize-public-api-list=' + '#'.join(symbols)]
+ opt_opts += ['-internalize-public-api-list=' + '#'.join(symbols)]
+ opt_opts += ['-passes={}'.format('${__COMMA__}'.join(passes))]
unit.onllvm_opt([merged_bc, out_bc] + opt_opts)
if 'GENERATE_MACHINE_CODE' in kwds:
unit.onllvm_llc([out_bc, '-O2'])