aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorStanislav Kirillov <staskirillov@gmail.com>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commitcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /build
parent92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c (diff)
downloadydb-cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134.tar.gz
Restoring authorship annotation for Stanislav Kirillov <staskirillov@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build')
-rw-r--r--build/plugins/rodata.py4
-rw-r--r--build/scripts/compile_cuda.py10
-rw-r--r--build/scripts/fix_msvc_output.py16
-rw-r--r--build/scripts/generate_mf.py16
-rw-r--r--build/scripts/vcs_info.py56
-rw-r--r--build/ymake.core.conf2
-rwxr-xr-xbuild/ymake_conf.py12
7 files changed, 58 insertions, 58 deletions
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
index f575653732..3ecb0f9a83 100644
--- a/build/plugins/rodata.py
+++ b/build/plugins/rodata.py
@@ -92,9 +92,9 @@ class ROData(iw.CustomCommand):
with open(tmp_file, 'w') as f:
f.write('global ' + self._prefix + file_name + '\n')
f.write('global ' + self._prefix + file_name + 'Size' + '\n')
- f.write('SECTION .rodata ALIGN=16\n')
+ f.write('SECTION .rodata ALIGN=16\n')
f.write(self._prefix + file_name + ':\nincbin "' + in_file + '"\n')
- f.write('align 4, db 0\n')
+ f.write('align 4, db 0\n')
f.write(self._prefix + file_name + 'Size:\ndd ' + str(file_size) + '\n')
if self._fmt.startswith('elf'):
diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py
index ac626bec1a..c0bec50b2a 100644
--- a/build/scripts/compile_cuda.py
+++ b/build/scripts/compile_cuda.py
@@ -50,7 +50,7 @@ def main():
# clang coverage
'-fprofile-instr-generate',
'-fcoverage-mapping',
- '/Zc:inline', # disable unreferenced functions (kernel registrators) remove
+ '/Zc:inline', # disable unreferenced functions (kernel registrators) remove
'-Wno-c++17-extensions',
'-flto',
'-faligned-allocation',
@@ -95,10 +95,10 @@ def main():
while cflags_queue:
arg = cflags_queue.popleft()
- if arg == '-mllvm':
- compiler_args.append(arg)
- compiler_args.append(cflags_queue.popleft())
- continue
+ if arg == '-mllvm':
+ compiler_args.append(arg)
+ compiler_args.append(cflags_queue.popleft())
+ continue
if arg[:2].upper() in ('-I', '/I', '-B'):
value = arg[2:]
if not value:
diff --git a/build/scripts/fix_msvc_output.py b/build/scripts/fix_msvc_output.py
index aa64adf316..b2e7d38307 100644
--- a/build/scripts/fix_msvc_output.py
+++ b/build/scripts/fix_msvc_output.py
@@ -8,19 +8,19 @@ def out2err(cmd):
return subprocess.Popen(cmd, stdout=sys.stderr).wait()
-def decoding_needed(strval):
- if sys.version_info >= (3, 0, 0):
- return isinstance(strval, bytes)
- else:
- return False
-
-
+def decoding_needed(strval):
+ if sys.version_info >= (3, 0, 0):
+ return isinstance(strval, bytes)
+ else:
+ return False
+
+
def out2err_cut_first_line(cmd):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
first_line = True
while True:
line = p.stdout.readline()
- line = line.decode('utf-8') if decoding_needed(line) else line
+ line = line.decode('utf-8') if decoding_needed(line) else line
if not line:
break
if first_line:
diff --git a/build/scripts/generate_mf.py b/build/scripts/generate_mf.py
index 36e00b6489..a44a969980 100644
--- a/build/scripts/generate_mf.py
+++ b/build/scripts/generate_mf.py
@@ -15,13 +15,13 @@ class GplNotAllowed(Exception):
pass
-def process_quotes(s):
- for quote_char in '\'"':
- if s.startswith(quote_char) and s.endswith(quote_char):
- return s[1:-1]
- return s
-
-
+def process_quotes(s):
+ for quote_char in '\'"':
+ if s.startswith(quote_char) and s.endswith(quote_char):
+ return s[1:-1]
+ return s
+
+
def parse_args():
args = pcf.get_args(sys.argv[1:])
lics, peers, free_args, credits = [], [], [], []
@@ -76,7 +76,7 @@ def generate_mf():
if credits:
union_texts = []
for texts_file in credits:
- with open(process_quotes(texts_file)) as f:
+ with open(process_quotes(texts_file)) as f:
union_texts.append(f.read())
meta['license_texts'] = '\n\n'.join(union_texts)
diff --git a/build/scripts/vcs_info.py b/build/scripts/vcs_info.py
index 01142134c2..319d1b4631 100644
--- a/build/scripts/vcs_info.py
+++ b/build/scripts/vcs_info.py
@@ -11,34 +11,34 @@ import zipfile
class _Formatting(object):
@staticmethod
- def is_str(strval):
- if sys.version_info >= (3, 0, 0):
- return isinstance(strval, (bytes,str))
- else:
- return isinstance(strval, basestring)
-
- @staticmethod
- def encoding_needed(strval):
- if sys.version_info >= (3, 0, 0):
- return isinstance(strval, str)
- else:
- return isinstance(strval, unicode)
-
- @staticmethod
+ def is_str(strval):
+ if sys.version_info >= (3, 0, 0):
+ return isinstance(strval, (bytes,str))
+ else:
+ return isinstance(strval, basestring)
+
+ @staticmethod
+ def encoding_needed(strval):
+ if sys.version_info >= (3, 0, 0):
+ return isinstance(strval, str)
+ else:
+ return isinstance(strval, unicode)
+
+ @staticmethod
def escape_special_symbols(strval):
- encoding_needed = _Formatting.encoding_needed(strval)
- c_str = strval.encode('utf-8') if encoding_needed else strval
- retval = b""
+ encoding_needed = _Formatting.encoding_needed(strval)
+ c_str = strval.encode('utf-8') if encoding_needed else strval
+ retval = b""
for c in c_str:
- if sys.version_info >= (3, 0, 0):
- c = bytes([c])
+ if sys.version_info >= (3, 0, 0):
+ c = bytes([c])
if c in ("\\", "\""):
retval += "\\" + c
elif ord(c) < ord(' '):
- retval += c.decode('latin-1').encode('unicode_escape')
+ retval += c.decode('latin-1').encode('unicode_escape')
else:
retval += c
- return retval.decode('utf-8') if encoding_needed else retval
+ return retval.decode('utf-8') if encoding_needed else retval
@staticmethod
def escape_line_feed(strval, indent=' '):
@@ -51,7 +51,7 @@ class _Formatting(object):
@staticmethod
def escaped_define(strkey, val):
name = "#define " + strkey + " "
- if _Formatting.is_str(val):
+ if _Formatting.is_str(val):
define = "\"" + _Formatting.escape_line_feed(
_Formatting.escape_trigraphs(_Formatting.escape_special_symbols(val))) + "\""
else:
@@ -60,7 +60,7 @@ class _Formatting(object):
@staticmethod
def escaped_go_map_key(strkey, strval):
- if _Formatting.is_str(strval):
+ if _Formatting.is_str(strval):
return ' ' + '"' + strkey + '": "' + _Formatting.escape_special_symbols(strval) + '",'
else:
return ' ' + '"' + strkey + '": "' + str(strval) + '",'
@@ -94,7 +94,7 @@ def get_json(file_name):
# TODO: check 'tar+svn' parsing
for i in ['ARCADIA_SOURCE_REVISION', 'ARCADIA_SOURCE_LAST_CHANGE', 'SVN_REVISION']:
- if i in out and _Formatting.is_str(out[i]):
+ if i in out and _Formatting.is_str(out[i]):
try:
out[i] = int(out[i])
except:
@@ -120,10 +120,10 @@ def print_c(json_file, output_file, argv):
with open(interface) as c:
c_file = c.read()
with open(output_file, 'w') as f:
- header = '\n'.join(gen_header(json_file))
- if sys.version_info < (3, 0, 0):
- header = header.encode('utf-8')
- f.write(header + '\n' + c_file)
+ header = '\n'.join(gen_header(json_file))
+ if sys.version_info < (3, 0, 0):
+ header = header.encode('utf-8')
+ f.write(header + '\n' + c_file)
def merge_java_content(old_content, json_file):
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index f51b358b19..081833998b 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -2773,7 +2773,7 @@ macro PYTHON3_MODULE() {
### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
module R_MODULE: DLL_UNIT {
when ($DARWIN == "yes") {
- LDFLAGS+=-flat_namespace -dynamiclib
+ LDFLAGS+=-flat_namespace -dynamiclib
}
when ($MSVC == "yes" || $CYGWIN == "yes") {
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 1dbb194cd8..30219eb85e 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -2224,10 +2224,10 @@ class MSVCToolchainOptions(ToolchainOptions):
sdk_dir = os.environ.get('WindowsSdkDir')
self.sdk_version = os.environ.get('WindowsSDKVersion').replace('\\', '')
vc_install_dir = os.environ.get('VCToolsInstallDir')
- # fix for cxx_std detection problem introduced in r7740071 when running in native VS toolkit commandline:
- # in that case ya make gets 'system_cxx' configuration name and cxx_std is obviously missing in that config
- # so default 'c++20' is substituted and we need to hotfix it here
- self.cxx_std = 'c++latest'
+ # fix for cxx_std detection problem introduced in r7740071 when running in native VS toolkit commandline:
+ # in that case ya make gets 'system_cxx' configuration name and cxx_std is obviously missing in that config
+ # so default 'c++20' is substituted and we need to hotfix it here
+ self.cxx_std = 'c++latest'
if any([x is None for x in (sdk_dir, self.sdk_version, vc_install_dir)]):
raise ConfigureError('No %WindowsSdkDir%, %WindowsSDKVersion% or %VCINSTALLDIR% present. Please, run vcvars64.bat to setup preferred environment.')
@@ -2739,13 +2739,13 @@ class MSVCLinker(MSVC, Linker):
emit('LINK_EXE_FLAGS', '$LINK_EXE_FLAGS_PER_TYPE')
- emit('LINK_IMPLIB_VALUE')
+ emit('LINK_IMPLIB_VALUE')
emit('LINK_IMPLIB', '/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib}')
if is_negative_str(preset('NO_DEBUGINFO', 'no')):
emit('LINK_EXTRA_OUTPUT', '/PDB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.pdb}')
else:
emit('LINK_EXTRA_OUTPUT')
-
+
if not self.tc.under_wine:
emit('LIB_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'lib')
emit('LINK_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'link')