aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts
diff options
context:
space:
mode:
authorDmitry Baksheev <dbakshee@yandex.ru>2022-02-10 16:48:12 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:12 +0300
commit0e38f1d675a0b3d02016acf698e8d04c0b224047 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /build/scripts
parent17fe552c0aa936de030b2b72934d9688ab9bb1c6 (diff)
downloadydb-0e38f1d675a0b3d02016acf698e8d04c0b224047.tar.gz
Restoring authorship annotation for Dmitry Baksheev <dbakshee@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts')
-rw-r--r--build/scripts/compile_cuda.py38
-rw-r--r--build/scripts/link_dyn_lib.py6
2 files changed, 22 insertions, 22 deletions
diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py
index 00486b4926..c0bec50b2a 100644
--- a/build/scripts/compile_cuda.py
+++ b/build/scripts/compile_cuda.py
@@ -2,7 +2,7 @@ import sys
import subprocess
import os
import collections
-import re
+import re
import tempfile
@@ -72,17 +72,17 @@ def main():
for prefix in skip_prefix_list:
cflags = [i for i in cflags if not i.startswith(prefix)]
- if not is_clang(command):
- def good(arg):
- if arg.startswith('--target='):
- return False
- if arg in ('-Wno-exceptions',
- '-Wno-inconsistent-missing-override'):
- return False
- return True
- cflags = filter(good, cflags)
-
- cpp_args = []
+ if not is_clang(command):
+ def good(arg):
+ if arg.startswith('--target='):
+ return False
+ if arg in ('-Wno-exceptions',
+ '-Wno-inconsistent-missing-override'):
+ return False
+ return True
+ cflags = filter(good, cflags)
+
+ cpp_args = []
compiler_args = []
# NVCC requires particular MSVC versions which may differ from the version
@@ -104,10 +104,10 @@ def main():
if not value:
value = cflags_queue.popleft()
if arg[1] == 'I':
- cpp_args.append('-I{}'.format(value))
+ cpp_args.append('-I{}'.format(value))
elif arg[1] == 'B': # todo: delete "B" flag check when cuda stop to use gcc
pass
- continue
+ continue
match = re.match(r'[-/]D(.*)', arg)
if match:
@@ -118,13 +118,13 @@ def main():
if vc_root and define.startswith('Y_MSVC_INCLUDE'):
define = os.path.expandvars('Y_MSVC_INCLUDE={}/include'.format(vc_root))
cpp_args.append('-D' + define.replace('\\', '/'))
- continue
+ continue
- compiler_args.append(arg)
+ compiler_args.append(arg)
- command += cpp_args
- if compiler_args:
- command += ['--compiler-options', ','.join(compiler_args)]
+ command += cpp_args
+ if compiler_args:
+ command += ['--compiler-options', ','.join(compiler_args)]
# --keep is necessary to prevent nvcc from embedding nvcc pid in generated
# symbols. It makes nvcc use the original file name as the prefix in the
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py
index f0510e0756..23487f5c1e 100644
--- a/build/scripts/link_dyn_lib.py
+++ b/build/scripts/link_dyn_lib.py
@@ -88,7 +88,7 @@ def fix_gnu_param(arch, ex):
else:
d[item['lang']].append(item['sym'])
- with tempfile.NamedTemporaryFile(mode='wt', delete=False) as f:
+ with tempfile.NamedTemporaryFile(mode='wt', delete=False) as f:
if version:
f.write('{} {{\nglobal:\n'.format(version))
else:
@@ -205,8 +205,8 @@ if __name__ == '__main__':
sys.exit(proc.returncode)
if opts.soname and opts.soname != opts.target:
- if os.path.exists(opts.soname):
- os.unlink(opts.soname)
+ if os.path.exists(opts.soname):
+ os.unlink(opts.soname)
os.link(opts.target, opts.soname)