diff options
author | workfork <workfork@yandex-team.ru> | 2022-02-10 16:46:43 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:43 +0300 |
commit | 89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /build | |
parent | c3745173272d1cf5b0642debb40d019e7ae71094 (diff) | |
download | ydb-89db6fe2fe2c32d2a832ddfeb04e8d078e301084.tar.gz |
Restoring authorship annotation for <workfork@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build')
-rw-r--r-- | build/platform/binutils/ya.make | 2 | ||||
-rw-r--r-- | build/platform/clang/ya.make | 2 | ||||
-rw-r--r-- | build/platform/yfm/ya.make | 4 | ||||
-rw-r--r-- | build/plugins/docs.py | 54 | ||||
-rw-r--r-- | build/plugins/ya.make | 2 | ||||
-rw-r--r-- | build/scripts/build_dll_and_java.py | 2 | ||||
-rw-r--r-- | build/scripts/clang_wrapper.py | 78 | ||||
-rw-r--r-- | build/scripts/collect_java_srcs.py | 2 | ||||
-rwxr-xr-x | build/scripts/fetch_from_sandbox.py | 2 | ||||
-rw-r--r-- | build/scripts/fs_tools.py | 6 | ||||
-rw-r--r-- | build/scripts/generate_mf.py | 96 | ||||
-rw-r--r-- | build/scripts/link_exe.py | 12 | ||||
-rw-r--r-- | build/scripts/llvm_opt_wrapper.py | 6 | ||||
-rw-r--r-- | build/scripts/tar_directory.py | 48 | ||||
-rw-r--r-- | build/scripts/ya.make | 2 | ||||
-rw-r--r-- | build/ya.conf.json | 140 | ||||
-rw-r--r-- | build/ymake.core.conf | 156 | ||||
-rwxr-xr-x | build/ymake_conf.py | 4 |
18 files changed, 309 insertions, 309 deletions
diff --git a/build/platform/binutils/ya.make b/build/platform/binutils/ya.make index e650d82ffd..aedcb12f23 100644 --- a/build/platform/binutils/ya.make +++ b/build/platform/binutils/ya.make @@ -1,6 +1,6 @@ RESOURCES_LIBRARY() -OWNER(g:contrib somov) +OWNER(g:contrib somov) INCLUDE(binutils.resource) diff --git a/build/platform/clang/ya.make b/build/platform/clang/ya.make index 13006f029f..342b928637 100644 --- a/build/platform/clang/ya.make +++ b/build/platform/clang/ya.make @@ -2,7 +2,7 @@ RESOURCES_LIBRARY() LICENSE(BSD-3-Clause) -OWNER(g:contrib) +OWNER(g:contrib) IF (CLANG10BC AND CLANG10 AND HOST_OS_LINUX) DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( diff --git a/build/platform/yfm/ya.make b/build/platform/yfm/ya.make index 5d92132ad1..ece089e998 100644 --- a/build/platform/yfm/ya.make +++ b/build/platform/yfm/ya.make @@ -1,5 +1,5 @@ OWNER( - workfork + workfork ) RESOURCES_LIBRARY() @@ -16,4 +16,4 @@ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( sbr:2614617315 FOR WIN32 ) -END() +END() diff --git a/build/plugins/docs.py b/build/plugins/docs.py index a144b1772b..760fe3af7f 100644 --- a/build/plugins/docs.py +++ b/build/plugins/docs.py @@ -1,34 +1,34 @@ -import json - - -def extract_macro_calls(unit, macro_value_name): - if not unit.get(macro_value_name): - return [] - - return filter(None, unit.get(macro_value_name).replace('$' + macro_value_name, '').split()) - - -def macro_calls_to_dict(unit, calls): - def split_args(arg): - if arg is None: - return None - - kv = filter(None, arg.split('=')) - if len(kv) != 2: - unit.message(['error', 'Invalid variables specification "{}": value expected to be in form %name%=%value% (with no spaces)'.format(arg)]) - return None - - return kv - - return dict(filter(None, map(split_args, calls))) - - -def onprocess_docs(unit, *args): +import json + + +def extract_macro_calls(unit, macro_value_name): + if not unit.get(macro_value_name): + return [] + + return filter(None, unit.get(macro_value_name).replace('$' + macro_value_name, '').split()) + + +def macro_calls_to_dict(unit, calls): + def split_args(arg): + if arg is None: + return None + + kv = filter(None, arg.split('=')) + if len(kv) != 2: + unit.message(['error', 'Invalid variables specification "{}": value expected to be in form %name%=%value% (with no spaces)'.format(arg)]) + return None + + return kv + + return dict(filter(None, map(split_args, calls))) + + +def onprocess_docs(unit, *args): build_tool = unit.get('_DOCS_BUILDER_VALUE') if build_tool: if build_tool not in ['mkdocs', 'yfm']: unit.message(['error', 'Unsupported build tool {}'.format(build_tool)]) - else: + else: build_tool = 'yfm' unit.ondocs_builder([build_tool]) if build_tool == 'yfm' and unit.enabled('_DOCS_USE_PLANTUML'): diff --git a/build/plugins/ya.make b/build/plugins/ya.make index 7ae3dc13b1..4ad5f5988e 100644 --- a/build/plugins/ya.make +++ b/build/plugins/ya.make @@ -1,4 +1,4 @@ -OWNER(g:ymake) +OWNER(g:ymake) PY2_LIBRARY() diff --git a/build/scripts/build_dll_and_java.py b/build/scripts/build_dll_and_java.py index f857875f2a..b9d8aff4df 100644 --- a/build/scripts/build_dll_and_java.py +++ b/build/scripts/build_dll_and_java.py @@ -36,7 +36,7 @@ def just_do_it(argv): inp = os.path.join(build_root, inp) if sys.platform == 'win32': inp = inp.replace('\\', '/') - dll_cmd.remove(inp) + dll_cmd.remove(inp) java_cmd.insert(java_cmd.index(dll_out), java_out) java_cmd.remove(dll_out) subprocess.check_call(java_cmd) diff --git a/build/scripts/clang_wrapper.py b/build/scripts/clang_wrapper.py index 844ae856d6..af3869f789 100644 --- a/build/scripts/clang_wrapper.py +++ b/build/scripts/clang_wrapper.py @@ -1,4 +1,4 @@ -import subprocess +import subprocess import sys @@ -6,48 +6,48 @@ def fix(s): # disable dbg DEVTOOLS-2744 if s == '-g': return None - if s == '/Z7' or s == '/Od' or s == '/Ob0' or s == '/D_DEBUG': - return None - - # disable sanitizers for generated code - if s.startswith('-fsanitize') or s == '-Dmemory_sanitizer_enabled' or s.startswith('-fsanitize-blacklist'): - return None - - # strip gcc toolchain flags (appear when crosscompiling) - if s.startswith('-fabi-version'): - return None - + if s == '/Z7' or s == '/Od' or s == '/Ob0' or s == '/D_DEBUG': + return None + + # disable sanitizers for generated code + if s.startswith('-fsanitize') or s == '-Dmemory_sanitizer_enabled' or s.startswith('-fsanitize-blacklist'): + return None + + # strip gcc toolchain flags (appear when crosscompiling) + if s.startswith('-fabi-version'): + return None + # remove arguments unknown to clang-cl if s == '-fcase-insensitive-paths': # or s == '-fno-lto': # DEVTOOLSSUPPORT-3966 return None - # Paths under .ya/tools/v3/.../msvc/include are divided with '\' - return s.replace('\\', '/') + # Paths under .ya/tools/v3/.../msvc/include are divided with '\' + return s.replace('\\', '/') + + +def fix_path(p): + try: + i = p.rfind('/bin/clang') + p = p[:i] + '/bin/clang-cl' + except ValueError: + pass + return p -def fix_path(p): - try: - i = p.rfind('/bin/clang') - p = p[:i] + '/bin/clang-cl' - except ValueError: - pass - return p - - if __name__ == '__main__': - is_on_win = sys.argv[1] == 'yes' - path = sys.argv[2] - args = filter(None, [fix(s) for s in sys.argv[3:]]) - if is_on_win: - path = fix_path(path) - try: - i = args.index('-emit-llvm') - args[i:i+1] = ['-Xclang', '-emit-llvm'] - except ValueError: - pass - args.append('-fms-compatibility-version=19') - - cmd = [path] + args - - rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=sys.stdout) - sys.exit(rc) + is_on_win = sys.argv[1] == 'yes' + path = sys.argv[2] + args = filter(None, [fix(s) for s in sys.argv[3:]]) + if is_on_win: + path = fix_path(path) + try: + i = args.index('-emit-llvm') + args[i:i+1] = ['-Xclang', '-emit-llvm'] + except ValueError: + pass + args.append('-fms-compatibility-version=19') + + cmd = [path] + args + + rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=sys.stdout) + sys.exit(rc) diff --git a/build/scripts/collect_java_srcs.py b/build/scripts/collect_java_srcs.py index 5e9adb136d..170002520a 100644 --- a/build/scripts/collect_java_srcs.py +++ b/build/scripts/collect_java_srcs.py @@ -44,7 +44,7 @@ if __name__ == '__main__': tf.extractall(dst) elif src.endswith('-sources.jar'): - with zipfile.ZipFile(src) as zf: + with zipfile.ZipFile(src) as zf: zf.extractall(dst) else: diff --git a/build/scripts/fetch_from_sandbox.py b/build/scripts/fetch_from_sandbox.py index ab35f9e719..a99542e174 100755 --- a/build/scripts/fetch_from_sandbox.py +++ b/build/scripts/fetch_from_sandbox.py @@ -24,7 +24,7 @@ def parse_args(): parser.add_argument('--resource-id', type=int, required=True) parser.add_argument('--custom-fetcher') parser.add_argument('--resource-file') - return parser.parse_args() + return parser.parse_args() class ResourceInfoError(Exception): diff --git a/build/scripts/fs_tools.py b/build/scripts/fs_tools.py index beb916831e..dec4c349c8 100644 --- a/build/scripts/fs_tools.py +++ b/build/scripts/fs_tools.py @@ -29,9 +29,9 @@ if __name__ == '__main__': if mode == 'copy': shutil.copy(args[0], args[1]) - elif mode == 'copy_tree_no_link': - dst = args[1] - shutil.copytree(args[0], dst, ignore=lambda dirname, names: [n for n in names if os.path.islink(os.path.join(dirname, n))]) + elif mode == 'copy_tree_no_link': + dst = args[1] + shutil.copytree(args[0], dst, ignore=lambda dirname, names: [n for n in names if os.path.islink(os.path.join(dirname, n))]) elif mode == 'copy_files': src = args[0] dst = args[1] diff --git a/build/scripts/generate_mf.py b/build/scripts/generate_mf.py index 76997020cc..a44a969980 100644 --- a/build/scripts/generate_mf.py +++ b/build/scripts/generate_mf.py @@ -1,20 +1,20 @@ -import json -import logging -import optparse -import os -import sys +import json +import logging +import optparse +import os +import sys import io - + import process_command_files as pcf - -class BadMfError(Exception): - pass - - -class GplNotAllowed(Exception): - pass - - + +class BadMfError(Exception): + pass + + +class GplNotAllowed(Exception): + pass + + def process_quotes(s): for quote_char in '\'"': if s.startswith(quote_char) and s.endswith(quote_char): @@ -22,40 +22,40 @@ def process_quotes(s): return s -def parse_args(): +def parse_args(): args = pcf.get_args(sys.argv[1:]) lics, peers, free_args, credits = [], [], [], [] - current_list = free_args - for a in args: - if a == '-Ya,lics': - current_list = lics - elif a == '-Ya,peers': - current_list = peers + current_list = free_args + for a in args: + if a == '-Ya,lics': + current_list = lics + elif a == '-Ya,peers': + current_list = peers elif a == '-Ya,credits': current_list = credits - elif a and a.startswith('-'): - current_list = free_args - current_list.append(a) - else: - current_list.append(a) - - parser = optparse.OptionParser() - parser.add_option('--build-root') - parser.add_option('--module-name') - parser.add_option('-o', '--output') + elif a and a.startswith('-'): + current_list = free_args + current_list.append(a) + else: + current_list.append(a) + + parser = optparse.OptionParser() + parser.add_option('--build-root') + parser.add_option('--module-name') + parser.add_option('-o', '--output') parser.add_option('-c', '--credits-output') - parser.add_option('-t', '--type') - opts, _ = parser.parse_args(free_args) + parser.add_option('-t', '--type') + opts, _ = parser.parse_args(free_args) return lics, peers, credits, opts, - - + + def generate_header(meta): return '-' * 20 + meta.get('path', 'Unknown module') + '-' * 20 -def generate_mf(): +def generate_mf(): lics, peers, credits, options = parse_args() - + meta = { 'module_name': options.module_name, 'path': os.path.dirname(options.output), @@ -63,16 +63,16 @@ def generate_mf(): 'dependencies': [], 'license_texts': '' } - - build_root = options.build_root - file_name = os.path.join(build_root, options.output) - + + build_root = options.build_root + file_name = os.path.join(build_root, options.output) + if options.type != 'LIBRARY': for rel_filename in peers: with open(os.path.join(build_root, rel_filename + '.mf')) as peer_file: peer_meta = json.load(peer_file) meta['dependencies'].append(peer_meta) - + if credits: union_texts = [] for texts_file in credits: @@ -101,11 +101,11 @@ def generate_mf(): data = data.decode('utf-8') f.write(data) - with open(file_name, 'w') as mf_file: - json.dump(meta, mf_file, indent=4) - - -if __name__ == '__main__': + with open(file_name, 'w') as mf_file: + json.dump(meta, mf_file, indent=4) + + +if __name__ == '__main__': try: generate_mf() except Exception as e: diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py index 387f3153e7..f469e3b442 100644 --- a/build/scripts/link_exe.py +++ b/build/scripts/link_exe.py @@ -1,9 +1,9 @@ -import sys -import subprocess +import sys +import subprocess import optparse - + from process_whole_archive_option import ProcessWholeArchiveOption - + def get_leaks_suppressions(cmd): supp, newcmd = [], [] @@ -57,7 +57,7 @@ def parse_args(): return parser.parse_args() -if __name__ == '__main__': +if __name__ == '__main__': opts, args = parse_args() cmd = fix_cmd(opts.musl, args) @@ -79,4 +79,4 @@ if __name__ == '__main__': stdout = sys.stdout rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=stdout) - sys.exit(rc) + sys.exit(rc) diff --git a/build/scripts/llvm_opt_wrapper.py b/build/scripts/llvm_opt_wrapper.py index 73f2e1adad..38ca3004af 100644 --- a/build/scripts/llvm_opt_wrapper.py +++ b/build/scripts/llvm_opt_wrapper.py @@ -1,4 +1,4 @@ -import subprocess +import subprocess import sys @@ -14,5 +14,5 @@ if __name__ == '__main__': path = sys.argv[1] args = [fix(s) for s in [path] + sys.argv[2:]] - rc = subprocess.call(args, shell=False, stderr=sys.stderr, stdout=sys.stdout) - sys.exit(rc) + rc = subprocess.call(args, shell=False, stderr=sys.stderr, stdout=sys.stdout) + sys.exit(rc) diff --git a/build/scripts/tar_directory.py b/build/scripts/tar_directory.py index 51ff079f5a..a91889fa22 100644 --- a/build/scripts/tar_directory.py +++ b/build/scripts/tar_directory.py @@ -9,35 +9,35 @@ def is_exe(fpath): def main(args): if len(args) < 2 or len(args) > 3: - raise Exception("Illegal usage: `tar_directory.py archive.tar directory [skip prefix]` or `tar_directory.py archive.tar output_directory --extract`") - tar, directory, prefix, extract = args[0], args[1], None, False + raise Exception("Illegal usage: `tar_directory.py archive.tar directory [skip prefix]` or `tar_directory.py archive.tar output_directory --extract`") + tar, directory, prefix, extract = args[0], args[1], None, False if len(args) == 3: - if args[2] == '--extract': - extract = True - else: - prefix = args[2] + if args[2] == '--extract': + extract = True + else: + prefix = args[2] for tar_exe in ('/usr/bin/tar', '/bin/tar'): - if not is_exe(tar_exe): - continue - if extract: - dest = os.path.abspath(directory) - if not os.path.exists(dest): - os.makedirs(dest) - os.execv(tar_exe, [tar_exe, '-xf', tar, '-C', dest]) - else: - source = os.path.relpath(directory, prefix) if prefix else directory + if not is_exe(tar_exe): + continue + if extract: + dest = os.path.abspath(directory) + if not os.path.exists(dest): + os.makedirs(dest) + os.execv(tar_exe, [tar_exe, '-xf', tar, '-C', dest]) + else: + source = os.path.relpath(directory, prefix) if prefix else directory os.execv(tar_exe, [tar_exe, '-cf', tar] + (['-C', prefix] if prefix else []) + [source]) - break + break else: - if extract: - dest = os.path.abspath(directory) - if not os.path.exists(dest): - os.makedirs(dest) - with tarfile.open(tar, 'r') as tar_file: - tar_file.extractall(dest) - else: + if extract: + dest = os.path.abspath(directory) + if not os.path.exists(dest): + os.makedirs(dest) + with tarfile.open(tar, 'r') as tar_file: + tar_file.extractall(dest) + else: source = directory - with tarfile.open(tar, 'w') as out: + with tarfile.open(tar, 'w') as out: out.add(os.path.abspath(source), arcname=os.path.relpath(source, prefix) if prefix else source) diff --git a/build/scripts/ya.make b/build/scripts/ya.make index 7454dc3e2a..710165e40d 100644 --- a/build/scripts/ya.make +++ b/build/scripts/ya.make @@ -1,4 +1,4 @@ -OWNER(g:ymake) +OWNER(g:ymake) PY2TEST() diff --git a/build/ya.conf.json b/build/ya.conf.json index ec958e4d0c..5f7cc875d6 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -357,9 +357,9 @@ "yd-migrate": { "description": "Run deploy migration" }, - "yfm-docs": { - "description": "YFM-extended markdown processor for Cloud deploy (v3)" - }, + "yfm-docs": { + "description": "YFM-extended markdown processor for Cloud deploy (v3)" + }, "aws": { "description": "Run aws" }, @@ -3352,8 +3352,8 @@ } ] }, - "svn110": { - "tools": { + "svn110": { + "tools": { "svn": { "bottle": "svn110", "executable": "svn" @@ -3370,8 +3370,8 @@ "bottle": "svn110", "executable": "svnversion" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3390,16 +3390,16 @@ "default": true } } - ] - }, - "zipatcher": { - "tools": { + ] + }, + "zipatcher": { + "tools": { "zipatcher": { "bottle": "zipatcher", "executable": "zipatcher" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3412,8 +3412,8 @@ }, "default": true } - ] - }, + ] + }, "cmake": { "tools": { "cmake": { @@ -4824,7 +4824,7 @@ "type": "golang", "version": "1.17.6" } - }, + }, "golang_1_18beta2": { "tools": { "golang_1.18beta2": { @@ -5236,34 +5236,34 @@ } ] }, - "yfm-docs": { - "tools": { - "yfm-docs": { - "bottle": "yfm-docs", - "executable": "yfm-docs" - } - }, - "platforms": [ - { - "host": { - "os": "LINUX" - }, - "default": true - }, - { - "host": { - "os": "DARWIN" - }, - "default": true - }, - { - "host": { - "os": "WIN" - }, - "default": true - } - ] - }, + "yfm-docs": { + "tools": { + "yfm-docs": { + "bottle": "yfm-docs", + "executable": "yfm-docs" + } + }, + "platforms": [ + { + "host": { + "os": "LINUX" + }, + "default": true + }, + { + "host": { + "os": "DARWIN" + }, + "default": true + }, + { + "host": { + "os": "WIN" + }, + "default": true + } + ] + }, "aws": { "tools": { "aws": { @@ -6963,12 +6963,12 @@ ] } }, - "svn110": { - "formula": { - "sandbox_id": 368201676, - "match": "svn" - }, - "executable": { + "svn110": { + "formula": { + "sandbox_id": 368201676, + "match": "svn" + }, + "executable": { "svn": [ "svn" ], @@ -6981,19 +6981,19 @@ "svnversion": [ "svnversion" ] - } - }, - "zipatcher": { - "formula": { + } + }, + "zipatcher": { + "formula": { "sandbox_id": 897674372, - "match": "zipatcher" - }, - "executable": { + "match": "zipatcher" + }, + "executable": { "zipatcher": [ "zipatcher" ] - } - }, + } + }, "cmake": { "formula": { "sandbox_id": 105454515, @@ -7417,7 +7417,7 @@ "gofmt" ] } - }, + }, "qemu": { "formula": { "sandbox_id": [ @@ -7723,17 +7723,17 @@ ] } }, - "yfm-docs": { - "formula": { + "yfm-docs": { + "formula": { "sandbox_id": 1150530779, - "match": "yfm-docs" - }, - "executable": { - "yfm-docs": [ - "yfm-docs" - ] - } - }, + "match": "yfm-docs" + }, + "executable": { + "yfm-docs": [ + "yfm-docs" + ] + } + }, "aws": { "formula": { "sandbox_id": 489186634, diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 3ee8287185..081833998b 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -1094,12 +1094,12 @@ macro _JAVA_FLATC_CMD(SRC) { .PEERDIR=contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION} } -# variables must be defined for all module types to make generate_mf.py work -MODULE_PREFIX= -MODULE_SUFFIX= +# variables must be defined for all module types to make generate_mf.py work +MODULE_PREFIX= +MODULE_SUFFIX= NEED_PLATFORM_PEERDIRS=yes PEERDIR_TEST_TOOL=yes - + # tag:python-specific PYTHON2=no PYTHON3=no @@ -1695,7 +1695,7 @@ module _PY2_PROGRAM: _BASE_PY_PROGRAM { ### ### Deprecated. Use PY3_PROGRAM instead. ### Python 2.x binary program. Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable. -### If name is not specified it will be generated from the name of the containing project directory. +### If name is not specified it will be generated from the name of the containing project directory. ### This only compatible with PYTHON2-tagged modules and selects those from multimodules. ### ### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/ @@ -1851,7 +1851,7 @@ UNITTEST_SEM=$CPP_PROGRAM_SEM && add_test NAME $REALPRJNAME COMMAND $REALPRJNAME ### Unit test module based on library/cpp/testing/unittest. ### It is recommended not to specify the name. ### -### Documentation: https://wiki.yandex-team.ru/yatool/test/#opisanievya.make1 +### Documentation: https://wiki.yandex-team.ru/yatool/test/#opisanievya.make1 module UNITTEST: _BASE_UNITTEST { .SEM=UNITTEST_SEM PEERDIR(library/cpp/testing/unittest_main) @@ -2048,12 +2048,12 @@ macro DATA(Data...) { # tag:test TEST_TAGS_VALUE= -### @usage: TAG ([tag...]) +### @usage: TAG ([tag...]) ### -### Each test can have one or more tags used to filter tests list for running. -### There are also special tags affecting test behaviour, for example ya:external, sb:ssd. +### Each test can have one or more tags used to filter tests list for running. +### There are also special tags affecting test behaviour, for example ya:external, sb:ssd. ### -### Documentation: https://wiki.yandex-team.ru/yatool/test/#obshhieponjatija +### Documentation: https://wiki.yandex-team.ru/yatool/test/#obshhieponjatija macro TAG(Tags...) { SET_APPEND(TEST_TAGS_VALUE $Tags) } @@ -2298,7 +2298,7 @@ module EXECTEST: _BARE_UNIT { # tag:cpp-specific tag:test ### @usage: Y_BENCHMARK([benchmarkname]) -### +### ### Benchmark test based on the library/cpp/testing/benchmark. ### ### For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark @@ -2457,7 +2457,7 @@ module LIBRARY: _LIBRARY { when ($HAS_CPP_PROTOBUF_PEERS == "yes") { PEERDIR+=$CPP_PROTOBUF_PEERS } - SET(MODULE_TYPE LIBRARY) + SET(MODULE_TYPE LIBRARY) SET(MODULE_LANG CPP) ADD_CLANG_TIDY() @@ -2793,13 +2793,13 @@ macro DYNAMIC_LIBRARY_FROM(Path...) { } -### @usage: DLL(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix]) +### @usage: DLL(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix]) ### ### Dynamic library module defintion. -### 1. major_ver and minor_ver must be integers. +### 1. major_ver and minor_ver must be integers. ### 2. EXPORTS allows you to explicitly specify the list of exported functions. This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files -### 3. PREFIX allows you to change the prefix of the output file (default DLL has the prefix "lib"). -### +### 3. PREFIX allows you to change the prefix of the output file (default DLL has the prefix "lib"). +### ### DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed). module DLL: DLL_UNIT { SET(MAKE_ONLY_SHARED_LIB yes) @@ -3000,8 +3000,8 @@ macro PACKAGE_STRICT() { ### @usage: PACKAGE(name) ### -### Module collects what is described directly inside it, builds and collects all its transitively available PEERDIRs. -### As a result, build directory of the project gets the structure of the accessible part of Arcadia, where the build result of each PEERDIR is placed to relevant Arcadia subpath. +### Module collects what is described directly inside it, builds and collects all its transitively available PEERDIRs. +### As a result, build directory of the project gets the structure of the accessible part of Arcadia, where the build result of each PEERDIR is placed to relevant Arcadia subpath. ### The data can be optionally packed if macro PACK() is used. ### ### Is only used together with the macros FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a PACKAGE. @@ -3010,7 +3010,7 @@ macro PACKAGE_STRICT() { ### ### @see: [PACK()](#macro_PACK) module PACKAGE: _BASE_UNIT { - .CMD=TOUCH_PACKAGE_MF + .CMD=TOUCH_PACKAGE_MF .PEERDIR_POLICY=as_build_from .ALL_INS_TO_OUT=yes .FINAL_TARGET=yes @@ -3043,10 +3043,10 @@ module CI_GROUP: _BARE_UNIT { PEERDIR_TAGS=CPP_PROTO PY3 PY3_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE DLL } -TOUCH_UNIT_MF=$TOUCH_UNIT && $GENERATE_MF -TOUCH_DOCS=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p DC"} ${kv;hide:"pc light-cyan"} $TARGET -TOUCH_DOCS_MF=$TOUCH_DOCS && $GENERATE_MF - +TOUCH_UNIT_MF=$TOUCH_UNIT && $GENERATE_MF +TOUCH_DOCS=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p DC"} ${kv;hide:"pc light-cyan"} $TARGET +TOUCH_DOCS_MF=$TOUCH_DOCS && $GENERATE_MF + # tag:proto ### @usage: RESOLVE_PROTO() ### @@ -3062,11 +3062,11 @@ macro RESOLVE_PROTO() { } ### @usage: UNION(name) -### +### ### Collection of PEERDIR dependencies, files and artifacts. ### UNION doesn't build its peers, just provides those to modules depending on it. ### When specied in DEPENDS() macro the UNION is transitively closed, building all its peers and providing those by own paths (without adding this module path like PACKAGE does). -### +### ### Is only used together with the macros like FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a UNION. ### ### Documentation: https://wiki.yandex-team.ru/yatool/large-data/ @@ -3076,7 +3076,7 @@ module UNION: _BASE_UNIT { NO_PLATFORM() SET(MODULE_SUFFIX .pkg.fake) SET(DONT_RESOLVE_INCLUDES yes) - .CMD=TOUCH_UNIT_MF + .CMD=TOUCH_UNIT_MF SET(NEED_PLATFORM_PEERDIRS no) PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNABLE PY3_BIN DLL } @@ -3237,7 +3237,7 @@ macro _DOCS_YFM_USE_PLANTUML() { } # tag:docs -### @usage: DOCS() +### @usage: DOCS() ### ### Documentation project multimodule. ### @@ -3245,27 +3245,27 @@ macro _DOCS_YFM_USE_PLANTUML() { ### When PEERDIRed from other DOCS() module behaves like a UNION (supplying own content and dependencies to build target). ### Peerdirs from modules other than DOCS are not accepted. ### Most usual macros are not accepted, only used with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS(), DOCS_BUILDER(). -### +### ### @see: [DOCS_DIR()](#macro_DOCS_DIR), [DOCS_CONFIG()](#macro_DOCS_CONFIG), [DOCS_VARS()](#macro_DOCS_VARS), [DOCS_BUILDER()](#macro_DOCS_BUILDER). -multimodule DOCS { +multimodule DOCS { module DOCSBOOK: _DOCS_BASE_UNIT { .CMD=_DOCS_BOOK_CMD .EPILOGUE=_DOCS_EPILOGUE - .FINAL_TARGET=yes + .FINAL_TARGET=yes .PEERDIR_POLICY=as_build_from ENABLE(DOCSBOOK) SET(MODULE_TYPE PROGRAM) - SET(PEERDIR_TAGS DOCSLIB) - SET(MODULE_TAG DOCBOOK) + SET(PEERDIR_TAGS DOCSLIB) + SET(MODULE_TAG DOCBOOK) _DOCS_YFM_OUTPUT_FORMAT=$_DOCS_YFM_BOOK_OUTPUT_FORMAT _DOCS_MKDOCS_CMDLINE_SUFFIX=$_DOCS_MKDOCS_BOOK_CMDLINE_SUFFIX _DOCS_COMMON_PROCESS_DEPS=$_DOCS_COMMON_BOOK_PROCESS_DEPS - PROCESS_DOCS() - } + PROCESS_DOCS() + } module DOCSLIB: _DOCS_BASE_UNIT { .CMD=_DOCS_LIB_CMD @@ -3275,8 +3275,8 @@ multimodule DOCS { ENABLE(DOCSLIB) SET(MODULE_TYPE LIBRARY) - SET(PEERDIR_TAGS DOCSLIB) - SET(MODULE_TAG DOCSLIB) + SET(PEERDIR_TAGS DOCSLIB) + SET(MODULE_TAG DOCSLIB) REALPRJNAME=preprocessed @@ -3285,9 +3285,9 @@ multimodule DOCS { _DOCS_COMMON_PROCESS_DEPS=$_DOCS_COMMON_LIB_PROCESS_DEPS PROCESS_DOCS() - } -} - + } +} + # tag:docs _DOCS_USE_PLANTUML= ### @usage: USE_PLANTUML() @@ -3298,11 +3298,11 @@ macro USE_PLANTUML() { } # tag:docs -DOCSBUILDER=yfm +DOCSBUILDER=yfm ### @usage: DOCS_BUILDER(tool) ### ### Specify docs builder tool. -### Avalialbe tools: mkdocs and yfm (by default). +### Avalialbe tools: mkdocs and yfm (by default). ### ### @see: [DOCS](#multimodule_DOCS) macro DOCS_BUILDER(DocsTool) { @@ -3313,52 +3313,52 @@ macro DOCS_BUILDER(DocsTool) { ### @usage: DOCS_DIR(path) ### ### Specify directory with source .md files for DOCS multimodule if it differs from project directory. -### Path must be Arcadia root relative. +### Path must be Arcadia root relative. ### ### @see: [DOCS](#multimodule_DOCS) -macro DOCS_DIR(Dir) { +macro DOCS_DIR(Dir) { SET(_DOCS_DIR_VALUE $Dir) -} - +} + # tag:docs _DOCS_DEFAULT_CONFIG= _DOCS_CONFIG_VALUE=$_DOCS_DEFAULT_CONFIG ### @usage: DOCS_CONFIG(path) ### -### Specify path to config file for DOCS multimodule if it differs from default path. -### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is set to "mkdocs" the default path is "%%project_directory%%/mkdocs.yml". -### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is not set or set to "yfm" the default path is "%%project_directory%%/.yfm". -### Path must be either Arcadia root relative. +### Specify path to config file for DOCS multimodule if it differs from default path. +### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is set to "mkdocs" the default path is "%%project_directory%%/mkdocs.yml". +### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is not set or set to "yfm" the default path is "%%project_directory%%/.yfm". +### Path must be either Arcadia root relative. ### ### @see: [DOCS](#multimodule_DOCS) -macro DOCS_CONFIG(File) { +macro DOCS_CONFIG(File) { SET(_DOCS_CONFIG_VALUE $File) -} - +} + # tag:docs _DOCS_VARS_VALUE= ### @usage: DOCS_VARS(variable1=value1 variable2=value2 ...) ### ### Specify a set of default values of template variables for DOCS multimodule. -### There must be no spaces around "=". Values will be treated as strings. +### There must be no spaces around "=". Values will be treated as strings. ### ### @see: [DOCS](#multimodule_DOCS) -macro DOCS_VARS(Args...) { +macro DOCS_VARS(Args...) { SET_APPEND(_DOCS_VARS_VALUE $Args) -} - +} + # tag:docs _DOCS_INCLUDE_SOURCES_VALUE= -### @usage: DOCS_INCLUDE_SOURCES(path...) -### -### Specify a list of paths to source code files which will be used as text includes in a documentation project. -### Paths must be Arcadia root relative. -### -### @see: [DOCS](#multimodule_DOCS) -macro DOCS_INCLUDE_SOURCES(Args...) { +### @usage: DOCS_INCLUDE_SOURCES(path...) +### +### Specify a list of paths to source code files which will be used as text includes in a documentation project. +### Paths must be Arcadia root relative. +### +### @see: [DOCS](#multimodule_DOCS) +macro DOCS_INCLUDE_SOURCES(Args...) { SET_APPEND(_DOCS_INCLUDE_SOURCES_VALUE $Args) -} - +} + # tag:python-specific PY_NAMESPACE_VALUE= @@ -3384,7 +3384,7 @@ macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) { # tag:java-specific JAVA_VCS_MF_ARG= COMPILE_JAVA_MF=$COMPILE_JAVA - + # tag:java-specific when ($EXT_JAVA_VCS_INFO == "yes") { JAVA_VCS_MF_ARG=--vcs-mf $VCS_JAVA @@ -3408,9 +3408,9 @@ macro EMBED_JAVA_VCS_INFO() { ### Unlike regular JAVA_LIBRARY this module doesn't produce .pom file, so it cannot be exported to Maven itself. ### PEERDIR it from JAVA_LIBRARY or JAVA_PROGRAM for export to Maven. module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT { - .EXTS=.jsrc .java .jar .mf + .EXTS=.jsrc .java .jar .mf .NODE_TYPE=Bundle - .CMD=COMPILE_JAVA_MF + .CMD=COMPILE_JAVA_MF .PEERDIR_POLICY=as_build_from .FINAL_TARGET=no .ALIASES=SRCS=_SRCS_NO_GLOBAL @@ -6893,14 +6893,14 @@ macro COMPILE_NLG(Src...) { ### @usage: NEED_CHECK() ### -### Commits to the project marked with this macro will be blocked by pre-commit check and then will be -### automatically merged to trunk only if there is no new broken build targets in check results. -### The use of this macro is disabled by default. -macro NEED_CHECK(Flags...) { - # TODO: FIXME - ENABLE(UNUSED_MACRO) -} - +### Commits to the project marked with this macro will be blocked by pre-commit check and then will be +### automatically merged to trunk only if there is no new broken build targets in check results. +### The use of this macro is disabled by default. +macro NEED_CHECK(Flags...) { + # TODO: FIXME + ENABLE(UNUSED_MACRO) +} + ### @usage: NO_NEED_CHECK() ### ### Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro. @@ -6912,7 +6912,7 @@ macro NO_NEED_CHECK(Flags...) { ### @usage: NEED_REVIEW() # deprecated ### ### Mark the project as needing review. -### Reviewers are listed in the macro OWNER. The use of this macro is disabled by default. +### Reviewers are listed in the macro OWNER. The use of this macro is disabled by default. ### Details can be found here: https://clubs.at.yandex-team.ru/arcadia/6104 macro NEED_REVIEW(Flags...) { # TODO: FIXME @@ -7459,7 +7459,7 @@ PROTO_LIBRARY_SEM=$CPP_LIBRARY_SEM && target_proto_plugin cpp_styleguide ${tool: # tag:proto ### @usage: PROTO_LIBRARY() -### +### ### Build some varian of protocol buffers library. ### ### The particular variant is selected based on where PEERDIR to PROTO_LIBRARY comes from. diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 8ccd341d0b..30219eb85e 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -2764,8 +2764,8 @@ class MSVCLinker(MSVC, Linker): emit("GENERATE_MF_CMD", '$YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"}', '--build-root $ARCADIA_BUILD_ROOT --module-name $REALPRJNAME -o ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME}', '-t $MODULE_TYPE --ya-start-command-file -Ya,lics $LICENSE_NAMES -Ya,peers ${rootrel:PEERS} -Ya,credits ${input:CREDITS_TEXTS_FILE} $CREDITS_FLAGS --ya-end-command-file', - ) - + ) + # we split srcs_global into two groups: libs and objs # # each group can be in its own command file # first group need /WHOLEARCHIVE: prefix which will be added in fix_msvc_output.py or run_msvc_wine.py |