aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/llvm_opt_wrapper.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/scripts/llvm_opt_wrapper.py
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/scripts/llvm_opt_wrapper.py')
-rw-r--r--build/scripts/llvm_opt_wrapper.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/scripts/llvm_opt_wrapper.py b/build/scripts/llvm_opt_wrapper.py
new file mode 100644
index 0000000000..38ca3004af
--- /dev/null
+++ b/build/scripts/llvm_opt_wrapper.py
@@ -0,0 +1,18 @@
+import subprocess
+import sys
+
+
+def fix(s):
+ # we use '#' instead of ',' because ymake always splits args by comma
+ if 'internalize' in s:
+ return s.replace('#', ',')
+
+ return s
+
+
+if __name__ == '__main__':
+ path = sys.argv[1]
+ args = [fix(s) for s in [path] + sys.argv[2:]]
+
+ rc = subprocess.call(args, shell=False, stderr=sys.stderr, stdout=sys.stdout)
+ sys.exit(rc)