diff options
author | mvel <mvel@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
commit | 43f5a35593ebc9f6bcea619bb170394ea7ae468e (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /build/plugins | |
parent | bd30392c4cc92487950adc375c07adf52da1d592 (diff) | |
download | ydb-43f5a35593ebc9f6bcea619bb170394ea7ae468e.tar.gz |
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins')
-rw-r--r-- | build/plugins/split_codegen.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/build/plugins/split_codegen.py b/build/plugins/split_codegen.py index 2e6cecbca1..f1e60bc142 100644 --- a/build/plugins/split_codegen.py +++ b/build/plugins/split_codegen.py @@ -1,11 +1,11 @@ from _common import sort_by_keywords -# This hard-coded many times in CppParts in various codegens -_DEFAULT_CPP_PARTS = 20 -# See TCodegenParams::MethodStream usage in factor codegen -_ADDITIONAL_STREAM_COUNT = 5 +# This hard-coded many times in CppParts in various codegens +_DEFAULT_CPP_PARTS = 20 +# See TCodegenParams::MethodStream usage in factor codegen +_ADDITIONAL_STREAM_COUNT = 5 + - def onsplit_codegen(unit, *args): ''' @usage: SPLIT_CODEGEN(tool prefix opts... [OUT_NUM num] [OUTPUT_INCLUDES output_includes...]) @@ -19,10 +19,10 @@ def onsplit_codegen(unit, *args): keywords = {"OUT_NUM": 1} flat_args, spec_args = sort_by_keywords(keywords, args) - num_outputs = _DEFAULT_CPP_PARTS + _ADDITIONAL_STREAM_COUNT - if "OUT_NUM" in spec_args: - num_outputs = int(spec_args["OUT_NUM"][0]) - + num_outputs = _DEFAULT_CPP_PARTS + _ADDITIONAL_STREAM_COUNT + if "OUT_NUM" in spec_args: + num_outputs = int(spec_args["OUT_NUM"][0]) + tool = flat_args[0] prefix = flat_args[1] @@ -30,14 +30,14 @@ def onsplit_codegen(unit, *args): for num in range(num_outputs): cmd.append('{}.{}.cpp'.format(prefix, num)) - cpp_parts = int(num_outputs) - _ADDITIONAL_STREAM_COUNT - cpp_parts_args = ['--cpp-parts', str(cpp_parts)] - + cpp_parts = int(num_outputs) - _ADDITIONAL_STREAM_COUNT + cpp_parts_args = ['--cpp-parts', str(cpp_parts)] + if len(flat_args) > 2: if flat_args[2] != 'OUTPUT_INCLUDES': cmd.append('OPTS') - cmd += cpp_parts_args + flat_args[2:] - else: - cmd += ['OPTS'] + cpp_parts_args + cmd += cpp_parts_args + flat_args[2:] + else: + cmd += ['OPTS'] + cpp_parts_args unit.on_split_codegen_base(cmd) |