diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-28 22:25:04 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-28 22:25:04 +0300 |
commit | b8a17f9b1c166d2e9a26b99348a4c29d972caf55 (patch) | |
tree | 1a2d881f1a9452b9c6103dbf69d73da7624e98e5 /build/scripts/clang_wrapper.py | |
parent | 25659221f18577ea38430a8ec3349836f5626b6a (diff) | |
download | ydb-b8a17f9b1c166d2e9a26b99348a4c29d972caf55.tar.gz |
Revert ymake build from ydb oss export
Diffstat (limited to 'build/scripts/clang_wrapper.py')
-rw-r--r-- | build/scripts/clang_wrapper.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/build/scripts/clang_wrapper.py b/build/scripts/clang_wrapper.py deleted file mode 100644 index af3869f789..0000000000 --- a/build/scripts/clang_wrapper.py +++ /dev/null @@ -1,53 +0,0 @@ -import subprocess -import sys - - -def fix(s): - # disable dbg DEVTOOLS-2744 - if s == '-g': - return None - if s == '/Z7' or s == '/Od' or s == '/Ob0' or s == '/D_DEBUG': - return None - - # disable sanitizers for generated code - if s.startswith('-fsanitize') or s == '-Dmemory_sanitizer_enabled' or s.startswith('-fsanitize-blacklist'): - return None - - # strip gcc toolchain flags (appear when crosscompiling) - if s.startswith('-fabi-version'): - return None - - # remove arguments unknown to clang-cl - if s == '-fcase-insensitive-paths': # or s == '-fno-lto': # DEVTOOLSSUPPORT-3966 - return None - - # Paths under .ya/tools/v3/.../msvc/include are divided with '\' - return s.replace('\\', '/') - - -def fix_path(p): - try: - i = p.rfind('/bin/clang') - p = p[:i] + '/bin/clang-cl' - except ValueError: - pass - return p - - -if __name__ == '__main__': - is_on_win = sys.argv[1] == 'yes' - path = sys.argv[2] - args = filter(None, [fix(s) for s in sys.argv[3:]]) - if is_on_win: - path = fix_path(path) - try: - i = args.index('-emit-llvm') - args[i:i+1] = ['-Xclang', '-emit-llvm'] - except ValueError: - pass - args.append('-fms-compatibility-version=19') - - cmd = [path] + args - - rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=sys.stdout) - sys.exit(rc) |