aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsidorovaa <sidorovaa@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commit09f39deb02382f740cd19dee5511ba781fd2f9d5 (patch)
tree19f064d2f5a2aa9c2fb80049de4eec87c721a503 /build
parentb05913d1c3c02a773578bceb7285084d2933ae86 (diff)
downloadydb-09f39deb02382f740cd19dee5511ba781fd2f9d5.tar.gz
Restoring authorship annotation for <sidorovaa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build')
-rw-r--r--build/plugins/_unpickler.py6
-rw-r--r--build/plugins/code_generator.py2
-rw-r--r--build/plugins/llvm_bc.py20
-rw-r--r--build/plugins/pybuild.py2
-rw-r--r--build/plugins/rodata.py22
-rw-r--r--build/plugins/swig.py2
-rw-r--r--build/plugins/xsyn.py2
-rw-r--r--build/plugins/ytest.py10
-rw-r--r--build/plugins/ytest2.py2
-rw-r--r--build/ymake.core.conf50
10 files changed, 59 insertions, 59 deletions
diff --git a/build/plugins/_unpickler.py b/build/plugins/_unpickler.py
index e01e7b3118..c4b3955e89 100644
--- a/build/plugins/_unpickler.py
+++ b/build/plugins/_unpickler.py
@@ -18,7 +18,7 @@ def main():
parser.add_argument('--src-root', help='$S real path', required=True)
parser.add_argument('--build-root', help='$B real path', required=True)
parser.add_argument('--tools', help='binaries needed by command', required=True, nargs='+')
- args, unknown_args = parser.parse_known_args()
+ args, unknown_args = parser.parse_known_args()
encoded_cmd = args.data
src_root = args.src_root
@@ -33,9 +33,9 @@ def main():
cmd_object.set_build_root(build_root)
if len(tools[1:]) == 0:
- cmd_object.run(unknown_args, common.get_interpreter_path())
+ cmd_object.run(unknown_args, common.get_interpreter_path())
else:
- cmd_object.run(unknown_args, *tools[1:])
+ cmd_object.run(unknown_args, *tools[1:])
if __name__ == '__main__':
diff --git a/build/plugins/code_generator.py b/build/plugins/code_generator.py
index ca8bb18c15..67fc71ab7a 100644
--- a/build/plugins/code_generator.py
+++ b/build/plugins/code_generator.py
@@ -9,7 +9,7 @@ pattern = re.compile(r"#include\s*[<\"](?P<INDUCED>[^>\"]+)[>\"]|(?:@|{@)\s*(?:i
class CodeGeneratorTemplateParser(object):
def __init__(self, path, unit):
self._path = path
- retargeted = os.path.join(unit.path(), os.path.relpath(path, unit.resolve(unit.path())))
+ retargeted = os.path.join(unit.path(), os.path.relpath(path, unit.resolve(unit.path())))
with open(path, 'rb') as f:
includes, induced = CodeGeneratorTemplateParser.parse_includes(f.readlines())
self._includes = unit.resolve_include([retargeted] + includes) if includes else []
diff --git a/build/plugins/llvm_bc.py b/build/plugins/llvm_bc.py
index 2cfe43884c..fa36e728ca 100644
--- a/build/plugins/llvm_bc.py
+++ b/build/plugins/llvm_bc.py
@@ -4,25 +4,25 @@ from _common import rootrel_arc_src, sort_by_keywords, skip_build_root, stripext
def onllvm_bc(unit, *args):
- free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1, 'NO_COMPILE': 0}, args)
+ free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1, 'NO_COMPILE': 0}, args)
name = kwds['NAME'][0]
symbols = kwds.get('SYMBOLS')
obj_suf = unit.get('OBJ_SUF')
- skip_compile_step = 'NO_COMPILE' in kwds
+ skip_compile_step = 'NO_COMPILE' in kwds
merged_bc = name + '_merged' + obj_suf + '.bc'
out_bc = name + '_optimized' + obj_suf + '.bc'
bcs = []
for x in free_args:
rel_path = rootrel_arc_src(x, unit)
bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + obj_suf + '.bc'
- if not skip_compile_step:
- if x.endswith('.c'):
- llvm_compile = unit.onllvm_compile_c
- elif x.endswith('.ll'):
- llvm_compile = unit.onllvm_compile_ll
- else:
- llvm_compile = unit.onllvm_compile_cxx
- llvm_compile([rel_path, bc_path])
+ if not skip_compile_step:
+ if x.endswith('.c'):
+ llvm_compile = unit.onllvm_compile_c
+ elif x.endswith('.ll'):
+ llvm_compile = unit.onllvm_compile_ll
+ else:
+ llvm_compile = unit.onllvm_compile_cxx
+ llvm_compile([rel_path, bc_path])
bcs.append(bc_path)
unit.onllvm_link([merged_bc] + bcs)
opt_opts = ['-O2', '-globalopt', '-globaldce']
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index f32a2d39a0..66706074a5 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -403,7 +403,7 @@ def onpy_srcs(unit, *args):
'--source-root', '${ARCADIA_ROOT}',
# set arcadia root relative __file__ for generated modules
'-X', 'set_initial_path={}'.format(filename),
- ] + cython_directives
+ ] + cython_directives
cython(cython_args)
py_register(unit, mod, py3)
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
index 3ecb0f9a83..abe8131904 100644
--- a/build/plugins/rodata.py
+++ b/build/plugins/rodata.py
@@ -1,4 +1,4 @@
-import argparse
+import argparse
import os
import _common as common
@@ -74,21 +74,21 @@ class ROData(iw.CustomCommand):
def output(self):
return common.make_tuples([common.tobuilddir(common.stripext(self._path)) + '.o'])
- def requested_vars(self):
+ def requested_vars(self):
return [('includes', '_ASM__INCLUDE')]
-
- def run(self, extra_args, binary):
+
+ def run(self, extra_args, binary):
in_file = self.resolve_path(common.get(self.input, 0))
in_file_no_ext = common.stripext(in_file)
file_name = os.path.basename(in_file_no_ext)
file_size = os.path.getsize(in_file)
tmp_file = self.resolve_path(common.get(self.output, 0) + '.asm')
- parser = argparse.ArgumentParser(prog='rodata.py', add_help=False)
- parser.add_argument('--includes', help='module\'s addincls', nargs='*', required=False)
- args = parser.parse_args(extra_args)
- self._incl_dirs = args.includes
-
+ parser = argparse.ArgumentParser(prog='rodata.py', add_help=False)
+ parser.add_argument('--includes', help='module\'s addincls', nargs='*', required=False)
+ args = parser.parse_args(extra_args)
+ self._incl_dirs = args.includes
+
with open(tmp_file, 'w') as f:
f.write('global ' + self._prefix + file_name + '\n')
f.write('global ' + self._prefix + file_name + 'Size' + '\n')
@@ -112,7 +112,7 @@ class ROData(iw.CustomCommand):
def incls():
for x in self._incl_dirs:
yield '-I'
- yield x
+ yield x
cmd = [binary, '-f', self._fmt] + list(plt()) + ['-D', '_' + self._type + '_', '-D_YASM_'] + self._flags + list(incls()) + ['-o', common.get(self.output, 0), path]
self.call(cmd)
@@ -135,7 +135,7 @@ class RODataCXX(iw.CustomCommand):
def output(self):
return common.make_tuples([self.main_out()])
- def run(self, extra_args, binary):
+ def run(self, extra_args, binary):
with open(self.resolve_path(self.main_out()), 'w') as f:
f.write('static_assert(sizeof(unsigned int) == 4, "ups, something gone wrong");\n\n')
f.write('extern "C" {\n')
diff --git a/build/plugins/swig.py b/build/plugins/swig.py
index 32a37204a6..ac25088311 100644
--- a/build/plugins/swig.py
+++ b/build/plugins/swig.py
@@ -104,7 +104,7 @@ class Swig(iw.CustomCommand):
def output_includes(self):
return [(self._out_header, [])] if self._swig_lang in ['java', 'jni_cpp'] else []
- def run(self, extra_args, binary):
+ def run(self, extra_args, binary):
if self._local_swig:
binary = self._tool
return self.do_run_java(binary, self._path) if self._swig_lang in ['java', 'jni_cpp', 'jni_java'] else self.do_run(binary, self._path)
diff --git a/build/plugins/xsyn.py b/build/plugins/xsyn.py
index ab7c1639db..47649cb12a 100644
--- a/build/plugins/xsyn.py
+++ b/build/plugins/xsyn.py
@@ -25,7 +25,7 @@ class Xsyn(iw.CustomCommand):
common.tobuilddir(self._path + '.h.rl5')
])
- def run(self, extra_args, interpeter):
+ def run(self, extra_args, interpeter):
self.call(interpeter + [self.resolve_path(common.get(self.input, 0)), self.resolve_path(common.get(self.input, 1)),
self.resolve_path(common.get(self.input, 2)), 'dontuse'], stdout=common.get(self.output, 0))
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index 8970837f0f..3f9183d8b0 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -717,7 +717,7 @@ def onadd_pytest_script(unit, *args):
requirements = get_values_list(unit, 'TEST_REQUIREMENTS_VALUE')
test_data = get_norm_paths(unit, 'TEST_DATA_VALUE')
data, data_files = get_canonical_test_resources(unit)
- test_data += data
+ test_data += data
python_paths = get_values_list(unit, 'TEST_PYTHON_PATH_VALUE')
binary_path = None
test_cwd = unit.get('TEST_CWD_VALUE') or ''
@@ -762,7 +762,7 @@ def add_test_to_dart(unit, test_type, binary_path=None, runner_bin=None):
requirements = get_values_list(unit, 'TEST_REQUIREMENTS_VALUE')
test_data = get_norm_paths(unit, 'TEST_DATA_VALUE')
data, data_files = get_canonical_test_resources(unit)
- test_data += data
+ test_data += data
python_paths = get_values_list(unit, 'TEST_PYTHON_PATH_VALUE')
yt_spec = get_values_list(unit, 'TEST_YT_SPEC_VALUE')
if not binary_path:
@@ -845,7 +845,7 @@ def onjava_test(unit, *args):
'TESTED-PROJECT-NAME': path,
'TEST-ENV': prepare_env(unit.get("TEST_ENV_VALUE")),
# 'TEST-PRESERVE-ENV': 'da',
- 'TEST-DATA': serialize_list(sorted(_common.filter_out_by_keyword(test_data, 'AUTOUPDATED'))),
+ 'TEST-DATA': serialize_list(sorted(_common.filter_out_by_keyword(test_data, 'AUTOUPDATED'))),
'FORK-MODE': unit.get('TEST_FORK_MODE') or '',
'SPLIT-FACTOR': unit.get('TEST_SPLIT_FACTOR') or '',
'CUSTOM-DEPENDENCIES': ' '.join(get_values_list(unit, 'TEST_DEPENDS_VALUE')),
@@ -957,7 +957,7 @@ def _dump_test(
test_cwd=None,
runner_bin=None,
yt_spec=None,
- data_files=None
+ data_files=None
):
if test_type == "PY_TEST":
@@ -1110,4 +1110,4 @@ def _get_external_resources_from_canon_data(data):
def _get_canonical_data_resources_v2(filename, unit_path):
- return (_get_external_resources_from_canon_data(_load_canonical_file(filename, unit_path)), [filename])
+ return (_get_external_resources_from_canon_data(_load_canonical_file(filename, unit_path)), [filename])
diff --git a/build/plugins/ytest2.py b/build/plugins/ytest2.py
index 0a34263c35..3e3226ac5b 100644
--- a/build/plugins/ytest2.py
+++ b/build/plugins/ytest2.py
@@ -27,7 +27,7 @@ def ytest_base(unit, related_prj_dir, related_prj_name, args):
custom_deps = ' '.join(spec_args["DEPENDS"]) if "DEPENDS" in spec_args else ''
unit.set(['CUSTOM-DEPENDENCIES', custom_deps])
data_lst = spec_args.get('DATA', []) + (unit.get(['__test_data']) or '').split(' ')
- data_lst.sort()
+ data_lst.sort()
data = '\"' + ';'.join(data_lst) + '\"' if data_lst else ''
unit.set(['TEST-DATA', data])
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 081833998b..32fc42940f 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -1841,7 +1841,7 @@ module _BASE_UNITTEST: _BASE_PROGRAM {
when ($UT_SKIP_EXCEPTIONS == "yes") {
C_DEFINES+=-DUT_SKIP_EXCEPTIONS
}
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
UNITTEST_SEM=$CPP_PROGRAM_SEM && add_test NAME $REALPRJNAME COMMAND $REALPRJNAME
@@ -1959,7 +1959,7 @@ module BOOSTTEST: _BASE_PROGRAM {
MODULE_SUFFIX=.ios.tar
}
ADD_YTEST($MODULE_PREFIX$REALPRJNAME $BOOST_TEST_TYPE_STRING)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:deprecated
@@ -2157,7 +2157,7 @@ module _BASE_PYTEST: _BASE_PY_PROGRAM {
PEERDIR+=library/python/pytest/empty
}
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:python-specific tag:deprecated tag:test
@@ -2257,7 +2257,7 @@ module GTEST_UGLY: _BASE_PROGRAM {
.FINAL_TARGET=no
PEERDIR(contrib/restricted/googletest/googlemock contrib/restricted/googletest/googletest)
ADD_YTEST($MODULE_PREFIX$REALPRJNAME gtest)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:test
@@ -2293,7 +2293,7 @@ module EXECTEST: _BARE_UNIT {
.RESTRICTED=FORK_TEST_FILES
SET(MODULE_SUFFIX .pkg.fake)
SETUP_EXECTEST()
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:cpp-specific tag:test
@@ -3372,15 +3372,15 @@ macro PY_NAMESPACE(Arg) {
}
# tag:internal
-### @usage: _SRCS_NO_GLOBAL(files...) # internal
-###
+### @usage: _SRCS_NO_GLOBAL(files...) # internal
+###
### Proxy macro to SRCS macro which filters out GLOBAL keyword from the list of source files.
### Useful for modules like EXTERNAL_JAVA_LIBRARY, where GLOBAL keyword cannot be applied properly.
### Note: this macro changes order of source files.
-macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) {
- SRCS($GLOBAL $FILES)
-}
-
+macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) {
+ SRCS($GLOBAL $FILES)
+}
+
# tag:java-specific
JAVA_VCS_MF_ARG=
COMPILE_JAVA_MF=$COMPILE_JAVA
@@ -3413,7 +3413,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
.CMD=COMPILE_JAVA_MF
.PEERDIR_POLICY=as_build_from
.FINAL_TARGET=no
- .ALIASES=SRCS=_SRCS_NO_GLOBAL
+ .ALIASES=SRCS=_SRCS_NO_GLOBAL
.ALLOWED=EMBED_JAVA_VCS_INFO
.RESTRICTED=EXTERNAL_JAR
@@ -5402,7 +5402,7 @@ macro EXTRALIBS_STATIC(Args...) {
macro ADD_COMPILABLE_TRANSLATE(Dict, Name, MakeTransDictOptions...) {
__translatename_lower=${tolower:Name}
__translate_dict=${BINDIR}/transdict.${__translatename_lower}.cpp
- RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT_NOAUTO ${__translate_dict} IN ${Dict})
+ RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT_NOAUTO ${__translate_dict} IN ${Dict})
}
### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...)
@@ -5714,12 +5714,12 @@ macro ADDINCLSELF(FOR="") {
COMPILE_OUT_SUFFIX=
_COMPILE_OUTPUTS=${output;suf=${COMPILE_OUT_SUFFIX}${OBJECT_SUF}:SRC}
_COMPILE_TIME_TRACE_OUTPUTS=${output;noauto;suf=${COMPILE_OUT_SUFFIX}${OBJECT_SUF}.time_trace.json:SRC}
-
-macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"") {
- SET(_COMPILE_OUTPUTS \${output;suf=\${OBJECT_SUF}$NOREL:SRC})
+
+macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"") {
+ SET(_COMPILE_OUTPUTS \${output;suf=\${OBJECT_SUF}$NOREL:SRC})
SET(_COMPILE_TIME_TRACE_OUTPUTS \${output;noauto;suf=\${OBJECT_SUF}.time_trace.json$NOREL:SRC})
-}
-
+}
+
_EMPTY_CMD=
# tag:src-processing tag:internal
@@ -5880,7 +5880,7 @@ macro _SRC("in", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("sc", SRC, SRCFLAGS...) {
- .CMD=${tool:"tools/domschemec"} --in ${input:SRC} --out ${output;norel:SRC.h} ${output_include;hide:"util/generic/strbuf.h"} ${output_include;hide:"util/generic/string.h"} ${output_include;hide:"util/generic/vector.h"} ${output_include;hide:"util/string/cast.h"} ${SRCFLAGS} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"}
+ .CMD=${tool:"tools/domschemec"} --in ${input:SRC} --out ${output;norel:SRC.h} ${output_include;hide:"util/generic/strbuf.h"} ${output_include;hide:"util/generic/string.h"} ${output_include;hide:"util/generic/vector.h"} ${output_include;hide:"util/string/cast.h"} ${SRCFLAGS} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"}
}
# tag:src-processing
@@ -6480,7 +6480,7 @@ DECIMAL_MD5_FIXED=
### Generates .cpp file <fileName> with one defined function 'const char* <funcName>() { return "<calculated_md5_hash>"; }'.
### <calculated_md5_hash> will be md5 hash for all inputs passed to this macro.
macro DECIMAL_MD5_LOWER_32_BITS(File, FUNCNAME="", Opts...) {
- .CMD=$YMAKE_PYTHON ${input:DECIMAL_MD5_SCRIPT} --fixed-output=${DECIMAL_MD5_FIXED} --func-name=${FUNCNAME} --lower-bits 32 --source-root=$ARCADIA_ROOT ${input;context=TEXT:Opts} ${output;stdout;chksum:File} ${kv;hide:"p SV"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"}
+ .CMD=$YMAKE_PYTHON ${input:DECIMAL_MD5_SCRIPT} --fixed-output=${DECIMAL_MD5_FIXED} --func-name=${FUNCNAME} --lower-bits 32 --source-root=$ARCADIA_ROOT ${input;context=TEXT:Opts} ${output;stdout;chksum:File} ${kv;hide:"p SV"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"}
}
# tag:internal
@@ -8666,7 +8666,7 @@ module GO_TEST: GO_PROGRAM {
ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.test)
ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.bench)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:go-specific
@@ -8960,12 +8960,12 @@ otherwise {
}
# tag:frontend-specific
-### @usage: COLLECT_FRONTEND_FILES(Varname, Dir)
+### @usage: COLLECT_FRONTEND_FILES(Varname, Dir)
###
-### Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
-macro COLLECT_FRONTEND_FILES(Varname, Dir) {
+### Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
+macro COLLECT_FRONTEND_FILES(Varname, Dir) {
_GLOB($Varname $Dir/**/*.(css|ejs|jpg|js|jsx|png|styl|svg|ts|tsx|json|html))
-}
+}
# tag:java-specific
# local jdk and tools