summaryrefslogtreecommitdiffstats
path: root/build/scripts/clang_wrapper.py
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2025-04-14 15:25:20 +0300
committermikhnenko <[email protected]>2025-04-14 15:41:28 +0300
commit3671cc0456bd7188be7c01cb0321a8dd1b47f63b (patch)
tree71ccf0cbc2728c1a723dc5ac8bb59e09bd3ec5f2 /build/scripts/clang_wrapper.py
parent411d89e7ed9e803438925a2034d7d566b73e2fdc (diff)
Drop -I to stl for bpf targets
commit_hash:ed9aed0cc15d46e1718fa49fcea36432fce52951
Diffstat (limited to 'build/scripts/clang_wrapper.py')
-rw-r--r--build/scripts/clang_wrapper.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/scripts/clang_wrapper.py b/build/scripts/clang_wrapper.py
index d5e48b91e10..71e0f03088e 100644
--- a/build/scripts/clang_wrapper.py
+++ b/build/scripts/clang_wrapper.py
@@ -31,6 +31,13 @@ def fix_path(p):
return p
+def drop_stl(s):
+ if s.startswith('-I') and 'contrib/libs/cxxsupp/libcxx/include' in s:
+ return None
+
+ return s
+
+
if __name__ == '__main__':
is_on_win = sys.argv[1] == 'yes'
path = sys.argv[2]
@@ -44,6 +51,12 @@ if __name__ == '__main__':
pass
args.append('-fms-compatibility-version=19')
+ for i in range(len(args) - 1):
+ if args[i] == '-target' and args[i + 1] == 'bpf':
+ # bpf should not be able to include stl headers
+ args = list(filter(None, [drop_stl(s) for s in args]))
+ break
+
cmd = [path] + args
rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=sys.stdout)