diff options
author | iaz1607 <iaz1607@yandex-team.com> | 2023-11-30 12:16:39 +0300 |
---|---|---|
committer | iaz1607 <iaz1607@yandex-team.com> | 2023-11-30 12:56:46 +0300 |
commit | 8951ddf780e02616cdb2ec54a02bc354e8507c0f (patch) | |
tree | 478097488957d3b554e25868c972a959bb40d78e /build/scripts/compile_cuda.py | |
parent | a5acb7aa4ca5a4603215e878eb0cad786793262b (diff) | |
download | ydb-8951ddf780e02616cdb2ec54a02bc354e8507c0f.tar.gz |
`build/scripts` ya style --py
Diffstat (limited to 'build/scripts/compile_cuda.py')
-rw-r--r-- | build/scripts/compile_cuda.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py index f8e1fa2b6d..eadb4519d2 100644 --- a/build/scripts/compile_cuda.py +++ b/build/scripts/compile_cuda.py @@ -27,8 +27,8 @@ def main(): if sys.argv[1] == '--mtime': mtime0 = sys.argv[2] cmd = 3 - command = sys.argv[cmd: spl] - cflags = sys.argv[spl + 1:] + command = sys.argv[cmd:spl] + cflags = sys.argv[spl + 1 :] dump_args = False if '--y_dump_args' in command: @@ -85,16 +85,20 @@ def main(): for flag in cflags: if all(not flag.startswith(skip_prefix) for skip_prefix in skip_prefix_list): if flag.startswith('-fopenmp-version='): - new_cflags.append('-fopenmp-version=45') # Clang 11 only supports OpenMP 4.5, but the default is 5.0, so we need to forcefully redefine it. + new_cflags.append( + '-fopenmp-version=45' + ) # Clang 11 only supports OpenMP 4.5, but the default is 5.0, so we need to forcefully redefine it. else: new_cflags.append(flag) cflags = new_cflags if not is_clang(command): + def good(arg): if arg.startswith('--target='): return False return True + cflags = filter(good, cflags) cpp_args = [] @@ -108,7 +112,6 @@ def main(): cflags_queue = collections.deque(cflags) while cflags_queue: - arg = cflags_queue.popleft() if arg == '-mllvm': compiler_args.append(arg) |