aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /build
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'build')
-rw-r--r--build/conf/compilers/gnu_compiler.conf470
-rw-r--r--build/conf/compilers/msvc_compiler.conf294
-rw-r--r--build/conf/java.ymake.conf179
-rw-r--r--build/conf/jbuild.ymake.conf122
-rw-r--r--build/conf/license.conf380
-rw-r--r--build/conf/linkers/ld.conf383
-rw-r--r--build/conf/linkers/msvc_linker.conf271
-rw-r--r--build/conf/opensource.conf14
-rw-r--r--build/conf/project_specific/maps/aar.conf350
-rw-r--r--build/conf/project_specific/maps/asrc.conf122
-rw-r--r--build/conf/project_specific/maps/mapkit.conf283
-rw-r--r--build/conf/project_specific/maps/sproto.conf21
-rw-r--r--build/conf/project_specific/other.conf11
-rw-r--r--build/conf/project_specific/yql_udf.conf261
-rw-r--r--build/conf/rules.conf43
-rw-r--r--build/conf/settings.conf155
-rw-r--r--build/conf/sysincl.conf61
-rw-r--r--build/conf/toolchains/gnu_toolchain.conf0
-rw-r--r--build/conf/toolchains/msvc_toolchain.conf7
-rw-r--r--build/conf/ts.conf105
-rw-r--r--build/conf_fatal_error/ya.make7
-rw-r--r--build/config/tests/clang_tidy/config.yaml29
-rw-r--r--build/config/tests/clang_tidy/ya.make4
-rw-r--r--build/config/tests/flake8/flake8.conf35
-rw-r--r--build/config/tests/flake8/ya.make4
-rw-r--r--build/config/tests/ya.make4
-rw-r--r--build/config/ya.make3
-rw-r--r--build/docs/all.md4568
-rw-r--r--build/docs/empty/ya.make5
-rw-r--r--build/docs/readme.md3168
-rw-r--r--build/external_resources/android_sdk/ya.make20
-rw-r--r--build/external_resources/antlr3/ya.make7
-rw-r--r--build/external_resources/antlr4/ya.make7
-rw-r--r--build/external_resources/codenavigation/ya.make14
-rw-r--r--build/external_resources/flake8_py2/ya.make23
-rw-r--r--build/external_resources/flake8_py3/ya.make23
-rw-r--r--build/external_resources/go_fake_xcrun/ya.make17
-rw-r--r--build/external_resources/go_tools/ya.make27
-rw-r--r--build/external_resources/goyndexer/ya.make16
-rw-r--r--build/external_resources/gradle/ya.make11
-rw-r--r--build/external_resources/mapsmobi_ios_pods/ya.make12
-rw-r--r--build/external_resources/mapsmobi_maven_repo/ya.make11
-rw-r--r--build/external_resources/maven/ya.make8
-rw-r--r--build/external_resources/pnpm/readme.md4
-rw-r--r--build/external_resources/pnpm/ya.make8
-rw-r--r--build/external_resources/swift-demangle/package.json22
-rw-r--r--build/external_resources/swift-demangle/ya.make12
-rw-r--r--build/external_resources/typescript/readme.md12
-rw-r--r--build/external_resources/typescript/ya.make8
-rw-r--r--build/external_resources/ya.make42
-rw-r--r--build/external_resources/ymake/ya.make7
-rw-r--r--build/external_resources/ymake/ya.make.inc13
-rw-r--r--build/external_resources/yolint/ya.make25
-rw-r--r--build/platform.md23
-rw-r--r--build/platform/android_sdk/ya.make20
-rw-r--r--build/platform/bfd/ya.make9
-rw-r--r--build/platform/binutils/binutils.resource7
-rw-r--r--build/platform/binutils/ya.make8
-rw-r--r--build/platform/cctools/ya.make12
-rw-r--r--build/platform/clang/arch.cmake27
-rwxr-xr-xbuild/platform/clang/clang-windows.sh31
-rw-r--r--build/platform/clang/ya.make24
-rw-r--r--build/platform/coverage_push_tool/ya.make10
-rw-r--r--build/platform/cuda/cuda_runtime_include.h13
-rw-r--r--build/platform/cuda/stdtree/ya.make13
-rw-r--r--build/platform/cuda/ya.make195
-rw-r--r--build/platform/gold/ya.make12
-rw-r--r--build/platform/intel_fpga_sdk/ya.make9
-rw-r--r--build/platform/ios_sdk/ya.make17
-rw-r--r--build/platform/java/error_prone/2.10.0/ya.make4
-rw-r--r--build/platform/java/error_prone/2.3.1/ya.make4
-rw-r--r--build/platform/java/error_prone/2.7.1/ya.make4
-rw-r--r--build/platform/java/error_prone/ya.make28
-rw-r--r--build/platform/java/groovy/ya.make10
-rw-r--r--build/platform/java/jacoco-agent/ya.make9
-rw-r--r--build/platform/java/jdk/jdk10/ya.make20
-rw-r--r--build/platform/java/jdk/jdk11/ya.make31
-rw-r--r--build/platform/java/jdk/jdk12/ya.make20
-rw-r--r--build/platform/java/jdk/jdk13/ya.make28
-rw-r--r--build/platform/java/jdk/jdk14/ya.make20
-rw-r--r--build/platform/java/jdk/jdk15/ya.make22
-rw-r--r--build/platform/java/jdk/jdk16/ya.make23
-rw-r--r--build/platform/java/jdk/jdk17/ya.make23
-rw-r--r--build/platform/java/jdk/jdk8/ya.make23
-rw-r--r--build/platform/java/jdk/resources.inc49
-rw-r--r--build/platform/java/jdk/ya.make311
-rw-r--r--build/platform/java/jni/ya.make29
-rw-r--r--build/platform/java/jstyle_lib/ya.make11
-rw-r--r--build/platform/java/kotlin/ya.make31
-rw-r--r--build/platform/java/kythe/ya.make10
-rw-r--r--build/platform/java/scriptgen/ya.make27
-rw-r--r--build/platform/java/uberjar/uberjar10/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar11/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar12/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar13/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar14/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar15/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar16/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar17/ya.make6
-rw-r--r--build/platform/java/uberjar/uberjar8/ya.make6
-rw-r--r--build/platform/java/uberjar/ya.make39
-rw-r--r--build/platform/java/ya.make10
-rw-r--r--build/platform/linux_sdk/README.md7
-rw-r--r--build/platform/linux_sdk/ya.make55
-rw-r--r--build/platform/lld/ya.make62
-rw-r--r--build/platform/local_so/readme.md3
-rw-r--r--build/platform/local_so/ya.make9
-rw-r--r--build/platform/macos_sdk/ya.make20
-rw-r--r--build/platform/macos_system_stl/ya.make15
-rw-r--r--build/platform/mapkit/ya.make32
-rw-r--r--build/platform/msvc/ya.make19
-rw-r--r--build/platform/nodejs/readme.md5
-rw-r--r--build/platform/nodejs/resources.inc2
-rw-r--r--build/platform/nodejs/ya.make17
-rw-r--r--build/platform/opengl/ya.make27
-rw-r--r--build/platform/perl/5.14/ya.make11
-rw-r--r--build/platform/perl/5.18/ya.make11
-rw-r--r--build/platform/perl/5.22/ya.make11
-rw-r--r--build/platform/perl/5.26/ya.make11
-rw-r--r--build/platform/perl/5.30/ya.make11
-rw-r--r--build/platform/perl/perl.inc33
-rw-r--r--build/platform/perl/perl_5.18.patch51
-rw-r--r--build/platform/perl/ya.make28
-rw-r--r--build/platform/python/ldflags/ya.make17
-rw-r--r--build/platform/python/python27/ya.make22
-rw-r--r--build/platform/python/python310/ya.make30
-rw-r--r--build/platform/python/python34/ya.make18
-rw-r--r--build/platform/python/python35/ya.make18
-rw-r--r--build/platform/python/python36/ya.make18
-rw-r--r--build/platform/python/python37/ya.make18
-rw-r--r--build/platform/python/python38/ya.make23
-rw-r--r--build/platform/python/python39/ya.make22
-rw-r--r--build/platform/python/readme.md83
-rw-r--r--build/platform/python/resources.inc32
-rw-r--r--build/platform/python/tests/test_common.py31
-rw-r--r--build/platform/python/tests/testlib.py21
-rw-r--r--build/platform/python/tests/ya.make36
-rw-r--r--build/platform/python/ya.make136
-rw-r--r--build/platform/python/ymake_python3/ya.make33
-rw-r--r--build/platform/qt/ya.make34
-rw-r--r--build/platform/test_tool/a.yaml16
-rw-r--r--build/platform/test_tool/host.ya.make.inc16
-rw-r--r--build/platform/test_tool/ya.make20
-rw-r--r--build/platform/wine/ya.make10
-rw-r--r--build/platform/xcode/swift/ya.make12
-rw-r--r--build/platform/xcode/tools/ya.make4
-rw-r--r--build/platform/xcode/tools/ya.make.inc9
-rw-r--r--build/platform/xcode/ya.make.inc16
-rw-r--r--build/platform/yfm/ya.make19
-rw-r--r--build/platform/yocto_sdk/yocto_sdk/ya.make11
-rw-r--r--build/plugins/_common.py201
-rw-r--r--build/plugins/_custom_command.py65
-rw-r--r--build/plugins/_import_wrapper.py24
-rw-r--r--build/plugins/_requirements.py49
-rw-r--r--build/plugins/_test_const.py327
-rw-r--r--build/plugins/_unpickler.py42
-rw-r--r--build/plugins/_xsyn_includes.py60
-rw-r--r--build/plugins/build_mn_files.py29
-rw-r--r--build/plugins/bundle.py22
-rw-r--r--build/plugins/code_generator.py45
-rw-r--r--build/plugins/copy_files_to_build_prefix.py36
-rw-r--r--build/plugins/cp.py30
-rw-r--r--build/plugins/cpp_style.py19
-rw-r--r--build/plugins/create_init_py.py15
-rw-r--r--build/plugins/credits.py22
-rw-r--r--build/plugins/docs.py44
-rw-r--r--build/plugins/files.py5
-rw-r--r--build/plugins/gobuild.py309
-rw-r--r--build/plugins/ios_app_settings.py19
-rw-r--r--build/plugins/ios_assets.py30
-rw-r--r--build/plugins/java.py374
-rw-r--r--build/plugins/large_files.py39
-rw-r--r--build/plugins/lib/__init__.py0
-rw-r--r--build/plugins/lib/_metric_resolvers.py11
-rw-r--r--build/plugins/lib/nots/__init__.py0
-rw-r--r--build/plugins/lib/nots/package_manager/__init__.py9
-rw-r--r--build/plugins/lib/nots/package_manager/base/__init__.py11
-rw-r--r--build/plugins/lib/nots/package_manager/base/constants.py5
-rw-r--r--build/plugins/lib/nots/package_manager/base/lockfile.py68
-rw-r--r--build/plugins/lib/nots/package_manager/base/package_json.py113
-rw-r--r--build/plugins/lib/nots/package_manager/base/package_manager.py108
-rw-r--r--build/plugins/lib/nots/package_manager/base/tests/package_json.py114
-rw-r--r--build/plugins/lib/nots/package_manager/base/tests/ya.make13
-rw-r--r--build/plugins/lib/nots/package_manager/base/ya.make21
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/__init__.py9
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/lockfile.py163
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/package_manager.py181
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/tests/lockfile.py320
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/tests/workspace.py58
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/tests/ya.make15
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/utils.py19
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/workspace.py69
-rw-r--r--build/plugins/lib/nots/package_manager/pnpm/ya.make23
-rw-r--r--build/plugins/lib/nots/package_manager/ya.make14
-rw-r--r--build/plugins/lib/nots/typescript/__init__.py7
-rw-r--r--build/plugins/lib/nots/typescript/tests/tsc_wrapper.py168
-rw-r--r--build/plugins/lib/nots/typescript/tests/ya.make13
-rw-r--r--build/plugins/lib/nots/typescript/tsc_wrapper.py219
-rw-r--r--build/plugins/lib/nots/typescript/ya.make18
-rw-r--r--build/plugins/lib/nots/ya.make14
-rw-r--r--build/plugins/lib/ya.make7
-rw-r--r--build/plugins/linker_script.py12
-rw-r--r--build/plugins/lj_archive.py44
-rw-r--r--build/plugins/llvm_bc.py33
-rw-r--r--build/plugins/macros_with_error.py29
-rw-r--r--build/plugins/mx_archive.py16
-rw-r--r--build/plugins/nots.py46
-rw-r--r--build/plugins/print_module_type.py5
-rw-r--r--build/plugins/pybuild.py648
-rw-r--r--build/plugins/res.py106
-rw-r--r--build/plugins/rodata.py168
-rw-r--r--build/plugins/sandbox_registry.py21
-rw-r--r--build/plugins/scarab_cant_clash.py66
-rw-r--r--build/plugins/split_codegen.py43
-rw-r--r--build/plugins/ssqls.py40
-rw-r--r--build/plugins/suppressions.py19
-rw-r--r--build/plugins/swig.py164
-rw-r--r--build/plugins/tests/test_code_generator.py16
-rw-r--r--build/plugins/tests/test_common.py49
-rw-r--r--build/plugins/tests/test_requirements.py52
-rw-r--r--build/plugins/tests/test_ssqls.py23
-rw-r--r--build/plugins/tests/ya.make16
-rw-r--r--build/plugins/xsyn.py34
-rw-r--r--build/plugins/ya.make23
-rw-r--r--build/plugins/yql_python_udf.py55
-rw-r--r--build/plugins/ytest.py1113
-rw-r--r--build/plugins/ytest2.py54
-rw-r--r--build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make7
-rw-r--r--build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make7
-rw-r--r--build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/flatc/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/flatc/ya.make.induced_deps4
-rw-r--r--build/prebuilt/contrib/tools/flatc/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/flatc/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/flatc64/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/flatc64/ya.make.induced_deps3
-rw-r--r--build/prebuilt/contrib/tools/flatc64/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/flatc64/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.induced_deps6
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.induced_deps29
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc/ya.make.induced_deps29
-rw-r--r--build/prebuilt/contrib/tools/protoc/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/protoc/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/protoc_std/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/protoc_std/ya.make.induced_deps24
-rw-r--r--build/prebuilt/contrib/tools/protoc_std/ya.make.prebuilt15
-rw-r--r--build/prebuilt/contrib/tools/protoc_std/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/python/bootstrap/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/python/bootstrap/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/python/bootstrap/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/python3/pycc/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/python3/pycc/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/python3/pycc/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/ragel6/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/ragel6/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/ragel6/ya.make.resource9
-rw-r--r--build/prebuilt/contrib/tools/yasm/ya.make7
-rw-r--r--build/prebuilt/contrib/tools/yasm/ya.make.prebuilt13
-rw-r--r--build/prebuilt/contrib/tools/yasm/ya.make.resource9
-rw-r--r--build/prebuilt/tools/enum_parser/enum_parser/ya.make7
-rw-r--r--build/prebuilt/tools/enum_parser/enum_parser/ya.make.induced_deps16
-rw-r--r--build/prebuilt/tools/enum_parser/enum_parser/ya.make.prebuilt15
-rw-r--r--build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource9
-rw-r--r--build/prebuilt/tools/event2cpp/ya.make7
-rw-r--r--build/prebuilt/tools/event2cpp/ya.make.induced_deps8
-rw-r--r--build/prebuilt/tools/event2cpp/ya.make.prebuilt15
-rw-r--r--build/prebuilt/tools/event2cpp/ya.make.resource9
-rw-r--r--build/prebuilt/tools/fix_elf/ya.make7
-rw-r--r--build/prebuilt/tools/fix_elf/ya.make.prebuilt13
-rw-r--r--build/prebuilt/tools/fix_elf/ya.make.resource9
-rw-r--r--build/prebuilt/tools/rescompiler/ya.make7
-rw-r--r--build/prebuilt/tools/rescompiler/ya.make.induced_deps1
-rw-r--r--build/prebuilt/tools/rescompiler/ya.make.prebuilt15
-rw-r--r--build/prebuilt/tools/rescompiler/ya.make.resource9
-rw-r--r--build/prebuilt/tools/rescompressor/ya.make7
-rw-r--r--build/prebuilt/tools/rescompressor/ya.make.prebuilt13
-rw-r--r--build/prebuilt/tools/rescompressor/ya.make.resource9
-rw-r--r--build/prebuilt/tools/rorescompiler/ya.make7
-rw-r--r--build/prebuilt/tools/rorescompiler/ya.make.induced_deps1
-rw-r--r--build/prebuilt/tools/rorescompiler/ya.make.prebuilt15
-rw-r--r--build/prebuilt/tools/rorescompiler/ya.make.resource9
-rw-r--r--build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make7
-rw-r--r--build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.prebuilt13
-rw-r--r--build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.resource9
-rw-r--r--build/prebuilt/ya.make25
-rw-r--r--build/rules/alice.policy48
-rw-r--r--build/rules/autocheck.blacklist28
-rw-r--r--build/rules/catboost.policy5
-rw-r--r--build/rules/contrib_deprecated.policy53
-rw-r--r--build/rules/contrib_deps.policy76
-rw-r--r--build/rules/contrib_python.policy701
-rw-r--r--build/rules/contrib_restricted.policy193
-rw-r--r--build/rules/flake8/README.md26
-rw-r--r--build/rules/flake8/migrations.yaml3677
-rw-r--r--build/rules/flake8/ya.make1
-rw-r--r--build/rules/go/.devexp.json18
-rw-r--r--build/rules/go/README.md9
-rw-r--r--build/rules/go/contrib.policy33
-rw-r--r--build/rules/go/migrations.yaml99
-rw-r--r--build/rules/go/vendor.policy1036
-rw-r--r--build/rules/go/ya.make1
-rw-r--r--build/rules/jstyle/migrations.yaml11
-rw-r--r--build/rules/jstyle/ya.make1
-rw-r--r--build/rules/junk.policy10
-rw-r--r--build/rules/kikimr.policy188
-rw-r--r--build/rules/library_deprecated.policy364
-rw-r--r--build/rules/library_deps.policy44
-rw-r--r--build/rules/local.blacklist3
-rw-r--r--build/rules/maps/maps.policy179
-rw-r--r--build/rules/maps/ya.make1
-rw-r--r--build/rules/passport.policy14
-rw-r--r--build/rules/py2_deprecation/readme.md9
-rw-r--r--build/rules/py2_deprecation/ya.make6
-rw-r--r--build/rules/taxi.policy3
-rw-r--r--build/rules/ya.make1
-rw-r--r--build/rules/yadi.policy1
-rw-r--r--build/rules/yp.policy3
-rw-r--r--build/rules/yt.policy6
-rw-r--r--build/sanitize-blacklist.txt4
-rw-r--r--build/scripts/_check_compiler.cpp1
-rw-r--r--build/scripts/_fake_src.cpp2
-rw-r--r--build/scripts/append_file.py9
-rw-r--r--build/scripts/autotar_gendirs.py70
-rwxr-xr-xbuild/scripts/build_catboost.py71
-rw-r--r--build/scripts/build_dll_and_java.py47
-rw-r--r--build/scripts/build_info_gen.py63
-rw-r--r--build/scripts/build_java_codenav_index.py49
-rw-r--r--build/scripts/build_java_with_error_prone.py36
-rw-r--r--build/scripts/build_java_with_error_prone2.py87
-rwxr-xr-xbuild/scripts/build_mn.py330
-rwxr-xr-xbuild/scripts/build_pln_header.py35
-rw-r--r--build/scripts/c_templates/svn_interface.c184
-rw-r--r--build/scripts/c_templates/svnversion.h42
-rw-r--r--build/scripts/c_templates/ya.make7
-rwxr-xr-xbuild/scripts/cat.py15
-rw-r--r--build/scripts/cgo1_wrapper.py45
-rw-r--r--build/scripts/check_config_h.py89
-rw-r--r--build/scripts/clang_tidy.py170
-rw-r--r--build/scripts/clang_tidy_arch.py33
-rw-r--r--build/scripts/clang_wrapper.py53
-rw-r--r--build/scripts/collect_java_srcs.py51
-rw-r--r--build/scripts/compile_cuda.py152
-rw-r--r--build/scripts/compile_java.py102
-rw-r--r--build/scripts/compile_jsrc.py24
-rw-r--r--build/scripts/compile_pysrc.py101
-rwxr-xr-xbuild/scripts/configure_file.py59
-rw-r--r--build/scripts/copy_files_to_dir.py59
-rw-r--r--build/scripts/copy_to_dir.py75
-rw-r--r--build/scripts/coverage-info.py282
-rw-r--r--build/scripts/cpp_flatc_wrapper.py31
-rw-r--r--build/scripts/create_jcoverage_report.py112
-rw-r--r--build/scripts/custom_link_green_mysql.py97
-rw-r--r--build/scripts/decimal_md5.py79
-rw-r--r--build/scripts/error.py77
-rw-r--r--build/scripts/extract_asrc.py23
-rw-r--r--build/scripts/extract_docs.py36
-rw-r--r--build/scripts/extract_jacoco_report.py29
-rw-r--r--build/scripts/f2c.py58
-rw-r--r--build/scripts/fail_module_cmd.py7
-rwxr-xr-xbuild/scripts/fetch_from.py375
-rw-r--r--build/scripts/fetch_from_archive.py36
-rw-r--r--build/scripts/fetch_from_external.py60
-rw-r--r--build/scripts/fetch_from_mds.py50
-rw-r--r--build/scripts/fetch_from_npm.py104
-rwxr-xr-xbuild/scripts/fetch_from_sandbox.py269
-rw-r--r--build/scripts/fetch_resource.py43
-rw-r--r--build/scripts/filter_zip.py71
-rw-r--r--build/scripts/find_and_tar.py22
-rw-r--r--build/scripts/find_time_trace.py17
-rw-r--r--build/scripts/fix_java_command_file_cp.py34
-rw-r--r--build/scripts/fix_msvc_output.py42
-rw-r--r--build/scripts/fs_tools.py104
-rw-r--r--build/scripts/gen_aar_gradle_script.py374
-rw-r--r--build/scripts/gen_java_codenav_entry.py57
-rw-r--r--build/scripts/gen_java_codenav_protobuf.py22
-rw-r--r--build/scripts/gen_join_srcs.py16
-rw-r--r--build/scripts/gen_mx_table.py75
-rw-r--r--build/scripts/gen_py3_reg.py34
-rw-r--r--build/scripts/gen_py_protos.py67
-rw-r--r--build/scripts/gen_py_reg.py32
-rw-r--r--build/scripts/gen_swiftc_output_map.py15
-rw-r--r--build/scripts/gen_tasklet_reg.py51
-rw-r--r--build/scripts/gen_test_apk_gradle_script.py193
-rw-r--r--build/scripts/gen_ub.py86
-rw-r--r--build/scripts/gen_yql_python_udf.py55
-rw-r--r--build/scripts/generate_mf.py113
-rw-r--r--build/scripts/generate_pom.py275
-rw-r--r--build/scripts/go_fake_include/go_asm.h0
-rw-r--r--build/scripts/go_proto_wrapper.py82
-rw-r--r--build/scripts/go_tool.py864
-rw-r--r--build/scripts/ios_wrapper.py180
-rw-r--r--build/scripts/java_pack_to_file.py36
-rw-r--r--build/scripts/link_asrc.py84
-rw-r--r--build/scripts/link_dyn_lib.py294
-rw-r--r--build/scripts/link_exe.py82
-rw-r--r--build/scripts/link_fat_obj.py91
-rw-r--r--build/scripts/link_lib.py85
-rw-r--r--build/scripts/llvm_opt_wrapper.py18
-rw-r--r--build/scripts/make_java_classpath_file.py26
-rw-r--r--build/scripts/make_java_srclists.py122
-rw-r--r--build/scripts/make_manifest_from_bf.py28
-rw-r--r--build/scripts/merge_coverage_data.py32
-rw-r--r--build/scripts/merge_files.py8
-rwxr-xr-xbuild/scripts/mkdir.py12
-rw-r--r--build/scripts/mkdocs_builder_wrapper.py35
-rwxr-xr-xbuild/scripts/mkver.py12
-rw-r--r--build/scripts/move.py15
-rw-r--r--build/scripts/pack_ios.py48
-rw-r--r--build/scripts/pack_jcoverage_resources.py24
-rw-r--r--build/scripts/perl_wrapper.py24
-rw-r--r--build/scripts/postprocess_go_fbs.py72
-rw-r--r--build/scripts/preprocess.py48
-rw-r--r--build/scripts/process_command_files.py33
-rw-r--r--build/scripts/process_whole_archive_option.py176
-rwxr-xr-xbuild/scripts/py_compile.py24
-rw-r--r--build/scripts/python_yndexer.py53
-rw-r--r--build/scripts/resolve_java_srcs.py106
-rw-r--r--build/scripts/retry.py29
-rw-r--r--build/scripts/run_ios_simulator.py79
-rw-r--r--build/scripts/run_javac.py122
-rw-r--r--build/scripts/run_junit.py125
-rw-r--r--build/scripts/run_llvm_dsymutil.py11
-rw-r--r--build/scripts/run_msvc_wine.py556
-rw-r--r--build/scripts/run_sonar.py121
-rwxr-xr-xbuild/scripts/run_tool.py9
-rw-r--r--build/scripts/setup_java_tmpdir.py40
-rw-r--r--build/scripts/sky.py43
-rw-r--r--build/scripts/stderr2stdout.py6
-rw-r--r--build/scripts/stdout2stderr.py6
-rwxr-xr-xbuild/scripts/symlink.py29
-rw-r--r--build/scripts/tar_directory.py45
-rw-r--r--build/scripts/tar_sources.py41
-rw-r--r--build/scripts/tared_protoc.py31
-rwxr-xr-xbuild/scripts/touch.py50
-rw-r--r--build/scripts/unpacking_jtest_runner.py148
-rw-r--r--build/scripts/vcs_info.py290
-rw-r--r--build/scripts/with_coverage.py40
-rw-r--r--build/scripts/with_crash_on_timeout.py22
-rw-r--r--build/scripts/with_pathsep_resolve.py23
-rw-r--r--build/scripts/wrap_groovyc.py23
-rw-r--r--build/scripts/wrapper.py11
-rw-r--r--build/scripts/writer.py40
-rw-r--r--build/scripts/xargs.py18
-rw-r--r--build/scripts/ya.make102
-rw-r--r--build/scripts/yield_line.py7
-rw-r--r--build/scripts/yndexer.py79
-rw-r--r--build/stdafx.hpp332
-rw-r--r--build/sysincl.lst0
-rw-r--r--build/sysincl/android.yml31
-rw-r--r--build/sysincl/darwin.yml235
-rw-r--r--build/sysincl/ibdrv.yml12
-rw-r--r--build/sysincl/intrinsic.yml47
-rw-r--r--build/sysincl/libc-musl-libcxx.yml6
-rw-r--r--build/sysincl/libc-to-compat.yml6
-rw-r--r--build/sysincl/libc-to-musl.yml254
-rw-r--r--build/sysincl/libc-to-nothing.yml160
-rw-r--r--build/sysincl/linux-headers.yml1122
-rw-r--r--build/sysincl/linux-musl.yml18
-rw-r--r--build/sysincl/linux-ubuntu-12.yml3
-rw-r--r--build/sysincl/linux.yml54
-rw-r--r--build/sysincl/misc-win.yml66
-rw-r--r--build/sysincl/misc.yml468
-rw-r--r--build/sysincl/nvidia.yml48
-rw-r--r--build/sysincl/python.yml104
-rw-r--r--build/sysincl/stl-to-libcxx.yml157
-rw-r--r--build/sysincl/stl-to-nothing.yml143
-rw-r--r--build/sysincl/swig-to-nothing.yml235
-rw-r--r--build/sysincl/swig.yml292
-rw-r--r--build/sysincl/system-jdk.yml2
-rw-r--r--build/sysincl/unsorted.yml986
-rw-r--r--build/sysincl/valgrind.yml4
-rw-r--r--build/sysincl/windows.yml316
-rw-r--r--build/ya.conf.json8036
-rw-r--r--build/ya.make38
-rw-r--r--build/ymake.core.conf9269
-rwxr-xr-xbuild/ymake_conf.py3245
492 files changed, 64394 insertions, 0 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf
new file mode 100644
index 0000000000..373be5bedd
--- /dev/null
+++ b/build/conf/compilers/gnu_compiler.conf
@@ -0,0 +1,470 @@
+_C_DEFINES_ANDROID=
+_C_DEFINES_ANDROID_OTHERWISE=
+when ($OS_ANDROID == "yes") {
+ _C_DEFINES_ANDROID=-DANDROID_FAKEID=$ANDROID_FAKEID
+}
+otherwise {
+ # There is no usable _FILE_OFFSET_BITS=64 support in Androids until API 21. And it's incomplete until at least API 24.
+ # https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
+ # Arcadia have API 16 for 32-bit Androids.
+ _C_DEFINES_ANDROID_OTHERWISE=-D_FILE_OFFSET_BITS=64
+}
+
+_C_DEFINES_GNU_SOURCE=
+when ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_CYGWIN == "yes") {
+ _C_DEFINES_GNU_SOURCE=-D_GNU_SOURCE
+}
+
+_C_DEFINES_CLANG_LINUX_X86_64=
+when ($CLANG == "yes" && $OS_LINUX == "yes" && $ARCH_X86_64 == "yes") {
+ _C_DEFINES_CLANG_LINUX_X86_64=-D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
+}
+
+_C_DEFINES_IOS=
+when ($OS_IOS == "yes") {
+ _C_DEFINES_IOS=-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
+}
+
+_C_DEFINES_WITH_VALGRIND=
+when ($WITH_VALGRIND == "yes") {
+ _C_DEFINES_WITH_VALGRIND=-DWITH_VALGRIND=1
+}
+
+C_DEFINES =-DFAKEID=$CPP_FAKEID
+C_DEFINES+=$_C_DEFINES_ANDROID
+C_DEFINES+=\
+-DARCADIA_ROOT=${ARCADIA_ROOT} \
+-DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT} \
+-D_THREAD_SAFE \
+-D_PTHREADS \
+-D_REENTRANT \
+-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES \
+-D_LARGEFILE_SOURCE \
+-D__STDC_CONSTANT_MACROS \
+-D__STDC_FORMAT_MACROS
+C_DEFINES+=$_C_DEFINES_ANDROID_OTHERWISE
+C_DEFINES+=$_C_DEFINES_GNU_SOURCE
+C_DEFINES+=$_C_DEFINES_CLANG_LINUX_X86_64
+C_DEFINES+=$_C_DEFINES_IOS
+C_DEFINES+=$_C_DEFINES_WITH_VALGRIND
+C_DEFINES+=$_C_DEFINES_NDEBUG
+
+_C_FOPTIONS_INIT_ARRAY=
+when ($CLANG == "yes" && $OS_LINUX == "yes") {
+ # Use .init_array instead of .ctors (default for old clang versions)
+ # See: https://maskray.me/blog/2021-11-07-init-ctors-init-array
+ _C_FOPTIONS_INIT_ARRAY=-fuse-init-array
+}
+
+_C_FOPTIONS_COLOR=
+_C_FOPTIONS_ALIGNED_ALLOCATION=
+when ($CLANG == "yes") {
+ # Set up output colorization
+ _C_FOPTIONS_COLOR=-fcolor-diagnostics
+ # Enable aligned allocation
+ _C_FOPTIONS_ALIGNED_ALLOCATION=-faligned-allocation
+}
+elsewhen ($GCC == "yes") {
+ # Set up output colorization
+ _C_FOPTIONS_COLOR=-fdiagnostics-color=always
+ # It looks like there is no way to enable aligned allocation in gcc
+}
+
+_C_FOPTIONS_MAPSMOBI_ARM=
+when ($OS_IOS == "yes") {
+ when ($MAPSMOBI_BUILD_TARGET == "yes" && $ARCH_ARM == "yes") {
+ _C_FOPTIONS_MAPSMOBI_ARM=-fembed-bitcode
+ }
+}
+
+_C_WARNINGS_CLANG=
+_CXX_WARNINGS_CLANG=
+when ($CLANG == "yes") {
+
+ _CXX_WARNINGS_CLANG=\
+-Wimport-preprocessor-directive-pedantic \
+-Wno-undefined-var-template \
+-Wno-return-std-move \
+-Wno-address-of-packed-member \
+-Wno-defaulted-function-deleted \
+-Wno-pessimizing-move \
+-Wno-range-loop-construct \
+-Wno-deprecated-anon-enum-enum-conversion \
+-Wno-deprecated-enum-enum-conversion \
+-Wno-deprecated-enum-float-conversion \
+-Wno-ambiguous-reversed-operator \
+-Wno-deprecated-volatile
+
+# -Wno-unknown-warning-option
+# For nvcc to accept the above.
+ _C_WARNINGS_CLANG=\
+-Wno-implicit-const-int-float-conversion \
+-Wno-unknown-warning-option
+
+}
+
+_C_FOPTIONS_GCC=
+when ($GCC == "yes") {
+ _C_FOPTIONS_GCC=-fno-delete-null-pointer-checks -fabi-version=8
+}
+
+_C_FOPTIONS_IOS=
+when ($OS_IOS != "yes") {
+ # Split all functions and data into separate sections for DCE and ICF linker passes
+ # NOTE: iOS build uses -fembed-bitcode which conflicts with -ffunction-sections (only relevant for ELF targets)
+ _C_FOPTIONS_IOS=-ffunction-sections -fdata-sections
+}
+
+_C_FOPTIONS_DEBUG=
+when ($_BUILD_DEBUG == "yes") {
+ _C_FOPTIONS_DEBUG=$FSTACK
+}
+
+_C_FLAGS_RELEASE=
+_C_FOPTIONS_RELEASE=
+_OPTIMIZE_RELEASE=
+when ($_BUILD_RELEASE == "yes") {
+ _C_FLAGS_RELEASE=$OPTIMIZE
+ when ($_BUILD_SIZE_OPTIMIZED == "yes") {
+ # -Oz is clang's more size-aggressive version of -Os
+ # For ARM specifically, clang -Oz is on par with gcc -Os:
+ # https://github.com/android/ndk/issues/133#issuecomment-365763507
+ when($CLANG == "yes") {
+ _OPTIMIZE_RELEASE=-Oz
+ }
+ otherwise {
+ _OPTIMIZE_RELEASE=-Os
+ }
+
+ # Generate sections with address significance tables for ICF linker pass
+ when($CLANG == "yes") {
+ _C_FOPTIONS_RELEASE=-faddrsig
+ }
+ }
+ otherwise {
+ _OPTIMIZE_RELEASE=-O3
+ }
+}
+
+_C_FOPTIONS_PROFILER=
+when ($_BUILD_PROFILER_TYPE != "") {
+ when ($_BUILD_PROFILER_TYPE in ["generic", "gprof"]) {
+ _C_FOPTIONS_PROFILER=-fno-omit-frame-pointer
+ }
+}
+
+_C_FOPTIONS =
+
+# Enable C++ exceptions (and allow them to be throw through pure C code)
+_C_FOPTIONS+=-fexceptions
+
+# Enable standard-conforming behavior and generate duplicate symbol error in case of duplicated global constants.
+# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678#c0
+_C_FOPTIONS+=-fno-common
+
+_C_FOPTIONS+=$_C_FOPTIONS_INIT_ARRAY
+_C_FOPTIONS+=$_C_FOPTIONS_COLOR
+_C_FOPTIONS+=$_C_FOPTIONS_ALIGNED_ALLOCATION
+_C_FOPTIONS+=$_C_FOPTIONS_MAPSMOBI_ARM
+_C_FOPTIONS+=$_C_FOPTIONS_DEBUG
+_C_FOPTIONS+=$_C_FOPTIONS_RELEASE
+_C_FOPTIONS+=$_C_FOPTIONS_PROFILER
+_C_FOPTIONS+=$_C_FOPTIONS_GCC
+_C_FOPTIONS+=$_C_FOPTIONS_IOS
+
+# Enable default warnings subset
+_C_WARNINGS =-Wall -Wextra
+
+# Disable some warnings which will fail compilation at the time
+_C_WARNINGS+=-Wno-parentheses
+
+_C_WARNINGS+=$_C_WARNINGS_CLANG
+
+# Issue a warning if certain overload is hidden due to inheritance
+_CXX_WARNINGS =-Woverloaded-virtual
+
+_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG
+
+_C_FLAGS_ARCH=
+when ($ARCH_I386 == "yes") {
+ _C_FLAGS_ARCH=-m32
+}
+when ($ARCH_X86_64 == "yes") {
+ _C_FLAGS_ARCH=-m64
+}
+
+_C_FLAGS_FAST_DEBUG=
+when ($_BUILD_FAST_DEBUG == "yes") {
+ _C_FLAGS_FAST_DEBUG=-Og
+}
+
+_C_DEFINES_NDEBUG=-UNDEBUG
+when ($_BUILD_WITH_NDEBUG == "yes") {
+ _C_DEFINES_NDEBUG=-DNDEBUG
+}
+
+_C_FLAGS_PROFILER=
+when ($_BUILD_PROFILER_TYPE == "gprof") {
+ _C_FLAGS_PROFILER=-pg
+}
+
+_C_FLAGS=\
+$CL_DEBUG_INFO $CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__ $_C_FLAGS_ARCH_OPT -pipe
+_C_FLAGS+=$_C_FLAGS_ARCH
+_C_FLAGS+=$_C_FLAGS_FAST_DEBUG
+_C_FLAGS+=$_C_FLAGS_RELEASE
+_C_FLAGS+=$_C_FLAGS_PROFILER
+
+_SFDL_FLAGS=-E -C -x c++
+when ($CLANG == "yes") {
+ _SFDL_FLAGS+=-Qunused-arguments
+}
+
+_DEBUG_INFO_FLAGS=-g
+when ($OS_LINUX == "yes") {
+ _DEBUG_INFO_FLAGS=-g -ggnu-pubnames
+}
+
+_CROSS_SUFFIX=.pic
+when ($FORCE_NO_PIC == "yes") {
+ _CROSS_SUFFIX=
+}
+
+C_COMPILER=${quo:C_COMPILER_UNQUOTED}
+OPTIMIZE=$_OPTIMIZE_RELEASE
+FSTACK=-fstack-protector
+DUMP_DEPS=
+GCC_PREPROCESSOR_OPTS=$DUMP_DEPS $C_DEFINES
+C_WARNING_OPTS=$_C_WARNINGS
+CXX_WARNING_OPTS=$_CXX_WARNINGS
+
+# PIE is only valid for executables, while PIC implies a shared library
+# `-pie` with a shared library is either ignored or fails to link
+when ($PIC == "yes") {
+ CFLAGS+=-fPIC
+ LDFLAGS+=-fPIC
+}
+elsewhen ($PIE == "yes") {
+ CFLAGS+=-fPIE
+ LDFLAGS+=-fPIE -pie
+}
+
+CFLAGS+=$_C_FLAGS $DEBUG_INFO_FLAGS $_C_FOPTIONS $C_WARNING_OPTS $GCC_PREPROCESSOR_OPTS $USER_CFLAGS $USER_CFLAGS_GLOBAL
+CXXFLAGS+=$CFLAGS $_CXX_STD $CXX_WARNING_OPTS $USER_CXXFLAGS $USER_CXXFLAGS_GLOBAL
+CONLYFLAGS+=$USER_CONLYFLAGS $USER_CONLYFLAGS_GLOBAL
+CXX_COMPILER=${quo:CXX_COMPILER_UNQUOTED}
+NOGCCSTACKCHECK=yes
+SFDL_FLAG=$_SFDL_FLAGS -o $SFDL_TMP_OUT
+WERROR_FLAG=-Werror
+DEBUG_INFO_FLAGS=$_DEBUG_INFO_FLAGS
+
+when ($NO_WSHADOW == "yes") {
+ C_WARNING_OPTS += -Wno-shadow
+}
+when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS = -w
+ CXX_WARNING_OPTS = -Wno-everything
+}
+when ($NO_OPTIMIZE == "yes") {
+ OPTIMIZE = -O0
+}
+when ($SAVE_TEMPS == "yes") {
+ CXXFLAGS += -save-temps
+}
+when ($NOGCCSTACKCHECK != "yes") {
+ FSTACK += -fstack-check
+}
+
+# _C_DEBUG_LIGHT=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B
+# _C_DEBUG_LIGHT_CL=$_C_DEBUG_LIGHT -Xclang -fdebug-compilation-dir -Xclang /tmp
+# _C_DEBUG=$_C_DEBUG_LIGHT -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T
+# _C_DEBUG_CL=$_C_DEBUG -Xclang -fdebug-compilation-dir -Xclang /tmp
+# _YASM_DEBUG_LIGHT=--replace=${ARCADIA_BUILD_ROOT}=/-B
+# _YASM_DEBUG=$_YASM_DEBUG_LIGHT --replace=${ARCADIA_ROOT}=/-S --replace=$(TOOL_ROOT)=/-T
+# when ($FORCE_CONSISTENT_DEBUG == "yes") {
+# when ($CLANG == "yes") {
+# CL_DEBUG_INFO=$_C_DEBUG_CL
+# }
+# otherwise {
+# CL_DEBUG_INFO=$_C_DEBUG
+# }
+# YASM_DEBUG_INFO=$_YASM_DEBUG
+# }
+# elsewhen ($CONSISTENT_DEBUG == "yes") {
+# when ($CLANG == "yes") {
+# CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_C_DEBUG_CL
+# }
+# otherwise {
+# CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_C_DEBUG
+# }
+# YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_YASM_DEBUG
+# }
+# elsewhen ($CONSISTENT_DEBUG_LIGHT == "yes") {
+# when ($CLANG == "yes") {
+# CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_C_DEBUG_LIGHT_CL
+# }
+# otherwise {
+# CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_C_DEBUG_LIGHT
+# }
+# YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=$_YASM_DEBUG_LIGHT
+# }
+#
+# _C_BUILTINS=-Wno-builtin-macro-redefined -D__DATE__="\"""Sep 31 2019""\"" -D__TIME__=\"00:00:00\"
+# when ($CLANG == "yes" && $_TC_VERSION_AT_LEAST_10 || $GCC == "yes" && $_TC_VERSION_AT_LEAST_8 == "yes") {
+# # XXX does not support non-normalized paths
+# _C_BUILTINS+=-fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/= -fmacro-prefix-map=${ARCADIA_ROOT}/= -fmacro-prefix-map=$(TOOL_ROOT)/=
+# }
+# otherwise {
+# # XXX this macro substitution breaks __FILE__ in included sources
+# _C_BUILTINS+=-D__FILE__=\"${input;qe;rootrel:SRC}\"
+# }
+#
+# when ($FORCE_CONSISTENT_BUILD == "yes") {
+# CL_MACRO_INFO=$_C_BUILTINS
+# }
+# elsewhen ($CONSISTENT_BUILD == "yes") {
+# CL_MACRO_INFO_DISABLE_CACHE__NO_UID__=$_C_BUILTINS
+# }
+
+when ($FORCE_CONSISTENT_DEBUG == "yes") {
+ when ($CLANG == "yes") {
+ CL_DEBUG_INFO=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T -Xclang -fdebug-compilation-dir -Xclang /tmp
+ }
+ otherwise {
+ CL_DEBUG_INFO=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T
+ }
+ YASM_DEBUG_INFO=--replace=${ARCADIA_BUILD_ROOT}=/-B --replace=${ARCADIA_ROOT}=/-S --replace=$(TOOL_ROOT)=/-T
+}
+elsewhen ($CONSISTENT_DEBUG == "yes") {
+ when ($CLANG == "yes") {
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T -Xclang -fdebug-compilation-dir -Xclang /tmp
+ }
+ otherwise {
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T
+ }
+ YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=--replace=${ARCADIA_BUILD_ROOT}=/-B --replace=${ARCADIA_ROOT}=/-S --replace=$(TOOL_ROOT)=/-T
+}
+elsewhen ($CONSISTENT_DEBUG_LIGHT == "yes") {
+ when ($CLANG == "yes") {
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -Xclang -fdebug-compilation-dir -Xclang /tmp
+ }
+ otherwise {
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B
+ }
+ YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=--replace=${ARCADIA_BUILD_ROOT}=/-B
+}
+
+when ($FORCE_CONSISTENT_BUILD == "yes") {
+ CL_MACRO_INFO=-Wno-builtin-macro-redefined -D__DATE__=\""Sep 31 2019\"" -D__TIME__=\"00:00:00\" -fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/= -fmacro-prefix-map=${ARCADIA_ROOT}/= -fmacro-prefix-map=$(TOOL_ROOT)/=
+}
+elsewhen ($CONSISTENT_BUILD == "yes") {
+ CL_MACRO_INFO_DISABLE_CACHE__NO_UID__=-Wno-builtin-macro-redefined -D__DATE__=\""Sep 31 2019\"" -D__TIME__=\"00:00:00\" -fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/= -fmacro-prefix-map=${ARCADIA_ROOT}/= -fmacro-prefix-map=$(TOOL_ROOT)/=
+}
+
+_CFLAGS_ARCH_I386=
+when ($ARCH_I386 == "yes" && $ARCH_I686 != "yes") {
+ _CFLAGS_ARCH_I386=-march=pentiumpro -mtune=pentiumpro
+}
+
+CFLAGS+=$_CFLAGS_ARCH_I386
+
+BC_CFLAGS+=$CFLAGS
+BC_CXXFLAGS+=$CXXFLAGS
+C_DEFINES+=-D__LONG_LONG_SUPPORTED
+
+OBJ_CROSS_SUF=$OBJ_SUF$_CROSS_SUFFIX
+OBJECT_SUF=$OBJ_SUF$_CROSS_SUFFIX.o
+GCC_COMPILE_FLAGS=$EXTRA_C_FLAGS -c -o $_COMPILE_OUTPUTS ${pre=-I:_C__INCLUDE}
+EXTRA_COVERAGE_OUTPUT=${output;noauto;hide;suf=${OBJECT_SUF}.gcno:SRC}
+CLANG_TIDY_OUTPUT_FILE=${output;noauto;suf=${OBJECT_SUF}.tidyjson:SRC}
+YNDEXER_OUTPUT_FILE=${output;noauto;suf=${OBJECT_SUF}.ydx.pb2:SRC}
+
+when ($DUMP_COMPILER_DEPS == "yes") {
+ DUMP_DEPS=-MD ${output;hide;noauto;suf=${OBJ_SUF}.o.d:SRC}
+}
+elsewhen ($DUMP_COMPILER_DEPS_FAST == "yes") {
+ DUMP_DEPS=-E -M -MF ${output;noauto;suf=${OBJ_SUF}.o.d:SRC}
+}
+
+_COMPILER_TIME_TRACE_GRANULARITY=500
+when ($TIME_TRACE_GRANULARITY && $TIME_TRACE_GRANULARITY != "") {
+ _COMPILER_TIME_TRACE_GRANULARITY=$TIME_TRACE_GRANULARITY
+}
+
+_COMPILER_TIME_TRACE_FLAGS=
+_COMPILER_TIME_TRACE_POSTPROCESS=
+when (($TIME_TRACE == "yes" || $COMPILER_TIME_TRACE == "yes") && $CLANG == "yes" && $_TC_VERSION_AT_LEAST_9 == "yes") {
+ _COMPILER_TIME_TRACE_FLAGS=-ftime-trace -ftime-trace-granularity=$_COMPILER_TIME_TRACE_GRANULARITY
+ _COMPILER_TIME_TRACE_POSTPROCESS=$YMAKE_PYTHON ${input:"build/scripts/find_time_trace.py"} $_COMPILE_OUTPUTS $_COMPILE_TIME_TRACE_OUTPUTS
+}
+
+_C_CPP_KV_STYLE=${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"p CC"} ${hide;kv:"pc green"}
+_CPP_ARGS=\
+$CLANG_TIDY_ARGS \
+$YNDEXER_ARGS \
+$CXX_COMPILER \
+$C_FLAGS_PLATFORM \
+$GCC_COMPILE_FLAGS \
+$CXXFLAGS \
+$CL_MACRO_INFO \
+$CL_MACRO_INFO_DISABLE_CACHE__NO_UID__ \
+$_COMPILER_TIME_TRACE_FLAGS \
+$EXTRA_OUTPUT \
+$SRCFLAGS \
+$_LANG_CFLAGS_VALUE \
+${input:SRC} \
+$TOOLCHAIN_ENV \
+$YNDEXER_OUTPUT \
+&& $_COMPILER_TIME_TRACE_POSTPROCESS \
+$_C_CPP_KV_STYLE
+
+_C_ARGS=\
+$CLANG_TIDY_ARGS \
+$YNDEXER_ARGS \
+$C_COMPILER \
+$C_FLAGS_PLATFORM \
+$GCC_COMPILE_FLAGS \
+$CFLAGS \
+$CL_MACRO_INFO \
+$CL_MACRO_INFO_DISABLE_CACHE__NO_UID__ \
+$_COMPILER_TIME_TRACE_FLAGS \
+$CONLYFLAGS \
+$EXTRA_OUTPUT \
+$SRCFLAGS \
+${input:SRC} \
+$TOOLCHAIN_ENV \
+$YNDEXER_OUTPUT \
+$_C_CPP_KV_STYLE
+
+### _SRC_C_NODEPS_CMD is obtained from _C_ARGS by filtering the following elements:
+### ${input:SRC}
+### $CL_MACRO_INFO
+### $CL_MACRO_INFO_DISABLE_CACHE__NO_UID__
+### $CLANG_TIDY_ARGS
+### $EXTRA_OUTPUT
+### $EXTRA_COVERAGE_OUTPUT
+### $SRCFLAGS
+### $YNDEXER_ARGS
+### $YNDEXER_OUTPUT
+###
+### $GCC_COMPILE_FLAGS is substituted for $EXTRA_C_FLAGS -c -o ${OUTFILE} ${SRC} ${pre=-I:INC}
+_SRC_C_NODEPS_CMD=\
+$C_COMPILER \
+$C_FLAGS_PLATFORM \
+$EXTRA_C_FLAGS -c -o ${OUTFILE} ${SRC} ${pre=-I:INC} \
+$CFLAGS \
+$CONLYFLAGS \
+$TOOLCHAIN_ENV \
+$_C_CPP_KV_STYLE
+
+_SRC_CPP_CMD=$_CPP_ARGS
+_SRC_C_CMD=$_C_ARGS
+_SRC_M_CMD=$SRC_c($SRC $SRCFLAGS)
+_SRC_MASM_CMD=$_EMPTY_CMD
+
+# fuzzing configuration
+when ($CLANG == "yes") {
+ when ($_TC_VERSION_AT_LEAST_12 == "yes") {
+ LIBFUZZER_PATH=contrib/libs/libfuzzer12
+ }
+}
diff --git a/build/conf/compilers/msvc_compiler.conf b/build/conf/compilers/msvc_compiler.conf
new file mode 100644
index 0000000000..6667f35c5c
--- /dev/null
+++ b/build/conf/compilers/msvc_compiler.conf
@@ -0,0 +1,294 @@
+_MSVC_MACRO=_WIN32_WINNT
+_MSVC_WINDOWS7=0x0601
+_MSVC_WINDOWS8=0x0602
+
+_MSVC_WARNS_ENABLED=
+# 'expression' : signed/unsigned mismatch
+_MSVC_WARNS_ENABLED+=/w14018
+# 'class' : class has virtual functions, but destructor is not virtual
+_MSVC_WARNS_ENABLED+=/w14265
+# 'operator' : expression is always false
+_MSVC_WARNS_ENABLED+=/w14296
+# missing type specifier - int assumed
+_MSVC_WARNS_ENABLED+=/w14431
+
+_MSVC_WARNS_AS_ERRORS=
+# 'function' undefined; assuming extern returning int
+_MSVC_WARNS_AS_ERRORS+=/we4013
+
+_MSVC_WARNS_DISABLED=
+# conditional expression is constant
+_MSVC_WARNS_DISABLED+=/wd4127
+# nonstandard extension used : zero-sized array in struct/union
+_MSVC_WARNS_DISABLED+=/wd4200
+# nonstandard extension used : nameless struct/union
+_MSVC_WARNS_DISABLED+=/wd4201
+# elements of array will be default initialized
+_MSVC_WARNS_DISABLED+=/wd4351
+# 'this' : used in base member initializer list
+_MSVC_WARNS_DISABLED+=/wd4355
+# decorated name length exceeded, name was truncated
+_MSVC_WARNS_DISABLED+=/wd4503
+# default constructor could not be generated
+_MSVC_WARNS_DISABLED+=/wd4510
+# copy constructor could not be generated
+_MSVC_WARNS_DISABLED+=/wd4511
+# assignment operator could not be generated
+_MSVC_WARNS_DISABLED+=/wd4512
+# check operator precedence for possible error; use parentheses to clarify precedence
+_MSVC_WARNS_DISABLED+=/wd4554
+# 'object' can never be instantiated - user defined constructor required
+_MSVC_WARNS_DISABLED+=/wd4610
+# assignment within conditional expression
+_MSVC_WARNS_DISABLED+=/wd4706
+# forcing value to bool 'true' or 'false' (performance warning)
+_MSVC_WARNS_DISABLED+=/wd4800
+# The POSIX name for this item is deprecated
+_MSVC_WARNS_DISABLED+=/wd4996
+# function marked as __forceinline not inlined
+_MSVC_WARNS_DISABLED+=/wd4714
+# 'TAtomic' : top-level volatile in cast is ignored
+_MSVC_WARNS_DISABLED+=/wd4197
+# 'initializing' : conversion from 'int' to 'ui32', signed/unsigned mismatch
+_MSVC_WARNS_DISABLED+=/wd4245
+# 'ystd::function<void (uint8_t *)>': structure was padded due to alignment specifier
+_MSVC_WARNS_DISABLED+=/wd4324
+# 'register' is no longer a supported storage class
+_MSVC_WARNS_DISABLED+=/wd5033
+
+_C_WARNINGS_CLANG_CL=
+_CXX_WARNINGS_CLANG_CL=
+_CXX_WARNINGS_CLANG_CL_2019=
+_CXX_WARNINGS_CLANG_CL_2019_IDE_MSVS=
+when ($CLANG_CL == "yes") {
+ _C_WARNINGS_CLANG_CL=\
+-Wno-absolute-value \
+-Wno-bitwise-op-parentheses \
+-Wno-dll-attribute-on-redeclaration \
+-Wno-extern-initializer \
+-Wno-format \
+-Wno-ignored-pragma-optimize \
+-Wno-inconsistent-dllimport \
+-Wno-int-conversion \
+-Wno-int-to-void-pointer-cast \
+-Wno-invalid-noreturn \
+-Wno-logical-op-parentheses \
+-Wno-macro-redefined \
+-Wno-parentheses \
+-Wno-pragma-pack \
+-Wno-tautological-constant-out-of-range-compare \
+-Wno-unknown-argument \
+-Wno-unknown-warning-option
+
+ _CXX_WARNINGS_CLANG_CL=\
+-Woverloaded-virtual \
+-Wno-attributes
+ # IGNIETFERRO-722 needed for contrib
+ _CXX_WARNINGS_CLANG_CL+=-Wno-register
+
+ _CXX_WARNINGS_CLANG_CL+=\
+-Wimport-preprocessor-directive-pedantic \
+-Wno-undefined-var-template
+
+ when ($_TC_VERSION_AT_LEAST_2019 == "yes") {
+ _CXX_WARNINGS_CLANG_CL_2019=\
+-Wno-deprecated-volatile \
+-Wno-deprecated-anon-enum-enum-conversion \
+-Wno-defaulted-function-deleted \
+-Wno-deprecated-enum-enum-conversion \
+-Wno-ambiguous-reversed-operator \
+-Wno-deprecated-enum-float-conversion \
+-Wno-pointer-to-int-cast
+ }
+
+ when ($IDE_MSVS == "yes") {
+ _CXX_WARNINGS_CLANG_CL_2019_IDE_MSVS=-Wno-unused-command-line-argument
+ }
+}
+
+_C_WARNINGS =$_MSVC_WARNS_AS_ERRORS
+_C_WARNINGS+=$_MSVC_WARNS_ENABLED
+_C_WARNINGS+=$_MSVC_WARNS_DISABLED
+_C_WARNINGS+=$_C_WARNINGS_CLANG_CL
+
+_CXX_WARNINGS =
+_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG_CL
+_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG_CL_2019
+_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG_CL_2019_IDE_MSVS
+
+_WINAPI_UNICODE=no
+
+_DEFINES_ARCH=
+when ($ARCH_X86_64 == "yes") {
+ _DEFINES_ARCH=/D_WIN64 /DWIN64
+}
+elsewhen ($ARCH_ARMV7 == "yes") {
+ _DEFINES_ARCH=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE /D__arm__
+}
+
+_DEFINES_WIN32_WINNT=/D$_MSVC_MACRO=$_MSVC_WINDOWS7
+
+when ($_WINAPI_UNICODE == "yes") {
+ _DEFINES_UNICODE=/DUNICODE /D_UNICODE
+}
+otherwise {
+ _DEFINES_UNICODE=/D_MBCS
+}
+
+_C_DEFINES=\
+/DARCADIA_ROOT=${ARCADIA_ROOT} \
+/DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT} \
+/DFAKEID=$CPP_FAKEID \
+/DWIN32 \
+/D_WIN32 \
+/D_WINDOWS \
+/D_CRT_SECURE_NO_WARNINGS \
+/D_CRT_NONSTDC_NO_WARNINGS \
+/D_USE_MATH_DEFINES \
+/D__STDC_CONSTANT_MACROS \
+/D__STDC_FORMAT_MACROS \
+/D_USING_V110_SDK71_ \
+/D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES \
+/DNOMINMAX \
+/DWIN32_LEAN_AND_MEAN
+
+_C_DEFINES+=$_DEFINES_ARCH
+_C_DEFINES+=$_DEFINES_WIN32_WINNT
+_C_DEFINES+=$_DEFINES_UNICODE
+
+C_DEFINES+=$_C_DEFINES
+
+_MSVC_FLAGS_CLANG=
+_MSVC_FLAGS_CLANG_NO_WARNINGS=
+_MSVC_FLAGS_CLANG_ARCH=
+_MSVC_FLAGS_CLANG_EQ_2019=
+when ($CLANG_CL == "yes") {
+ # -fcase-insensitive-paths
+ # Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems.
+ #
+ # -fno-common
+ # Enable standard-conforming behavior and generate duplicate symbol error in case of duplicated global constants.
+ # See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678#c0
+ _MSVC_FLAGS_CLANG=-fcase-insensitive-paths -fno-common
+ when ($ARCH_X86_64 == "yes") {
+ _MSVC_FLAGS_CLANG_ARCH=-m64
+ }
+ elsewhen ($ARCH_I386 == "yes") {
+ _MSVC_FLAGS_CLANG_ARCH=-m32
+ }
+ otherwise {
+ _MSVC_FLAGS_CLANG_ARCH=
+ }
+
+ # Some warnings are getting triggered even when NO_COMPILER_WARNINGS is enabled
+ _MSVC_FLAGS_CLANG_NO_WARNINGS=-Wno-c++11-narrowing -Wno-register
+
+ when ($_TC_VERSION_EXACTLY_2019 == "yes") {
+ # heretic: на момент коммита в нашей конфигурации указано, что тулчейн clang11-windows - аналог msvc 2019
+ # https://a.yandex-team.ru/arc/trunk/arcadia/build/ya.conf.json?rev=r7910792#L2185
+ # сам clang11 по дефолту представляется msvc2017 (#define _MSC_VER 1911
+ # https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/clang11/lib/Driver/ToolChains/MSVC.cpp?rev=r7913127#L1352
+ # вручную заставляем его представляться msvc2019 (#define _MSC_VER 1921)
+ # значение версии взято вот отсюда:
+ # https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/llvm11/include/llvm/Support/Compiler.h?blame=true&rev=r7913127#L89
+ _MSVC_FLAGS_CLANG_EQ_2019=-fms-compatibility-version=19.21
+ }
+}
+
+_MSVC_FLAGS=/nologo /Zm500 /GR /bigobj /FC /EHs /errorReport:prompt $MSVC_INLINE_FLAG /utf-8
+# enable standard conforming mode
+_MSVC_FLAGS+=/permissive-
+_MSVC_FLAGS+=$_MSVC_FLAGS_ARCH_OPT
+_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG
+_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG_ARCH
+_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG_NO_WARNINGS
+_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG_EQ_2019
+_MSVC_FLAGS+=$_MSVC_FLAGS_INCLUDE
+
+MSVC_INLINE_OPTIMIZED=yes
+when ($MSVC_INLINE_OPTIMIZED == "yes") {
+ MSVC_INLINE_FLAG=/Zc:inline
+}
+when ($MSVC_INLINE_OPTIMIZED == "no") {
+ MSVC_INLINE_FLAG=/Zc:inline-
+}
+
+# Use builtin offsetof implementation
+# instead of a crutcy macro defined in ucrt/stddef.h.
+# The latter can not be used in constexpr statements.
+_CXX_DEFINES=/D_CRT_USE_BUILTIN_OFFSETOF
+
+_FLAGS_C_ONLY=
+
+# Provide proper __cplusplus value
+# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
+_CXX_FLAGS=/Zc:__cplusplus
+
+_FLAGS_MSVS_ONLY=
+DEBUG_INFO_FLAGS=/Z7
+when ($IDE_MSVS == "yes") {
+ when ($CLANG_CL != "yes") {
+ _FLAGS_MSVS_ONLY=/FD /MP
+ }
+ DEBUG_INFO_FLAGS=/Zi /FS
+}
+
+C_WARNING_OPTS=$_C_WARNINGS
+CXX_WARNING_OPTS=$_CXX_WARNINGS
+
+# https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
+when ($DLL_RUNTIME == "yes") {
+ _FLAGS_DEBUG_RUNTIME=/MDd
+ _FLAGS_RELEASE_RUNTIME=/MD
+}
+otherwise {
+ _FLAGS_DEBUG_RUNTIME=/MTd
+ _FLAGS_RELEASE_RUNTIME=/MT
+}
+CFLAGS_DEBUG=/Ob0 /Od /D_DEBUG $_FLAGS_DEBUG_RUNTIME
+CFLAGS_RELEASE=/Ox /Ob2 /Oi /DNDEBUG $_FLAGS_RELEASE_RUNTIME
+
+MASMFLAGS=
+_MASM_IO=/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}
+when ($ARCH_ARMV7) {
+ _MASM_IO=-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}
+}
+
+OBJ_CROSS_SUF=$OBJ_SUF
+OBJECT_SUF=$OBJ_SUF.obj
+
+CFLAGS+=$_MSVC_FLAGS $_FLAGS_MSVS_ONLY $CFLAGS_PER_TYPE $DEBUG_INFO_FLAGS $C_WARNING_OPTS $C_DEFINES $USER_CFLAGS $USER_CFLAGS_GLOBAL
+CXXFLAGS+=$CFLAGS $_STD_CXX $_CXX_FLAGS $_CXX_DEFINES $CXX_WARNING_OPTS $USER_CXXFLAGS $USER_CXXFLAGS_GLOBAL
+CONLYFLAGS+=$_FLAGS_C_ONLY $USER_CONLYFLAGS $USER_CONLYFLAGS_GLOBAL
+
+BC_CFLAGS+=$CFLAGS
+BC_CXXFLAGS+=$BC_CFLAGS $CXXFLAGS
+
+CFLAGS+=$_CFLAGS_UCRT_VC_INCLUDES
+
+when ($NO_WSHADOW == "yes") {
+ C_WARNING_OPTS+=/wd4456 /wd4457
+}
+when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS=/w
+ CXX_WARNING_OPTS=
+}
+when ($NO_OPTIMIZE == "yes") {
+ OPTIMIZE=/Od
+}
+
+SFDL_FLAG=/E /C /P /TP /Fi$SFDL_TMP_OUT
+WERROR_FLAG=/WX
+
+CL_WRAPPER=${YMAKE_PYTHON} ${input:"build/scripts/fix_msvc_output.py"} cl
+ML_WRAPPER=${YMAKE_PYTHON} ${input:"build/scripts/fix_msvc_output.py"} ml
+when ($_UNDER_WINE == "yes") {
+ CL_WRAPPER=
+ ML_WRAPPER=
+}
+
+_SRC_C_NODEPS_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo${OUTFILE} ${SRC} ${EXTRA_C_FLAGS} ${pre=/I :INC} ${CFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}
+_SRC_CPP_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${CXX_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CXXFLAGS} ${SRCFLAGS} ${_LANG_CFLAGS_VALUE} ${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}
+_SRC_C_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CFLAGS} ${CONLYFLAGS} ${SRCFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}
+_SRC_M_CMD=$_EMPTY_CMD
+_SRC_MASM_CMD=${cwd:ARCADIA_BUILD_ROOT} ${TOOLCHAIN_ENV} ${ML_WRAPPER} ${MASM_COMPILER} ${MASMFLAGS} ${SRCFLAGS} $_MASM_IO ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p AS"} ${kv;hide:"pc yellow"}
diff --git a/build/conf/java.ymake.conf b/build/conf/java.ymake.conf
new file mode 100644
index 0000000000..ed85153c78
--- /dev/null
+++ b/build/conf/java.ymake.conf
@@ -0,0 +1,179 @@
+YMAKE_JAVA_MODULES=yes
+JBUILD_JAVA_MODULES=no
+
+macro _INPUT_WITH_FLAG(Flag, IN[]) {
+ .CMD=$_INPUT_WITH_FLAG_IMPL(${pre=$Flag :IN} IN $IN)
+}
+
+macro _INPUT_WITH_FLAG_IMPL(IN{input}[], Args...) {
+ .CMD=$Args ${input;hide:IN}
+}
+
+macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") {
+ .PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input;pre=build/scripts/:DEBUG.py} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:"tools/acceleo"}${RUN_JAR_PROG_CP_SUF} ru.yandex.se.logsng.tool.Cli $_INPUT_WITH_FLAG(--xsd IN $XSD) $_INPUT_WITH_FLAG(--mtl IN $MTL) $_INPUT_WITH_FLAG(--lang IN $LANG) --output-dir $BINDIR --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT} --mtl-root $MTL_ROOT ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+}
+
+### @usage: JAVA_LIBRARY()
+###
+### The module describing java library build.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_LIBRARY: JAR_LIBRARY {
+ .ALIASES=REQUIREMENTS=JAVA_REQUIREMENTS
+}
+
+### @usage: JAVA_PROGRAM()
+###
+### The module describing java programs build.
+### Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+multimodule JAVA_PROGRAM {
+ module JAR_RUNABLE: _JAR_RUNABLE {
+ .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+ # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+ # * A -> B -> C -> lib-v1.4
+ # | |-> DM(lib-v1.1)
+ # | |-> EXCLUDE(lib-v1.4)
+ # | |-> FORBID_CONFLICT_DM_RECENT = OK
+ # |-> DM(lib-v1.1)
+ # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+ .IGNORED=RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+ .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+ .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO REQUIREMENTS=JAVA_REQUIREMENTS
+ .FINAL_TARGET=no
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ }
+}
+
+multimodule JUNIT5 {
+ module JAR_TESTABLE: _JAR_TEST {
+ .ALLOWED=YT_SPEC
+ # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+ # * A -> B -> C -> lib-v1.4
+ # | |-> DM(lib-v1.1)
+ # | |-> EXCLUDE(lib-v1.4)
+ # | |-> FORBID_CONFLICT_DM_RECENT = OK
+ # |-> DM(lib-v1.1)
+ # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JUNIT5)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .ALLOWED=YT_SPEC
+ .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+ .FINAL_TARGET=no
+
+ PEERDIR(devtools/junit5-runner build/platform/java/jacoco-agent)
+ SET(MODULE_TYPE JUNIT5)
+ }
+}
+
+multimodule JTEST {
+ module JAR_TESTABLE: _JAR_TEST {
+ .ALLOWED=YT_SPEC
+ # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+ # * A -> B -> C -> lib-v1.4
+ # | |-> DM(lib-v1.1)
+ # | |-> EXCLUDE(lib-v1.4)
+ # | |-> FORBID_CONFLICT_DM_RECENT = OK
+ # |-> DM(lib-v1.1)
+ # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JTEST)
+ PEERDIR(devtools/junit-runner)
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .ALLOWED=YT_SPEC
+ .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+ .FINAL_TARGET=no
+
+ SET(MODULE_TYPE JTEST)
+ DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+ PEERDIR(build/platform/java/jacoco-agent)
+ }
+}
+
+multimodule JTEST_FOR {
+ module JAR_TESTABLE: _JAR_TEST {
+ .ALLOWED=YT_SPEC
+ # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+ # * A -> B -> C -> lib-v1.4
+ # | |-> DM(lib-v1.1)
+ # | |-> EXCLUDE(lib-v1.4)
+ # | |-> FORBID_CONFLICT_DM_RECENT = OK
+ # |-> DM(lib-v1.1)
+ # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JTEST_FOR)
+ PEERDIR(${UNITTEST_DIR} devtools/junit-runner)
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .ALLOWED=YT_SPEC
+ .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+ .FINAL_TARGET=no
+
+ SET(MODULE_TYPE JTEST_FOR)
+ DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+ PEERDIR(devtools/junit-runner build/platform/java/jacoco-agent ${UNITTEST_DIR})
+ }
+}
+
+multimodule JAVA_CONTRIB_PROGRAM {
+ module JAR_RUNABLE: _JAR_RUNABLE {
+ .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ ENABLE(DISABLE_SCRIPTGEN)
+ }
+ module JAR_COMPILATION: JAVA_CONTRIB {
+ .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+ .FINAL_TARGET=no
+ }
+}
+
+module _DLL_COMPATIBLE_JAVA_LIBRARY: EXTERNAL_JAVA_LIBRARY {
+ SET(DONT_RESOLVE_INCLUDES yes)
+}
+
+### @usage: DLL_JAVA()
+###
+### DLL built using swig for Java. Produces dynamic library and a .jar.
+### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+### .jar goes on the classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+multimodule DLL_JAVA {
+ module JNI_DLL: DLL {
+ .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS
+ SET(SWIG_LANG jni_cpp)
+ .FINAL_TARGET=no
+ }
+ module JAR_COMPILATION: _DLL_COMPATIBLE_JAVA_LIBRARY {
+ .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS PEERDIR=_NOOP_MACRO
+ .PEERDIRSELF=JNI_DLL
+ SET(SWIG_LANG jni_java)
+ PEERDIR+=build/platform/java/jdk
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+ .FINAL_TARGET=yes
+ }
+}
diff --git a/build/conf/jbuild.ymake.conf b/build/conf/jbuild.ymake.conf
new file mode 100644
index 0000000000..945a7cc979
--- /dev/null
+++ b/build/conf/jbuild.ymake.conf
@@ -0,0 +1,122 @@
+YMAKE_JAVA_MODULES=no
+JBUILD_JAVA_MODULES=yes
+
+EXTERNAL_JAR_VALUE=
+### @usage: EXTERNAL_JAR(library.jar)
+###
+### Provide an external name for built JAVA_LIBRARY() or JAVA_PROGRAM()
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#ispolzovanievneshnixmavenbibliotek
+macro EXTERNAL_JAR(Args...) {
+ SET_APPEND(EXTERNAL_JAR_VALUE $ARGS_DELIM $Args)
+}
+
+### @usage: JAVA_LIBRARY()
+###
+### The module describing java library build.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_LIBRARY: _JAVA_PLACEHOLDER {
+ SET(MODULE_TYPE JAVA_LIBRARY)
+}
+
+### @usage: JAVA_PROGRAM()
+###
+### The module describing java programs build.
+### Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_PROGRAM: _JAVA_PLACEHOLDER {
+ .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+ SET(MODULE_TYPE JAVA_PROGRAM)
+}
+
+### @usage: JUNIT5()
+###
+### Java tests module based on JUnit 5 framework.
+###
+### If requested, build system will scan the source code of the module for the presence of junit tests and run them.
+### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JUNIT5: _JAVA_PLACEHOLDER {
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ SET(MODULE_TYPE JUNIT5)
+ SET(TEST_RUNNER devtools/junit5-runner)
+ SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER})
+ # Used as place to add managed dependencies for test execution and take them into account
+ # during traverses properly.
+ _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd)
+
+ PEERDIR(${TEST_RUNNER})
+ PEERDIR(build/platform/java/jacoco-agent)
+ JAVA_TEST()
+}
+
+### @usage: JTEST()
+###
+### Java tests module based on JUnit 4 framework.
+###
+### If requested, build system will scan the source code of the module for the presence of junit tests and run them.
+### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JTEST: _JAVA_PLACEHOLDER {
+ .ALLOWED=YT_SPEC
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ SET(MODULE_TYPE JTEST)
+ SET(TEST_RUNNER devtools/junit-runner)
+ SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER})
+ # Used as place to add managed dependencies for test execution and take them into account
+ # during traverses properly.
+ _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd)
+
+ # TODO: if <needs_sonar>
+ DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+ DEPENDS(${TEST_RUNNER})
+ _GHOST_PEERDIR(${TEST_RUNNER})
+ PEERDIR(build/platform/java/jacoco-agent)
+ JAVA_TEST()
+
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+### @usage: JTEST_FOR(ModuleDir)
+###
+### Convinience java tests module based on JUnit 4 framework for specified library or program.
+###
+### In contrast to the JTEST, the build system will scan for the presence of the test sources of the module in ModuleDir . As ModuleDir should contain JAVA_PROGRAM or JAVA_LIBRARY . JTEST_FOR also can have its own source, in this case they will be compiled and added to the classpath of a test run.
+### Output artifacts: a jar, a directory of exhaust tests(if requested tests are run).
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JTEST_FOR: JTEST {
+ .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+ SET(MODULE_TYPE JTEST_FOR)
+ SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER} ${UNITTEST_DIR})
+
+ PEERDIR($UNITTEST_DIR)
+ SET(REALPRJNAME jtest)
+ JAVA_TEST()
+}
+
+module JAVA_CONTRIB_PROGRAM: JAVA_CONTRIB {
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ ENABLE(DISABLE_SCRIPTGEN)
+}
+
+### @usage: DLL_JAVA()
+###
+### DLL built using swig for Java. Produces dynamic library and a .jar.
+### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+### .jar goes on the classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+module DLL_JAVA: DLL {
+ .EXTS=.o .obj .jsrc .java .mf
+ .CMD=SWIG_DLL_JAR_CMD
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+
+ PROPAGATES_MANAGEABLE_PEERS=yes
+ SET(SWIG_LANG java)
+}
diff --git a/build/conf/license.conf b/build/conf/license.conf
new file mode 100644
index 0000000000..0c43ed4c1d
--- /dev/null
+++ b/build/conf/license.conf
@@ -0,0 +1,380 @@
+LICENSE_EXPRESSION_IMPLICIT_OR=yes
+LICENSE_EXPRESSION_IMPLICIT_AND=yes
+LICENSE_EXPRESSION=
+LICENSE_NAMES=
+
+MODULE_LICENSES_RESTRICTIONS=
+MODULE_LICENSES_RESTRICTION_EXCEPTIONS=
+MODULE_LICENSES_RESTRICTION_TYPES=
+DEFAULT_MODULE_LICENSE=YandexUncategorized
+EXPLICIT_LICENSE_PREFIXES=
+
+# List of license properties which can be used to restrict transitive dependencies. There are three variables checked for each
+# property:
+# * LICENSES_<PROP_NAME>_STATIC: list of licenses which propagates this property when linking with code published by one of
+# them statically.
+# * LICENSES_<PROP_NAME>_DYNAMIC: list of licenses which propagates this property when linking with code published by one of
+# them dyamically.
+# * LICENSES_<PROP_NAME>: list of licenses which propagates this property regrdless of type of linking with code published by
+# one of them. Putting some license into this list is equivalent to putting it into both
+# LICENSES_<PROP_NAME>_STATIC and LICENSES_<PROP_NAME>_DYNAMIC lists.
+LICENSE_PROPERTIES= \
+ FORBIDDEN NDA REQUIRE_DISCLOSURE PERMISSIVE REQUIRE_CITATION SERVICE
+
+LICENSES_UNATTRIBUTED= \
+ AFL-2.0 \
+ AML \
+ APSL-1.0 \
+ ASM-BSD-3-Clause \
+ Amazon-SL \
+ Artistic-1.0-Perl \
+ BCL \
+ BSD-3-Clause-Open-MPI \
+ BSD-4-Clause-Shortened \
+ BSLA \
+ Bison-Exception \
+ BouncyCastle-MIT \
+ Brian-Gladman-3-Clause \
+ Bsd-New-Tcpdump \
+ Bsd-Original-Uc-1986 \
+ CC-BY-1.0 \
+ CC-BY-2.0 \
+ CC-BY-2.5 \
+ CC-BY-3.0 \
+ CC-BY-4.0 \
+ CC-BY-NC-1.0 \
+ CC-BY-NC-2.0 \
+ CC-BY-NC-2.5 \
+ CC-BY-NC-3.0 \
+ CC-BY-NC-ND-1.0 \
+ CC-BY-NC-ND-2.0 \
+ CC-BY-NC-ND-2.5 \
+ CC-BY-NC-ND-3.0 \
+ CC-BY-NC-SA-1.0 \
+ CC-BY-NC-SA-2.0 \
+ CC-BY-NC-SA-2.5 \
+ CC-BY-NC-SA-3.0 \
+ CC-BY-ND-1.0 \
+ CC-BY-ND-2.0 \
+ CC-BY-ND-2.5 \
+ CC-BY-ND-3.0 \
+ CC-BY-SA-1.0 \
+ CC-BY-SA-2.0 \
+ CC-BY-SA-2.5 \
+ CC-BY-SA-3.0 \
+ CC-BY-SA-4.0 \
+ CDDL \
+ CECILL-B \
+ Carnegie-Mellon \
+ Carnegie-Mellon-Contributors \
+ DOC \
+ DSO-1.1 \
+ EDL-1.0 \
+ Elastic-License-2.0 \
+ FSFUL \
+ FSFULLR \
+ Fftpack-2004 \
+ GCC-exception-3.1 \
+ GDAL \
+ GFDL-1.1-or-later \
+ GPL-2.0 WITH Classpath-exception-2.0 \
+ GPL-2.0 WITH FOSS-exception \
+ GPL-2.0-only WITH Mysql-Linking-Exception-2018 \
+ GPL-2.0-only WITH Universal-FOSS-exception-1.0 \
+ GPL-2.0-or-later WITH Avisynth-C-Interface-Exception \
+ GPL-2.0-or-later WITH Bison-Exception-2.0 \
+ GPL-2.0-or-later WITH Bison-exception-2.2 \
+ GPL-2.0-or-later WITH C-Interface-Exception \
+ GPL-2.0-or-later WITH Libtool-exception \
+ GPL-2.0-or-later WITH mif-exception \
+ Go-License \
+ Google-Patent-License-Webm \
+ Google-Patent-License-Webrtc \
+ HPND \
+ HPND-sell-variant \
+ HPND-sell-variant \
+ HSQLDB-BSD-3-Clause \
+ Hdf5 \
+ IPL-1.0 \
+ Ibm-Dhcp \
+ Ietf-trust \
+ ImageMagick \
+ Info-Zip \
+ Intel-Confidential \
+ Intel-Material \
+ JAMon-BSD-3-Clause \
+ LGPL-3.0-or-later WITH ZeroMQ-Exception \
+ LPL-1.02 \
+ LicenseRef-scancode-bsd-new-nomod \
+ LicenseRef-scancode-cc-by-2.0-uk \
+ LicenseRef-scancode-cc-devnations-2.0 \
+ LicenseRef-scancode-cc-sampling-1.0 \
+ LicenseRef-scancode-free-unknown \
+ LicenseRef-scancode-generic-cla \
+ LicenseRef-scancode-other-copyleft \
+ LicenseRef-scancode-other-permissive \
+ LicenseRef-scancode-pcre \
+ LicenseRef-scancode-proprietary-license \
+ LicenseRef-scancode-unknown \
+ LicenseRef-scancode-unknown-license-reference \
+ LicenseRef-scancode-warranty-disclaimer \
+ MirOS \
+ Mit-Xfig \
+ Mozilla-GC \
+ Musl-Exception \
+ NAIST-2003 \
+ Nvidia-Gov \
+ Oracle \
+ Oracle-technology \
+ PSF-3.7.2 \
+ Qhull \
+ Quicklz \
+ Red-Hat-Attribution \
+ Ruby \
+ SSPL-1.0 \
+ SZIP \
+ Sendmail \
+ Softsurfer \
+ Stlport-4.5 \
+ Sunpro \
+ TCL \
+ TU-Berlin-1.0 \
+ Unicode-TOU \
+ Universal-FOSS-exception-1.0 \
+ Unknown \
+ Unlicense \
+ Vcalendar \
+ Vim \
+ X11-Adobe-Dec \
+ X11-Hanson \
+ X11-XConsortium-Veillard \
+ Xfree86-1.0 \
+ Xnet \
+ jQuery-MIT
+
+LICENSES_PATCHES_FORBIDDEN= \
+ Unicode
+
+LICENSES_FORBIDDEN= \
+ AGPL-3.0-only \
+ AGPL-3.0-or-later \
+ Artistic-1.0 \
+ ${LICENSES_UNATTRIBUTED}
+
+# Group for proprietary code licenses
+LICENSES_NDA= \
+ Intel-NDA \
+ mimepp \
+ OracleOebs \
+ Sophos-SDK \
+ YandexUncategorized \
+ YandexNDA
+
+# These licenses allow use with opensource code only
+LICENSES_REQUIRE_DISCLOSURE= \
+ CDDL-1.0 \
+ CDDL-1.1 \
+ CECILL-2.0 \
+ CPL-1.0 \
+ EPL-1.0 \
+ EPL-2.0 \
+ GPL \
+ GPL-1.0-only \
+ GPL-1.0-or-later \
+ GPL-1.0-or-later WITH Linux-syscall-note \
+ GPL-1.1 \
+ GPL-2.0 \
+ GPL-2.0-only \
+ GPL-2.0-only WITH GCC-exception-2.0 \
+ GPL-2.0-only WITH Linux-syscall-note \
+ GPL-2.0-or-later \
+ GPL-2.0-or-later WITH GCC-exception-2.0 \
+ GPL-2.0-or-later WITH Linux-syscall-note \
+ GPL-3.0-only \
+ GPL-3.0-or-later \
+ GPL-3.0-or-later WITH Bison-exception-2.2
+
+LICENSES_REQUIRE_DISCLOSURE_STATIC= \
+ LGPL \
+ LGPL-1.0-or-later \
+ LGPL-2.0-only \
+ LGPL-2.0-or-later \
+ LGPL-2.0-or-later WITH Libtool-exception \
+ LGPL-2.0-or-later WITH Linux-syscall-note \
+ LGPL-2.1-only \
+ LGPL-2.1-only WITH Linux-syscall-note \
+ LGPL-2.1-or-later \
+ LGPL-2.1-or-later WITH Linux-syscall-note \
+ LGPL-3.0-only \
+ LGPL-3.0-or-later
+
+# These licenses allows any kind of linkage with proprietary code
+LICENSES_PERMISSIVE= \
+ 0BSD \
+ Apache-1.0 \
+ Apache-1.1 \
+ Apache-2.0 \
+ Apache-2.0 WITH LLVM-exception \
+ APSL-2.0 \
+ Beerware \
+ blessing \
+ BSL-1.0 \
+ BSD \
+ BSD-1-Clause \
+ BSD-2-Clause \
+ BSD-2-Clause-Patent \
+ BSD-2-Clause-Views \
+ BSD-3-Clause \
+ BSD-4-Clause \
+ BSD-4-Clause-UC \
+ BSD-derived \
+ BSD-ORIGINAL-UC-1986 \
+ BSD-Source-Code \
+ Bsd-Simplified-Darwin \
+ Bsd-Unchanged \
+ Bsd-Unmodified \
+ bzip2-1.0.6 \
+ CC0-1.0 \
+ CC-PDDC \
+ Cmu-Computing-Services \
+ CUP-Parser \
+ curl \
+ Custom-Punycode \
+ Facebook-SDK \
+ FDK \
+ FSFAP \
+ FTL \
+ H2 \
+ IBM-pibs \
+ ICU \
+ Ietf \
+ IJG \
+ Intel-Simplified \
+ ISC \
+ JSON \
+ Khronos \
+ Libpbm \
+ LicenseRef-scancode-bitstream \
+ LicenseRef-scancode-ams-fonts \
+ Linux-OpenIB \
+ Libpng \
+ libpng-2.0 \
+ libtiff \
+ Martin-Birgmeier \
+ MIT \
+ MIT-0 \
+ MIT-CMU \
+ MIT-Modern-Variant \
+ MIT-Nagy \
+ MIT-open-group \
+ Mit-Old-Style \
+ Mit-Veillard-Variant \
+ MPL-1.0 \
+ MPL-1.1 \
+ MPL-2.0 \
+ Minpack \
+ NCSA \
+ NTP \
+ Not-Applicable \
+ Nvidia \
+ OGC-1.0 \
+ OLDAP-2.8 \
+ OML \
+ OpenSSL \
+ PayPal-SDK \
+ PCRE \
+ PD \
+ Public-Domain \
+ Public-Domain-US-Govt \
+ PHP-3.01 \
+ PIL \
+ Plexus \
+ PostgreSQL \
+ Protobuf-License \
+ PSF \
+ PSF-2.0 \
+ Python-2.0 \
+ Qhull \
+ Repoze-public \
+ RSA-MD \
+ RSA-MD4 \
+ RSA-1990 \
+ Sleepycat \
+ Snprintf \
+ SGI-B-2.0 \
+ SMLNJ \
+ SSH-short \
+ SSLeay \
+ Unicode-DFS-2016 \
+ Unicode-Icu-58 \
+ Unicode-Mappings \
+ Unlicense \
+ Unrar \
+ UPL-1.0 \
+ Vertica \
+ W3C \
+ WTFPL \
+ X11 \
+ X11-Lucent \
+ YandexOpen \
+ Zlib \
+ zlib-acknowledgement \
+ ZPL-2.1 \
+ ${LICENSES_PATCHES_FORBIDDEN}
+
+LICENSES_PERMISSIVE_DYNAMIC= \
+ LGPL \
+ LGPL-2.0-only \
+ LGPL-2.0-or-later \
+ LGPL-2.1-only \
+ LGPL-2.1-or-later \
+ LGPL-3.0-only \
+ LGPL-3.0-or-later
+
+# https://st.yandex-team.ru/ARCADIAWGSUP-34
+CUSTOM_LICENSE_LIBSSH2_AGENT_WIN=Libssh2-Agent-Win
+
+# TODO: this list is almost empty. needed for DEVRULES-151
+LICENSES_REQUIRE_CITATION= \
+ Apache-2.0 \
+ Cmu-Computing-Services \
+ OpenSSL \
+ Spencer-94 \
+ ${CUSTOM_LICENSE_LIBSSH2_AGENT_WIN}
+
+LICENSES_SERVICE= \
+ Service-Dll-Harness \
+ Service-Prebuilt-Tool \
+ Service-Py23-Proxy
+
+macro _REQUIRE_EXPLICIT_LICENSE(Prefix...) {
+ SET(EXPLICIT_LICENSE_PREFIXES ${Prefix})
+}
+
+### @usage: LICENSE(licenses...)
+###
+### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
+### library satisfying all conditions of any of the listed licenses.
+###
+### A license must be prescribed for contribs
+macro LICENSE(Flags...) {
+ SET(LICENSE_EXPRESSION $Flags)
+ SET(LICENSE_NAMES $Flags)
+}
+
+### @usage RESTRICT_LICENSES(ALLOW_ONLY|DENY LicenseProperty...)
+###
+### Restrict licenses of direct and indirect module dependencies.
+###
+### ALLOW_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions
+### list.
+###
+### DENY restriction type forbids dependency on module with no license without any listed propery from the list.
+###
+### Note: Can be used multiple times on the same module all specified constraints will be checked.
+### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
+macro RESTRICT_LICENSES(TYPE, EXCEPT[], RESTRICTIONS...) {
+ SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE)
+ SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS)
+ SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT)
+}
diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf
new file mode 100644
index 0000000000..655c09dc66
--- /dev/null
+++ b/build/conf/linkers/ld.conf
@@ -0,0 +1,383 @@
+_LD_FLAGS_1=
+_LD_FLAGS_2=
+when ($MUSL == "yes") {
+ _LD_FLAGS_1=-Wl,--no-as-needed
+ when ($GCC == "yes") {
+ # MUSL_BFD: musl build uses --no-dynamic-linker linker flag
+ # which gold doesn't know about. And we can only specify linker
+ # type, not it's path as we do for Clang through linker selector.
+ _LD_FLAGS_2=-fuse-ld=bfd
+ }
+}
+elsewhen ($OS_LINUX == "yes") {
+ _LD_FLAGS_1=-ldl -lrt -Wl,--no-as-needed
+ when ($GCC == "yes") {
+ _LD_FLAGS_2=-Wl,-Bstatic -latomic -Wl,-Bdynamic
+ }
+}
+elsewhen ($OS_ANDROID == "yes") {
+ _LD_FLAGS_1=-ldl -Wl,--no-as-needed
+ when ($_DEFAULT_LINKER_ID == "lld" && $_ANDROID_API_LESS_THEN_29 == "yes") {
+ # https://github.com/android/ndk/issues/1196
+ _LD_FLAGS_2=-Wl,--no-rosegment
+ }
+}
+elsewhen ($OS_DARWIN == "yes") {
+ _LD_FLAGS_1=-Wl,-no_deduplicate
+ when ($CLANG != "yes") {
+ _LD_FLAGS_2=-Wl,-no_compact_unwind
+ }
+}
+
+_LD_FLAGS_IOS_MAPSMOBI_ARM=
+when ($OS_IOS == "yes" && $MAPSMOBI_BUILD_TARGET == "yes" && $ARCH_ARM) {
+ _LD_FLAGS_IOS_MAPSMOBI_ARM=-fembed-bitcode -Wl,-bitcode_verify
+}
+
+_LD_FLAGS_PROFILER_TYPE=
+when ($_BUILD_PROFILER_TYPE == "gprof") {
+ _LD_FLAGS_PROFILER_TYPE=-pg
+}
+
+_LD_FLAGS_COVERAGE=
+when ($_BUILD_COVERAGE == "yes") {
+ _LD_FLAGS_COVERAGE=-fprofile-arcs -ftest-coverage
+}
+
+_LD_FLAGS =
+_LD_FLAGS+=$_LD_FLAGS_1
+_LD_FLAGS+=$_LD_FLAGS_2
+_LD_FLAGS+=$_LD_FLAGS_IOS_MAPSMOBI_ARM
+_LD_FLAGS+=$_LD_FLAGS_PROFILER_TYPE
+_LD_FLAGS+=$_LD_FLAGS_COVERAGE
+_LD_FLAGS+=$LD_SDK_VERSION
+
+LDFLAGS+=$USER_LDFLAGS $_LD_FLAGS
+LDFLAGS_GLOBAL+=
+
+_START_GROUP=
+_END_GROUP=
+START_WHOLE_ARCHIVE_VALUE=
+END_WHOLE_ARCHIVE_VALUE=
+LD_STRIP_FLAG=
+_SONAME_OPTION=
+_LD_SRCS_GLOBALS=--start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}
+when ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_CYGWIN == "yes" || $OS_NONE == "yes") {
+ _START_GROUP=-Wl,--start-group
+ _END_GROUP=-Wl,--end-group
+ START_WHOLE_ARCHIVE_VALUE=-Wl,--whole-archive
+ END_WHOLE_ARCHIVE_VALUE=-Wl,--no-whole-archive
+ LD_STRIP_FLAG=-s
+ _SONAME_OPTION=-soname
+ _LD_SRCS_GLOBALS=-Wl,--whole-archive ${rootrel;ext=.a:SRCS_GLOBAL} -Wl,--no-whole-archive ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}
+}
+
+when ($_LD_WHOLE_ARCHIVE == "yes") {
+}
+
+when ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
+ _SONAME_OPTION=-install_name
+}
+
+_LD_LINKER_OUTPUT=
+_LD_LINKER_OUTPUT_FLAG=--linker-output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION.linker.txt:REALPRJNAME}
+
+# Enable section-level DCE (dead code elimination):
+# remove whole unused code and data sections
+# (needs `-ffunction-sections` and `-fdata-sections` to be useful)
+#
+# NOTE: CGO linker doesn't seem to support DCE, but shares common LDFLAGS
+_LD_DCE_FLAG_GC_SECTIONS=
+_LD_DCE_FLAG_PRINT_SECTIONS=
+when ($OS_DARWIN == "yes") {
+ _LD_DCE_FLAG_GC_SECTIONS=-Wl,-dead_strip
+}
+elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes") {
+ _LD_DCE_FLAG_GC_SECTIONS=-Wl,--gc-sections
+ when ($LINKER_DCE_PRINT_SECTIONS == "yes") {
+ _LD_DCE_FLAG_PRINT_SECTIONS=-Wl,--print-gc-sections
+ _LD_LINKER_OUTPUT=$_LD_LINKER_OUTPUT_FLAG
+ }
+}
+LD_DCE_FLAG =
+LD_DCE_FLAG+=$_LD_DCE_FLAG_GC_SECTIONS
+LD_DCE_FLAG+=$_LD_DCE_FLAG_PRINT_SECTIONS
+DCE_FLAG=
+
+_LD_ICF_FLAG=
+_LD_ICF_FLAG_PRINT_SECTIONS=
+when ($_DEFAULT_LINKER_ID == "lld") {
+ # Enable ICF (identical code folding pass) in safe mode
+ # https://research.google/pubs/pub36912/
+ _LD_ICF_FLAG=-Wl,-icf=safe
+ when ($LINKER_ICF_PRINT_SECTIONS == "yes") {
+ _LD_ICF_FLAG_PRINT_SECTIONS=-Wl,--print-icf-sections
+ _LD_LINKER_OUTPUT=$_LD_LINKER_OUTPUT_FLAG
+ }
+}
+LD_ICF_FLAG =
+LD_ICF_FLAG+=$_LD_ICF_FLAG
+LD_ICF_FLAG+=$_LD_ICF_FLAG_PRINT_SECTIONS
+ICF_FLAG=
+
+STRIP_FLAG=
+
+C_LIBRARY_PATH=
+C_SYSTEM_LIBRARIES_INTERCEPT=
+
+_LD_THREAD_LIBRARY=
+when ($OS_LINUX == "yes" || $OS_DARWIN == "yes") {
+ _LD_THREAD_LIBRARY=-lpthread
+}
+
+_LD_USE_STDLIB=
+when ($_BUILD_COVERAGE == "yes" || $GCOV_COVERAGE == "yes" || $CLANG_COVERAGE == "yes" || $_BUILD_SANITIZED == "yes") {
+ _LD_USE_STDLIB=
+}
+elsewhen ($OS_ANDROID == "yes") {
+ when ($_ANDROID_NDK_VERSION_LESS_THEN_23 == "yes") {
+ # Preserve old behaviour: specify runtime libs manually
+ _LD_USE_STDLIB=-nodefaultlibs
+ }
+ otherwise {
+ # Use toolchain defaults to link with libunwind/clang_rt.builtins
+ _LD_USE_STDLIB=-nostdlib++
+ }
+}
+elsewhen ($OS_LINUX == "yes" || $OS_DARWIN == "yes" || $OS_IOS == "yes") {
+ _LD_USE_STDLIB=-nodefaultlibs
+}
+
+_C_SYSTEM_LIBRARIES=$_LD_USE_STDLIB $_LD_THREAD_LIBRARY $_LD_SYS_LIB -lc
+when ($MUSL == "yes") {
+ _C_SYSTEM_LIBRARIES=-nostdlib
+}
+C_SYSTEM_LIBRARIES=$_C_SYSTEM_LIBRARIES
+
+OBJADDE=
+
+LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG=
+when ($OS_LINUX == "yes" || $OS_ANDROID == "yes") {
+ LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG=-rdynamic
+}
+
+NO_EXPORT_DYNAMIC_SYMBOLS=
+EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG
+when ($EXPORTS_FILE) {
+ EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG -Wl,--version-script=${input:EXPORTS_FILE}
+}
+when ($NO_EXPORT_DYNAMIC_SYMBOLS == "yes") {
+ EXPORTS_VALUE=
+}
+
+LINKER_SCRIPT_VALUE=${ext=.ld;pre=-T:SRCS_GLOBAL}
+
+_LINKER_TIME_TRACE_GRANULARITY=500
+when ($TIME_TRACE_GRANULARITY && $TIME_TRACE_GRANULARITY != "") {
+ _LINKER_TIME_TRACE_GRANULARITY=$TIME_TRACE_GRANULARITY
+}
+
+_LINKER_TIME_TRACE_FLAG=
+when (($TIME_TRACE == "yes" || $LINKER_TIME_TRACE == "yes") && $_DEFAULT_LINKER_ID == "lld") {
+ _LINKER_TIME_TRACE_FLAG=\
+-Wl,--time-trace \
+-Wl,--time-trace-granularity=$_LINKER_TIME_TRACE_GRANULARITY \
+-Wl,--time-trace-file=${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.time_trace.json:REALPRJNAME}
+}
+
+_EXE_FLAGS=\
+$C_FLAGS_PLATFORM \
+$BEFORE_PEERS \
+$_START_GROUP \
+${rootrel:PEERS} \
+$_END_GROUP \
+$AFTER_PEERS \
+$EXPORTS_VALUE \
+$LINKER_SCRIPT_VALUE \
+$LDFLAGS \
+$LDFLAGS_GLOBAL \
+$OBJADDE \
+$OBJADDE_LIB \
+$C_LIBRARY_PATH \
+$C_SYSTEM_LIBRARIES_INTERCEPT \
+$C_SYSTEM_LIBRARIES \
+$STRIP_FLAG \
+$DCE_FLAG \
+$ICF_FLAG \
+$_LINKER_TIME_TRACE_FLAG
+
+_SONAME_FLAG=-Wl,$_SONAME_OPTION,$_SONAME
+_SHARED_FLAG=-shared
+_EXEC_SHARED_FLAG=
+when ($OS_LINUX == "yes") {
+ _EXEC_SHARED_FLAG=-pie -fPIE -Wl,--unresolved-symbols=ignore-all -rdynamic
+}
+
+_LD_ENV_STYLE=${cwd:ARCADIA_BUILD_ROOT} $TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+# Program
+GENERATE_MF_CMD=\
+$YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} \
+--build-root $ARCADIA_BUILD_ROOT \
+--module-name $REALPRJNAME \
+-o ${output;rootrel;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
+
+LINK_SCRIPT_EXE_FLAGS=
+
+REAL_LINK_EXE_CMDLINE =\
+$YMAKE_PYTHON ${input:"build/scripts/link_exe.py"} \
+--source-root $ARCADIA_ROOT
+REAL_LINK_EXE_CMDLINE+=$_LD_LINKER_OUTPUT
+REAL_LINK_EXE_CMDLINE+=\
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+$_LD_ARCH_FLAG \
+$LINK_SCRIPT_EXE_FLAGS \
+$CXX_COMPILER \
+$_LD_SRCS_GLOBALS \
+$VCS_C_OBJ $AUTO_INPUT -o $TARGET \
+$_EXE_FLAGS \
+$_LD_ENV_STYLE
+
+REAL_LINK_EXE_TIDY=\
+$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} \
+--build-root $ARCADIA_BUILD_ROOT \
+--source-root $ARCADIA_ROOT \
+--output-file $TARGET \
+$AUTO_INPUT \
+$_LD_ENV_STYLE
+
+# Executable Shared Library
+
+REAL_LINK_EXEC_DYN_LIB_CMDLINE =\
+$YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"} \
+--target $TARGET
+REAL_LINK_EXEC_DYN_LIB_CMDLINE+=$_LD_LINKER_OUTPUT
+REAL_LINK_EXEC_DYN_LIB_CMDLINE+=\
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+$_LD_ARCH_FLAG \
+$LINK_DYN_LIB_FLAGS \
+$CXX_COMPILER \
+$_LD_SRCS_GLOBALS \
+$VCS_C_OBJ $AUTO_INPUT -o $TARGET \
+$_EXEC_SHARED_FLAG \
+$_SONAME_FLAG \
+$_EXE_FLAGS \
+$_LD_ENV_STYLE
+
+REAL_LINK_EXEC_DYN_LIB=$REAL_LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+
+# Shared Library
+
+LINK_DYN_LIB_FLAGS=
+
+REAL_LINK_DYN_LIB_CMDLINE =\
+$YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"} \
+--target $TARGET
+REAL_LINK_DYN_LIB_CMDLINE+=$_LD_LINKER_OUTPUT
+REAL_LINK_DYN_LIB_CMDLINE+=\
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+$_LD_ARCH_FLAG \
+$LINK_DYN_LIB_FLAGS \
+$CXX_COMPILER \
+$_LD_SRCS_GLOBALS \
+$VCS_C_OBJ $AUTO_INPUT -o $TARGET \
+$_SHARED_FLAG \
+$_SONAME_FLAG \
+$_EXE_FLAGS \
+$_LD_ENV_STYLE
+
+REAL_LINK_DYN_LIB=$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+
+_DWARF_COMMAND=
+when ($OS_DARWIN == "yes" && $NO_DEBUGINFO != "yes") {
+ _DWARF_COMMAND=$DWARF_TOOL $TARGET -o ${output;pre=$MODULE_PREFIX$REALPRJNAME.dSYM/Contents/Resources/DWARF/$MODULE_PREFIX:REALPRJNAME} $_LD_ENV_STYLE
+}
+DWARF_COMMAND=$_DWARF_COMMAND
+
+_REAL_LINK_EXE=$REAL_LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_EXE && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND && $PACK_IOS_CMD
+_LINK_DYN_LIB=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND
+when ($TIDY == "yes") {
+ _REAL_LINK_EXE=$REAL_LINK_EXE_TIDY
+ _LINK_EXE=$REAL_LINK_EXE
+ _LINK_DYN_LIB=$REAL_LINK_EXE
+}
+REAL_LINK_EXE=$_REAL_LINK_EXE
+LINK_EXE=$_LINK_EXE
+LINK_DYN_LIB=$_LINK_DYN_LIB
+
+LINK_EXEC_DYN_LIB=\
+$GENERATE_MF && \
+$GENERATE_VCS_C_INFO_NODEP && \
+$REAL_LINK_EXEC_DYN_LIB && \
+$DWARF_COMMAND && \
+$LINK_ADDITIONAL_SECTIONS_COMMAND
+
+SWIG_DLL_JAR_CMD=\
+$GENERATE_MF && \
+$GENERATE_VCS_C_INFO_NODEP && \
+$REAL_SWIG_DLL_JAR_CMD && \
+$DWARF_COMMAND
+
+_LD_TAIL_LINK_LIB=$AUTO_INPUT ${requirements;hide:LIB_REQUIREMENTS} ${kv;hide:"p AR"} $TOOLCHAIN_ENV ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+_LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/link_lib.py"} ${quo:AR_TOOL} $AR_TYPE $_LD_LLVM_AR_FORMAT $ARCADIA_BUILD_ROOT $_LD_AR_PLUGIN
+_LD_LIB_GENERATE_MF=$GENERATE_MF &&
+when ($TIDY == "yes") {
+ _LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --output-file
+ _LD_LIB_GENERATE_MF=
+}
+LINK_LIB=$_LD_LIB_GENERATE_MF $_LD_ARCHIVER $TARGET $_LD_TAIL_LINK_LIB
+GLOBAL_LINK_LIB=$_LD_ARCHIVER $GLOBAL_TARGET $_LD_TAIL_LINK_LIB
+
+# "Fat Object" : pre-linked global objects and static library with all dependencies
+_LD_LINK_FAT_PREFIX=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $YMAKE_PYTHON ${input:"build/scripts/link_fat_obj.py"} --build-root $ARCADIA_BUILD_ROOT
+_LD_LINK_FAT_SRCS_GLOBALS_WA=$_LD_SRCS_GLOBALS
+_LD_LINK_FAT_SRCS_GLOBALS_NO_WA=${rootrel;ext=.a:SRCS_GLOBAL} ${rootrel;ext=.o:SRCS_GLOBAL}
+
+_LD_LINK_FAT_SUFFIX1=$_LD_ARCH_FLAG \
+-Ya,input $AUTO_INPUT $VCS_C_OBJ \
+-Ya,global_srcs
+
+_LD_LINK_FAT_SUFFIX2=-Ya,peers $PEERS \
+-Ya,linker $CXX_COMPILER \
+$LDFLAGS_GLOBAL $C_FLAGS_PLATFORM $LD_SDK_VERSION \
+-Ya,archiver $_LD_ARCHIVER \
+$TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+LINK_FAT_OBJECT=\
+$_LD_LINK_FAT_PREFIX \
+--obj=$TARGET --lib=${output:REALPRJNAME.a} \
+$_LD_LINK_FAT_SUFFIX1 \
+$_LD_LINK_FAT_SRCS_GLOBALS_WA \
+$_LD_LINK_FAT_SUFFIX2
+
+LINK_RECURSIVE_LIBRARY=\
+$_LD_LINK_FAT_PREFIX \
+--lib=$TARGET --with-own-obj --with-global-srcs \
+$_LD_LINK_FAT_SUFFIX1 \
+$_LD_LINK_FAT_SRCS_GLOBALS_NO_WA \
+$_LD_LINK_FAT_SUFFIX2
+
+LINK_FAT_OBJECT_LIBRARY=\
+$_LD_LINK_FAT_PREFIX \
+--lib=$TARGET $FAT_OBJECT_ARGS $FAT_OBJECT_OUTS \
+$_LD_LINK_FAT_SUFFIX1 \
+$_LD_LINK_FAT_SRCS_GLOBALS_NO_WA \
+$_LD_LINK_FAT_SUFFIX2
+
+LIBRT=-lrt
+MD5LIB=-lcrypt
+LIBRESOLV=
+when ($OS_LINUX || $OS_DARWIN || $OS_ANDROID) {
+ LIBRESOLV=-lresolv
+}
+PROFFLAG=-pg
diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf
new file mode 100644
index 0000000000..e905024bda
--- /dev/null
+++ b/build/conf/linkers/msvc_linker.conf
@@ -0,0 +1,271 @@
+_MSVC_ARCH=
+when ($ARCH_I386 == "yes" || $ARCH_I686 == "yes") {
+ _MSVC_ARCH=x86
+}
+elsewhen ($ARCH_X86_64 == "yes") {
+ _MSVC_ARCH=x64
+}
+elsewhen ($ARCH_ARM == "yes") {
+ _MSVC_ARCH=arm
+}
+
+_FLAGS_MACHINE=/MACHINE:${toupper:_MSVC_ARCH}
+
+_FLAGS_IGNORE=/IGNORE:4221
+
+_FLAGS_COMMON_IDE_MSVS=
+when ($IDE_MSVS == "yes") {
+ _FLAGS_COMMON_IDE_MSVS=/INCREMENTAL
+}
+otherwise {
+ _FLAGS_COMMON_IDE_MSVS=/INCREMENTAL:NO
+}
+
+# TODO(nslus): DEVTOOLS-1868 remove restriction.
+_FLAGS_DEBUG_ONLY_DEBUG=
+_FLAGS_RELEASE_ONLY_DEBUG=
+_FLAGS_COMMON_DEBUG=
+when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") {
+ when ($IDE_MSVS == "yes") {
+ when ($CLANG_CL == "yes") {
+ _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG
+ }
+ otherwise {
+ _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG:FASTLINK
+ }
+ _FLAGS_RELEASE_ONLY_DEBUG=/DEBUG
+ }
+ otherwise {
+ _FLAGS_COMMON_DEBUG=/DEBUG
+ }
+}
+
+_FLAGS_COMMON_LIBPATHS=
+when ($IDE_MSVS != "yes") {
+ _FLAGS_COMMON_LIBPATHS=\
+/LIBPATH:"$_MSVC_TC_KIT_LIBS/um/$_MSVC_ARCH" \
+/LIBPATH:"$_MSVC_TC_KIT_LIBS/ucrt/$_MSVC_ARCH" \
+/LIBPATH:"$_MSVC_TC_VC_ROOT/lib/$_MSVC_ARCH"
+}
+
+_FLAGS_COMMON =/NOLOGO /ERRORREPORT:PROMPT /SUBSYSTEM:CONSOLE /TLBID:1 $MSVC_DYNAMICBASE /NXCOMPAT
+_FLAGS_COMMON+=$_FLAGS_IGNORE
+_FLAGS_COMMON+=$_FLAGS_MACHINE
+_FLAGS_COMMON+=$_FLAGS_COMMON_IDE_MSVS
+_FLAGS_COMMON+=$_FLAGS_COMMON_DEBUG
+_FLAGS_COMMON+=$_FLAGS_COMMON_LIBPATHS
+
+_FLAGS_DEBUG_ONLY_CLANG_CL=
+when ($CLANG_CL == "yes") {
+ _FLAGS_DEBUG_ONLY_CLANG_CL=/STACK:4194304
+}
+
+_FLAGS_DEBUG_ONLY =$_FLAGS_DEBUG_ONLY_CLANG_CL
+_FLAGS_DEBUG_ONLY+=$_FLAGS_DEBUG_ONLY_DEBUG
+_FLAGS_RELEASE_ONLY =$_FLAGS_RELEASE_ONLY_DEBUG
+
+LINK_EXE_FLAGS_DEBUG =$_FLAGS_COMMON
+LINK_EXE_FLAGS_DEBUG+=$_FLAGS_DEBUG_ONLY
+
+LINK_EXE_FLAGS_RELEASE =$_FLAGS_COMMON
+LINK_EXE_FLAGS_RELEASE+=$_FLAGS_RELEASE_ONLY
+
+LINK_LIB_FLAGS=$_FLAGS_IGNORE $_FLAGS_MACHINE
+
+LINK_STDLIBS=\
+advapi32.lib \
+comdlg32.lib \
+crypt32.lib \
+dnsapi.lib \
+gdi32.lib \
+iphlpapi.lib \
+kernel32.lib \
+mswsock.lib \
+ole32.lib \
+oleaut32.lib \
+psapi.lib \
+rpcrt4.lib \
+secur32.lib \
+shell32.lib \
+shlwapi.lib \
+user32.lib \
+userenv.lib \
+uuid.lib \
+version.lib \
+winmm.lib \
+winspool.lib \
+ws2_32.lib
+
+LDFLAGS_GLOBAL=
+LDFLAGS=
+OBJADDE=
+
+LINK_EXE_FLAGS=$LINK_EXE_FLAGS_PER_TYPE
+
+LINK_IMPLIB=/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib}
+_LINK_EXTRA_OUTPUT=
+when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") {
+ _LINK_EXTRA_OUTPUT=/PDB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.pdb}
+}
+LINK_EXTRA_OUTPUT=$_LINK_EXTRA_OUTPUT
+
+LIB_WRAPPER=${YMAKE_PYTHON} ${input:"build/scripts/fix_msvc_output.py"} lib
+LINK_WRAPPER=${YMAKE_PYTHON} ${input:"build/scripts/fix_msvc_output.py"} link
+when ($_UNDER_WINE == "yes") {
+ LIB_WRAPPER=
+ LINK_WRAPPER=
+}
+
+LINK_WRAPPER_DYNLIB=${YMAKE_PYTHON} ${input:"build/scripts/link_dyn_lib.py"} --arch WINDOWS --target $TARGET
+
+EXPORTS_VALUE=
+LINK_IMPLIB_VALUE=
+when ($EXPORTS_FILE) {
+ LINK_IMPLIB_VALUE=$LINK_IMPLIB
+ EXPORTS_VALUE=/DEF:${input:EXPORTS_FILE}
+}
+
+GENERATE_MF_CMD=\
+$YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} \
+--build-root $ARCADIA_BUILD_ROOT \
+--module-name $REALPRJNAME \
+-o ${output;rootrel;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
+# the tail of link commands will be added in the third command file
+_MSVC_SRCS_GLOBALS=\
+--start-wa --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} --ya-end-command-file --end-wa \
+--ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file
+
+REAL_LINK_DYN_LIB_CMDLINE=\
+${TOOLCHAIN_ENV} \
+${cwd:ARCADIA_BUILD_ROOT} \
+${LINK_WRAPPER} \
+${LINK_WRAPPER_DYNLIB} \
+${LINK_EXE_CMD} \
+${LINK_IMPLIB_VALUE} \
+/DLL \
+/OUT:${qe;rootrel:TARGET} \
+${LINK_EXTRA_OUTPUT} \
+${EXPORTS_VALUE} \
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+$_MSVC_SRCS_GLOBALS \
+--ya-start-command-file \
+${VCS_C_OBJ_RR} \
+${qe;rootrel:AUTO_INPUT} \
+${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+$LINK_EXE_FLAGS \
+$LINK_STDLIBS $LDFLAGS \
+$LDFLAGS_GLOBAL \
+$OBJADDE \
+--ya-end-command-file
+
+REAL_LINK_DYN_LIB=$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+
+SWIG_DLL_JAR_CMD=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD
+
+_MSVC_HEAD_LINK_LIB=${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD}
+_MSVC_TAIL_LINK_LIB=\
+--ya-start-command-file \
+${qe;rootrel:AUTO_INPUT} \
+$LINK_LIB_FLAGS \
+--ya-end-command-file \
+${requirements;hide:LIB_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p AR"} ${hide;kv:"pc light-red"}
+
+LINK_LIB=${GENERATE_MF} && $_MSVC_HEAD_LINK_LIB /OUT:${qe;rootrel:TARGET} $_MSVC_TAIL_LINK_LIB
+GLOBAL_LINK_LIB=$_MSVC_HEAD_LINK_LIB /OUT:${qe;rootrel:GLOBAL_TARGET} $_MSVC_TAIL_LINK_LIB
+
+LINK_EXE_CMDLINE=\
+${GENERATE_MF} && \
+$GENERATE_VCS_C_INFO_NODEP && \
+${TOOLCHAIN_ENV} \
+${cwd:ARCADIA_BUILD_ROOT} \
+${LINK_WRAPPER} \
+${LINK_EXE_CMD} \
+/OUT:${qe;rootrel:TARGET} \
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+${LINK_EXTRA_OUTPUT} \
+$_MSVC_SRCS_GLOBALS \
+--ya-start-command-file \
+${VCS_C_OBJ_RR} \
+${qe;rootrel:AUTO_INPUT} \
+$LINK_EXE_FLAGS \
+$LINK_STDLIBS \
+$LDFLAGS \
+$LDFLAGS_GLOBAL \
+$OBJADDE \
+${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+--ya-end-command-file \
+${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}
+
+LINK_EXE=$LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+
+LINK_DYN_LIB=${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB ${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}
+
+LINK_EXEC_DYN_LIB_CMDLINE=\
+${GENERATE_MF} && \
+$GENERATE_VCS_C_INFO_NODEP && \
+${TOOLCHAIN_ENV} \
+${cwd:ARCADIA_BUILD_ROOT} \
+${LINK_WRAPPER} \
+${LINK_WRAPPER_DYNLIB} \
+${LINK_EXE_CMD} \
+/OUT:${qe;rootrel:TARGET} \
+${LINK_EXTRA_OUTPUT} \
+${EXPORTS_VALUE} \
+${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \
+$_MSVC_SRCS_GLOBALS \
+'--ya-start-command-file \
+${VCS_C_OBJ_RR} \
+${qe;rootrel:AUTO_INPUT} \
+${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+$LINK_EXE_FLAGS \
+$LINK_STDLIBS \
+$LDFLAGS $LDFLAGS_GLOBAL \
+$OBJADDE \
+--ya-end-command-file \
+${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}
+
+LINK_EXEC_DYN_LIB=$LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
+
+LINK_GLOBAL_FAT_OBJECT=\
+${TOOLCHAIN_ENV} \
+${cwd:ARCADIA_BUILD_ROOT} \
+${LIB_WRAPPER} \
+${LINK_LIB_CMD} \
+/OUT:${qe;rootrel:TARGET} \
+--ya-start-command-file \
+${qe;rootrel;ext=.lib:SRCS_GLOBAL} \
+${qe;rootrel;ext=.obj:SRCS_GLOBAL} \
+${qe;rootrel:AUTO_INPUT} \
+$LINK_LIB_FLAGS \
+--ya-end-command-file
+
+LINK_PEERS_FAT_OBJECT=\
+${TOOLCHAIN_ENV} \
+${cwd:ARCADIA_BUILD_ROOT} \
+${LIB_WRAPPER} \
+${LINK_LIB_CMD} \
+/OUT:${qe;rootrel;output:REALPRJNAME.lib} \
+--ya-start-command-file \
+${qe;rootrel:PEERS} \
+$LINK_LIB_FLAGS \
+--ya-end-command-file
+
+LINK_FAT_OBJECT=\
+${GENERATE_MF} && \
+$GENERATE_VCS_C_INFO_NODEP && \
+$LINK_GLOBAL_FAT_OBJECT && \
+$LINK_PEERS_FAT_OBJECT \
+${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
diff --git a/build/conf/opensource.conf b/build/conf/opensource.conf
new file mode 100644
index 0000000000..027f6a3e42
--- /dev/null
+++ b/build/conf/opensource.conf
@@ -0,0 +1,14 @@
+when ($CATBOOST_OPENSOURCE == "yes") {
+ OPENSOURCE=yes
+}
+
+when ($OPENSOURCE) {
+ LOCAL_YDB_DOCKER_PUBLIC_BUILD=yes
+ CATBOOST_OPENSOURCE=yes
+ USE_DYNAMIC_IDN=yes
+ USE_DYNAMIC_AIO=yes
+ USE_DYNAMIC_ICONV=yes
+ USE_ASMLIB=no
+ SO_OUTPUTS=yes
+ UDF_NO_PROBE=yes
+}
diff --git a/build/conf/project_specific/maps/aar.conf b/build/conf/project_specific/maps/aar.conf
new file mode 100644
index 0000000000..780ff38984
--- /dev/null
+++ b/build/conf/project_specific/maps/aar.conf
@@ -0,0 +1,350 @@
+
+_GRADLE_FLAGS_VALUE=
+### @usage: GRADLE_FLAGS(flags...) # internal
+###
+### SEt additional flags for gradle
+macro GRADLE_FLAGS(FLAGS...) {
+ SET_APPEND(_GRADLE_FLAGS_VALUE $FLAGS)
+}
+
+### @usage: PROGURAD_RULES(ProguardRuleFiles...)
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro PROGUARD_RULES(RULES...) {
+ SET_APPEND(_PROGUARD_RULES_GLOBAL $RULES)
+}
+
+### @usage: AARS(Aars...)
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro AARS(DEPS...) {
+ SET_APPEND(_AARS_GLOBAL $DEPS)
+}
+
+### @usage: MOBILE_DLL() # internal
+module MOBILE_DLL: DLL {
+ .CMD=LINK_MOBILE_DLL
+
+ PEERDIR(build/external_resources/android_sdk)
+ PEERDIR(build/external_resources/gradle)
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR($JDK_RESOURCE_PEERDIR)
+
+ SET(BIN_AAR_DIR $BINDIR/aar)
+ SET(BIN_TMP_DIR $BINDIR/tmp)
+}
+
+_MOBILE_TEST_APK_AAR_MANIFEST_VALUE=
+### @usage: MOBILE_TEST_APK_AAR_MANIFEST(file) # internal
+macro MOBILE_TEST_APK_AAR_MANIFEST(FILE) {
+ SET(_MOBILE_TEST_APK_AAR_MANIFEST_VALUE $FILE)
+}
+
+_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE=
+### @usage: MOBILE_TEST_APK_AAR_PROGUARD_RULES(file) # internal
+macro MOBILE_TEST_APK_AAR_PROGUARD_RULES(FILE) {
+ SET(_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE $FILE)
+}
+
+_MOBILE_TEST_APK_AAR_AARS_VALUE=
+### @usage: MOBILE_TEST_APK_AAR_AARS(filenames...) # internal
+macro MOBILE_TEST_APK_AAR_AARS(AARS...) {
+ SET_APPEND(_MOBILE_TEST_APK_AAR_AARS_VALUE $AARS)
+}
+
+_MOBILE_TEST_APK_AAR_BUNDLES_VALUE=
+### @usage: MOBILE_TEST_APK_AAR_BUNDLES(filenames...) # internal
+macro MOBILE_TEST_APK_AAR_BUNDLES(BUNDLES...) {
+ SET_APPEND(_MOBILE_TEST_APK_AAR_BUNDLES_VALUE $BUNDLES)
+ BUNDLE_EXTRA_INPUTS($BUNDLES)
+}
+
+_MOBILE_TEST_APK_TEMPLATE_DIR=
+### @usage: MOBILE_TEST_APK_TEMPLATE(dir filenames...) # internal
+macro MOBILE_TEST_APK_TEMPLATE(TEMPLATE_DIR, INPUTS...) {
+ SET(_MOBILE_TEST_APK_TEMPLATE_DIR $TEMPLATE_DIR)
+ BUNDLE_EXTRA_INPUTS(${pre=$TEMPLATE_DIR/:INPUTS})
+}
+
+_MOBILE_TEST_APK_CMDLINE=\
+$FS_TOOLS md $BIN_TMP_DIR \
+&& $FS_TOOLS md $BINDIR/.android \
+&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \
+&& $FS_TOOLS md $BINDIR/jni_libs/$ARCH_NAME \
+&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \
+&& $MOVE_FILE $OUTPUT $BINDIR/jni_libs/$ARCH_NAME/${pre=lib;suf=.so:_MOBILE_TEST_APK_LIBRARY_NAME} \
+&& $FS_TOOLS md $BIN_AAR_DIR \
+&& $YMAKE_PYTHON ${input:"build/scripts/gen_aar_gradle_script.py"} \
+${input;hide:EXTRA_INPUTS} \
+--aidl-dirs $BIN_TMP_DIR/aidl \
+--assets-dirs $BIN_TMP_DIR/assets \
+--java-dirs $BIN_TMP_DIR/src \
+--jni-libs-dirs $BINDIR/jni_libs \
+--res-dirs $BIN_TMP_DIR/res \
+--manifest ${input:_MOBILE_TEST_APK_AAR_MANIFEST_VALUE} \
+--proguard-rules ${input:_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \
+--aars $_MOBILE_TEST_APK_AAR_AARS_VALUE $_AARS_GLOBAL \
+--bundles $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \
+--output-dir $BIN_AAR_DIR \
+--bundle-name unittest \
+--maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \
+&& ${cwd:BIN_AAR_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assemble${_BUNDLE_BUILD_TYPE} ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \
+&& $FS_TOOLS md $BIN_APK_DIR \
+&& $FS_TOOLS md $BIN_APK_DIR/res \
+&& $COPY_CMD $_MOBILE_TEST_APK_TEMPLATE_DIR/Manifest.xml $BIN_APK_DIR/Manifest.xml \
+&& $YMAKE_PYTHON ${input:"build/scripts/gen_test_apk_gradle_script.py"} \
+${input;hide:EXTRA_INPUTS} \
+--app-id $REALPRJNAME \
+--assets-dirs $_MOBILE_TEST_APK_ASSETS_DIRS_VALUE \
+--java-dirs $_MOBILE_TEST_APK_TEMPLATE_DIR/java \
+--jni-libs-dirs \
+--res-dirs $BIN_APK_DIR/res $_MOBILE_TEST_APK_TEMPLATE_DIR/res $BIN_TMP_DIR/res \
+--manifest Manifest.xml \
+--aars \
+--output-dir $BIN_APK_DIR \
+--bundle-name $REALPRJNAME \
+--bundles $BIN_AAR_DIR/build/outputs/aar/unittest-${tolower:_BUNDLE_BUILD_TYPE}.aar $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \
+--library-name $_MOBILE_TEST_APK_LIBRARY_NAME \
+--maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \
+&& ${cwd:BIN_APK_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assembleDebug ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \
+&& $COPY_CMD $BIN_APK_DIR/build/outputs/apk/${tolower:_BUNDLE_BUILD_TYPE}/$REALPRJNAME.apk ${OUTPUT}
+
+_MOBILE_TEST_APK_EXTRA_INPUTS_VALUE=
+
+macro _MOBILE_TEST_APK_CMD_IMPL(OUTPUT, EXTRA_INPUTS...) {
+ .CMD=$_MOBILE_TEST_APK_CMDLINE
+}
+
+_MOBILE_TEST_APK_CMD=$_MOBILE_TEST_APK_CMD_IMPL($TARGET $_BUNDLE_EXTRA_INPUTS_VALUE)
+
+LINK_MOBILE_TEST_APK=$LINK_DYN_LIB && $_MOBILE_TEST_APK_CMD
+
+### @usage: MOBILE_TEST_APK() # internal
+module MOBILE_TEST_APK: DLL {
+ .CMD=LINK_MOBILE_TEST_APK
+ .GLOBAL=_AARS _PROGUARD_RULES
+
+ PEERDIR(build/external_resources/android_sdk)
+ PEERDIR(build/external_resources/gradle)
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR($JDK_RESOURCE_PEERDIR)
+
+ SET(MODULE_PREFIX)
+ SET(MODULE_SUFFIX .apk)
+
+ SET(BIN_AAR_DIR $BINDIR/aar)
+ SET(BIN_APK_DIR $BINDIR/apk)
+ SET(BIN_TMP_DIR $BINDIR/tmp)
+ SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle)
+
+ SET(_MOBILE_TEST_APK_LIBRARY_NAME unittests)
+
+ when ($OS_ANDROID == "yes") {
+ when ($ARCH_ARM7 == "yes") {
+ ARCH_NAME=armeabi-v7a
+ }
+ elsewhen ($ARCH_ARM64 == "yes") {
+ ARCH_NAME=arm64-v8a
+ }
+ elsewhen ($ARCH_I386 == "yes") {
+ ARCH_NAME=x86
+ }
+ elsewhen ($ARCH_X86_64 == "yes") {
+ ARCH_NAME=x86_64
+ }
+ otherwise {
+ ARCH_NAME=unsupported
+ }
+ }
+}
+
+
+### @usage: MOBILE_BOOST_TEST_APK() # internal
+module MOBILE_BOOST_TEST_APK: MOBILE_TEST_APK {
+ PEERDIR(devtools/dummy_arcadia/test/test_apk/template)
+ PEERDIR(build/external_resources/mapsmobi_maven_repo)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME boost.test)
+
+ MOBILE_TEST_APK_TEMPLATE(${ARCADIA_ROOT}/devtools/dummy_arcadia/test/test_apk/template Manifest.xml java/com/yandex/test/unittests/RunTestsActivity.java res/values/strings.xml)
+}
+
+when ($BT_RELEASE) {
+ _BUNDLE_BUILD_TYPE=Release
+}
+otherwise {
+ _BUNDLE_BUILD_TYPE=Debug
+}
+
+_AAR_EXTRA_INPUTS_VALUE=
+
+_AAR_MANIFEST_VALUE=
+### @usage: AAR_MANIFEST(filename) # internal
+macro AAR_MANIFEST(FILE) {
+ SET(_AAR_MANIFEST_VALUE $FILE)
+}
+
+_AAR_PROGUARD_RULES_VALUE=
+### @usage: AAR_PROGUARD_RULES(filename) # internal
+macro AAR_PROGUARD_RULES(FILE) {
+ SET(_AAR_PROGUARD_RULES_VALUE $FILE)
+}
+
+_AAR_AARS_VALUE=
+### @usage: AAR_AARS(aars...) # internal
+macro AAR_AARS(Aars...) {
+ SET_APPEND(_AAR_AARS_VALUE $Aars)
+}
+
+_AAR_COMPILE_ONLY_AARS_VALUE=
+### @usage: AAR_COMPILE_ONLY_AARS(compile_only_aars...) # internal
+macro AAR_COMPILE_ONLY_AARS(Aars...) {
+ SET_APPEND(_AAR_COMPILE_ONLY_AARS_VALUE $Aars)
+}
+
+
+_AAR_AIDL_DIRS_VALUE=
+### @usage: AAR_AIDL_SRCS(dir filenames...) # internal
+macro AAR_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_AAR_AIDL_DIRS_VALUE $PREFIX)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_AAR_ASSETS_DIRS_VALUE=
+### @usage: AAR_ASSETS_SRCS(dir filenames...) # internal
+macro AAR_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_AAR_ASSETS_DIRS_VALUE $PREFIX)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_AAR_BUNDLES_VALUE=
+### @usage: AAR_BUNDLES(filenames...) # internal
+macro AAR_BUNDLES(BUNDLES...) {
+ SET_APPEND(_AAR_BUNDLES_VALUE $BUNDLES)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE $BUNDLES)
+}
+
+_AAR_JNI_LIB_DIRS_VALUE=
+### @usage: AAR_JNI_LIBS(dir filenames...) # internal
+macro AAR_JNI_LIBS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_AAR_JNI_LIB_DIRS_VALUE $PREFIX)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_AAR_JAVA_DIRS_VALUE=
+### @usage: AAR_JAVA_SRCS(dir filenames...) # internal
+macro AAR_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_AAR_JAVA_DIRS_VALUE $PREFIX)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_AAR_RES_DIRS_VALUE=
+### @usage: AAR_RES_SRCS(dir filenames...) # internal
+macro AAR_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_AAR_RES_DIRS_VALUE $PREFIX)
+ SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_AAR_LOCAL_MAVEN_REPO_VALUE=
+### @usage: AAR_LOCAL_MAVEN_REPO(repo...)
+macro AAR_LOCAL_MAVEN_REPO(REPO...) {
+ SET_APPEND(_AAR_LOCAL_MAVEN_REPO_VALUE $REPO)
+}
+
+_AAR_GRADLE_SCRIPT_GENERATOR_VALUE=
+### @usage: AAR_GRADLE_SCRIPT_GENERATOR(python_script)
+macro AAR_GRADLE_SCRIPT_GENERATOR(GENERATOR) {
+ SET(_AAR_GRADLE_SCRIPT_GENERATOR_VALUE $GENERATOR)
+}
+
+when ($AAR_GENERATE_DOC) {
+ _AAR_GENERATE_DOC_VALUE=--generate-doc
+ _AAR_COPY_DOC_VALUE=\
+ && ${cwd:BINDIR} $COPY_CMD build/${REALPRJNAME}-javadoc.tar.gz ${output;suf=-javadoc.tar.gz:REALPRJNAME}
+}
+otherwise {
+ _AAR_GENERATE_DOC_VALUE=
+ _AAR_COPY_DOC_VALUE=
+}
+
+when ($AAR_NO_STRIP) {
+ _AAR_NO_STRIP_VALUE=--do-not-strip
+}
+otherwise {
+ _AAR_NO_STRIP_VALUE=
+}
+
+_AAR_CMDLINE=\
+$FS_TOOLS md $BIN_TMP_DIR \
+&& $FS_TOOLS md $BINDIR/.android \
+&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \
+&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \
+&& $YMAKE_PYTHON ${input:_AAR_GRADLE_SCRIPT_GENERATOR_VALUE} \
+${input;hide:EXTRA_INPUTS} \
+--aidl-dirs $_AAR_AIDL_DIRS_VALUE $BIN_TMP_DIR/aidl \
+--assets-dirs $_AAR_ASSETS_DIRS_VALUE $BIN_TMP_DIR/assets \
+--java-dirs $_AAR_JAVA_DIRS_VALUE $BIN_TMP_DIR/src \
+--jni-libs-dirs $_AAR_JNI_LIB_DIRS_VALUE $BIN_TMP_DIR/jni_libs \
+--res-dirs $_AAR_RES_DIRS_VALUE $BIN_TMP_DIR/res \
+--manifest ${input:_AAR_MANIFEST_VALUE} \
+--proguard-rules ${input:_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \
+--aars $_AAR_AARS_VALUE $_AARS_GLOBAL \
+--compile-only-aars $_AAR_COMPILE_ONLY_AARS_VALUE \
+--bundles $_AAR_BUNDLES_VALUE \
+--output-dir $BINDIR \
+--bundle-name $REALPRJNAME \
+--peers $PEERS \
+--maven-repos $_AAR_LOCAL_MAVEN_REPO_VALUE \
+$_AAR_GENERATE_DOC_VALUE \
+$_AAR_NO_STRIP_VALUE \
+&& ${cwd:BINDIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR bundle${_BUNDLE_BUILD_TYPE}Aar ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} $VCS_INFO_DISABLE_CACHE__NO_UID__ \
+&& ${cwd:BINDIR} $COPY_CMD build/outputs/aar/${REALPRJNAME}-${tolower:_BUNDLE_BUILD_TYPE}.aar $TARGET \
+$_AAR_COPY_DOC_VALUE \
+&& ${cwd:BINDIR} $COPY_CMD build/${suf=-pom.xml:REALPRJNAME} ${output;suf=-pom.xml:REALPRJNAME} \
+&& ${cwd:BINDIR} $COPY_CMD build/libs/${suf=-sources.jar:REALPRJNAME} ${output;suf=-sources.jar:REALPRJNAME}
+
+macro _AAR_CMD_IMPL(EXTRA_INPUTS...) {
+ .CMD=$_AAR_CMDLINE && $GENERATE_MF
+}
+
+AAR_CMD=$_AAR_CMD_IMPL($_AAR_EXTRA_INPUTS_VALUE)
+
+### @usage: AAR() # internal
+module AAR: _BASE_UNIT {
+ .CMD=AAR_CMD
+ .GLOBAL=_AARS _PROGUARD_RULES
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=yes
+
+ SET(MODULE_PREFIX)
+ SET(MODULE_SUFFIX .aar)
+ SET(DONT_RESOLVE_INCLUDES yes)
+ SET(NEED_PLATFORM_PEERDIRS no)
+ NO_PLATFORM()
+
+ PEERDIR(build/external_resources/android_sdk)
+ PEERDIR(build/external_resources/gradle)
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR($JDK_RESOURCE_PEERDIR)
+
+ SET(BIN_TMP_DIR $BINDIR/tmp)
+ SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle)
+}
+
+_SECONDARY_OUTPUT_VALUE=
+
+### @usage: SECONDARY_OUTPUT(filename) # internal
+###
+### The use of this macro is strictly prohibited!!!
+macro SECONDARY_OUTPUT(OUTPUT) {
+ SET(_SECONDARY_OUTPUT_VALUE $OUTPUT)
+}
+
+_AAR_PROXY_LIBRARY_CMD=$LINK_LIB && $COPY_CMD $_SECONDARY_OUTPUT_VALUE ${input;hide:_SECONDARY_OUTPUT_VALUE} ${output:REALPRJNAME.aar}
+
+### @usage: AAR_PROXY_LIBRARY() # internal
+###
+### The use of this module is strictly prohibited!!!
+module AAR_PROXY_LIBRARY: _PROXY_LIBRARY {
+ .ALLOWED=SECONDARY_OUTPUT
+ .CMD=_AAR_PROXY_LIBRARY_CMD
+}
diff --git a/build/conf/project_specific/maps/asrc.conf b/build/conf/project_specific/maps/asrc.conf
new file mode 100644
index 0000000000..dee6354cbc
--- /dev/null
+++ b/build/conf/project_specific/maps/asrc.conf
@@ -0,0 +1,122 @@
+_BUNDLE_DELIM_JAVA=__DELIM_JAVA__
+_BUNDLE_DELIM_RES=__DELIM_RES__
+_BUNDLE_DELIM_ASSETS=__DELIM_ASSETS__
+_BUNDLE_DELIM_AIDL=__DELIM_AIDL__
+
+_BUNDLE_EXTRA_INPUTS_VALUE=
+### @usage: BUNDLE_EXTRA_INPUTS(filenames...) # internal
+macro BUNDLE_EXTRA_INPUTS(INPUTS...) {
+ SET_APPEND(_BUNDLE_EXTRA_INPUTS_VALUE $INPUTS)
+}
+
+_BUNDLE_AIDL_SRCS_VALUE=
+### @usage: BUNDLE_AIDL_SRCS(dirname filenames...) # internal
+macro BUNDLE_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_DELIM_AIDL $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+ BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_BUNDLE_JAVA_SRCS_VALUE=
+### @usage: BUNDLE_JAVA_SRCS(dirname filenames...) # internal
+macro BUNDLE_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_DELIM_JAVA $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+ BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_BUNDLE_RES_SRCS_VALUE=
+### @usage: BUNDLE_RES_SRCS(dirname filenames...) # internal
+macro BUNDLE_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_BUNDLE_RES_SRCS_VALUE $_BUNDLE_DELIM_RES $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+ BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_BUNDLE_ASSETS_SRCS_VALUE=
+### @usage: BUNDLE_ASSETS_SRCS(dirname filenames...) # internal
+macro BUNDLE_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) {
+ SET_APPEND(_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_DELIM_ASSETS $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
+ BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
+}
+
+_BUNDLE_SRCS_VALUE=$_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_RES_SRCS_VALUE
+
+macro _COMPILE_ASRC_IMPL(EXTRA_INPUTS...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output $TARGET ${kv;hide:"p AC"} $kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+}
+
+_COMPILE_ASRC=$_COMPILE_ASRC_IMPL($_ASRC_EXTRA_INPUTS_VALUE)
+
+COMPILE_ASRC_MF=$_COMPILE_ASRC && $GENERATE_MF
+
+### @usage: ASRC_LIBRARY() # internal
+module ASRC_LIBRARY: _BASE_UNIT {
+ .CMD=COMPILE_ASRC_MF
+ .ALL_INS_TO_OUT=no
+ .PEERDIR_POLICY=as_include
+ .FINAL_TARGET=no
+ PEERDIR_TAGS=JAVA_PROTO JAVA_IDL
+ MODULE_TYPE=Library
+ SET(MODULE_SUFFIX .asrc)
+ SET(DONT_RESOLVE_INCLUDES yes)
+ SET(NEED_PLATFORM_PEERDIRS no)
+
+ NO_RUNTIME()
+}
+
+macro _MOBILE_LIBRARY_PREREQUISITES_IMPL(OUTPUT, EXTRA_INPUTS...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE --output $OUTPUT ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
+}
+
+macro _MOBILE_LIBRARY_PREREQUISITES_CMD(OUTPUT, EXTRA_INPUTS...) {
+ .CMD=${output;hide:OUTPUT} ${input;hide:EXTRA_INPUTS} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} $_MOBILE_LIBRARY_PREREQUISITES_IMPL($OUTPUT $EXTRA_INPUTS)
+}
+
+when ($OS_ANDROID == "yes") {
+ LINK_MOBILE_LIB=$LINK_LIB && $_MOBILE_LIBRARY_PREREQUISITES_CMD(${BINDIR}/$MODULE_PREFIX$REALPRJNAME$MODULE_SUFFIX.asrc $_BUNDLE_EXTRA_INPUTS_VALUE)
+}
+otherwise {
+ LINK_MOBILE_LIB=$LINK_LIB
+}
+
+### @usage: MOBILE_LIBRARY() # internal
+module MOBILE_LIBRARY: LIBRARY {
+ .CMD=LINK_MOBILE_LIB
+ DISABLE(NEED_ADD_FAKE_SRC)
+}
+
+_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --jsrcs ${ext=.jsrc;tags_in=local:PEERS} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
+
+macro _JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL(EXTRA_INPUTS...) {
+ .CMD=$_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE
+}
+
+JSRC_PROXY_MOBILE_LIBRARY_CMD=$LINK_LIB && $_JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL($_BUNDLE_EXTRA_INPUTS_VALUE)
+
+### @usage: JSRC_PROXY_MOBILE_LIBRARY() # internal
+module JSRC_PROXY_MOBILE_LIBRARY: MOBILE_LIBRARY {
+ .CMD=JSRC_PROXY_MOBILE_LIBRARY_CMD
+ .PEERDIR_POLICY=as_build_from
+ .PROXY=yes
+
+ SET(MODULE_TYPE LIBRARY)
+ DISABLE(NEED_ADD_FAKE_SRC)
+
+ PEERDIR_TAGS=JAVA_PROTO JAVA_IDL
+
+ SET(BIN_TMP_DIR ${BINDIR}/tmp)
+
+ NO_UTIL()
+}
+
+_MOBILE_DLL_PREREQUISITES_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --asrcs ${PEERS.arcs} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
+
+macro _MOBILE_DLL_PREREQUISITES_CMD(EXTRA_INPUTS...) {
+ .CMD=$_MOBILE_DLL_PREREQUISITES_CMDLINE
+}
+
+when ($OS_ANDROID == "yes") {
+ LINK_MOBILE_DLL=$LINK_DYN_LIB && $_MOBILE_DLL_PREREQUISITES_CMD($_BUNDLE_EXTRA_INPUTS_VALUE)
+}
+otherwise {
+ LINK_MOBILE_DLL=$LINK_DYN_LIB
+}
+
diff --git a/build/conf/project_specific/maps/mapkit.conf b/build/conf/project_specific/maps/mapkit.conf
new file mode 100644
index 0000000000..d64b41f72a
--- /dev/null
+++ b/build/conf/project_specific/maps/mapkit.conf
@@ -0,0 +1,283 @@
+MAPKIT_IDL_INCLUDES=
+macro MAPKIT_ADDINCL(Dirs...) {
+ ADDINCL(${pre=FOR idl :Dirs})
+ SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs)
+}
+
+### @usage: MAPS_IDL_ADDINCL(dirnames...) # internal
+###
+### Warpper for MAPKIT_ADDINCL macro which is used for mobile mapkit build
+macro MAPS_IDL_ADDINCL(Dirs...) {
+ MAPKIT_ADDINCL($Dirs)
+}
+
+### @usage: _MAPKITIDL_PROXY(args...) # internal
+###
+### Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources
+macro _MAPKITIDL_PROXY(Args...) {
+ MAPKITIDL($Args)
+ ENABLE(USE_YMAKE_RESOURCE)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_TEXT_DEPS ${ext=idl:Args})
+}
+
+MAPS_IDL_FILTER=
+
+### @usage: MAPS_IDL_SRCS(filenames...) # internal
+###
+### Warpper for MAPKITIDL macro which is used for mobile mapkit build
+macro MAPS_IDL_SRCS(Srcs...) {
+ _MAPKITIDL_PROXY($Srcs ${MAPS_IDL_FILTER})
+}
+
+### @usage: MAPS_IDL_GLOBAL_SRCS(filenames...) # internal
+###
+### Warpper for MAPKITIDL macro which is used for mobile mapkit build
+macro MAPS_IDL_GLOBAL_SRCS(Srcs...) {
+ _MAPKITIDL_PROXY(GLOBAL_OUTPUTS $Srcs ${MAPS_IDL_FILTER})
+}
+
+### @usage: MAPSMOBI_SRCS(filenames...) # internal
+###
+### Make all source files listed as GLOBAL or not (depending on the value of
+### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of
+### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to
+### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to
+### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is
+### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a
+### call to SRCS() macro with additional argument which is the value of
+### MAPSMOBI_USE_SRCS_GLOBAL variable
+macro MAPSMOBI_SRCS(FILES...) {
+ ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES)
+}
+
+### @usage: EXPORT_MAPKIT_PROTO() # internal deprecated
+###
+### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO
+### when transition of mapsmobi to arcadia is finished
+macro EXPORT_MAPKIT_PROTO() {
+ PROTO_NAMESPACE(GLOBAL maps/mapsmobi/external/proto)
+}
+
+BEFORE_PEERS=
+AFTER_PEERS=
+when ($MAPKIT_WHOLE_ARCHIVE == "yes") {
+ when($OS_LINUX) {
+ BEFORE_PEERS += $START_WHOLE_ARCHIVE_VALUE
+ AFTER_PEERS += $END_WHOLE_ARCHIVE_VALUE
+ }
+ elsewhen($OS_DARWIN) {
+ LDFLAGS+=-Wl,-all_load
+ }
+}
+
+### @usage: MAPKIT_ENABLE_WHOLE_ARCHIVE() # internal deprecated
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPKIT_ENABLE_WHOLE_ARCHIVE() {
+ ENABLE(MAPKIT_WHOLE_ARCHIVE)
+}
+
+### @usage: MAPS_IDL_LIBRARY()
+###
+### Definition of multimodule that builds various variants of libraries.
+### The particular variant is selected based on where PEERDIR to IDL_LIBRARY comes from.
+### Now supported 2 variants: C++, Java
+### Java version is not really a library but an archive of generated Java sources
+multimodule MAPS_IDL_LIBRARY {
+ module CPP_IDL: LIBRARY {
+ .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_GLOBAL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS
+ SET(PEERDIR_TAGS CPP_IDL CPP_PROTO __EMPTY__)
+ SET(MAPS_IDL_FILTER)
+ ENABLE(CPP_IDL)
+ NO_UTIL()
+
+ when ($OS_IOS == "yes") {
+ CFLAGS+=-fobjc-arc
+ }
+ }
+
+ module JAVA_IDL: JSRC_LIBRARY {
+ .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS
+ .IGNORED=CPP_ADDINCL
+ SET(PEERDIR_TAGS JAVA_IDL JAVA_PROTO)
+ SET(MAPS_IDL_FILTER FILTER .java)
+ ENABLE(JAVA_IDL)
+ }
+}
+
+### @usage: MAPSMOBI_COLLECT_ASSETS_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_ASSETS_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*)
+ RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPSMOBI_COLLECT_AIDL_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_AIDL_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*.aidl)
+ RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPSMOBI_COLLECT_JAVA_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_JAVA_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*.java)
+ RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPSMOBI_COLLECT_JNI_LIBS_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_JNI_LIBS_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*.so)
+ RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPSMOBI_COLLECT_RES_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_RES_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*.(xml|png))
+ RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPSMOBI_COLLECT_TPL_FILES(varname [dir]) # internal
+###
+### This macro is strictly prohibited to use outside of mapsmobi project
+macro MAPSMOBI_COLLECT_TPL_FILES(VAR, DIR="") {
+ _GLOB($VAR ${suf=/:DIR}**/*.tpl)
+ RESTRICT_PATH(tools/idl MSG This macro is for use in mapsmobi projects)
+}
+
+### @usage: MAPS_GARDEN_COLLECT_MODULE_TRAITS(varnamei dir) # internal
+###
+### This macro is strictly prohibited to use outside of maps/garden project
+macro MAPS_GARDEN_COLLECT_MODULE_TRAITS(VAR, DIR) {
+ _GLOB($VAR $DIR/*/module_traits.json)
+ RESTRICT_PATH(maps/garden/sdk/module_traits/tests/module_traits_bundle MSG This macro is for use in maps/garden project)
+}
+
+# mapsmobi build configuration
+
+MAPSMOBI_FAKEID=${FAKEID}_r8609790
+MAPSMOBI_BUILD=
+YANDEX_EXPORT=
+YRT_EXPORT=
+MAPSMOBI_CPP_PROTO_PLUGINS=
+STATIC_STL=
+EXPORT_ALL_SYMBOLS=
+when ($MAPSMOBI_BUILD_HOST || $MAPSMOBI_BUILD_TARGET) {
+ MAPSMOBI_BUILD=yes
+}
+when ($MAPSMOBI_BUILD) {
+ CFLAGS+=-DMOBILE_BUILD ${hide:MAPSMOBI_FAKEID}
+ MAPKIT_BASE_PROTO_PACKAGE=yandex.maps.proto
+ MAPKIT_PROTO_ROOT=maps/doc/proto
+ MAPKIT_IDL_FRAMEWORK=maps/mobile/libs/idl_frameworks
+}
+when ($MAPSMOBI_BUILD_TARGET) {
+ ALLOCATOR=FAKE
+ USE_VANILLA_PROTOC=yes
+ PROTOBUF_LITE=yes
+ CPP_PROTO_PLUGINS=lite${pre=,:MAPSMOBI_CPP_PROTO_PLUGINS}:
+ when ($OPENSOURCE != "yes") {
+ SYSINCL+=build/yandex_specific/sysincl/mapsmobi.yml
+ }
+
+ CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT}
+}
+when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
+ JDK_VERSION=8
+ MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT"
+ YANDEX_EXPORT=__attribute__((visibility(\"default\")))
+ CFLAGS+=-fvisibility=hidden
+
+ when ($MAPS_MOBILE_EXPORT_CPP_API) {
+ LDFLAGS+=-lc++_shared
+ CFLAGS+=-DZLIB_DLL
+ CFLAGS+=-DPROTOBUF_USE_DLLS -DLIBPROTOBUF_EXPORTS
+ CFLAGS+=-DPNG_IMPEXP=${YANDEX_EXPORT}
+ CFLAGS+=-DBOOST_ALL_DYN_LINK
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=${YANDEX_EXPORT}
+ DYNAMIC_BOOST=yes
+ }
+ otherwise {
+ STATIC_STL=yes
+ YANDEX_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
+ LDFLAGS+=-lc++_static -Wl,--exclude-libs,ALL -static-libstdc++
+ USE_GLOBAL_CMD=no
+ }
+
+ when ($EXPORT_ALL_SYMBOLS) {
+ CFLAGS+=-fvisibility=default
+ }
+
+ when ($NO_DEBUGINFO != "yes" && $REDUCED_DEBUGINFO) {
+ CFLAGS+=-g1
+ }
+
+ CFLAGS+=-DANDROID -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -Wa,--noexecstack
+ CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare -Wno-deprecated-declarations
+
+ LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined
+
+ when ($BT_RELEASE || $BT_RELWITHDEBINFO) {
+ CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections
+ LDFLAGS+=-Wl,--gc-sections -Wl,--build-id
+ }
+
+ when ($ARCH_ARM7) {
+ CFLAGS+=-mfloat-abi=softfp
+ #Android clang overaligns some float types which causes NEON programs to fail on old Android versions. So we disable NEON.
+ #See https://github.com/android/ndk/issues/640 for more information
+ CFLAGS+=-mfpu=vfpv3-d16
+ }
+ elsewhen ($ARCH_ARM64) {
+ }
+ elsewhen ($ARCH_I386) {
+ CFLAGS+=-fstrict-aliasing -mstackrealign -DTLS_STACK_PROTECTOR
+ }
+ elsewhen ($ARCH_X86_64) {
+ CFLAGS+=-fstrict-aliasing -mstackrealign -march=x86-64 -msse4.2 -mpopcnt -m64 -DTLS_STACK_PROTECTOR
+ }
+ otherwise {
+ PEERDIR+=__unsupported_architecture_for_android__
+ }
+}
+when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) {
+ QT_REQUIRED=yes
+ LDFLAGS+=-lc++
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
+}
+when ($MAPSMOBI_BUILD_TARGET && $OS_IOS) {
+ CFLAGS+=-DIOS -stdlib=libc++ -fvisibility=hidden
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
+ when ($MAPS_MOBILE_EXPORT_OBJC_API) {
+ YRT_EXPORT=__attribute__((visibility(\"default\")))
+ }
+}
+when ($MAPSMOBI_BUILD_TARGET && $OS_LINUX) {
+ when ($NO_GRAPHICS != "yes") {
+ QT_REQUIRED=yes
+ OPENGL_REQUIRED=yes
+ }
+ OS_SDK=ubuntu-16
+ PIC=yes
+ LDFLAGS+=-lstdc++ -lgcc_s
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
+}
+when ($MAPSMOBI_BUILD_TARGET && $OS_YOCTO) {
+ QT_REQUIRED=yes
+ PIC=yes
+ CFLAGS+=-DBOOST_SYMBOL_EXPORT=
+ CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
+}
diff --git a/build/conf/project_specific/maps/sproto.conf b/build/conf/project_specific/maps/sproto.conf
new file mode 100644
index 0000000000..1a62563fc1
--- /dev/null
+++ b/build/conf/project_specific/maps/sproto.conf
@@ -0,0 +1,21 @@
+### @usage: EXPORT_YMAPS_PROTO() # maps-specific
+###
+### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace.
+macro EXPORT_YMAPS_PROTO() {
+ PROTO_NAMESPACE(GLOBAL maps/doc/proto)
+}
+
+macro _YMAPS_GENERATE_SPROTO_HEADER(File) {
+ .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=maps/libs/sproto
+}
+
+### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific
+###
+### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
+macro YMAPS_SPROTO(FILES...) {
+ SET(PROTO_HEADER_EXTS .pb.h .sproto.h)
+ foreach (FILE : $FILES) {
+ [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE)
+ }
+}
diff --git a/build/conf/project_specific/other.conf b/build/conf/project_specific/other.conf
new file mode 100644
index 0000000000..602ed5cfa3
--- /dev/null
+++ b/build/conf/project_specific/other.conf
@@ -0,0 +1,11 @@
+# Catboost
+BUILD_CATBOOST_SCRIPT=build/scripts/build_catboost.py
+### @usage: BUILD_CATBOOST(cbmodel cbname)
+###
+### Generate catboost model and access code.
+### cbmodel - CatBoost model file name (*.cmb).
+### cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code.
+### CatBoost specific macro.
+macro BUILD_CATBOOST(CbModel, CbName) {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_CATBOOST_SCRIPT} build_cb_f $ARCADIA_ROOT $ARCH_TOOL ${input:CbModel} $CbName ${output;chksum;pre=cb.:CbName.cpp} ${output;hide;pre=CB_External_;suf=.rodata:CbName} ${output_include;hide:"kernel/catboost/catboost_calcer.h"} ${kv;hide:"p CB"} ${kv;hide:"pc yellow"}
+}
diff --git a/build/conf/project_specific/yql_udf.conf b/build/conf/project_specific/yql_udf.conf
new file mode 100644
index 0000000000..badaf36687
--- /dev/null
+++ b/build/conf/project_specific/yql_udf.conf
@@ -0,0 +1,261 @@
+when ($SANITIZER_TYPE || $USE_ARCADIA_PYTHON == "no" || $UDF_NO_PROBE == "yes" || $MUSL == "yes" || $TIDY == "yes") {
+ YQL_UDF_LINK_CMD=$LINK_DYN_LIB
+ YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB
+}
+otherwise {
+ YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"}
+ YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"}
+}
+
+### @usage: UDF_BASE(name [EXPORTS symlist_file] [PREFIX prefix]) #internal
+###
+### The base logic of all UDF extension modules (User-Defined Functions).
+### Processing EXPORTS and PREFIX is the same as for DLL.
+###
+### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
+module UDF_BASE: DLL_UNIT {
+ PRINT_MODULE_TYPE(UDF $REALPRJNAME)
+
+ when ($MSVC != "yes" && $DARWIN != "yes") {
+ LDFLAGS+= -Wl,-Bsymbolic
+ }
+}
+
+### @usage: UDF(name [EXPORTS symlist_file] [PREFIX prefix]) # deprecated
+###
+### The KiWi UDF module.
+### Processing EXPORTS and PREFIX is the same as for DLL.
+###
+### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
+module UDF: UDF_BASE {
+ PEERDIR(yweb/robot/kiwi/kwcalc/udflib)
+}
+
+### @usage: UDF_LIB([name]) # deprecated
+###
+### The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib.
+module UDF_LIB: LIBRARY {
+ PEERDIR(yweb/robot/kiwi/kwcalc/udflib)
+}
+
+UDF_NO_PROBE="no"
+### @usage: UDF_NO_PROBE()
+###
+### Disable UDF import check at build stage
+macro UDF_NO_PROBE() {
+ ENABLE(UDF_NO_PROBE)
+}
+
+### @usage: YQL_UDF_TEST([name])
+###
+### The module to test YQL C++ UDF.
+###
+### Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+module YQL_UDF_TEST: PY2TEST {
+ PEERDIR(yql/library/udf_test)
+ PEERDIR(yt/python/client_lite)
+
+ DEPENDS(yql/tools/astdiff)
+ DEPENDS(yql/tools/udf_resolver)
+ DEPENDS(yql/tools/yqlrun)
+ DATA(arcadia/ydb/library/yql/mount)
+ DATA(arcadia/yql/cfg/tests)
+}
+
+### @usage: _ADD_YQL_UDF_DEPS()
+###
+### Add all needed PEERDIRs to a YQL_UDF.
+###
+### https://yql.yandex-team.ru/docs/yt/udf/cpp/
+macro _ADD_YQL_UDF_DEPS() {
+ PEERDIR(ydb/library/yql/public/udf)
+ PEERDIR(ydb/library/yql/public/udf/support)
+}
+
+### @usage: _MAKE_YQL_UDF()
+###
+### Make module definition an YQL UDF: add all needed dependencies, properties and flags
+###
+### https://yql.yandex-team.ru/docs/yt/udf/cpp/
+macro _MAKE_YQL_UDF() {
+ _ADD_YQL_UDF_DEPS()
+ SET_APPEND(USER_CXXFLAGS -DBUILD_UDF)
+ # For Windows using declspecs
+ DEFAULT(YQL_UDF_EXPORT ${ARCADIA_ROOT}/ydb/library/yql/public/udf/udfs_exports.exports)
+
+ when ($WINDOWS == "yes") {
+ YQL_UDF_EXPORT=
+ }
+
+ SET(EXPORTS_FILE $YQL_UDF_EXPORT)
+}
+
+### @usage: YQL_UDF_MODULE(name)
+###
+### The extension module for YQL with C++ UDF (User Defined Function YQL)
+###
+### https://yql.yandex-team.ru/docs/yt/udf/cpp/
+module YQL_UDF_MODULE: UDF_BASE {
+ .CMD=YQL_UDF_LINK_CMD
+ _MAKE_YQL_UDF()
+ PROVIDES(YqlServicePolicy)
+}
+
+module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM {
+ .CMD=YQL_UDF_LINK_PRG_CMD
+ _MAKE_YQL_UDF()
+}
+
+### @usage: YQL_UDF(name)
+###
+### User-defined function for YQL
+###
+### Multimodule which is YQL_UDF_MODULE when built directly or referred by BUNDLE and DEPENDS macros.
+### If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs.
+###
+### @see: [YQL_UDF_MODULE()](#module_YQL_UDF_MODULE)
+multimodule YQL_UDF {
+ module YQL_UDF_SHARED: YQL_UDF_MODULE {
+ NO_CLANG_TIDY()
+ }
+ module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY {
+ .ALIASES=SRCS=GLOBAL_SRCS
+ OBJ_SUF=.udfs
+ _ADD_YQL_UDF_DEPS()
+ # disable credits generation for static library
+ SET(CREDITS_FLAGS)
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.static.lib
+ }
+ }
+}
+
+### @usage: YQL_ABI_VERSION(major minor release))
+###
+### Specifying the supported ABI for YQL_UDF.
+###
+### @see: [YQL_UDF()](#multimodule_YQL_UDF)
+macro YQL_ABI_VERSION(Major, Minor, Patch) {
+ YQL_ABI_FLAGS=-DUDF_ABI_VERSION_MAJOR=$Major -DUDF_ABI_VERSION_MINOR=$Minor -DUDF_ABI_VERSION_PATCH=$Patch
+ SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS)
+}
+
+### @usage: YQL_LAST_ABI_VERSION()
+###
+### Use the last ABI for YQL_UDF
+###
+macro YQL_LAST_ABI_VERSION() {
+ YQL_ABI_FLAGS=-DUSE_CURRENT_UDF_ABI_VERSION
+ SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS)
+}
+
+### @usage: YQL_PYTHON_UDF(name)
+###
+### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+###
+### https://yql.yandex-team.ru/docs/yt/udf/python/
+module YQL_PYTHON_UDF: YQL_UDF_MODULE {
+ .IGNORED=USE_PYTHON2
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL
+
+ USE_PYTHON2()
+ _ARCADIA_PYTHON_ADDINCL()
+ PEERDIR(build/platform/python/ldflags)
+ PEERDIR(library/python/type_info)
+
+ DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports)
+
+ when ($WINDOWS == "yes") {
+ YQL_PYTHON_UDF_EXPORT=
+ }
+
+ ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader
+ ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+ SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+}
+
+### @usage: YQL_PYTHON_UDF_PROGRAM(name)
+###
+### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+###
+### https://yql.yandex-team.ru/docs/yt/udf/python/
+module YQL_PYTHON_UDF_PROGRAM: _YQL_UDF_PROGRAM_BASE {
+ .IGNORED=USE_PYTHON2
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL
+ USE_PYTHON2()
+ _ARCADIA_PYTHON_ADDINCL()
+ PEERDIR(build/platform/python/ldflags)
+ PEERDIR(library/python/type_info)
+
+ DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports)
+
+ when ($WINDOWS == "yes") {
+ YQL_PYTHON_UDF_EXPORT=
+ }
+
+ ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader
+ ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+ SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+}
+
+### @usage: YQL_PYTHON3_UDF(name)
+###
+### The extension module for YQL with Python 3.x UDF (User Defined Function for YQL).
+### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+###
+### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+module YQL_PYTHON3_UDF: YQL_UDF_MODULE {
+ .RESTRICTED=PYTHON2_ADDINCL PYTHON3_ADDINCL USE_PYTHON2 USE_PYTHON3
+ _ARCADIA_PYTHON3_ADDINCL()
+ PEERDIR(build/platform/python/ldflags)
+ PEERDIR(library/python/type_info)
+
+ DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports)
+
+ when ($WINDOWS == "yes") {
+ YQL_PYTHON_UDF_EXPORT=
+ }
+
+ ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader
+ ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+ SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT)
+}
+
+macro _MAKE_YQL_PYTHON_UDF_TEST() {
+ PEERDIR(library/python/pytest)
+ DEPENDS(yql/tools/run_python_udf)
+ SETUP_PYTEST_BIN(RUNNER_BIN $(BUILD_ROOT)/yql/tools/run_python_udf/run_python_udf)
+}
+
+### @usage: YQL_PYTHON_UDF_TEST(name)
+###
+### The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL_PYTHON_UDF.
+###
+### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool.
+###
+### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+###
+### @example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make
+###
+### @see: [YQL_PYTHON_UDF()](#module_YQL_PYTHON_UDF)
+module YQL_PYTHON_UDF_TEST: YQL_PYTHON_UDF {
+ _MAKE_YQL_PYTHON_UDF_TEST()
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+### @usage: YQL_PYTHON3_UDF_TEST(name)
+###
+### The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL_PYTHON3_UDF.
+###
+### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool.
+###
+### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+###
+### @see: [YQL_PYTHON3_UDF()](#module_YQL_PYTHON3_UDF)
+module YQL_PYTHON3_UDF_TEST: YQL_PYTHON3_UDF {
+ _MAKE_YQL_PYTHON_UDF_TEST()
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
diff --git a/build/conf/rules.conf b/build/conf/rules.conf
new file mode 100644
index 0000000000..51bf1baa52
--- /dev/null
+++ b/build/conf/rules.conf
@@ -0,0 +1,43 @@
+PEERDIRS_RULES_PATH=\
+ build/rules/junk.policy \
+ build/rules/go/contrib.policy \
+ build/rules/go/vendor.policy \
+ build/rules/contrib_deprecated.policy \
+ build/rules/contrib_python.policy \
+ build/rules/contrib_restricted.policy \
+ build/rules/contrib_deps.policy \
+ build/rules/library_deps.policy \
+ build/rules/library_deprecated.policy \
+ build/rules/passport.policy \
+ build/rules/yt.policy \
+ build/rules/catboost.policy \
+ build/rules/maps/maps.policy \
+ build/rules/taxi.policy \
+ build/rules/yp.policy \
+ build/rules/alice.policy \
+ build/rules/kikimr.policy \
+ build/rules/yadi.policy
+
+CHECK_INTERNAL=yes
+INTERNAL_EXCEPTIONS=\
+ contrib \
+ search/begemot/rules/internal \
+ mssngr/router/lib/protos/internal \
+ mssngr/router/lib/registry/method/internal \
+ cv/imageproc/ocr/api/mobile_c/internal \
+ kernel/ugc/security/lib/internal \
+ maps/mobile/libs/mapkit/internal
+
+_BLACKLISTS=
+when ($DISABLE_BLACKLIST == "yes") {
+ _BLACKLISTS=
+}
+elsewhen ($CUSTOM_BLACKLIST != "") {
+ _BLACKLISTS=$CUSTOM_BLACKLIST
+}
+elsewhen ($AUTOCHECK == "yes" || $TEST_BLACKLIST_AUTOCHECK == "yes") {
+ _BLACKLISTS+=build/rules/autocheck.blacklist
+}
+otherwise {
+ _BLACKLISTS+=build/rules/local.blacklist
+}
diff --git a/build/conf/settings.conf b/build/conf/settings.conf
new file mode 100644
index 0000000000..4329f3233a
--- /dev/null
+++ b/build/conf/settings.conf
@@ -0,0 +1,155 @@
+GLOBAL_SRCS_IN_RESULTS=yes
+JSON_CACHE_IS_ATTACHED=yes
+USE_ADDINCL_WITHOUT_FOR_AS_ADDINCL_FOR_C=yes
+LANGS_REQUIRE_BUILD_AND_SRC_ROOTS=c asm cython proto flatc swig ydl nlg
+
+# NOTE! Only foldable vars should be listed here
+_FOLDABLE_VARS_=\
+ CL_WRAPPER \
+ END_WHOLE_ARCHIVE_VALUE \
+ LD_SDK_VERSION \
+ LD_STRIP_FLAG \
+ LIB_WRAPPER \
+ LINK_EXE_FLAGS_DEBUG \
+ LINK_EXE_FLAGS_RELEASE \
+ LINK_IMPLIB \
+ LINK_LIB_FLAGS \
+ LINK_STDLIBS \
+ LINK_WRAPPER \
+ LINK_WRAPPER_DYNLIB \
+ ML_WRAPPER \
+ START_WHOLE_ARCHIVE_VALUE \
+ _CFLAGS_ARCH_I386 \
+ _CFLAGS_UCRT_VC_INCLUDES \
+ _COMPILER_TIME_TRACE_FLAGS \
+ _COMPILER_TIME_TRACE_GRANULARITY \
+ _COMPILER_TIME_TRACE_POSTPROCESS \
+ _CPP_ARGS \
+ _CROSS_SUFFIX \
+ _CXX_DEFINES \
+ _CXX_FLAGS \
+ _CXX_STD \
+ _CXX_WARNINGS \
+ _CXX_WARNINGS_CLANG \
+ _CXX_WARNINGS_CLANG_CL \
+ _CXX_WARNINGS_CLANG_CL_2019 \
+ _CXX_WARNINGS_CLANG_CL_2019_IDE_MSVS \
+ _CXX_WARNINGS_GCC_7 \
+ _C_ARGS \
+ _C_CPP_KV_STYLE \
+ _C_DEFINES \
+ _C_DEFINES_ANDROID \
+ _C_DEFINES_ANDROID_OTHERWISE \
+ _C_DEFINES_CLANG_LINUX_X86_64 \
+ _C_DEFINES_GNU_SOURCE \
+ _C_DEFINES_IOS \
+ _C_DEFINES_NDEBUG \
+ _C_DEFINES_WITH_VALGRIND \
+ _C_FLAGS \
+ _C_FLAGS_ARCH \
+ _C_FLAGS_ARCH_OPT \
+ _C_FLAGS_FAST_DEBUG \
+ _C_FLAGS_PROFILER \
+ _C_FLAGS_RELEASE \
+ _C_FOPTIONS \
+ _C_FOPTIONS_ALIGNED_ALLOCATION \
+ _C_FOPTIONS_CLANG_10 \
+ _C_FOPTIONS_CLANG_10_LINUX \
+ _C_FOPTIONS_COLOR \
+ _C_FOPTIONS_COVERAGE \
+ _C_FOPTIONS_DEBUG \
+ _C_FOPTIONS_GCC \
+ _C_FOPTIONS_INIT_ARRAY \
+ _C_FOPTIONS_IOS \
+ _C_FOPTIONS_MAPSMOBI_ARM \
+ _C_FOPTIONS_PROFILER \
+ _C_FOPTIONS_RELEASE \
+ _C_SYSTEM_LIBRARIES \
+ _C_WARNINGS \
+ _C_WARNINGS_CLANG \
+ _C_WARNINGS_CLANG_CL \
+ _DEBUG_INFO_FLAGS \
+ _DEFINES_ARCH \
+ _DEFINES_UNICODE \
+ _DEFINES_WIN32_WINNT \
+ _DWARF_COMMAND \
+ _END_GROUP \
+ _EXEC_SHARED_FLAG \
+ _EXE_FLAGS \
+ _FLAGS_COMMON \
+ _FLAGS_COMMON_DEBUG \
+ _FLAGS_COMMON_IDE_MSVS \
+ _FLAGS_COMMON_LIBPATHS \
+ _FLAGS_C_ONLY \
+ _FLAGS_DEBUG_ONLY \
+ _FLAGS_DEBUG_ONLY_CLANG_CL \
+ _FLAGS_DEBUG_ONLY_DEBUG \
+ _FLAGS_DEBUG_RUNTIME \
+ _FLAGS_IGNORE \
+ _FLAGS_MACHINE \
+ _FLAGS_MSVS_ONLY \
+ _FLAGS_RELEASE_ONLY \
+ _FLAGS_RELEASE_ONLY_DEBUG \
+ _FLAGS_RELEASE_RUNTIME \
+ _LD_ARCHIVER \
+ _LD_ARCH_FLAG \
+ _LD_AR_PLUGIN \
+ _LD_DCE_FLAG_GC_SECTIONS \
+ _LD_DCE_FLAG_PRINT_SECTIONS \
+ _LD_ENV_STYLE \
+ _LD_FLAGS \
+ _LD_FLAGS_1 \
+ _LD_FLAGS_2 \
+ _LD_FLAGS_COVERAGE \
+ _LD_FLAGS_IOS_MAPSMOBI_ARM \
+ _LD_FLAGS_PROFILER_TYPE \
+ _LD_FLAGS_SIZE_OPTIMIZED \
+ _LD_ICF_FLAG \
+ _LD_ICF_FLAG_PRINT_SECTIONS \
+ _LD_LIB_GENERATE_MF \
+ _LD_LINKER_OUTPUT\
+ _LD_LINKER_OUTPUT_FLAG \
+ _LD_LINK_FAT_PREFIX \
+ _LD_LINK_FAT_SRCS_GLOBALS_NO_WA \
+ _LD_LINK_FAT_SRCS_GLOBALS_WA \
+ _LD_LINK_FAT_SUFFIX1 \
+ _LD_LINK_FAT_SUFFIX2 \
+ _LD_LLVM_AR_FORMAT \
+ _LD_SRCS_GLOBALS \
+ _LD_SYS_LIB \
+ _LD_TAIL_LINK_LIB \
+ _LD_THREAD_LIBRARY \
+ _LD_USE_STDLIB \
+ _LINKER_TIME_TRACE_FLAG \
+ _LINKER_TIME_TRACE_GRANULARITY \
+ _LINK_EXTRA_OUTPUT \
+ _MASM_IO \
+ _MSVC_ARCH \
+ _MSVC_FLAGS \
+ _MSVC_FLAGS_ARCH_OPT \
+ _MSVC_FLAGS_CLANG \
+ _MSVC_FLAGS_CLANG_ARCH \
+ _MSVC_FLAGS_CLANG_EQ_2019 \
+ _MSVC_FLAGS_CLANG_NO_WARNINGS \
+ _MSVC_FLAGS_INCLUDE \
+ _MSVC_HEAD_LINK_LIB \
+ _MSVC_MACRO \
+ _MSVC_SRCS_GLOBALS \
+ _MSVC_TAIL_LINK_LIB \
+ _MSVC_TC_KIT_LIBS \
+ _MSVC_TC_VC_ROOT \
+ _MSVC_WARNS_AS_ERRORS \
+ _MSVC_WARNS_DISABLED \
+ _MSVC_WARNS_ENABLED \
+ _MSVC_WINDOWS7 \
+ _MSVC_WINDOWS8 \
+ _OPTIMIZE_RELEASE \
+ _SFDL_FLAGS \
+ _SHARED_FLAG \
+ _SONAME_FLAG \
+ _SONAME_OPTION \
+ _START_GROUP \
+ _STD_CXX \
+ _WINAPI_UNICODE \
+
+# end of _FOLDABLE_VARS list
diff --git a/build/conf/sysincl.conf b/build/conf/sysincl.conf
new file mode 100644
index 0000000000..60e641e2db
--- /dev/null
+++ b/build/conf/sysincl.conf
@@ -0,0 +1,61 @@
+SYSINCL=
+SYSINCL+=build/sysincl/libc-to-compat.yml
+SYSINCL+=build/sysincl/libc-to-nothing.yml
+SYSINCL+=build/sysincl/stl-to-nothing.yml
+SYSINCL+=build/sysincl/linux.yml
+SYSINCL+=build/sysincl/windows.yml
+SYSINCL+=build/sysincl/darwin.yml
+SYSINCL+=build/sysincl/intrinsic.yml
+SYSINCL+=build/sysincl/nvidia.yml
+SYSINCL+=build/sysincl/misc.yml
+SYSINCL+=build/sysincl/unsorted.yml
+
+when ($USE_LOCAL_SWIG == "yes") {
+ SYSINCL+=build/sysincl/swig-to-nothing.yml
+}
+otherwise {
+ SYSINCL+=build/sysincl/swig.yml
+}
+
+when ($USE_SYSTEM_JDK) {
+ SYSINCL+=build/sysincl/system-jdk.yml
+}
+
+when ($OPENSOURCE != "yes") {
+ SYSINCL+=build/yandex_specific/sysincl/speechkit.yml
+ SYSINCL+=build/yandex_specific/sysincl/sophos.yml
+ SYSINCL+=build/yandex_specific/sysincl/misc.yml
+ SYSINCL+=build/yandex_specific/sysincl/taxi.yml
+}
+
+when ($MUSL == "yes") {
+ SYSINCL+=build/sysincl/libc-to-musl.yml
+ SYSINCL+=build/sysincl/linux-musl.yml
+}
+
+when ($OS_WINDOWS == "yes") {
+ SYSINCL+=build/sysincl/misc-win.yml
+ when ($OPENSOURCE !="yes") {
+ SYSINCL+=build/yandex_specific/sysincl/misc-win.yml
+ }
+}
+
+when ($OS_ANDROID == "yes") {
+ SYSINCL+=build/sysincl/android.yml
+}
+
+when ($OS_LINUX != "yes") {
+ SYSINCL+=build/sysincl/linux-headers.yml
+}
+
+when ($OS_LINUX != "yes" || $CATBOOST_OPENSOURCE == "yes") {
+ SYSINCL+=build/sysincl/ibdrv.yml
+}
+
+when ($WITH_VALGRIND == "yes") {
+ SYSINCL+=build/sysincl/valgrind.yml
+}
+
+when ($OS_LINUX == "yes" && $OS_SDK == "ubuntu-12") {
+ SYSINCL+=build/sysincl/linux-ubuntu-12.yml
+}
diff --git a/build/conf/toolchains/gnu_toolchain.conf b/build/conf/toolchains/gnu_toolchain.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build/conf/toolchains/gnu_toolchain.conf
diff --git a/build/conf/toolchains/msvc_toolchain.conf b/build/conf/toolchains/msvc_toolchain.conf
new file mode 100644
index 0000000000..6b4d6b5c45
--- /dev/null
+++ b/build/conf/toolchains/msvc_toolchain.conf
@@ -0,0 +1,7 @@
+# TODO(somov): Заглушка для тех мест, где C_FLAGS_PLATFORM используется
+# для любых платформ. Нужно унифицировать с GnuToolchain.
+C_FLAGS_PLATFORM=
+
+when ($_UNDER_WINE == "yes") {
+ WINE_ENV=${env:"WINEPREFIX_SUFFIX=4.0"}
+}
diff --git a/build/conf/ts.conf b/build/conf/ts.conf
new file mode 100644
index 0000000000..8fc221c3ca
--- /dev/null
+++ b/build/conf/ts.conf
@@ -0,0 +1,105 @@
+NODEJS_ROOT=$NODEJS_RESOURCE_GLOBAL
+NODEJS_BIN=$NODEJS_ROOT/node
+PNPM_ROOT=$PNPM_RESOURCE_GLOBAL
+PNPM_SCRIPT=$PNPM_ROOT/pnpm.js
+TSC_ROOT=$TS_COMPILER_RESOURCE_GLOBAL/typescript
+TSC_SCRIPT=$TSC_ROOT/lib/tsc.js
+NOTS_TOOL=${tool:"tools/nots"}
+NOTS_TOOL_BASE_ARGS=--build-root $ARCADIA_BUILD_ROOT --bindir $BINDIR --curdir $CURDIR --nodejs-bin $NODEJS_BIN
+
+NPM_CONTRIBS_PATH=devtools/dummy_arcadia/ts/contribs
+
+### @usage: NPM_CONTRIBS() # internal
+###
+### Defines special module that provides contrib tarballs from internal npm registry.
+### Should be used only with `NODE_MODULES` macro.
+###
+### @see [FROM_NPM_LOCKFILES()](#macro_FROM_NPM_LOCKFILES)
+### @see [NODE_MODULES()](#macro_NODE_MODULES)
+module NPM_CONTRIBS: _BASE_UNIT {
+ .CMD=TOUCH_UNIT
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=no
+ .ALLOWED=FROM_NPM_LOCKFILES
+ .RESTRICTED=PEERDIR
+
+ SET(MODULE_TAG NPM_CONTRIBS)
+
+ MODULE_SUFFIX=.fake
+
+ _BARE_MODULE()
+}
+
+### @usage: FROM_NPM_LOCKFILES(LOCKFILES...) # internal
+###
+### Defines lockfile list for `NPM_CONTRIBS` module.
+###
+### @see [NPM_CONTRIBS()](#module_NPM_CONTRIBS)
+macro FROM_NPM_LOCKFILES(LOCKFILES...) {
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS $LOCKFILES)
+ # See implementation in build/plugins/nots.py
+ _FROM_NPM_LOCKFILES($LOCKFILES)
+}
+
+### @usage: FROM_NPM(NAME VERSION SKY_ID INTEGRITY INTEGRITY_ALGO TARBALL_PATH)
+macro FROM_NPM(NAME, VERSION, SKY_ID, INTEGRITY, INTEGRITY_ALGO, TARBALL_PATH) {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_npm.py"} ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/sky.py"} --name $NAME --version $VERSION --sky-id $SKY_ID --integrity $INTEGRITY --integrity-algorithm $INTEGRITY_ALGO --copy-to ${output:TARBALL_PATH} ${requirements;hide:"network:full"} ${kv;hide:"p NP"} ${kv;hide:"pc yellow"}
+}
+
+### @usage: NODE_MODULES()
+###
+### Materializes `node_modules.tar` bundle according to the module's lockfile.
+###
+### @see [NPM_CONTRIBS()](#module_NPM_CONTRIBS)
+macro NODE_MODULES() {
+ # See implementation in build/plugins/nots.py
+}
+
+_NODE_MODULES_INPUTS=
+
+macro _NODE_MODULES(IN{input}[], OUT{output}[]) {
+ PEERDIR($NPM_CONTRIBS_PATH)
+ SET(_NODE_MODULES_INPUTS \${input;hide:node_modules.tar})
+
+ .CMD=${cwd:BINDIR} $NOTS_TOOL create-node-modules $NOTS_TOOL_BASE_ARGS --pnpm-script $PNPM_SCRIPT --contribs $NPM_CONTRIBS_PATH ${input;hide:IN} ${output;global;hide:OUT} ${kv;hide:"p NM"} ${kv;hide:"pc yellow"}
+}
+
+module _TS_BASE_UNIT: _BASE_UNIT {
+ SET(MODULE_TAG TS)
+ SET(PEERDIR_TAGS TS NPM_CONTRIBS)
+
+ PEERDIR(build/platform/nodejs)
+ PEERDIR(build/external_resources/pnpm)
+ PEERDIR(build/external_resources/typescript)
+
+ MODULE_SUFFIX=.fake
+
+ _BARE_MODULE()
+}
+
+TS_CONFIG_PATH=tsconfig.json
+
+TS_COMPILE=${cwd:BINDIR} $NOTS_TOOL compile-ts $NOTS_TOOL_BASE_ARGS --tsc-script $TSC_SCRIPT --config ${input:TS_CONFIG_PATH} $_NODE_MODULES_INPUTS ${output;hide:"package.json"} ${kv;hide:"p FE"} ${kv;hide:"pc yellow"} && $TOUCH_UNIT
+
+### @usage: TS_LIBRARY([name])
+###
+### The TypeScript/JavaScript library module, compiles TypeScript sources to JavaScript.
+### Build results are JavaScript files, typings and source mappings (depending on local tsconfig.json settings).
+###
+### @see [NODE_MODULES()](#macro_NODE_MODULES)
+### @example
+###
+### TS_LIBRARY()
+### SRCS(src/index.ts)
+### NODE_MODULES()
+### END()
+###
+module TS_LIBRARY : _TS_BASE_UNIT {
+ .CMD=TS_COMPILE
+ .FINAL_TARGET=yes
+ .PEERDIR_POLICY=as_build_from
+
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/${TS_CONFIG_PATH} ${CURDIR}/package.json)
+
+ _TS_CONFIGURE($TS_CONFIG_PATH)
+}
diff --git a/build/conf_fatal_error/ya.make b/build/conf_fatal_error/ya.make
new file mode 100644
index 0000000000..40c85f1079
--- /dev/null
+++ b/build/conf_fatal_error/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake kikht)
+RESOURCES_LIBRARY()
+SET(FATAL_ERROR_MODULE yes)
+IF (FATAL_ERROR_MESSAGE != "")
+ MESSAGE(FATAL_ERROR $FATAL_ERROR_MESSAGE)
+ENDIF()
+END()
diff --git a/build/config/tests/clang_tidy/config.yaml b/build/config/tests/clang_tidy/config.yaml
new file mode 100644
index 0000000000..d55707592c
--- /dev/null
+++ b/build/config/tests/clang_tidy/config.yaml
@@ -0,0 +1,29 @@
+Checks: >
+ -*,
+ arcadia-typeid-name-restriction,
+ bugprone-use-after-move,
+ readability-identifier-naming,
+CheckOptions:
+ - key: readability-identifier-naming.ClassCase
+ value: CamelCase
+ - key: readability-identifier-naming.PublicMemberCase
+ value: CamelCase
+ - key: readability-identifier-naming.ProtectedMemberCase
+ value: CamelCase
+ - key: readability-identifier-naming.ProtectedMemberSuffix
+ value: _
+ - key: readability-identifier-naming.PrivateMemberCase
+ value: CamelCase
+ - key: readability-identifier-naming.PrivateMemberSuffix
+ value: _
+ - key: readability-identifier-naming.FunctionCase
+ value: CamelCase
+ # do not tide public begin / end methods to workaround clang-tidy bug in range-based for loops
+ - key: readability-identifier-naming.PublicMethodIgnoredRegexp
+ value: "(begin|end|empty|size|ysize|front|back)"
+ - key: readability-identifier-naming.PublicMethodCase
+ value: CamelCase
+ - key: readability-identifier-naming.ProtectedMethodCase
+ value: CamelCase
+ - key: readability-identifier-naming.PrivateMethodCase
+ value: CamelCase
diff --git a/build/config/tests/clang_tidy/ya.make b/build/config/tests/clang_tidy/ya.make
new file mode 100644
index 0000000000..fc6544f38f
--- /dev/null
+++ b/build/config/tests/clang_tidy/ya.make
@@ -0,0 +1,4 @@
+OWNER(
+ g:cpp-committee
+ g:yatest
+)
diff --git a/build/config/tests/flake8/flake8.conf b/build/config/tests/flake8/flake8.conf
new file mode 100644
index 0000000000..8af22b5d4d
--- /dev/null
+++ b/build/config/tests/flake8/flake8.conf
@@ -0,0 +1,35 @@
+[flake8]
+select =
+ E, W, # pep8 errors and warnings
+ F, # pyflakes
+ C9, # McCabe
+ N8, # Naming Conventions
+ #B, S, # bandit
+ #C, # commas
+ #D, # docstrings
+ #P, # string-format
+ #Q, # quotes
+
+ignore =
+ E122, # continuation line missing indentation or outdented
+ E123, # closing bracket does not match indentation of opening bracket's line
+ E127, # continuation line over-indented for visual indent
+ E131, # continuation line unaligned for hanging
+ E203, # whitespace before ':'
+ E225, # missing whitespace around operator
+ E226, # missing whitespace around arithmetic operator
+ E24, # multiple spaces after ',' or tab after ','
+ E275, # missing whitespace after keyword
+ E305, # expected 2 blank lines after end of function or class
+ E306, # expected 1 blank line before a nested definition
+ E402, # module level import not at top of file
+ E722, # do not use bare except, specify exception instead
+ E731, # do not assign a lambda expression, use a def
+ E741, # do not use variables named 'l', 'O', or 'I'
+
+ F722, # syntax error in forward annotation
+
+ W503, # line break before binary operator
+ W504, # line break after binary operator
+
+max-line-length = 200
diff --git a/build/config/tests/flake8/ya.make b/build/config/tests/flake8/ya.make
new file mode 100644
index 0000000000..c4ba4105e0
--- /dev/null
+++ b/build/config/tests/flake8/ya.make
@@ -0,0 +1,4 @@
+OWNER(
+ g:python-committee
+ g:yatest
+)
diff --git a/build/config/tests/ya.make b/build/config/tests/ya.make
new file mode 100644
index 0000000000..146c3f63ad
--- /dev/null
+++ b/build/config/tests/ya.make
@@ -0,0 +1,4 @@
+OWNER(
+ shadchin
+ g:yatest
+)
diff --git a/build/config/ya.make b/build/config/ya.make
new file mode 100644
index 0000000000..ff93704d5b
--- /dev/null
+++ b/build/config/ya.make
@@ -0,0 +1,3 @@
+RECURSE(
+ tests
+)
diff --git a/build/docs/all.md b/build/docs/all.md
new file mode 100644
index 0000000000..32621d9d22
--- /dev/null
+++ b/build/docs/all.md
@@ -0,0 +1,4568 @@
+*Do not edit, this file is generated from comments to macros definitions using `ya dump conf-docs -all`.*
+
+# ya.make and core.conf commands
+
+General info: [How to write ya.make files](https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles)
+
+## Table of contents
+
+ * [Multimodules](#multimodules)
+ - Multimodule [DLL_JAVA](#multimodule_DLL_JAVA)
+ - Multimodule [DOCS](#multimodule_DOCS)
+ - Multimodule [DYNAMIC_LIBRARY](#multimodule_DYNAMIC_LIBRARY)
+ - Multimodule [FBS_LIBRARY](#multimodule_FBS_LIBRARY)
+ - Multimodule [JAR_PROGRAM](#multimodule_JAR_PROGRAM)
+ - Multimodule [JAVA_CONTRIB_PROGRAM](#multimodule_JAVA_CONTRIB_PROGRAM)
+ - Multimodule [JAVA_PROGRAM](#multimodule_JAVA_PROGRAM)
+ - Multimodule [JTEST](#multimodule_JTEST)
+ - Multimodule [JTEST_FOR](#multimodule_JTEST_FOR)
+ - Multimodule [JTEST_YMAKE](#multimodule_JTEST_YMAKE)
+ - Multimodule [JUNIT5](#multimodule_JUNIT5)
+ - Multimodule [JUNIT5_YMAKE](#multimodule_JUNIT5_YMAKE)
+ - Multimodule [MAPS_IDL_LIBRARY](#multimodule_MAPS_IDL_LIBRARY)
+ - Multimodule [PROTO_LIBRARY](#multimodule_PROTO_LIBRARY)
+ - Multimodule [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
+ - Multimodule [PY23_NATIVE_LIBRARY](#multimodule_PY23_NATIVE_LIBRARY)
+ - Multimodule [PY23_TEST](#multimodule_PY23_TEST)
+ - Multimodule [PY3TEST](#multimodule_PY3TEST)
+ - Multimodule [PY3_PROGRAM](#multimodule_PY3_PROGRAM)
+ - Multimodule [SANDBOX_PY23_TASK](#multimodule_SANDBOX_PY23_TASK)
+ - Multimodule [SANDBOX_PY3_TASK](#multimodule_SANDBOX_PY3_TASK)
+ - Multimodule [SANDBOX_TASK](#multimodule_SANDBOX_TASK)
+ - Multimodule [SSQLS_LIBRARY](#multimodule_SSQLS_LIBRARY)
+ - Multimodule [YQL_UDF](#multimodule_YQL_UDF)
+ * [Modules](#modules)
+ - Module [AAR](#module_AAR)
+ - Module [AAR_PROXY_LIBRARY](#module_AAR_PROXY_LIBRARY)
+ - Module [ASRC_LIBRARY](#module_ASRC_LIBRARY)
+ - Module [BOOSTTEST](#module_BOOSTTEST)
+ - Module [BOOSTTEST_WITH_MAIN](#module_BOOSTTEST_WITH_MAIN)
+ - Module [CI_GROUP](#module_CI_GROUP)
+ - Module [CONTAINER](#module_CONTAINER)
+ - Module [CONTAINER_LAYER](#module_CONTAINER_LAYER)
+ - Module [CPP_STYLE_TEST](#module_CPP_STYLE_TEST)
+ - Module [CUSTOM_BUILD_LIBRARY](#module_CUSTOM_BUILD_LIBRARY)
+ - Module [DEFAULT_IOS_INTERFACE](#module_DEFAULT_IOS_INTERFACE)
+ - Module [DEV_DLL_PROXY](#module_DEV_DLL_PROXY)
+ - Module [DLL](#module_DLL)
+ - Module [DLL_PROXY](#module_DLL_PROXY)
+ - Module [DLL_PROXY_LIBRARY](#module_DLL_PROXY_LIBRARY)
+ - Module [DLL_TOOL](#module_DLL_TOOL)
+ - Module [DLL_UNIT](#module_DLL_UNIT)
+ - Module [EXECTEST](#module_EXECTEST)
+ - Module [EXTERNAL_JAVA_LIBRARY](#module_EXTERNAL_JAVA_LIBRARY)
+ - Module [FAT_OBJECT](#module_FAT_OBJECT)
+ - Module [FUZZ](#module_FUZZ)
+ - Module [GO_DLL](#module_GO_DLL)
+ - Module [GO_LIBRARY](#module_GO_LIBRARY)
+ - Module [GO_PROGRAM](#module_GO_PROGRAM)
+ - Module [GO_TEST](#module_GO_TEST)
+ - Module [GTEST](#module_GTEST)
+ - Module [GTEST_UGLY](#module_GTEST_UGLY)
+ - Module [G_BENCHMARK](#module_G_BENCHMARK)
+ - Module [IOS_INTERFACE](#module_IOS_INTERFACE)
+ - Module [JAR_LIBRARY](#module_JAR_LIBRARY)
+ - Module [JAVA_CONTRIB](#module_JAVA_CONTRIB)
+ - Module [JAVA_CONTRIB_PROXY](#module_JAVA_CONTRIB_PROXY)
+ - Module [JAVA_LIBRARY](#module_JAVA_LIBRARY)
+ - Module [JSRC_LIBRARY](#module_JSRC_LIBRARY)
+ - Module [JSRC_PROXY_MOBILE_LIBRARY](#module_JSRC_PROXY_MOBILE_LIBRARY)
+ - Module [LIBRARY](#module_LIBRARY)
+ - Module [MCU_PROGRAM](#module_MCU_PROGRAM)
+ - Module [METAQUERY](#module_METAQUERY)
+ - Module [MOBILE_BOOST_TEST_APK](#module_MOBILE_BOOST_TEST_APK)
+ - Module [MOBILE_DLL](#module_MOBILE_DLL)
+ - Module [MOBILE_LIBRARY](#module_MOBILE_LIBRARY)
+ - Module [MOBILE_TEST_APK](#module_MOBILE_TEST_APK)
+ - Module [NPM_CONTRIBS](#module_NPM_CONTRIBS)
+ - Module [PACKAGE](#module_PACKAGE)
+ - Module [PREBUILT_PROGRAM](#module_PREBUILT_PROGRAM)
+ - Module [PROGRAM](#module_PROGRAM)
+ - Module [PROTO_DESCRIPTIONS](#module_PROTO_DESCRIPTIONS)
+ - Module [PROTO_REGISTRY](#module_PROTO_REGISTRY)
+ - Module [PY2MODULE](#module_PY2MODULE)
+ - Module [PY2TEST](#module_PY2TEST)
+ - Module [PY2_LIBRARY](#module_PY2_LIBRARY)
+ - Module [PY2_PROGRAM](#module_PY2_PROGRAM)
+ - Module [PY3MODULE](#module_PY3MODULE)
+ - Module [PY3TEST_BIN](#module_PY3TEST_BIN)
+ - Module [PY3_LIBRARY](#module_PY3_LIBRARY)
+ - Module [PY3_PROGRAM_BIN](#module_PY3_PROGRAM_BIN)
+ - Module [PYCR_PROGRAM](#module_PYCR_PROGRAM)
+ - Module [PYTEST_BIN](#module_PYTEST_BIN)
+ - Module [PY_ANY_MODULE](#module_PY_ANY_MODULE)
+ - Module [PY_PACKAGE](#module_PY_PACKAGE)
+ - Module [RECURSIVE_LIBRARY](#module_RECURSIVE_LIBRARY)
+ - Module [RESOURCES_LIBRARY](#module_RESOURCES_LIBRARY)
+ - Module [R_MODULE](#module_R_MODULE)
+ - Module [SO_PROGRAM](#module_SO_PROGRAM)
+ - Module [TS_LIBRARY](#module_TS_LIBRARY)
+ - Module [UDF](#module_UDF)
+ - Module [UDF_BASE](#module_UDF_BASE)
+ - Module [UDF_LIB](#module_UDF_LIB)
+ - Module [UNION](#module_UNION)
+ - Module [UNITTEST](#module_UNITTEST)
+ - Module [UNITTEST_FOR](#module_UNITTEST_FOR)
+ - Module [UNITTEST_WITH_CUSTOM_ENTRY_POINT](#module_UNITTEST_WITH_CUSTOM_ENTRY_POINT)
+ - Module [YCR_PROGRAM](#module_YCR_PROGRAM)
+ - Module [YQL_PYTHON3_UDF](#module_YQL_PYTHON3_UDF)
+ - Module [YQL_PYTHON3_UDF_TEST](#module_YQL_PYTHON3_UDF_TEST)
+ - Module [YQL_PYTHON_UDF](#module_YQL_PYTHON_UDF)
+ - Module [YQL_PYTHON_UDF_PROGRAM](#module_YQL_PYTHON_UDF_PROGRAM)
+ - Module [YQL_PYTHON_UDF_TEST](#module_YQL_PYTHON_UDF_TEST)
+ - Module [YQL_UDF_MODULE](#module_YQL_UDF_MODULE)
+ - Module [YQL_UDF_TEST](#module_YQL_UDF_TEST)
+ - Module [YT_UNITTEST](#module_YT_UNITTEST)
+ - Module [Y_BENCHMARK](#module_Y_BENCHMARK)
+ - Module [_BARE_UNIT](#module__BARE_UNIT)
+ - Module [_BASE_PROGRAM](#module__BASE_PROGRAM)
+ - Module [_BASE_PY3_PROGRAM](#module__BASE_PY3_PROGRAM)
+ - Module [_BASE_PYTEST](#module__BASE_PYTEST)
+ - Module [_BASE_PY_PROGRAM](#module__BASE_PY_PROGRAM)
+ - Module [_BASE_UNIT](#module__BASE_UNIT)
+ - Module [_BASE_UNITTEST](#module__BASE_UNITTEST)
+ - Module [_COMPILABLE_JAR_BASE](#module__COMPILABLE_JAR_BASE)
+ - Module [_DLL_COMPATIBLE_JAVA_LIBRARY](#module__DLL_COMPATIBLE_JAVA_LIBRARY)
+ - Module [_DLL_COMPATIBLE_LIBRARY](#module__DLL_COMPATIBLE_LIBRARY)
+ - Module [_DOCS_BASE_UNIT](#module__DOCS_BASE_UNIT)
+ - Module [_GO_BASE_UNIT](#module__GO_BASE_UNIT)
+ - Module [_GO_DLL_BASE_UNIT](#module__GO_DLL_BASE_UNIT)
+ - Module [_JAR_BASE](#module__JAR_BASE)
+ - Module [_JAR_RUNABLE](#module__JAR_RUNABLE)
+ - Module [_JAR_TEST](#module__JAR_TEST)
+ - Module [_JAVA_PLACEHOLDER](#module__JAVA_PLACEHOLDER)
+ - Module [_LIBRARY](#module__LIBRARY)
+ - Module [_LINK_UNIT](#module__LINK_UNIT)
+ - Module [_PROXY_LIBRARY](#module__PROXY_LIBRARY)
+ - Module [_PY2_PROGRAM](#module__PY2_PROGRAM)
+ - Module [_PY3_LIBRARY](#module__PY3_LIBRARY)
+ - Module [_PY_PACKAGE](#module__PY_PACKAGE)
+ - Module [_TS_BASE_UNIT](#module__TS_BASE_UNIT)
+ - Module [_YQL_UDF_PROGRAM_BASE](#module__YQL_UDF_PROGRAM_BASE)
+ * [Macros](#macros)
+ - Macros [AARS](#macro_AARS) .. [AAR_LOCAL_MAVEN_REPO](#macro_AAR_LOCAL_MAVEN_REPO)
+ - Macros [AAR_MANIFEST](#macro_AAR_MANIFEST) .. [ADD_COMPILABLE_TRANSLATE](#macro_ADD_COMPILABLE_TRANSLATE)
+ - Macros [ADD_COMPILABLE_TRANSLIT](#macro_ADD_COMPILABLE_TRANSLIT) .. [ANNOTATION_PROCESSOR](#macro_ANNOTATION_PROCESSOR)
+ - Macros [ARCHIVE](#macro_ARCHIVE) .. [BUILDWITH_CYTHON_CPP](#macro_BUILDWITH_CYTHON_CPP)
+ - Macros [BUILDWITH_RAGEL6](#macro_BUILDWITH_RAGEL6) .. [BUNDLE_ASSETS_SRCS](#macro_BUNDLE_ASSETS_SRCS)
+ - Macros [BUNDLE_EXTRA_INPUTS](#macro_BUNDLE_EXTRA_INPUTS) .. [CHECK_CONFIG_H](#macro_CHECK_CONFIG_H)
+ - Macros [CHECK_CONTRIB_CREDITS](#macro_CHECK_CONTRIB_CREDITS) .. [COMPILE_LUA_21](#macro_COMPILE_LUA_21)
+ - Macros [COMPILE_NLG](#macro_COMPILE_NLG) .. [CPP_ADDINCL](#macro_CPP_ADDINCL)
+ - Macros [CPP_ENUMS_SERIALIZATION](#macro_CPP_ENUMS_SERIALIZATION) .. [CUSTOM_LINK_STEP_SCRIPT](#macro_CUSTOM_LINK_STEP_SCRIPT)
+ - Macros [CXXFLAGS](#macro_CXXFLAGS) .. [DEFAULT](#macro_DEFAULT)
+ - Macros [DEPENDENCY_MANAGEMENT](#macro_DEPENDENCY_MANAGEMENT) .. [DOCS_INCLUDE_SOURCES](#macro_DOCS_INCLUDE_SOURCES)
+ - Macros [DOCS_VARS](#macro_DOCS_VARS) .. [END](#macro_END)
+ - Macros [ENDIF](#macro_ENDIF) .. [EXTERNAL_JAR](#macro_EXTERNAL_JAR)
+ - Macros [EXTERNAL_RESOURCE](#macro_EXTERNAL_RESOURCE) .. [FLAT_JOIN_SRCS_GLOBAL](#macro_FLAT_JOIN_SRCS_GLOBAL)
+ - Macros [FORK_SUBTESTS](#macro_FORK_SUBTESTS) .. [FUZZ_OPTS](#macro_FUZZ_OPTS)
+ - Macros [GENERATED_SRCS](#macro_GENERATED_SRCS) .. [GO_CGO1_FLAGS](#macro_GO_CGO1_FLAGS)
+ - Macros [GO_CGO2_FLAGS](#macro_GO_CGO2_FLAGS) .. [GO_LDFLAGS](#macro_GO_LDFLAGS)
+ - Macros [GO_LINK_FLAGS](#macro_GO_LINK_FLAGS) .. [GO_TEST_FOR](#macro_GO_TEST_FOR)
+ - Macros [GO_TEST_SRCS](#macro_GO_TEST_SRCS) .. [IF](#macro_IF)
+ - Macros [INCLUDE](#macro_INCLUDE) .. [JAR_INCLUDE](#macro_JAR_INCLUDE)
+ - Macros [JAR_RESOURCE](#macro_JAR_RESOURCE) .. [JAVA_SRCS](#macro_JAVA_SRCS)
+ - Macros [JAVA_TEST](#macro_JAVA_TEST) .. [LDFLAGS](#macro_LDFLAGS)
+ - Macros [LD_REQUIREMENTS](#macro_LD_REQUIREMENTS) .. [LJ_ARCHIVE](#macro_LJ_ARCHIVE)
+ - Macros [LLVM_BC](#macro_LLVM_BC) .. [MACROS_WITH_ERROR](#macro_MACROS_WITH_ERROR)
+ - Macros [MAPKITIDL](#macro_MAPKITIDL) .. [MAPSMOBI_SRCS](#macro_MAPSMOBI_SRCS)
+ - Macros [MAPS_GARDEN_COLLECT_MODULE_TRAITS](#macro_MAPS_GARDEN_COLLECT_MODULE_TRAITS) .. [MOBILE_TEST_APK_AAR_BUNDLES](#macro_MOBILE_TEST_APK_AAR_BUNDLES)
+ - Macros [MOBILE_TEST_APK_AAR_MANIFEST](#macro_MOBILE_TEST_APK_AAR_MANIFEST) .. [NO_BUILD_IF](#macro_NO_BUILD_IF)
+ - Macros [NO_CHECK_IMPORTS](#macro_NO_CHECK_IMPORTS) .. [NO_EXPORT_DYNAMIC_SYMBOLS](#macro_NO_EXPORT_DYNAMIC_SYMBOLS)
+ - Macros [NO_EXTENDED_SOURCE_SEARCH](#macro_NO_EXTENDED_SOURCE_SEARCH) .. [NO_PLATFORM_RESOURCES](#macro_NO_PLATFORM_RESOURCES)
+ - Macros [NO_PYTHON_COVERAGE](#macro_NO_PYTHON_COVERAGE) .. [NVCC_DEVICE_LINK](#macro_NVCC_DEVICE_LINK)
+ - Macros [ONLY_TAGS](#macro_ONLY_TAGS) .. [PARTITIONED_RECURSE_FOR_TESTS](#macro_PARTITIONED_RECURSE_FOR_TESTS)
+ - Macros [PARTITIONED_RECURSE_ROOT_RELATIVE](#macro_PARTITIONED_RECURSE_ROOT_RELATIVE) .. [PROTO_ADDINCL](#macro_PROTO_ADDINCL)
+ - Macros [PROTO_NAMESPACE](#macro_PROTO_NAMESPACE) .. [PY_DOCTESTS](#macro_PY_DOCTESTS)
+ - Macros [PY_ENUMS_SERIALIZATION](#macro_PY_ENUMS_SERIALIZATION) .. [PY_SRCS](#macro_PY_SRCS)
+ - Macros [PY_SSQLS_SRCS](#macro_PY_SSQLS_SRCS) .. [REQUIREMENTS](#macro_REQUIREMENTS)
+ - Macros [REQUIRES](#macro_REQUIRES) .. [RUN_ANTLR4_CPP](#macro_RUN_ANTLR4_CPP)
+ - Macros [RUN_ANTLR4_GO](#macro_RUN_ANTLR4_GO) .. [SETUP_PYTEST_BIN](#macro_SETUP_PYTEST_BIN)
+ - Macros [SETUP_RUN_PYTHON](#macro_SETUP_RUN_PYTHON) .. [SPLIT_FACTOR](#macro_SPLIT_FACTOR)
+ - Macros [SRC](#macro_SRC) .. [SRC_CPP_SSE41](#macro_SRC_CPP_SSE41)
+ - Macros [SRC_CPP_SSSE3](#macro_SRC_CPP_SSSE3) .. [STRIP](#macro_STRIP)
+ - Macros [STRUCT_CODEGEN](#macro_STRUCT_CODEGEN) .. [TASKLET_REG_EXT](#macro_TASKLET_REG_EXT)
+ - Macros [TEST_CWD](#macro_TEST_CWD) .. [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX)
+ - Macros [UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE](#macro_UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE) .. [USE_EXT_PROTO](#macro_USE_EXT_PROTO)
+ - Macros [USE_JAVALITE](#macro_USE_JAVALITE) .. [USE_RECIPE](#macro_USE_RECIPE)
+ - Macros [USE_SKIFF](#macro_USE_SKIFF) .. [WITH_DYNAMIC_LIBS](#macro_WITH_DYNAMIC_LIBS)
+ - Macros [WITH_GROOVY](#macro_WITH_GROOVY) .. [YDL_DESC_USE_BINARY](#macro_YDL_DESC_USE_BINARY)
+ - Macros [YMAPS_SPROTO](#macro_YMAPS_SPROTO) .. [_ADD_HIDDEN_INPUTS](#macro__ADD_HIDDEN_INPUTS)
+ - Macros [_ADD_JAVA_STYLE_CHECKS](#macro__ADD_JAVA_STYLE_CHECKS) .. [_BUILDWITH_CYTHON_C_API_H](#macro__BUILDWITH_CYTHON_C_API_H)
+ - Macros [_BUILDWITH_CYTHON_C_DEP](#macro__BUILDWITH_CYTHON_C_DEP) .. [_COMPILE_ASRC_IMPL](#macro__COMPILE_ASRC_IMPL)
+ - Macros [_CONDITIONAL_SRCS](#macro__CONDITIONAL_SRCS) .. [_DOCS_EPILOGUE](#macro__DOCS_EPILOGUE)
+ - Macros [_DOCS_MKDOCS_CMD_IMPL](#macro__DOCS_MKDOCS_CMD_IMPL) .. [_FETCH_CONTRIB](#macro__FETCH_CONTRIB)
+ - Macros [_FILL_JAR_COPY_RESOURCES_CMD](#macro__FILL_JAR_COPY_RESOURCES_CMD) .. [_GLOB](#macro__GLOB)
+ - Macros [_GO_COMPILE_CGO1](#macro__GO_COMPILE_CGO1) .. [_GO_GRPC_GATEWAY_SRCS_IMPL](#macro__GO_GRPC_GATEWAY_SRCS_IMPL)
+ - Macros [_GO_GRPC_GATEWAY_SWAGGER_SRCS](#macro__GO_GRPC_GATEWAY_SWAGGER_SRCS) .. [_GO_PROTO_CMD_IMPL](#macro__GO_PROTO_CMD_IMPL)
+ - Macros [_GO_RESOURCE](#macro__GO_RESOURCE) .. [_JAVAC_RUN_HELPER](#macro__JAVAC_RUN_HELPER)
+ - Macros [_JAVA_EVLOG_CMD](#macro__JAVA_EVLOG_CMD) .. [_MAKE_YQL_PYTHON_UDF_TEST](#macro__MAKE_YQL_PYTHON_UDF_TEST)
+ - Macros [_MAKE_YQL_UDF](#macro__MAKE_YQL_UDF) .. [_MX_BIN_TO_INFO](#macro__MX_BIN_TO_INFO)
+ - Macros [_MX_GEN_TABLE](#macro__MX_GEN_TABLE) .. [_PYCR_GENERATE_CONFIGS](#macro__PYCR_GENERATE_CONFIGS)
+ - Macros [_PYCR_GENERATE_CONFIGS_INTL](#macro__PYCR_GENERATE_CONFIGS_INTL) .. [_PY_PROGRAM](#macro__PY_PROGRAM)
+ - Macros [_PY_PROTO_CMD](#macro__PY_PROTO_CMD) .. [_REGISTER_NO_CHECK_IMPORTS](#macro__REGISTER_NO_CHECK_IMPORTS)
+ - Macros [_REQUIRE_EXPLICIT_LICENSE](#macro__REQUIRE_EXPLICIT_LICENSE) .. [_SRC____C](#macro__SRC____C)
+ - Macros [_SRC____S](#macro__SRC____S) .. [_SRC____ev](#macro__SRC____ev)
+ - Macros [_SRC____f](#macro__SRC____f) .. [_SRC____l](#macro__SRC____l)
+ - Macros [_SRC____lex](#macro__SRC____lex) .. [_SRC____pysrc](#macro__SRC____pysrc)
+ - Macros [_SRC____pyx](#macro__SRC____pyx) .. [_SRC____storyboard](#macro__SRC____storyboard)
+ - Macros [_SRC____xib](#macro__SRC____xib) .. [_SRC_cpp](#macro__SRC_cpp)
+ - Macros [_SRC_lua_21](#macro__SRC_lua_21) .. [_SWIG_PYTHON_CPP](#macro__SWIG_PYTHON_CPP)
+ - Macros [_TS_CONFIGURE](#macro__TS_CONFIGURE) .. [_YTEST](#macro__YTEST)
+## Multimodules <a name="multimodules"></a>
+
+###### Multimodule [DLL\_JAVA][]() <a name="multimodule_DLL_JAVA"></a>
+DLL built using swig for Java. Produces dynamic library and a .jar.
+Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+.jar goes on the classpath.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+
+###### Multimodule [DOCS][]() <a name="multimodule_DOCS"></a>
+Documentation project multimodule.
+
+When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder).
+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 [DYNAMIC\_LIBRARY][]() _# internal_ <a name="multimodule_DYNAMIC_LIBRARY"></a>
+The use of this module is strictly prohibited except LGPL-related opensourcing
+This provides linkable DLL module which brings its results to programs and tests
+for seamless tesing and packaging
+
+###### Multimodule [FBS\_LIBRARY][]() <a name="multimodule_FBS_LIBRARY"></a>
+Build some variant of Flatbuffers library.
+
+The particular variant is selected based on where PEERDIR to FBS\_LIBRARY
+comes from.
+
+Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+When PEERDIR comes from module for particular language appropriate variant
+is selected.
+
+Notes: FBS\_NAMESPACE must be specified in all dependent FBS\_LIBRARY modules
+ if build of Go code is requested.
+
+###### Multimodule [JAR\_PROGRAM][] <a name="multimodule_JAR_PROGRAM"></a>
+Not documented yet.
+
+###### Multimodule [JAVA\_CONTRIB\_PROGRAM][] <a name="multimodule_JAVA_CONTRIB_PROGRAM"></a>
+Not documented yet.
+
+###### Multimodule [JAVA\_PROGRAM][]() <a name="multimodule_JAVA_PROGRAM"></a>
+The module describing java programs build.
+Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Multimodule [JTEST][] <a name="multimodule_JTEST"></a>
+Not documented yet.
+
+###### Multimodule [JTEST\_FOR][] <a name="multimodule_JTEST_FOR"></a>
+Not documented yet.
+
+###### Multimodule [JTEST\_YMAKE][] <a name="multimodule_JTEST_YMAKE"></a>
+Not documented yet.
+
+###### Multimodule [JUNIT5][] <a name="multimodule_JUNIT5"></a>
+Not documented yet.
+
+###### Multimodule [JUNIT5\_YMAKE][] <a name="multimodule_JUNIT5_YMAKE"></a>
+Not documented yet.
+
+###### Multimodule [MAPS\_IDL\_LIBRARY][]() <a name="multimodule_MAPS_IDL_LIBRARY"></a>
+Definition of multimodule that builds various variants of libraries.
+The particular variant is selected based on where PEERDIR to IDL\_LIBRARY comes from.
+Now supported 2 variants: C++, Java
+Java version is not really a library but an archive of generated Java sources
+
+###### Multimodule [PROTO\_LIBRARY][]() <a name="multimodule_PROTO_LIBRARY"></a>
+Build some varian of protocol buffers library.
+
+The particular variant is selected based on where PEERDIR to PROTO\_LIBRARY comes from.
+
+Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+When PEERDIR comes from module for particular language appropriate variant is selected.
+PROTO\_LIBRARY also supports emission of GRPC code if GRPC() macro is specified.
+Notes:
+- Python versions emit C++ code in addition to Python as optimization.
+- In some PROTO\_LIBRARY-es Java or Python versions are excluded via EXCLUDE\_TAGS macros due to incompatibilities.
+- Use from DEPENDS or BUNDLE is not allowed
+
+Documentation: https://wiki.yandex-team.ru/yatool/proto\_library/
+
+See: [GRPC()](#macro\_GRPC), [OPTIMIZE\_PY\_PROTOS()](#macro\_OPTIMIZE\_PY\_PROTOS), [INCLUDE\_TAGS()](#macro\_INCLUDE\_TAGS), [EXCLUDE\_TAGS()](#macro\_EXCLUDE\_TAGS)
+
+###### Multimodule [PY23\_LIBRARY][]([name]) <a name="multimodule_PY23_LIBRARY"></a>
+Build PY2\_LIBRARY or PY3\_LIBRARY depending on incoming PEERDIR.
+Direct build or build by RECURSE creates both variants.
+This multimodule doesn't define any final targets, so use from DEPENDS or BUNDLE is not allowed.
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs
+
+###### Multimodule [PY23\_NATIVE\_LIBRARY][]([name]) <a name="multimodule_PY23_NATIVE_LIBRARY"></a>
+Build LIBRARY compatible with either Python 2.x or Python 3.x depending on incoming PEERDIR.
+
+This multimodule doesn't depend on Arcadia Python binary build. It is intended only for C++ code and cannot contain PY\_SRCS and USE\_PYTHON2 macros.
+Use these multimodule instead of PY23\_LIBRARY if the C++ extension defined in it will be used in PY2MODULE.
+While it doesn't bring Arcadia Python dependency itself, it is still compatible with Arcadia Python build and can be PEERDIR-ed from PY2\_LIBRARY and alikes.
+Proper version will be selected according to Python version of the module PEERDIR comes from.
+
+This mulrtimodule doesn't define any final targets so cannot be used from DEPENDS or BUNDLE macros.
+
+For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary
+
+@see [LIBRARY()](#module\_LIBRARY), [PY2MODULE()](#module\_PY2MODULE)
+
+###### Multimodule [PY23\_TEST][] <a name="multimodule_PY23_TEST"></a>
+Not documented yet.
+
+###### Multimodule [PY3TEST][]([name]) <a name="multimodule_PY3TEST"></a>
+The test module for Python 3.x based on py.test
+
+This module is compatible only with PYTHON3-tagged modules and selects peers from multimodules accordingly.
+This module is only compatible with Arcadia Python build (to avoid tests duplication from Python2/3-tests). For non-Arcadia python use PYTEST.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Multimodule [PY3\_PROGRAM][]([progname]) <a name="multimodule_PY3_PROGRAM"></a>
+Python 3.x binary program. Links all Python 3.x libraries and Python 3.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.
+This only compatible with PYTHON3-tagged modules and selects those from multimodules.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Multimodule [SANDBOX\_PY23\_TASK][] <a name="multimodule_SANDBOX_PY23_TASK"></a>
+Not documented yet.
+
+###### Multimodule [SANDBOX\_PY3\_TASK][]([Name]) <a name="multimodule_SANDBOX_PY3_TASK"></a>
+Multimodule describing Sandbox task (Python3 code that can be executed by Sandbox system).
+
+When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX\_PY3\_TASKs as libraries.
+The final artifact is provided when SANDBOX\_PY3\_TASK is referred to by DEPENDS and BUNDLE macros.
+As PEERDIR target, it works like regular PY3\_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX\_PY3\_TASKs.
+
+Currently Sandbox supports Python 3.x only in binary tasks, both variants will be compatible only with Python 3.x and py23 libraries
+and will select multimodule variants accordingly.
+
+Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+
+###### Multimodule [SANDBOX\_TASK][]([Name]) <a name="multimodule_SANDBOX_TASK"></a>
+Multimodule describing Sandbox task (Python code that can be executed by Sandbox system).
+
+When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX\_TASKs as libraries.
+The final artifact is provided when SANDBOX\_TASK is referred to by DEPENDS and BUNDLE macros.
+As PEERDIR target, it works like regular PY2\_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX\_TASKs.
+
+Currently Sandbox supports only Python 2.x, so both variants will be compatible only with Python 2.x modules
+and will select multimodule variants accordingly.
+
+Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+
+###### Multimodule [SSQLS\_LIBRARY][] <a name="multimodule_SSQLS_LIBRARY"></a>
+Not documented yet.
+
+###### Multimodule [YQL\_UDF][](name) <a name="multimodule_YQL_UDF"></a>
+User-defined function for YQL
+
+Multimodule which is YQL\_UDF\_MODULE when built directly or referred by BUNDLE and DEPENDS macros.
+If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs.
+
+@see: [YQL\_UDF\_MODULE()](#module\_YQL\_UDF\_MODULE)
+
+## Modules <a name="modules"></a>
+
+###### Module [AAR][]() _# internal_ <a name="module_AAR"></a>
+Not documented yet.
+
+###### Module [AAR\_PROXY\_LIBRARY][]() _# internal_ <a name="module_AAR_PROXY_LIBRARY"></a>
+The use of this module is strictly prohibited!!!
+
+###### Module [ASRC\_LIBRARY][]() _# internal_ <a name="module_ASRC_LIBRARY"></a>
+Not documented yet.
+
+###### Module [BOOSTTEST][]([name]) _#deprecated_ <a name="module_BOOSTTEST"></a>
+Test module based on boost/test/unit\_test.hpp.
+As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects.
+No new module of this type should be introduced unless it is explicitly approved by C++ committee.
+
+###### Module [BOOSTTEST\_WITH\_MAIN][]([name]) _#deprecated_ <a name="module_BOOSTTEST_WITH_MAIN"></a>
+Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation
+
+###### Module [CI\_GROUP][]() <a name="module_CI_GROUP"></a>
+Module collects what is described directly inside it transitively by PEERDIRs.
+No particular layout of built artifacts is implied. This module is needed primarilly for CI dependency analysis and may not trigger builds at all.
+
+Is only used together with the macro PEERDIR() and FILES(). Don't use SRCS inside CI\_GROUP().
+
+###### Module [CONTAINER][]: \_BARE\_UNIT <a name="module_CONTAINER"></a>
+Not documented yet.
+
+###### Module [CONTAINER\_LAYER][]: \_BARE\_UNIT <a name="module_CONTAINER_LAYER"></a>
+Not documented yet.
+
+###### Module [CPP\_STYLE\_TEST][]: PY3TEST\_BIN <a name="module_CPP_STYLE_TEST"></a>
+Not documented yet.
+
+###### Module [CUSTOM\_BUILD\_LIBRARY][]: LIBRARY <a name="module_CUSTOM_BUILD_LIBRARY"></a>
+Not documented yet.
+
+###### Module [DEFAULT\_IOS\_INTERFACE][]: IOS\_INTERFACE <a name="module_DEFAULT_IOS_INTERFACE"></a>
+Not documented yet.
+
+###### Module [DEV\_DLL\_PROXY][]() _# internal_ <a name="module_DEV_DLL_PROXY"></a>
+The use of this module is strictly prohibited!!!
+This is a temporary and project-specific solution.
+
+###### Module [DLL][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_DLL"></a>
+Dynamic library module defintion.
+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").
+
+DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
+
+###### Module [DLL\_PROXY][]() _# internal_ <a name="module_DLL_PROXY"></a>
+The use of this module is strictly prohibited!!!
+This is a temporary and project-specific solution.
+
+###### Module [DLL\_PROXY\_LIBRARY][]() _# internal_ <a name="module_DLL_PROXY_LIBRARY"></a>
+The use of this module is strictly prohibited!!!
+
+###### Module [DLL\_TOOL][] <a name="module_DLL_TOOL"></a>
+DLL\_TOOL is a DLL that can be used as a LD\_PRELOAD tool.
+
+###### Module [DLL\_UNIT][] _# internal_ <a name="module_DLL_UNIT"></a>
+Base module for all dynamically linked libraries as final artifacts.
+Contains all general logic for such kind of modules. Supports versioning and export files.
+Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed).
+
+###### Module [EXECTEST][]() <a name="module_EXECTEST"></a>
+Module definition of generic test that executes a binary.
+Use macro RUN to specify binary to run.
+
+@example:
+
+ EXECTEST()
+ OWNER(g:yatool)
+
+ RUN(
+ cat input.txt
+ )
+ DATA(
+ arcadia/devtools/ya/test/tests/exectest/data
+ )
+ DEPENDS(
+ devtools/dummy_arcadia/cat
+ )
+ TEST_CWD(devtools/ya/test/tests/exectest/data)
+ END()
+
+More examples: https://wiki.yandex-team.ru/yatool/test/#exec-testy
+
+@see: [RUN()](#macro\_RUN)
+
+###### Module [EXTERNAL\_JAVA\_LIBRARY][]() _#internal_ <a name="module_EXTERNAL_JAVA_LIBRARY"></a>
+EXTERNAL\_JAVA\_LIBRARY() is a module for creating a .jar file using non-Java code (generators etc.)
+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 [FAT\_OBJECT][]() <a name="module_FAT_OBJECT"></a>
+The "fat" object module. It will contain all its transitive dependencies reachable by PEERDIRs:
+static libraries, local (from own SRCS) and global (from peers') object files.
+
+Designed for use in XCode projects for iOS.
+
+###### Module [FUZZ][]() <a name="module_FUZZ"></a>
+In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput().
+This module should be reachable by RECURSE from /autocheck project in order for the corpus to be regularly updated.
+AFL and Libfuzzer are supported in Arcadia via a single interface, but the automatic fuzzing still works only through Libfuzzer.
+
+Example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2\_fuzzer.cc?rev=2919463#L58
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Module [GO\_DLL][](name major\_ver [minor\_ver] [PREFIX prefix]) <a name="module_GO_DLL"></a>
+Go ishared object module definition.
+Compile and link Go module to a shared object.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_LIBRARY][]([name]) <a name="module_GO_LIBRARY"></a>
+Go library module definition.
+Compile Go module as a library suitable for PEERDIR from other Go modules.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_PROGRAM][]([name]) <a name="module_GO_PROGRAM"></a>
+Go program module definition.
+Compile and link Go module to an executable program.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_TEST][]([name]) <a name="module_GO_TEST"></a>
+Go test module definition.
+Compile and link Go module as a test suitable for running with Arcadia testing support.
+All usual testing support macros like DATA, DEPENDS, SIZE, REQUIREMENTS etc. are supported.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GTEST][]([name]) <a name="module_GTEST"></a>
+Unit test module based on library/cpp/testing/gtest.
+It is recommended not to specify the name.
+
+Documentation: https://docs.yandex-team.ru/arcadia-cpp/cpp\_test
+
+###### Module [GTEST\_UGLY][]([name]) <a name="module_GTEST_UGLY"></a>
+Deprecated, do not use in new projects. Use GTEST instead.
+
+The test module based on gtest (contrib/libs/gtest contrib/libs/gmock).
+Use public documentation on gtest for details.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [G\_BENCHMARK][]([benchmarkname]) <a name="module_G_BENCHMARK"></a>
+Benchmark test based on the google benchmark.
+
+For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md
+
+###### Module [IOS\_INTERFACE][]() <a name="module_IOS_INTERFACE"></a>
+iOS GUI module definition
+
+###### Module [JAR\_LIBRARY][]() _#internal_ <a name="module_JAR_LIBRARY"></a>
+Reimplementation of the JAVA\_LIBRARY with ymake.core.conf and ymake based dependency management
+
+###### Module [JAVA\_CONTRIB][]: \_JAR\_BASE <a name="module_JAVA_CONTRIB"></a>
+Not documented yet.
+
+###### Module [JAVA\_CONTRIB\_PROXY][]: \_JAR\_BASE <a name="module_JAVA_CONTRIB_PROXY"></a>
+Not documented yet.
+
+###### Module [JAVA\_LIBRARY][]() <a name="module_JAVA_LIBRARY"></a>
+The module describing java library build.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Module [JSRC\_LIBRARY][]() _# internal_ <a name="module_JSRC_LIBRARY"></a>
+Not documented yet.
+
+###### Module [JSRC\_PROXY\_MOBILE\_LIBRARY][]() _# internal_ <a name="module_JSRC_PROXY_MOBILE_LIBRARY"></a>
+Not documented yet.
+
+###### Module [LIBRARY][]() <a name="module_LIBRARY"></a>
+The regular static library module.
+
+The LIBRARY() is intermediate module, so when built directly it won't build its dependencies.
+It transitively provides its PEERDIRs to ultimate final target, where all LIBRARY() modules are built and linked together.
+
+This is C++ library, and it selects peers from multimodules accordingly.
+
+It makes little sense to mention LIBRARY in DEPENDS or BUNDLE, package and deploy it since it is not a standalone entity.
+In order to use library in tests PEERDIR it to link into tests.
+If you think you need to distribute static library please contact devtools@ for assistance.
+
+###### Module [MCU\_PROGRAM][]([progname]) <a name="module_MCU_PROGRAM"></a>
+Program module for microcontrollers. Converts binary to Intel HEX and Motorola S-record file formats.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [METAQUERY][]() _#deprecated_ <a name="module_METAQUERY"></a>
+Project Definition - KIWI Meta query. (Objected)
+
+https://wiki.yandex-team.ru/robot/manual/kiwi/techdoc/design/metaquery/
+
+###### Module [MOBILE\_BOOST\_TEST\_APK][]() _# internal_ <a name="module_MOBILE_BOOST_TEST_APK"></a>
+Not documented yet.
+
+###### Module [MOBILE\_DLL][]() _# internal_ <a name="module_MOBILE_DLL"></a>
+Not documented yet.
+
+###### Module [MOBILE\_LIBRARY][]() _# internal_ <a name="module_MOBILE_LIBRARY"></a>
+Not documented yet.
+
+###### Module [MOBILE\_TEST\_APK][]() _# internal_ <a name="module_MOBILE_TEST_APK"></a>
+Not documented yet.
+
+###### Module [NPM\_CONTRIBS][]() _# internal_ <a name="module_NPM_CONTRIBS"></a>
+Defines special module that provides contrib tarballs from internal npm registry.
+Should be used only with `NODE\_MODULES` macro.
+
+@see [FROM\_NPM\_LOCKFILES()](#macro\_FROM\_NPM\_LOCKFILES)
+@see [NODE\_MODULES()](#macro\_NODE\_MODULES)
+
+###### Module [PACKAGE][](name) <a name="module_PACKAGE"></a>
+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.
+
+Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+
+@see: [PACK()](#macro\_PACK)
+
+###### Module [PREBUILT\_PROGRAM][]([programname]) _# internal_ <a name="module_PREBUILT_PROGRAM"></a>
+Program module which uses a prebuilt prgram as its output.
+
+###### Module [PROGRAM][]([progname]) <a name="module_PROGRAM"></a>
+Regular program module.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [PROTO\_DESCRIPTIONS][]: \_BARE\_UNIT <a name="module_PROTO_DESCRIPTIONS"></a>
+Not documented yet.
+
+###### Module [PROTO\_REGISTRY][]: PROTO\_DESCRIPTIONS <a name="module_PROTO_REGISTRY"></a>
+Not documented yet.
+
+###### Module [PY2MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY2MODULE"></a>
+The Python external module for Python2 and any system Python
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: this module will always PEERDIR Python2 version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR PY2\_LIBRARY or PY23\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY2TEST][]([name]) <a name="module_PY2TEST"></a>
+The test module for Python 2.x based on py.test
+
+This module is compatible only with PYTHON2-tagged modules and selects peers from multimodules accordingly.
+This module is compatible with non-Arcadia Python builds.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#python
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [PY2\_LIBRARY][]() _# deprecated_ <a name="module_PY2_LIBRARY"></a>
+Deprecated. Use PY23\_LIBRARY or PY3\_LIBRARY instead.
+Python 2.x binary built library. Builds sources from PY\_SRCS to data suitable for PY2\_PROGRAM.
+Adds dependencies to Python 2.x runtime library from Arcadia.
+This module is only compatible with PYTHON2-tagged modules and selects those from multimodules.
+This module is only compatible with Arcadia Python build.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY2\_PROGRAM][]([progname]) _# deprecated_ <a name="module_PY2_PROGRAM"></a>
+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.
+This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY3MODULE"></a>
+The Python external module for Python3 and any system Python
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: this module will always PEERDIR Python3 version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR PY3\_LIBRARY or PY23\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3TEST\_BIN][]() _#deprecated_ <a name="module_PY3TEST_BIN"></a>
+Same as PY3TEST. Don't use this, use PY3TEST instead.
+
+###### Module [PY3\_LIBRARY][]() <a name="module_PY3_LIBRARY"></a>
+Python 3.x binary library. Builds sources from PY\_SRCS to data suitable for PY2\_PROGRAM
+Adds dependencies to Python 2.x runtime library from Arcadia.
+This module is only compatible with PYTHON3-tagged modules and selects those from multimodules.
+This module is only compatible with Arcadia Python build.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3\_PROGRAM\_BIN][]([progname]) <a name="module_PY3_PROGRAM_BIN"></a>
+Use instead of PY3\_PROGRAM only if ya.make with PY3\_PROGRAM() included in another ya.make
+In all other cases use PY3\_PROGRAM
+
+###### Module [PYCR\_PROGRAM][]([progname]) <a name="module_PYCR_PROGRAM"></a>
+pycare-specific program module. Generates pycare configs in addition to producing the program.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [PYTEST\_BIN][]() _#deprecated_ <a name="module_PYTEST_BIN"></a>
+Same as PY2TEST. Don't use this, use PY2TEST instead.
+
+###### Module [PY\_ANY\_MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY_ANY_MODULE"></a>
+The Python external module for any versio of Arcadia or system Python.
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: Use PYTHON2\_MODULE()/PYTHON3\_MODULE() in order to PEERDIR proper version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR any PY\*\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY\_PACKAGE][](name) _# internal, deprecated_ <a name="module_PY_PACKAGE"></a>
+This is module created via PY\_PROTOS\_FOR() macro
+
+###### Module [RECURSIVE\_LIBRARY][]() <a name="module_RECURSIVE_LIBRARY"></a>
+The recursive ("fat") library module. It will contain all its transitive dependencies reachable by PEERDIRs:
+from static libraries, local (from own SRCS) and global (from peers') object files.
+
+Designed for use in XCode projects for iOS.
+
+###### Module [RESOURCES\_LIBRARY][]() <a name="module_RESOURCES_LIBRARY"></a>
+Definition of a module that brings its content from external source (Sandbox) via DECLARE\_EXTERNAL\_RESOURCE macro.
+This can participate in PEERDIRs of others as library but it cannot have own sources and PEERDIRs.
+
+@see: [DECLARE\_EXTERNAL\_RESOURCE()](#macro\_DECLARE\_EXTERNAL\_RESOURCE)
+
+###### Module [R\_MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_R_MODULE"></a>
+The external module for R language.
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+###### Module [SO\_PROGRAM][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_SO_PROGRAM"></a>
+Executable dynamic library module defintion.
+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.
+
+###### Module [TS\_LIBRARY][]([name]) <a name="module_TS_LIBRARY"></a>
+The TypeScript/JavaScript library module, compiles TypeScript sources to JavaScript.
+Build results are JavaScript files, typings and source mappings (depending on local tsconfig.json settings).
+
+@see [NODE\_MODULES()](#macro\_NODE\_MODULES)
+@example
+
+ TS_LIBRARY()
+ SRCS(src/index.ts)
+ NODE_MODULES()
+ END()
+
+###### Module [UDF][](name [EXPORTS symlist\_file] [PREFIX prefix]) _# deprecated_ <a name="module_UDF"></a>
+The KiWi UDF module.
+Processing EXPORTS and PREFIX is the same as for DLL.
+
+https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
+
+###### Module [UDF\_BASE][](name [EXPORTS symlist\_file] [PREFIX prefix]) _#internal_ <a name="module_UDF_BASE"></a>
+The base logic of all UDF extension modules (User-Defined Functions).
+Processing EXPORTS and PREFIX is the same as for DLL.
+
+https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
+
+###### Module [UDF\_LIB][]([name]) _# deprecated_ <a name="module_UDF_LIB"></a>
+The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib.
+
+###### Module [UNION][](name) <a name="module_UNION"></a>
+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/
+
+###### Module [UNITTEST][]([name]) <a name="module_UNITTEST"></a>
+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
+
+###### Module [UNITTEST\_FOR][](path/to/lib) <a name="module_UNITTEST_FOR"></a>
+Convenience extension of UNITTEST module.
+The UNINTTEST module with additional SRCDIR + ADDINCL + PEERDIR on path/to/lib.
+path/to/lib is the path to the directory with the LIBRARY project.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [UNITTEST\_WITH\_CUSTOM\_ENTRY\_POINT][]([name]) <a name="module_UNITTEST_WITH_CUSTOM_ENTRY_POINT"></a>
+Generic unit test module.
+
+###### Module [YCR\_PROGRAM][]([progname]) <a name="module_YCR_PROGRAM"></a>
+yacare-specific program module. Generates yacare configs in addition to producing the program.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [YQL\_PYTHON3\_UDF][](name) <a name="module_YQL_PYTHON3_UDF"></a>
+The extension module for YQL with Python 3.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON3\_UDF\_TEST][](name) <a name="module_YQL_PYTHON3_UDF_TEST"></a>
+The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL\_PYTHON3\_UDF.
+
+This module will basically build itself as UDF and run as test using yql/tools/run\_python\_udf/run\_python\_udf tool.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+@see: [YQL\_PYTHON3\_UDF()](#module\_YQL\_PYTHON3\_UDF)
+
+###### Module [YQL\_PYTHON\_UDF][](name) <a name="module_YQL_PYTHON_UDF"></a>
+Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON\_UDF\_PROGRAM][](name) <a name="module_YQL_PYTHON_UDF_PROGRAM"></a>
+Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON\_UDF\_TEST][](name) <a name="module_YQL_PYTHON_UDF_TEST"></a>
+The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL\_PYTHON\_UDF.
+
+This module will basically build itself as UDF and run as test using yql/tools/run\_python\_udf/run\_python\_udf tool.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+@example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make
+
+@see: [YQL\_PYTHON\_UDF()](#module\_YQL\_PYTHON\_UDF)
+
+###### Module [YQL\_UDF\_MODULE][](name) <a name="module_YQL_UDF_MODULE"></a>
+The extension module for YQL with C++ UDF (User Defined Function YQL)
+
+https://yql.yandex-team.ru/docs/yt/udf/cpp/
+
+###### Module [YQL\_UDF\_TEST][]([name]) <a name="module_YQL_UDF_TEST"></a>
+The module to test YQL C++ UDF.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [YT\_UNITTEST][]([name]) <a name="module_YT_UNITTEST"></a>
+YT Unit test module based on mapreduce/yt/library/utlib
+
+###### Module [Y\_BENCHMARK][]([benchmarkname]) <a name="module_Y_BENCHMARK"></a>
+Benchmark test based on the library/cpp/testing/benchmark.
+
+For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
+
+###### Module [\_BARE\_UNIT][] _# internal_ <a name="module__BARE_UNIT"></a>
+The base of all modules describing default bare minimum for all modules.
+To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+
+###### Module [\_BASE\_PROGRAM][] _# internal_ <a name="module__BASE_PROGRAM"></a>
+The base of all programs. It adds dependencies to make final artefact complete and runnable.
+
+###### Module \_BASE\_PY\_PROGRAM _#internal_ <a name="module__BASE_PY3_PROGRAM"></a>
+The base module for all Python 3.x binary programs. Adds linking logic, relevant module properties and
+dependency on Python 3.x interpreter. Also adds import tests on all sources including libraries.
+Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
+This only compatible with PYTHON3-tagged modules and selects those from multimodules
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [\_BASE\_PYTEST][] _# internal_ <a name="module__BASE_PYTEST"></a>
+Base logic of Python 2.x py.test modules: common module properties and dependencies.
+
+###### Module [\_BASE\_PY\_PROGRAM][] _#internal_ <a name="module__BASE_PY_PROGRAM"></a>
+The base module for all Python 2.x binary programs. Adds linking logic, relevant module properties and
+dependency on Python 2.x interpreter. Also adds import tests on all sources including PEERDIR'ed libraries.
+Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
+This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [\_BASE\_UNIT][] _# internal_ <a name="module__BASE_UNIT"></a>
+The base of all LIBRARY/PROGRAM modules describing common logic for all modules.
+To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+
+###### Module [\_BASE\_UNITTEST][] _# internal_ <a name="module__BASE_UNITTEST"></a>
+Module with base logic for all unit-test modules: it makes code runnable as unit-test by Arcadia testing machinery.
+
+###### Module [\_COMPILABLE\_JAR\_BASE][] : \_JAR\_BASE _#internal_ <a name="module__COMPILABLE_JAR_BASE"></a>
+Not documented yet.
+
+###### Module [\_DLL\_COMPATIBLE\_JAVA\_LIBRARY][]: EXTERNAL\_JAVA\_LIBRARY _#internal_ <a name="module__DLL_COMPATIBLE_JAVA_LIBRARY"></a>
+Not documented yet.
+
+###### Module [\_DLL\_COMPATIBLE\_LIBRARY][] _# internal_ <a name="module__DLL_COMPATIBLE_LIBRARY"></a>
+Base module to place DLLs into multimodules back to back with libraries.
+In order to function properly all modules in multimodule shall have the
+same set of arguments. So this module is just library that accepts but
+ignores all DLL arguments.
+
+###### Module [\_DOCS\_BASE\_UNIT][] _#internal_ <a name="module__DOCS_BASE_UNIT"></a>
+FIXME(snermolaev)
+
+###### Module [\_GO\_BASE\_UNIT][] _# internal_ <a name="module__GO_BASE_UNIT"></a>
+The base module of all golang modules. Defines common properties, dependencies and rules for go build.
+
+###### Module [\_GO\_DLL\_BASE\_UNIT][]: GO\_PROGRAM _#internal_ <a name="module__GO_DLL_BASE_UNIT"></a>
+Not documented yet.
+
+###### Module [\_JAR\_BASE][]: \_BARE\_UNIT _#internal_ <a name="module__JAR_BASE"></a>
+Not documented yet.
+
+###### Module [\_JAR\_RUNABLE][]: \_COMPILABLE\_JAR\_BASE _#internal_ <a name="module__JAR_RUNABLE"></a>
+Not documented yet.
+
+###### Module [\_JAR\_TEST][]: \_COMPILABLE\_JAR\_BASE _#internal_ <a name="module__JAR_TEST"></a>
+Not documented yet.
+
+###### Module [\_JAVA\_PLACEHOLDER][] _#internal_ <a name="module__JAVA_PLACEHOLDER"></a>
+The base module for all Java modules. Defines common properties and dependencies.
+
+###### Module [\_LIBRARY][] _# internal_ <a name="module__LIBRARY"></a>
+Base module definition for all libraries.
+Contains basic logic like module properties, default variable values etc.
+All libraries similar to C++-libraries should be inherited from it.
+
+###### Module [\_LINK\_UNIT][] _# internal_ <a name="module__LINK_UNIT"></a>
+The base of all linkable modules: programs, DLLs etc. Describes common linking logic.
+
+###### Module [\_PROXY\_LIBRARY][]() _# internal_ <a name="module__PROXY_LIBRARY"></a>
+The use of this module is strictly prohibited!!!
+
+###### Module [\_PY2\_PROGRAM][]: \_BASE\_PY\_PROGRAM _#internal_ <a name="module__PY2_PROGRAM"></a>
+Not documented yet.
+
+###### Module [\_PY3\_LIBRARY][]() _#internal_ <a name="module__PY3_LIBRARY"></a>
+Basic Python3 library module
+
+###### Module [\_PY\_PACKAGE][]: UNION _#internal_ <a name="module__PY_PACKAGE"></a>
+Not documented yet.
+
+###### Module [\_TS\_BASE\_UNIT][]: \_BASE\_UNIT _#internal_ <a name="module__TS_BASE_UNIT"></a>
+Not documented yet.
+
+###### Module [\_YQL\_UDF\_PROGRAM\_BASE][]: SO\_PROGRAM _#internal_ <a name="module__YQL_UDF_PROGRAM_BASE"></a>
+Not documented yet.
+
+## Macros <a name="macros"></a>
+
+###### Macro [AARS][](Aars...) <a name="macro_AARS"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [AAR\_AARS][](aars...) _# internal_ <a name="macro_AAR_AARS"></a>
+Not documented yet.
+
+###### Macro [AAR\_AIDL\_SRCS][](dir filenames...) _# internal_ <a name="macro_AAR_AIDL_SRCS"></a>
+Not documented yet.
+
+###### Macro [AAR\_ASSETS\_SRCS][](dir filenames...) _# internal_ <a name="macro_AAR_ASSETS_SRCS"></a>
+Not documented yet.
+
+###### Macro [AAR\_BUNDLES][](filenames...) _# internal_ <a name="macro_AAR_BUNDLES"></a>
+Not documented yet.
+
+###### Macro [AAR\_COMPILE\_ONLY\_AARS][](compile\_only\_aars...) _# internal_ <a name="macro_AAR_COMPILE_ONLY_AARS"></a>
+Not documented yet.
+
+###### Macro [AAR\_GRADLE\_SCRIPT\_GENERATOR][](python\_script) <a name="macro_AAR_GRADLE_SCRIPT_GENERATOR"></a>
+Not documented yet.
+
+###### Macro [AAR\_JAVA\_SRCS][](dir filenames...) _# internal_ <a name="macro_AAR_JAVA_SRCS"></a>
+Not documented yet.
+
+###### Macro [AAR\_JNI\_LIBS][](dir filenames...) _# internal_ <a name="macro_AAR_JNI_LIBS"></a>
+Not documented yet.
+
+###### Macro [AAR\_LOCAL\_MAVEN\_REPO][](repo...) <a name="macro_AAR_LOCAL_MAVEN_REPO"></a>
+Not documented yet.
+
+###### Macro [AAR\_MANIFEST][](filename) _# internal_ <a name="macro_AAR_MANIFEST"></a>
+Not documented yet.
+
+###### Macro [AAR\_PROGUARD\_RULES][](filename) _# internal_ <a name="macro_AAR_PROGUARD_RULES"></a>
+Not documented yet.
+
+###### Macro [AAR\_RES\_SRCS][](dir filenames...) _# internal_ <a name="macro_AAR_RES_SRCS"></a>
+Not documented yet.
+
+###### Macro [ACCELEO][](XSD{input}[], MTL{input}[], MTL\_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT\_NOAUTO{output}[], OUTPUT\_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") <a name="macro_ACCELEO"></a>
+Not documented yet.
+
+###### Macro [ADDINCL][]([FOR <lang>][GLOBAL dir]\* dirlist) _# builtin_ <a name="macro_ADDINCL"></a>
+The macro adds the directories to include/import search path to compilation flags of the current project.
+By default settings apply to C/C++ compilation namely sets -I<library path> flag, use FOR argument to change target command.
+@params:
+`FOR <lang>` - adds inclues/import serach path for othe language. E.g. `FOR proto` adds import search path for .proto files processing.
+`GLOBAL` - extends the search for headers (-I) on the dependent projects.
+
+###### Macro [ADDINCLSELF][]() <a name="macro_ADDINCLSELF"></a>
+The macro adds the -I<project source path> flag to the source compilation flags of the current project.
+
+###### Macro [ADD\_CHECK][] <a name="macro_ADD_CHECK"></a>
+Not documented yet.
+
+###### Macro [ADD\_CHECK\_PY\_IMPORTS][] <a name="macro_ADD_CHECK_PY_IMPORTS"></a>
+Not documented yet.
+
+###### Macro [ADD\_CLANG\_TIDY][]() <a name="macro_ADD_CLANG_TIDY"></a>
+Not documented yet.
+
+###### Macro [ADD\_COMPILABLE\_TRANSLATE][](Dict Name Options...) <a name="macro_ADD_COMPILABLE_TRANSLATE"></a>
+Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
+
+###### Macro [ADD\_COMPILABLE\_TRANSLIT][](TranslitTable NGrams Name Options...) <a name="macro_ADD_COMPILABLE_TRANSLIT"></a>
+Generate transliteration dictionary code
+This will emit both translit, untranslit and ngrams table codes those will be than further compiled into library
+
+###### Macro [ADD\_DLLS\_TO\_JAR][]() <a name="macro_ADD_DLLS_TO_JAR"></a>
+Not documented yet.
+
+###### Macro [ADD\_PERL\_MODULE][](Dir ModuleName) <a name="macro_ADD_PERL_MODULE"></a>
+Add dependency on specified Perl module to the library
+
+###### Macro [ADD\_PYTEST\_BIN][] <a name="macro_ADD_PYTEST_BIN"></a>
+Not documented yet.
+
+###### Macro [ADD\_PYTEST\_SCRIPT][] <a name="macro_ADD_PYTEST_SCRIPT"></a>
+Not documented yet.
+
+###### Macro [ADD\_YTEST][] <a name="macro_ADD_YTEST"></a>
+Not documented yet.
+
+###### Macro [ALLOCATOR][](Alloc) _# Default: LF_ <a name="macro_ALLOCATOR"></a>
+Set memory allocator implementation for the PROGRAM()/DLL() module.
+This may only be specified for programs and dlls, use in other modules leads to configuration errors.
+
+Available allocators are: "LF", "LF\_YT", "LF\_DBG", "YT", "J", "B", "BM", "C", "TCMALLOC", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE", "MIM", "HU".
+ - LF - lfalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc)
+ - LF\_YT - Allocator selection for YT (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/yt/ya.make)
+ - LF\_DBG - Debug allocator selection (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/dbg/ya.make)
+ - YT - The YTAlloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/ytalloc/impl/ya.make)
+ - J - The JEMalloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/jemalloc)
+ - B - The balloc allocator named Pyotr Popov and Anton Samokhvalov
+ - Discussion: https://ironpeter.at.yandex-team.ru/replies.xml?item\_no=126
+ - Code: https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/balloc
+ - BM - The balloc for market (agri@ commits from july 2018 till November 2018 saved)
+ - C - Like B, but can be disabled for each thread to LF or SYSTEM one (B can be disabled only to SYSTEM)
+ - MIM - Microsoft's mimalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/mimalloc)
+ - TCMALLOC - Google TCMalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/tcmalloc)
+ - GOOGLE - Google TCMalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/galloc)
+ - LOCKLESS - Allocator based upon lockless queues (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/lockless)
+ - SYSTEM - Use target system allocator
+ - FAKE - Don't link with any allocator
+
+More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/
+
+###### Macro [ALL\_PY\_SRCS][]([RECURSIVE] { | TOP\_LEVEL | NAMESPACE ns} [Dirs...]) <a name="macro_ALL_PY_SRCS"></a>
+Puts all .py-files from given Dirs (relative to projects') into PY\_SRCS of the current module.
+If Dirs is ommitted project directory is used
+
+`RECURSIVE` makes lookup recursive with resprect to Dirs
+`TOP\_LEVEL` and `NAMESPACE` are forwarded to `PY\_SRCS`
+
+Note: Only one such macro per module is allowed
+Note: Macro is designed to reject any ya.make files in Dirs except current one
+
+@see [PY\_SRCS()](#macro\_PY\_SRCS)
+
+###### Macro [ALL\_SRCS][]([GLOBAL] filenames...) <a name="macro_ALL_SRCS"></a>
+Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
+Call to ALL\_SRCS macro is equivalent to call to GLOBAL\_SRCS macro when GLOBAL keyword is specified
+as the first argument and is equivalent to call to SRCS macro otherwise.
+
+@example:
+
+ LIBRARY()
+ SET(MAKE_IT_GLOBAL GLOBAL)
+ ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
+ END()
+
+@see: [GLOBAL\_SRCS()](#macro\_GLOBAL\_SRCS), [SRCS()](#macro\_SRCS)
+
+###### Macro [ANNOTATION\_PROCESSOR][](processors...) <a name="macro_ANNOTATION_PROCESSOR"></a>
+The macro is in development.
+Used to specify annotation processors to build JAVA\_PROGRAM() and JAVA\_LIBRARY().
+
+###### Macro [ARCHIVE][](archive\_name [DONT\_COMPRESS] files...) <a name="macro_ARCHIVE"></a>
+Add arbitrary data to a modules. Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+
+Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+
+###### Macro [ARCHIVE\_ASM][](NAME archive\_name files...) <a name="macro_ARCHIVE_ASM"></a>
+Similar to the macro ARCHIVE, but:
+1. works faster and it is better to use for large files.
+2. Different syntax (see examples in codesearch or users/pg/tests/archive\_test)
+
+###### Macro [ARCHIVE\_BY\_KEYS][](archive\_name key [DONT\_COMPRESS] files...) <a name="macro_ARCHIVE_BY_KEYS"></a>
+Add arbitrary data to a module be accessible by specified key.
+Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+
+Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+
+###### Macro [ASM\_PREINCLUDE][](AsmFiles...) <a name="macro_ASM_PREINCLUDE"></a>
+Supply additional .asm files to all assembler calls within a module
+
+###### Macro [ASSERT][] <a name="macro_ASSERT"></a>
+Not documented yet.
+
+###### Macro [BASE\_CODEGEN][](tool\_path prefix) <a name="macro_BASE_CODEGEN"></a>
+Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
+
+###### Macro [BPF][](Input Output Opts...) <a name="macro_BPF"></a>
+Emit eBPF bytecode from .c file.
+Note: Output name is used as is, no extension added.
+
+###### Macro [BPF\_STATIC][](Input Output Opts...) <a name="macro_BPF_STATIC"></a>
+Emit eBPF bytecode from .c file.
+Note: Output name is used as is, no extension added.
+
+###### Macro [BUILDWITH\_CYTHON\_C][](Src Options...) <a name="macro_BUILDWITH_CYTHON_C"></a>
+Generates .c file from .pyx.
+
+###### Macro [BUILDWITH\_CYTHON\_CPP][](Src Options...) <a name="macro_BUILDWITH_CYTHON_CPP"></a>
+Generates .cpp file from .pyx.
+
+###### Macro [BUILDWITH\_RAGEL6][](Src Options...) <a name="macro_BUILDWITH_RAGEL6"></a>
+Compile .rl file using Ragel6.
+
+###### Macro [BUILD\_CATBOOST][](cbmodel cbname) <a name="macro_BUILD_CATBOOST"></a>
+Generate catboost model and access code.
+cbmodel - CatBoost model file name (\*.cmb).
+cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code.
+CatBoost specific macro.
+
+###### Macro [BUILD\_MN][]([CHECK] [PTR] [MULTI] mninfo mnname) _# matrixnet_ <a name="macro_BUILD_MN"></a>
+Generate MatrixNet data and access code using single command.
+Alternative macro BUILD\_MNS() works faster and better for large files.
+
+###### Macro [BUILD\_MNS][]([CHECK] NAME listname mninfos...) _# matrixnet_ <a name="macro_BUILD_MNS"></a>
+Generate MatrixNet data and access code using separate commands for support code, interface and data.
+Faster version of BUILD\_MN() macro for large files.
+
+###### Macro [BUILD\_ONLY\_IF][](variables) _# builtin_ <a name="macro_BUILD_ONLY_IF"></a>
+Print warning if all variables are false. For example, BUILD\_ONLY\_IF(LINUX WIN32)
+
+###### Macro [BUILD\_PLNS][](Src...) <a name="macro_BUILD_PLNS"></a>
+Generate interface header plnmodels.h for Relev model (PLN).
+Relev specific macro.
+
+###### Macro [BUILD\_YDL\_DESC][](Input Symbol Output) <a name="macro_BUILD_YDL_DESC"></a>
+Generate a descriptor for a Symbol located in a ydl module Input, and put it to the file Output.
+
+@example:
+
+ PACKAGE()
+ BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+ END()
+
+This will parse file ../types.ydl, generate a descriptor for a symbol Event defined in the said file, and put the descriptor to the Event.ydld.
+
+###### Macro [BUNDLE][](<Dir [NAME Name]>...) <a name="macro_BUNDLE"></a>
+Brings build artefact from module Dir under optional Name to the current module (e.g. UNION)
+If NAME is not specified, the name of the Dir's build artefact will be preserved
+It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice.
+Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one.
+
+###### Macro [BUNDLE\_AIDL\_SRCS][](dirname filenames...) _# internal_ <a name="macro_BUNDLE_AIDL_SRCS"></a>
+Not documented yet.
+
+###### Macro [BUNDLE\_ASSETS\_SRCS][](dirname filenames...) _# internal_ <a name="macro_BUNDLE_ASSETS_SRCS"></a>
+Not documented yet.
+
+###### Macro [BUNDLE\_EXTRA\_INPUTS][](filenames...) _# internal_ <a name="macro_BUNDLE_EXTRA_INPUTS"></a>
+Not documented yet.
+
+###### Macro [BUNDLE\_JAVA\_SRCS][](dirname filenames...) _# internal_ <a name="macro_BUNDLE_JAVA_SRCS"></a>
+Not documented yet.
+
+###### Macro [BUNDLE\_RES\_SRCS][](dirname filenames...) _# internal_ <a name="macro_BUNDLE_RES_SRCS"></a>
+Not documented yet.
+
+###### Macro [CC\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_CC_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all C/C++ compilation commands in the module
+
+###### Macro $[CFG\_VARS][] _# internal_ <a name="macro_CFG_VARS"></a>
+Mark commands that embed Configuration variables into files
+
+###### Macro [CFLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_CFLAGS"></a>
+Add the specified flags to the compilation command of C and C++ files.
+@params: GLOBAL - Propagates these flags to dependent projects
+Note: remember about the incompatibility flags for clang and cl (to set flags specifically for cl.exe use MSVC\_FLAGS).
+
+###### Macro [CGO\_CFLAGS][](Flags...) <a name="macro_CGO_CFLAGS"></a>
+Compiler flags specific to CGO compilation
+
+###### Macro [CGO\_LDFLAGS][](Files...) <a name="macro_CGO_LDFLAGS"></a>
+Linker flags specific to CGO linking
+
+###### Macro [CGO\_SRCS][](Files...) <a name="macro_CGO_SRCS"></a>
+.go sources to be built with CGO
+
+###### Macro [CHECK\_CONFIG\_H][](<conf\_header>) _# internal_ <a name="macro_CHECK_CONFIG_H"></a>
+This internal macro adds checking code for configuration header in external (contrib) library.
+The check is needed to avoid conflicts on certain types and functions available in arcadia.
+
+@see https://a.yandex-team.ru/arc/trunk/arcadia/build/scripts/check\_config\_h.py for exact details
+
+###### Macro [CHECK\_CONTRIB\_CREDITS][] <a name="macro_CHECK_CONTRIB_CREDITS"></a>
+Not documented yet.
+
+###### Macro [CHECK\_DEPENDENT\_DIRS][](DENY|ALLOW\_ONLY ([ALL|PEERDIRS|GLOB] dir)...) <a name="macro_CHECK_DEPENDENT_DIRS"></a>
+Specify project transitive dependencies constraints.
+
+@params:
+ 1. DENY: current module can not depend on module from any specified directory neither directly nor transitively.
+ 2. ALLOW\_ONLY: current module can not depend on module from a dir not specified in the directory list neither directly nor transitively.
+ 3. ALL: directory constraints following after this modifier are applied to both transitive PEERDIR dependencies and tool dependencies.
+ 4. PEERDIRS: directory constraints following after this modifier are applied to transitive PEERDIR dependencies only.
+ 5. GLOB: next directory constraint is an ANT glob pattern.
+ 6. EXCEPT: next constraint is an excption for the rest of other rules.
+
+Direcory constraints added before either ALL or PEERDIRS modifier is used are treated as ALL directory constraints.
+
+Note: Can be used multiple times on the same module all specified constraints will be checked.
+All macro invocation for the same module must use same constraints type (DENY or ALLOW\_ONLY)
+
+###### Macro [CHECK\_JAVA\_DEPS][](<yes|no>) <a name="macro_CHECK_JAVA_DEPS"></a>
+Check for different classes with duplicate name in classpath.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [CLANG\_EMIT\_AST\_CXX][](Input Output Opts...) <a name="macro_CLANG_EMIT_AST_CXX"></a>
+Emit Clang AST from .cpp file. CXXFLAGS and LLVM\_OPTS are passed in, while CFLAGS and C\_FLAGS\_PLATFORM are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [COLLECT\_FRONTEND\_FILES][](Varname, Dir) <a name="macro_COLLECT_FRONTEND_FILES"></a>
+Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
+
+###### Macro [COLLECT\_JINJA\_TEMPLATES][](varname path) <a name="macro_COLLECT_JINJA_TEMPLATES"></a>
+This macro collects all jinja and yaml files in the directory specified by second argument and
+stores result in the variable with mane specified by first parameter.
+
+###### Macro [COLLECT\_YDB\_API\_SPECS\_LEGACY][](VarName Paths...) _#deprecated_ <a name="macro_COLLECT_YDB_API_SPECS_LEGACY"></a>
+This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited
+
+###### Macro [COMPILE\_C\_AS\_CXX][]() <a name="macro_COMPILE_C_AS_CXX"></a>
+Compile .c files as .cpp ones within a module.
+
+###### Macro [COMPILE\_LUA][](Src, [NAME <import\_name>]) <a name="macro_COMPILE_LUA"></a>
+Compile LUA source file to object code using LUA 2.0
+Optionally override import name which is by default reflects Src name
+
+###### Macro [COMPILE\_LUA\_21][](Src, [NAME <import\_name>]) <a name="macro_COMPILE_LUA_21"></a>
+Compile LUA source file to object code using LUA 2.1
+Optionally override import name which is by default reflects Src name
+
+###### Macro [COMPILE\_NLG][](Src...) <a name="macro_COMPILE_NLG"></a>
+Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
+
+Alice-specific macro
+
+###### Macro [COMPILE\_SWIFT\_MODULE][](SRCS{input}[], BRIDGE\_HEADER{input}="", Flags...) <a name="macro_COMPILE_SWIFT_MODULE"></a>
+Not documented yet.
+
+###### Macro [CONFIGURE\_FILE][](from to) <a name="macro_CONFIGURE_FILE"></a>
+Copy file with the replacement of configuration variables in form of @ANY\_CONF\_VAR@ with their values.
+The values are collected during configure stage, while replacement itself happens during build stage.
+Used implicitly for .in-files processing.
+
+###### Macro [CONFTEST\_LOAD\_POLICY\_LOCAL][]() <a name="macro_CONFTEST_LOAD_POLICY_LOCAL"></a>
+Loads conftest.py files in a way that pytest does it
+
+###### Macro [CONLYFLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_CONLYFLAGS"></a>
+Add the specified flags to the compilation command of .c (but not .cpp) files.
+@params: GLOBAL - Distributes these flags on dependent projects
+
+###### Macro [COPY][] <a name="macro_COPY"></a>
+Not documented yet.
+
+###### Macro [COPY\_FILE][](File Destination [AUTO] [OUTPUT\_INCLUDES Deps...]) <a name="macro_COPY_FILE"></a>
+Copy file to build root. It is possible to change both location and the name.
+
+Parameters:
+- File - Source file name.
+- Destination - Output file name.
+- AUTO - Consider copied file for further processing automtically.
+- OUTPUT\_INCLUDES output\_includes... - Output file dependencies.
+
+The file will be just copied if AUTO boolean parameter is not specified. You should explicitly
+mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
+
+###### Macro [COPY\_FILES\_TO\_BUILD\_PREFIX][] <a name="macro_COPY_FILES_TO_BUILD_PREFIX"></a>
+Not documented yet.
+
+###### Macro [COPY\_FILE\_WITH\_CONTEXT][](FILE DEST [AUTO] [OUTPUT\_INCLUDES DEPS...]) <a name="macro_COPY_FILE_WITH_CONTEXT"></a>
+Copy file to build root the same way as it is done for COPY\_FILE, but also
+propagates the context of the source file.
+
+###### Macro [CPP\_ADDINCL][](Dirs...) <a name="macro_CPP_ADDINCL"></a>
+Not documented yet.
+
+###### Macro [CPP\_ENUMS\_SERIALIZATION][] <a name="macro_CPP_ENUMS_SERIALIZATION"></a>
+Not documented yet.
+
+###### Macro [CPP\_PROTO\_PLUGIN][](Name Tool Suf DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN"></a>
+Define protoc plugin for C++ with given Name that emits code into 1 extra output
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CPP\_PROTO\_PLUGIN0][](Name Tool DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN0"></a>
+Define protoc plugin for C++ with given Name that emits code into regular outputs
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CPP\_PROTO\_PLUGIN2][](Name Tool Suf1 Suf2 DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN2"></a>
+Define protoc plugin for C++ with given Name that emits code into 2 extra outputs
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CREATE\_BUILDINFO\_FOR][](GenHdr) <a name="macro_CREATE_BUILDINFO_FOR"></a>
+Creates header file to access some information about build specified via configuration variables.
+Unlike CREATE\_SVNVERSION\_FOR() it doesn't take revion information from VCS, it uses revision and SandboxTaskId passed via -D options to ya make
+
+###### Macro [CREATE\_INIT\_PY\_STRUCTURE][] <a name="macro_CREATE_INIT_PY_STRUCTURE"></a>
+Not documented yet.
+
+###### Macro [CREDITS\_DISCLAIMER][] <a name="macro_CREDITS_DISCLAIMER"></a>
+Not documented yet.
+
+###### Macro [CTEMPLATE\_VARNAMES][](File) <a name="macro_CTEMPLATE_VARNAMES"></a>
+Generate File.varnames.h using contrib/libs/ctemplate/make\_tpl\_varnames\_h
+
+Documentation: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/ctemplate/README.md
+
+###### Macro [CUDA\_NVCC\_FLAGS][](compiler flags) <a name="macro_CUDA_NVCC_FLAGS"></a>
+Add the specified flags to the compile line .cu-files.
+
+###### Macro [CUSTOM\_LINK\_STEP\_SCRIPT][](name) <a name="macro_CUSTOM_LINK_STEP_SCRIPT"></a>
+Specifies name of a script for custom link step. The scripts
+should be placed in the build/scripts directory and are subject to
+review by devtools@.
+
+###### Macro [CXXFLAGS][](compiler\_flags) <a name="macro_CXXFLAGS"></a>
+Add the specified flags to the compilation command of .cpp (but not .c) files.
+
+###### Macro [DARWIN\_SIGNED\_RESOURCE][](Resource, Relpath) <a name="macro_DARWIN_SIGNED_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [DARWIN\_STRINGS\_RESOURCE][](Resource, Relpath) <a name="macro_DARWIN_STRINGS_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [DATA][]([path...]) <a name="macro_DATA"></a>
+Specifies the path to the data necessary test.
+Valid values are: arcadia/<path> , arcadia\_tests\_data/<path> and sbr://<resource\_id>.
+In the latter case resource will be brought to the working directory of the test before it is started
+
+Used only inside TEST modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#dannyeizrepozitorija
+
+###### Macro [DEB\_VERSION][](File) <a name="macro_DEB_VERSION"></a>
+Creates a header file DebianVersion.h define the DEBIAN\_VERSION taken from the File.
+
+###### Macro [DECIMAL\_MD5\_LOWER\_32\_BITS][](<fileName> [FUNCNAME funcName] [inputs...]) <a name="macro_DECIMAL_MD5_LOWER_32_BITS"></a>
+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 [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_BUNDLE][](name sbr:id FOR platform1 sbr:id FOR platform2...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE"></a>
+Associate name with sbr-id on platform.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_PACK][](RESOURCE\_NAME name sbr:id FOR platform1 sbr:id FOR platform2... RESOURCE\_NAME name1 sbr:id1 FOR platform1...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_HOST_RESOURCES_PACK"></a>
+Associate name with sbr-id on platform.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DECLARE\_EXTERNAL\_RESOURCE][](name sbr:id name1 sbr:id1...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_RESOURCE"></a>
+Associate name with sbr-id.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DEFAULT][](varname value) _#builtin_ <a name="macro_DEFAULT"></a>
+Sets varname to value if value is not set yet
+
+###### Macro [DEPENDENCY\_MANAGEMENT][](path/to/lib1 path/to/lib2 ...) <a name="macro_DEPENDENCY_MANAGEMENT"></a>
+Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version.
+
+For example, if the moduse has PEERDIR (contrib/java/junit/junit), and
+ 1. specifies DEPENDENCY\_MANAGEMENT(contrib/java/junit/junit/4.12),
+ the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12;
+ 2. doesn't specify DEPENDENCY\_MANAGEMENT, PEERDIR automatically replaced
+ with the default from contrib/java/junit/junit/ya.make.
+ These defaults are always there and are supported by maven-import, which puts
+ there the maximum version available in contrib/java.
+
+The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B.
+
+If some module has both DEPENDENCY\_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Macro [DEPENDS][](path1 [path2...]) _# builtin_ <a name="macro_DEPENDS"></a>
+Buildable targets that should be brought to the test run. This dependency isonly used when tests run is requested. It will build the specified modules andbring them to the working directory of the test (in their Arcadia paths). Itis reasonable to specify only final targets her (like programs, DLLs orpackages). DEPENDS to UNION is the only exception: UNIONs aretransitively closed at DEPENDS bringing all dependencies to the test.
+
+DEPENDS on multimodule will select and bring single final target. If more noneor more than one final target available in multimodule DEPENDS to it willproduce configuration error.
+
+###### Macro [DIRECT\_DEPS\_ONLY][] <a name="macro_DIRECT_DEPS_ONLY"></a>
+Add direct PEERDIR's only in java compile classpath
+
+###### Macro [DISABLE][](varname) _#builtin_ <a name="macro_DISABLE"></a>
+Sets varname to 'no'
+
+###### Macro [DISABLE\_DATA\_VALIDATION][]() <a name="macro_DISABLE_DATA_VALIDATION"></a>
+Not documented yet.
+
+###### Macro [DLL\_FOR][](path/to/lib [libname] [major\_ver [minor\_ver]] [EXPORTS symlist\_file]) _#builtin_ <a name="macro_DLL_FOR"></a>
+DLL module definition based on specified LIBRARY
+
+###### Macro [DOCS\_BUILDER][](tool) <a name="macro_DOCS_BUILDER"></a>
+Specify docs builder tool.
+Avalialbe tools: mkdocs and yfm (by default).
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DOCS\_CONFIG][](path) <a name="macro_DOCS_CONFIG"></a>
+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\_DIR][](path) <a name="macro_DOCS_DIR"></a>
+Specify directory with source .md files for DOCS multimodule if it differs from project directory.
+Path must be Arcadia root relative.
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DOCS\_INCLUDE\_SOURCES][](path...) <a name="macro_DOCS_INCLUDE_SOURCES"></a>
+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\_VARS][](variable1=value1 variable2=value2 ...) <a name="macro_DOCS_VARS"></a>
+Specify a set of default values of template variables for DOCS multimodule.
+There must be no spaces around "=". Values will be treated as strings.
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DUMPERF\_CODEGEN][](Prefix) <a name="macro_DUMPERF_CODEGEN"></a>
+A special case BASE\_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
+
+###### Macro [DYNAMIC\_DEPS][](Path...) _# internal, temporary_ <a name="macro_DYNAMIC_DEPS"></a>
+Enlist paths to all DYNAMIC\_LIBRARY dependencies of the DYNAMIC\_LIBRARY
+This it needed to transfer their outputs through the library to PROGRAM
+or dependent DLL/DYNAMIC\_LIBRARY.
+
+Note: this is temporary solution until support of `super-global` variables come
+ which will enable transfer of some properies though final targets like DLLs.
+
+###### Macro [DYNAMIC\_LIBRARY\_FROM][](Paths) <a name="macro_DYNAMIC_LIBRARY_FROM"></a>
+Use specified libraries as sources of DLL
+
+###### Macro IF(condition) .. [ELSE][]IF(other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_ELSE"></a>
+Apply macros if none of previous conditions hold
+
+###### Macro IF(condition) .. [ELSEIF][](other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_ELSEIF"></a>
+Apply macros if other\_condition holds while none of previous conditions hold
+
+###### Macro [EMBED\_JAVA\_VCS\_INFO][]() <a name="macro_EMBED_JAVA_VCS_INFO"></a>
+Embed manifest with vcs info into `EXTERNAL\_JAVA\_LIBRARY`
+By default this is disabled.
+
+###### Macro [ENABLE][](varname) _#builtin_ <a name="macro_ENABLE"></a>
+Sets varname to 'yes'
+
+###### Macro [ENABLE\_PREVIEW][]() <a name="macro_ENABLE_PREVIEW"></a>
+Enable java preview features.
+
+###### Macro [END][]() _# builtin_ <a name="macro_END"></a>
+The end of the module
+
+###### Macro IF(condition) .. ELSEIF(other\_condition) .. ELSE() .. [ENDIF][]() _#builtin_ <a name="macro_ENDIF"></a>
+End of conditional construct
+
+###### Macro [ENV][](key[=value]) <a name="macro_ENV"></a>
+Sets env variable key to value (gets value from system env by default).
+
+###### Macro [EXCLUDE][] <a name="macro_EXCLUDE"></a>
+EXCLUDE(prefixes)
+
+The macro is in development.
+Specifies which libraries should be excluded from the classpath.
+
+###### Macro [EXCLUDE\_TAGS][](tags...) _# builtin_ <a name="macro_EXCLUDE_TAGS"></a>
+Instantiate from multimodule all variants except ones with tags listed
+
+###### Macro [EXPORTS\_SCRIPT][](exports\_file) <a name="macro_EXPORTS_SCRIPT"></a>
+Specify exports script within PROGRAM, DLL and DLL-derived modules.
+This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files.
+The other option use EXPORTS parameter of the DLL module itself.
+
+@see: [DLL](#module\_DLL)
+
+###### Macro [EXPORT\_ALL\_DYNAMIC\_SYMBOLS][]() <a name="macro_EXPORT_ALL_DYNAMIC_SYMBOLS"></a>
+Export all non-hidden symbols as dynamic when linking a PROGRAM.
+
+###### Macro [EXPORT\_MAPKIT\_PROTO][]() _# internal deprecated_ <a name="macro_EXPORT_MAPKIT_PROTO"></a>
+This macro is a temporary one and should be changed to EXPORT\_YMAPS\_PROTO
+when transition of mapsmobi to arcadia is finished
+
+###### Macro [EXPORT\_YMAPS\_PROTO][]() _# maps-specific_ <a name="macro_EXPORT_YMAPS_PROTO"></a>
+Maps-specific .proto handling: IMPORT\_YMAPS\_PROTO() + maps protobuf namespace.
+
+###### Macro [EXPOSE][](OutputsToExport...) <a name="macro_EXPOSE"></a>
+Allows to mark outputs of macro command as unused in the current module but intended
+to be used in modules consuming current via PEERDIR.
+
+TODO(DEVTOOLS-9000) proper implementation needed
+
+###### Macro [EXTERNAL\_JAR][] <a name="macro_EXTERNAL_JAR"></a>
+Not documented yet.
+
+###### Macro [EXTERNAL\_RESOURCE][](...) _#builtin, deprecated_ <a name="macro_EXTERNAL_RESOURCE"></a>
+Don't use this. Use RESOURCE\_LIBRARY or FROM\_SANDBOX instead
+
+###### Macro [EXTRADIR][](...) _#builtin, deprecated_ <a name="macro_EXTRADIR"></a>
+Ignored
+
+###### Macro [EXTRALIBS][](liblist) _# builtin_ <a name="macro_EXTRALIBS"></a>
+Add external dynamic libraries during program linkage stage
+
+###### Macro [EXTRALIBS\_STATIC][](Libs...) <a name="macro_EXTRALIBS_STATIC"></a>
+Add the specified external static libraries to the program link
+
+###### Macro [FAT\_RESOURCE][] <a name="macro_FAT_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [FBS\_NAMESPACE][](NAMESPACE, PATH...) <a name="macro_FBS_NAMESPACE"></a>
+Not documented yet.
+
+###### Macro [FBS\_TO\_PYSRC][](output\_base\_name fbs\_files...) _# internal_ <a name="macro_FBS_TO_PYSRC"></a>
+Create a tar archive of .py files generated by flatc for Python. Output tar
+archive will have .fbs.pysrc extension. This .fbs.pysrc extension is specially
+processed when --add-flatbuf-result flag is specified on the command line
+for 'ya make ...' (tar archive is extracted to output directory).
+
+###### Macro [FILES][] <a name="macro_FILES"></a>
+Not documented yet.
+
+###### Macro [FLATC\_FLAGS][](flags...) <a name="macro_FLATC_FLAGS"></a>
+Add flags to flatc command line
+
+###### Macro [FLAT\_JOIN\_SRCS\_GLOBAL][](Out Src...) <a name="macro_FLAT_JOIN_SRCS_GLOBAL"></a>
+Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+This macro places all files into single file, so will work with any sources.
+You should specify file name with the extension as Out. Further processing will be done according to this extension.
+
+###### Macro [FORK\_SUBTESTS][]() <a name="macro_FORK_SUBTESTS"></a>
+Splits the test run in chunks on subtests.
+The number of chunks can be overridden using the macro SPLIT\_FACTOR.
+
+Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FORK\_TESTS][]() <a name="macro_FORK_TESTS"></a>
+Splits a test run on chunks by test classes.
+The number of chunks can be overridden using the macro SPLIT\_FACTOR.
+
+Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FORK\_TEST\_FILES][]() <a name="macro_FORK_TEST_FILES"></a>
+Only for PY2TEST and PY3TEST: splits a file executable with the tests on chunks in the files listed in TEST\_SRCS
+Compatible with FORK\_(SUB)TESTS.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FROM\_ARCHIVE][](Src [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE]) <a name="macro_FROM_ARCHIVE"></a>
+Process file archive as [FROM\_SANDBOX()](#macro\_FROM\_SANDBOX).
+
+###### Macro [FROM\_MDS][]([FILE] key [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE]) <a name="macro_FROM_MDS"></a>
+Download resource from MDS with the specified key and process like [FROM\_SANDBOX()](#macro\_FROM\_SANDBOX).
+
+###### Macro [FROM\_NPM][](NAME VERSION SKY\_ID INTEGRITY INTEGRITY\_ALGO TARBALL\_PATH) <a name="macro_FROM_NPM"></a>
+Not documented yet.
+
+###### Macro [FROM\_NPM\_LOCKFILES][](LOCKFILES...) _# internal_ <a name="macro_FROM_NPM_LOCKFILES"></a>
+Defines lockfile list for `NPM\_CONTRIBS` module.
+
+@see [NPM\_CONTRIBS()](#module\_NPM\_CONTRIBS)
+
+###### Macro [FROM\_SANDBOX][]([FILE] resource\_id [AUTOUPDATED script] [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE] [OUTPUT\_INCLUDES <include files>]) <a name="macro_FROM_SANDBOX"></a>
+Download the resource from the Sandbox, unpack (if not explicitly specified word FILE) and add OUT files to the build. EXECUTABLE makes them executable.
+You may specify extra dependencies that output files bring using OUTPUT\_INCLUDES. The change of these may e.g. lead to recompilation of .cpp files extracted from resource.
+If there is no default processing for OUT files or you need process them specially use OUT\_NOAUTO instead of OUT.
+
+It is disallowed to specify directory as OUT/OUT\_NOAUTO since all outputs of commands shall be known to build system.
+
+RENAME renames files to the corresponding OUT and OUT\_NOAUTO outputs:
+FROM\_SANDBOX(resource\_id RENAME in\_file1 in\_file2 OUT out\_file1 out\_file2 out\_file3)
+FROM\_SANDBOX(resource\_id RENAME in\_file1 OUT out\_file1 RENAME in\_file2 OUT out\_file2)
+FROM\_SANDBOX(FILE resource\_id RENAME resource\_file OUT out\_name)
+
+RENAME RESOURCE allows to rename the resource without specifying its file name.
+
+If AUTOUPDATED is specified than macro will be regularly updated according to autoupdate script. The dedicated Sandbox task scans the arcadia and
+changes resource\_ids in such macros if newer resource of specified type is available. Note that the task seeks AUTOUPDATED in specific position,
+so you shall place it immediately after resource\_id.
+
+###### Macro [FUZZ\_DICTS][](path1 [path2...]) <a name="macro_FUZZ_DICTS"></a>
+Allows you to specify dictionaries, relative to the root of Arcadia, which will be used in Fuzzing.
+Libfuzzer and AFL use a single syntax for dictionary descriptions.
+Should only be used in FUZZ modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Macro [FUZZ\_OPTS][](opt1 [Opt2...]) <a name="macro_FUZZ_OPTS"></a>
+Overrides or adds options to the corpus mining and fuzzer run.
+Currently supported only Libfuzzer, so you should use the options for it.
+Should only be used in FUZZ modules.
+
+@example:
+
+ FUZZ_OPTS (
+ -max_len=1024
+ -rss_limit_mb=8192
+ )
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Macro [GENERATED\_SRCS][](srcs... PARSE\_META\_FROM cpp\_srcs... [OUTPUT\_INCLUDES output\_includes...] [OPTIONS]) <a name="macro_GENERATED_SRCS"></a>
+Generate sources using Jinja 2 template engine.
+
+srcs... - list of text files which will be generated during build time by templates. Each template must be
+ placed to the place in source tree where corresponding source file should be generated. Name of
+ template must be "<name\_of\_src\_file>.markettemplate". For example if you want to generate file "example.cpp"
+ then template should be named "example.cpp.markettemplate".
+PARSE\_META\_FROM cpp\_srcs... - list of C++ source files (.cpp, .h) which will be parsed using clang library
+ and metainformation extracted from the files will be made available for templates. Example of
+ template code fragment using metainformation: {{ meta.objects["@N@std@S@string"].name }}
+OUTPUT\_INCLUDES output\_includes... - in cases when build system parser fails to determine all headers
+ which generated files include, you can specify additional headers here. In a normal situation this should
+ not be needed and this feature could be removed in the future.
+OPTIONS - additional options for code\_generator utility
+
+Examples of templates can be found in directory market/tools/code\_generator/templates.
+Metainformation does not contain entries for every object declared in C++ files specified in PARSE\_META\_FROM
+parameter. To include some object into consideration you need to mark it by attribute. Attributes can
+automatically add more attributes to dependent objects. This behavior depends on attribute definition.
+
+More information will be available (eventually:) here: https://wiki.yandex-team.ru/Users/denisk/codegenerator/
+
+###### Macro [GENERATE\_ENUM\_SERIALIZATION][](File.h) <a name="macro_GENERATE_ENUM_SERIALIZATION"></a>
+Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.
+
+Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+
+###### Macro [GENERATE\_ENUM\_SERIALIZATION\_WITH\_HEADER][](File.h) <a name="macro_GENERATE_ENUM_SERIALIZATION_WITH_HEADER"></a>
+Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module
+Provide access to serialization functions via generated header File\_serialized.h
+
+Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+
+###### Macro [GENERATE\_PY\_PROTOS][](ProtoFiles...) _# deprecated_ <a name="macro_GENERATE_PY_PROTOS"></a>
+Generate python bindings for protobuf files.
+Macro is obsolete and not recommended for use!
+
+###### Macro [GENERATE\_SCRIPT][] <a name="macro_GENERATE_SCRIPT"></a>
+heretic@ promised to make tutorial here
+Don't forget
+Feel free to remind
+
+###### Macro [GEN\_SCHEEME2][](scheeme\_name from\_file dependent\_files...) <a name="macro_GEN_SCHEEME2"></a>
+Generates a C++ description for structure(contains the field RecordSig) in the specified file (and connected).
+
+1. ${scheeme\_name}.inc - the name of the generated file.
+2. Use an environment variable - DATAWORK\_SCHEEME\_EXPORT\_FLAGS that allows to specify flags to tools/structparser
+
+@example:
+
+ SET(DATAWORK_SCHEEME_EXPORT_FLAGS --final_only -m "::")
+
+all options are passed to structparser (in this example --final\_only - do not export heirs with public base that contains the required field,,- m "::" only from the root namespace)
+sets in extra option
+
+@example:
+
+ SET(EXTRACT_STRUCT_INFO_FLAGS -f \"const static ui32 RecordSig\"
+ -u \"RecordSig\" -n${scheeme_name}SchemeInfo ----gcc44_no_typename no_complex_overloaded_func_export
+ ${DATAWORK_SCHEEME_EXPORT_FLAGS})
+
+for compatibility with C++ compiler and the external environment.
+See tools/structparser for more details.
+
+###### Macro [GLOBAL\_SRCS][](filenames...) <a name="macro_GLOBAL_SRCS"></a>
+Make all source files listed as GLOBAL.
+Call to GLOBAL\_SRCS macro is equivalent to call to SRCS macro when each source file is marked with GLOBAL keyword.
+Arcadia root relative or project dir relative paths are supported for filenames arguments. GLOBAL keyword is not
+recognized for GLOBAL\_SRCS in contrast to SRCS macro.
+
+@example:
+Consider the file to ya.make:
+
+ LIBRARY()
+ GLOBAL_SRCS(foo.cpp bar.cpp)
+ END()
+
+@see: [SRCS()](#macro\_SRCS)
+
+###### Macro [GO\_ASM\_FLAGS][](flags) <a name="macro_GO_ASM_FLAGS"></a>
+Add the specified flags to the go asm compile command line.
+
+###### Macro [GO\_BENCH\_TIMEOUT][](x) <a name="macro_GO_BENCH_TIMEOUT"></a>
+Sets timeout in seconds for 1 Benchmark in go benchmark suite
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [GO\_CGO1\_FLAGS][](flags) <a name="macro_GO_CGO1_FLAGS"></a>
+Add the specified flags to the go cgo compile command line.
+
+###### Macro [GO\_CGO2\_FLAGS][](flags) <a name="macro_GO_CGO2_FLAGS"></a>
+Add the specified flags to the go cgo compile command line.
+
+###### Macro [GO\_COMPILE\_FLAGS][](flags) <a name="macro_GO_COMPILE_FLAGS"></a>
+Add the specified flags to the go compile command line.
+
+###### Macro [GO\_EMBED\_DIR][](DIR) <a name="macro_GO_EMBED_DIR"></a>
+Define an embed directory DIR.
+
+###### Macro [GO\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_EMBED_PATTERN"></a>
+Define an embed pattern.
+
+###### Macro GO\_TEST\_EMBED\_DIR(DIR) <a name="macro_GO_EMBED_TEST_DIR"></a>
+Define an embed directory DIR for internal go tests.
+
+###### Macro GO\_XTEST\_EMBED\_DIR(DIR) <a name="macro_GO_EMBED_XTEST_DIR"></a>
+Define an embed directory DIR for external go tests.
+
+###### Macro [GO\_FAKE\_OUTPUT][](go-src-files...) <a name="macro_GO_FAKE_OUTPUT"></a>
+Not documented yet.
+
+###### Macro [GO\_GRPC\_GATEWAY\_SRCS][]() <a name="macro_GO_GRPC_GATEWAY_SRCS"></a>
+Use of grpc-gateway plugin (Supported for Go only).
+
+###### Macro [GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS][]() <a name="macro_GO_GRPC_GATEWAY_SWAGGER_SRCS"></a>
+Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
+
+###### Macro [GO\_LDFLAGS][](Flags...) <a name="macro_GO_LDFLAGS"></a>
+Link flags for GO\_PROGRAM linking from .go sources
+
+###### Macro [GO\_LINK\_FLAGS][](flags) <a name="macro_GO_LINK_FLAGS"></a>
+Add the specified flags to the go link command line.
+
+###### Macro [GO\_MOCKGEN\_FROM][](Path) <a name="macro_GO_MOCKGEN_FROM"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_MOCKS][]() <a name="macro_GO_MOCKGEN_MOCKS"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_REFLECT][]() <a name="macro_GO_MOCKGEN_REFLECT"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_TYPES][](First, Rest...) <a name="macro_GO_MOCKGEN_TYPES"></a>
+Not documented yet.
+
+###### Macro [GO\_PACKAGE\_NAME][](Name) <a name="macro_GO_PACKAGE_NAME"></a>
+Override name of a Go package.
+
+###### Macro [GO\_PROTO\_PLUGIN][](Name Ext Tool [DEPS dependencies...]) <a name="macro_GO_PROTO_PLUGIN"></a>
+Define protoc plugin for GO with given Name that emits extra output with provided extension
+Ext using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [GO\_SKIP\_TESTS][](TestNames...) <a name="macro_GO_SKIP_TESTS"></a>
+Define a set of tests that should not be run.
+NB! Subtests are not taken into account!
+
+###### Macro [GO\_TEST\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_TEST_EMBED_PATTERN"></a>
+Define an embed pattern for internal go tests.
+
+###### Macro [GO\_TEST\_FOR][](path/to/module) _#builtin_ <a name="macro_GO_TEST_FOR"></a>
+Produces go test for specified module
+
+###### Macro [GO\_TEST\_SRCS][](Files...) <a name="macro_GO_TEST_SRCS"></a>
+.go sources for internal tests of a module
+
+###### Macro [GO\_XTEST\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_XTEST_EMBED_PATTERN"></a>
+Define an embed pattern for external go tests.
+
+###### Macro [GO\_XTEST\_SRCS][](Files...) <a name="macro_GO_XTEST_SRCS"></a>
+.go sources for external tests of a module
+
+###### Macro [GRADLE\_FLAGS][](flags...) _# internal_ <a name="macro_GRADLE_FLAGS"></a>
+SEt additional flags for gradle
+
+###### Macro [GRPC][]() <a name="macro_GRPC"></a>
+Emit GRPC code for all .proto files in a PROTO\_LIBRARY.
+This works for all available PROTO\_LIBRARY versions (C++, Python 2.x, Pyton 3.x, Java and Go).
+
+###### Macro [IDEA\_EXCLUDE\_DIRS][](<excluded dirs>) <a name="macro_IDEA_EXCLUDE_DIRS"></a>
+Exclude specified directories from an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IDEA\_JAR\_SRCS][](Args...) <a name="macro_IDEA_JAR_SRCS"></a>
+Not documented yet.
+
+###### Macro [IDEA\_MODULE\_NAME][](module\_name) <a name="macro_IDEA_MODULE_NAME"></a>
+Set module name in an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IDEA\_RESOURCE\_DIRS][](<additional dirs>) <a name="macro_IDEA_RESOURCE_DIRS"></a>
+Set specified resource directories in an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IF][](condition) .. ELSEIF(other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_IF"></a>
+Apply macros if condition holds
+
+###### Macro [INCLUDE][](filename) _#builtin_ <a name="macro_INCLUDE"></a>
+Include file textually and process it as a part of the ya.make
+
+###### Macro [INCLUDE\_TAGS][](tags...) _# builtin_ <a name="macro_INCLUDE_TAGS"></a>
+Additionally instantiate from multimodule all variants with tags listed (overrides default)
+
+###### Macro [INDUCED\_DEPS][](Extension Path...) _#builtin_ <a name="macro_INDUCED_DEPS"></a>
+States that files wih the Extension generated by the PROGRAM will depend on files in Path.
+This only useful in PROGRAM and similar modules. It will be applied if the PROGRAM is used in RUN\_PROGRAM macro.
+All Paths specified must be absolute arcadia paths i.e. start with ${ARCADIA\_ROOT} ${ARCADIA\_BUILD\_ROOT}, ${CURDIR} or ${BINDIR}.
+
+###### Macro [IOS\_APP\_ASSETS\_FLAGS][](Flags...) <a name="macro_IOS_APP_ASSETS_FLAGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_APP\_COMMON\_FLAGS][](Flags...) <a name="macro_IOS_APP_COMMON_FLAGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_APP\_SETTINGS][] <a name="macro_IOS_APP_SETTINGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_ASSETS][] <a name="macro_IOS_ASSETS"></a>
+Not documented yet.
+
+###### Macro [JAR\_ANNOTATION\_PROCESSOR][](Classes...) <a name="macro_JAR_ANNOTATION_PROCESSOR"></a>
+Not documented yet.
+
+###### Macro [JAR\_EXCLUDE][](Filters...) <a name="macro_JAR_EXCLUDE"></a>
+Filter .jar file content: remove matched files
+\* and \*\* patterns are supported (like JAVA\_SRCS)
+
+###### Macro [JAR\_INCLUDE][](Filters...) <a name="macro_JAR_INCLUDE"></a>
+Filter .jar file content: keep only matched files
+\* and \*\* patterns are supported (like JAVA\_SRCS)
+
+###### Macro [JAR\_RESOURCE][](Id) <a name="macro_JAR_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [JAVAC\_FLAGS][](Args...) <a name="macro_JAVAC_FLAGS"></a>
+Set additional Java compilation flags.
+
+###### Macro [JAVA\_DEPENDENCIES\_CONFIGURATION][](Vetos...) <a name="macro_JAVA_DEPENDENCIES_CONFIGURATION"></a>
+Validate contrib/java dependencies
+Valid arguments
+FORBID\_DIRECT\_PEERDIRS - fail when module have direct PEERDIR (with version) (non-transitive)
+FORBID\_DEFAULT\_VERSIONS - fail when module have PEERDIR to library with default (last) version (transitive)
+FORBID\_CONFLICT - fail when module have resolved without DEPENDENCY\_MANAGEMENT version conflict (transitive)
+FORBID\_CONFLICT\_DM - fail when module have resolved with DEPENDENCY\_MANAGEMENT version conflict (transitive)
+FORBID\_CONFLICT\_DM\_RECENT - like FORBID\_CONFLICT\_DM but fail only when dependency have more recent version than specified in DEPENDENCY\_MANAGEMENT
+REQUIRE\_DM - all dependencies must be specified in DEPENDENCY\_MANAGEMENT (transitive)
+
+###### Macro [JAVA\_EXTERNAL\_DEPENDENCIES][](file1 file2 ...) <a name="macro_JAVA_EXTERNAL_DEPENDENCIES"></a>
+Add non-source java external build dependency (like lombok config file)
+
+###### Macro [JAVA\_IGNORE\_CLASSPATH\_CLASH\_FOR][]([classes]) <a name="macro_JAVA_IGNORE_CLASSPATH_CLASH_FOR"></a>
+Ignore classpath clash test fails for classes
+
+###### Macro [JAVA\_MODULE][] <a name="macro_JAVA_MODULE"></a>
+Not documented yet.
+
+###### Macro [JAVA\_PROTO\_PLUGIN][](Name Tool DEPS <Dependencies>) <a name="macro_JAVA_PROTO_PLUGIN"></a>
+Define protoc plugin for Java with given Name that emits extra outputs
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [JAVA\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_JAVA_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all C/C++ compilation commands in the module
+
+###### Macro [JAVA\_RESOURCE][](JAR, SOURCES="") <a name="macro_JAVA_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [JAVA\_SRCS][](srcs) <a name="macro_JAVA_SRCS"></a>
+Specify java source files and resources. A macro can be contained in any of four java modules.
+Keywords:
+1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory.
+2. PACKAGE\_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE\_PREFIX package.name.
+
+@example:
+ - example/ya.make
+
+ JAVA_PROGRAM()
+ JAVA_SRCS(SRCDIR src/main/java **/*)
+ END()
+
+ - example/src/main/java/ru/yandex/example/HelloWorld.java
+
+ package ru.yandex.example;
+ public class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+ }
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs
+
+###### Macro [JAVA\_TEST][] <a name="macro_JAVA_TEST"></a>
+Not documented yet.
+
+###### Macro [JAVA\_TEST\_DEPS][] <a name="macro_JAVA_TEST_DEPS"></a>
+Not documented yet.
+
+###### Macro MODULE\_JDK(Version) <a name="macro_JDK_VERSION"></a>
+Specify JDK version for module
+
+###### Macro [JOINSRC][]() _# deprecated, does-nothing_ <a name="macro_JOINSRC"></a>
+This macro currently does nothing. Use JOIN\_SRCS and similar macros to make one file of set of sources.
+
+###### Macro [JOIN\_SRCS][](Out Src...) <a name="macro_JOIN_SRCS"></a>
+Join set of sources into single file named Out and send it for further processing.
+This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+You should specify file name with the extension as Out. Futher processing will be done according this extension.
+
+###### Macro [JOIN\_SRCS\_GLOBAL][](Out Src...) <a name="macro_JOIN_SRCS_GLOBAL"></a>
+Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+You should specify file name with the extension as Out. Further processing will be done according to this extension.
+
+###### Macro [JVM\_ARGS][](Args...) <a name="macro_JVM_ARGS"></a>
+Arguments to run Java programs in tests.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [KOTLINC\_FLAGS][](-flags) <a name="macro_KOTLINC_FLAGS"></a>
+Set additional Kotlin compilation flags.
+
+###### Macro [LARGE\_FILES][]([AUTOUPDATED] Files...) <a name="macro_LARGE_FILES"></a>
+Use large file ether from working copy or from remote storage via placeholder <File>.external
+If <File> is present locally (and not a symlink!) it will be copied to build directory.
+Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
+
+###### Macro [LDFLAGS][](LinkerFlags...) <a name="macro_LDFLAGS"></a>
+Add flags to the link command line of executable or shared library/dll.
+Note: LDFLAGS are always global. When set in the LIBRARY module they will affect all programs/dlls/tests the library is linked into.
+Note: remember about the incompatibility of flags for gcc and cl.
+
+###### Macro [LD\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_LD_REQUIREMENTS"></a>
+Override CPU and RAM requirements for link command in the module
+
+###### Macro [LIB\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_LIB_REQUIREMENTS"></a>
+Override CPU and RAM requirements for library creation comand of a x\_LIBRARY modules
+
+###### Macro [LICENSE][](licenses...) <a name="macro_LICENSE"></a>
+Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
+library satisfying all conditions of any of the listed licenses.
+
+A license must be prescribed for contribs
+
+###### Macro [LICENSE\_TEXTS][](File) <a name="macro_LICENSE_TEXTS"></a>
+This macro specifies the filename with all library licenses texts
+
+###### Macro [LINKER\_SCRIPT][](Files...) <a name="macro_LINKER_SCRIPT"></a>
+Specify files to be used as a linker script
+
+###### Macro [LINK\_EXEC\_DYN\_LIB\_IMPL][] <a name="macro_LINK_EXEC_DYN_LIB_IMPL"></a>
+$usage: LINK\_EXEC\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [LINK\_EXE\_IMPL][] <a name="macro_LINK_EXE_IMPL"></a>
+$usage: LINK\_EXE\_IMPL(peers...) # internal
+
+###### Macro [LINT][](<none|base|strict>) <a name="macro_LINT"></a>
+Set linting levem for sources of the module
+
+###### Macro [LJ\_21\_ARCHIVE][](NAME Name LuaFiles...) _# deprecated_ <a name="macro_LJ_21_ARCHIVE"></a>
+Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys
+
+###### Macro [LJ\_ARCHIVE][](NAME Name LuaFiles...) <a name="macro_LJ_ARCHIVE"></a>
+Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys
+
+###### Macro [LLVM\_BC][] <a name="macro_LLVM_BC"></a>
+Not documented yet.
+
+###### Macro [LLVM\_COMPILE\_C][](Input Output Opts...) <a name="macro_LLVM_COMPILE_C"></a>
+Emit LLVM bytecode from .c file. BC\_CFLAGS, LLVM\_OPTS and C\_FLAGS\_PLATFORM are passed in, while CFLAGS are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_COMPILE\_CXX][](Input Output Opts...) <a name="macro_LLVM_COMPILE_CXX"></a>
+Emit LLVM bytecode from .cpp file. BC\_CXXFLAGS, LLVM\_OPTS and C\_FLAGS\_PLATFORM are passed in, while CFLAGS are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_COMPILE\_LL][](Input Output Opts...) <a name="macro_LLVM_COMPILE_LL"></a>
+Compile LLVM bytecode to object representation.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_LINK][](Output Inputs...) <a name="macro_LLVM_LINK"></a>
+Call llvm-link on set of Inputs to produce Output.
+Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
+
+###### Macro [LLVM\_OPT][](Input Output Opts...) <a name="macro_LLVM_OPT"></a>
+Call llvm-opt with set of Opts on Input to produce Output.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LOCAL\_JAR][](File) <a name="macro_LOCAL_JAR"></a>
+Not documented yet.
+
+###### Macro [LOCAL\_SOURCES\_JAR][](File) <a name="macro_LOCAL_SOURCES_JAR"></a>
+Not documented yet.
+
+###### Macro [LUA][](script\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...][ REQUIREMENTS reqs]) <a name="macro_LUA"></a>
+Run a lua script.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- script\_path - Path to the script.3
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files.
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+
+###### Macro [MACROS\_WITH\_ERROR][] <a name="macro_MACROS_WITH_ERROR"></a>
+Not documented yet.
+
+###### Macro [MAPKITIDL][](idl-file-name... <a name="macro_MAPKITIDL"></a>
+[OUT\_DIR output-dir]
+[IDL\_INCLUDES idl-dirs...]
+[FILTER filters...])
+[FILTER\_OUT filters...])
+[GLOBAL\_OUTPUTS]
+Generate bindings to target platform language.
+(Used for mobile MapKit project)
+1. idl-file-name... - a list of \*.idl files to process
+2. output-dir - a base root of output directory
+3. idl-dirs - a list of directories where to search for imported \*.idl files
+4. filters - a list of extensions used to filter outputs and output includes
+
+###### Macro [MAPKIT\_ADDINCL][](Dirs...) <a name="macro_MAPKIT_ADDINCL"></a>
+Not documented yet.
+
+###### Macro [MAPKIT\_ENABLE\_WHOLE\_ARCHIVE][]() _# internal deprecated_ <a name="macro_MAPKIT_ENABLE_WHOLE_ARCHIVE"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_AIDL\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_AIDL_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_ASSETS\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_ASSETS_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_JAVA\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_JAVA_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_JNI\_LIBS\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_JNI_LIBS_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_RES\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_RES_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_COLLECT\_TPL\_FILES][](varname [dir]) _# internal_ <a name="macro_MAPSMOBI_COLLECT_TPL_FILES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [MAPSMOBI\_SRCS][](filenames...) _# internal_ <a name="macro_MAPSMOBI_SRCS"></a>
+Make all source files listed as GLOBAL or not (depending on the value of
+MAPSMOBI\_USE\_SRCS\_GLOBAL). Be careful since the value of
+MAPSMOBI\_USE\_SRCS\_GLOBAL matters! If the value of this variable is equal to
+GLOBAL then call to MAPSMOBI\_SRCS() macro behaves like call to
+GLOBAL\_SRCS() macro otherwise the value of MAPSMOBI\_USE\_SRCS\_GLOBAL is
+treated as a file name and a call to MAPSMOBI\_SRCS() macro behaves like a
+call to SRCS() macro with additional argument which is the value of
+MAPSMOBI\_USE\_SRCS\_GLOBAL variable
+
+###### Macro [MAPS\_GARDEN\_COLLECT\_MODULE\_TRAITS][](varnamei dir) _# internal_ <a name="macro_MAPS_GARDEN_COLLECT_MODULE_TRAITS"></a>
+This macro is strictly prohibited to use outside of maps/garden project
+
+###### Macro [MAPS\_IDL\_ADDINCL][](dirnames...) _# internal_ <a name="macro_MAPS_IDL_ADDINCL"></a>
+Warpper for MAPKIT\_ADDINCL macro which is used for mobile mapkit build
+
+###### Macro [MAPS\_IDL\_GLOBAL\_SRCS][](filenames...) _# internal_ <a name="macro_MAPS_IDL_GLOBAL_SRCS"></a>
+Warpper for MAPKITIDL macro which is used for mobile mapkit build
+
+###### Macro [MAPS\_IDL\_SRCS][](filenames...) _# internal_ <a name="macro_MAPS_IDL_SRCS"></a>
+Warpper for MAPKITIDL macro which is used for mobile mapkit build
+
+###### Macro [MASMFLAGS][](compiler flags) <a name="macro_MASMFLAGS"></a>
+Add the specified flags to the compilation command of .masm files.
+
+###### Macro [MAVEN\_GROUP\_ID][](group\_id\_for\_maven\_export) <a name="macro_MAVEN_GROUP_ID"></a>
+Set maven export group id for JAVA\_PROGRAM() and JAVA\_LIBRARY().
+Have no effect on regular build.
+
+###### Macro [MESSAGE][]([severity] message) _# builtin_ <a name="macro_MESSAGE"></a>
+Print message with given severity level (STATUS, FATAL\_ERROR)
+
+###### Macro [METAQUERYFILES][](filenames...) _#deprecated_ <a name="macro_METAQUERYFILES"></a>
+This macro does nothing and will be removed
+
+###### Macro [MOBILE\_TEST\_APK\_AAR\_AARS][](filenames...) _# internal_ <a name="macro_MOBILE_TEST_APK_AAR_AARS"></a>
+Not documented yet.
+
+###### Macro [MOBILE\_TEST\_APK\_AAR\_BUNDLES][](filenames...) _# internal_ <a name="macro_MOBILE_TEST_APK_AAR_BUNDLES"></a>
+Not documented yet.
+
+###### Macro [MOBILE\_TEST\_APK\_AAR\_MANIFEST][](file) _# internal_ <a name="macro_MOBILE_TEST_APK_AAR_MANIFEST"></a>
+Not documented yet.
+
+###### Macro [MOBILE\_TEST\_APK\_AAR\_PROGUARD\_RULES][](file) _# internal_ <a name="macro_MOBILE_TEST_APK_AAR_PROGUARD_RULES"></a>
+Not documented yet.
+
+###### Macro [MOBILE\_TEST\_APK\_TEMPLATE][](dir filenames...) _# internal_ <a name="macro_MOBILE_TEST_APK_TEMPLATE"></a>
+Not documented yet.
+
+###### Macro [MSVC\_FLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_MSVC_FLAGS"></a>
+Add the specified flags to the compilation line of C/C++files.
+Flags apply only if the compiler used is MSVC (cl.exe)
+
+###### Macro [MX\_FORMULAS][](BinFiles...) _# deprecated, matrixnet_ <a name="macro_MX_FORMULAS"></a>
+Create MatrixNet formulas archive
+
+###### Macro [NEED\_CHECK][]() <a name="macro_NEED_CHECK"></a>
+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\_REVIEW][]() _# deprecated_ <a name="macro_NEED_REVIEW"></a>
+Mark the project as needing review.
+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 [NGINX\_MODULES][](Modules...) <a name="macro_NGINX_MODULES"></a>
+Not documented yet.
+
+###### Macro [NODE\_MODULES][]() <a name="macro_NODE_MODULES"></a>
+Materializes `node\_modules.tar` bundle according to the module's lockfile.
+
+@see [NPM\_CONTRIBS()](#module\_NPM\_CONTRIBS)
+
+###### Macro [NO\_BUILD\_IF][](variables) _# builtin_ <a name="macro_NO_BUILD_IF"></a>
+Print warning if some variable is true
+
+###### Macro [NO\_CHECK\_IMPORTS][]([patterns]) <a name="macro_NO_CHECK_IMPORTS"></a>
+Do not run checks on imports of Python modules.
+Optional parameter mask patterns describes the names of the modules that do not need to check.
+
+###### Macro [NO\_CLANG\_COVERAGE][]() <a name="macro_NO_CLANG_COVERAGE"></a>
+Disable heavyweight clang coverage for the module
+
+###### Macro [NO\_CLANG\_TIDY][]() <a name="macro_NO_CLANG_TIDY"></a>
+Not documented yet.
+
+###### Macro [NO\_CODENAVIGATION][]() _# internal_ <a name="macro_NO_CODENAVIGATION"></a>
+Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support.
+Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+
+###### Macro [NO\_COMPILER\_WARNINGS][]() <a name="macro_NO_COMPILER_WARNINGS"></a>
+Disable all compiler warnings in the module.
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [NO\_CPU\_CHECK][]() <a name="macro_NO_CPU_CHECK"></a>
+Compile module without startup CPU features check
+
+###### Macro [NO\_CYTHON\_COVERAGE][]() <a name="macro_NO_CYTHON_COVERAGE"></a>
+Disable cython and cythonized python coverage (CYTHONIZE\_PY)
+Implies NO\_CLANG\_COVERAGE() - right now, we can't disable instrumentation for .py.cpp files, but enable for .cpp
+
+###### Macro [NO\_DEBUG\_INFO][]() <a name="macro_NO_DEBUG_INFO"></a>
+Compile files without debug info collection.
+
+###### Macro [NO\_DOCTESTS][]() <a name="macro_NO_DOCTESTS"></a>
+Disable doctests in PY[|3|23\_]TEST
+
+###### Macro [NO\_EXPORT\_DYNAMIC\_SYMBOLS][]() <a name="macro_NO_EXPORT_DYNAMIC_SYMBOLS"></a>
+Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM.
+
+###### Macro [NO\_EXTENDED\_SOURCE\_SEARCH][]() <a name="macro_NO_EXTENDED_SOURCE_SEARCH"></a>
+Prevent module using in extended python source search.
+Use the macro if module contains python2-only files (or other python sources which shouldn't be imported by python3 interpreter)
+which resides in the same directories with python 3 usefull code. contrib/python/future is a example.
+Anyway, preferred way is to move such files into separate dir and don't use this macro at all.
+
+Also see: https://docs.yandex-team.ru/ya-make/manual/python/vars#y\_python\_extended\_source\_search for details
+
+###### Macro [NO\_JOIN\_SRC][]() _# deprecated, does-nothing_ <a name="macro_NO_JOIN_SRC"></a>
+This macro currently does nothing. This is default behavior which cannot be overridden at module level.
+
+###### Macro [NO\_LIBC][]() <a name="macro_NO_LIBC"></a>
+Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata).
+Note: use this with care. libc most likely will be linked into executable anyway,
+so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_LINT][]() <a name="macro_NO_LINT"></a>
+Do not check for style files included in PY\_SRCS, TEST\_SRCS, JAVA\_SRCS.
+
+###### Macro [NO\_MYPY][]() <a name="macro_NO_MYPY"></a>
+Not documented yet.
+
+###### Macro [NO\_NEED\_CHECK][]() <a name="macro_NO_NEED_CHECK"></a>
+Commits to the project marked with this macro will not be affected by higher-level NEED\_CHECK macro.
+
+###### Macro [NO\_OPTIMIZE][]() <a name="macro_NO_OPTIMIZE"></a>
+Build code without any optimizations (-O0 mode).
+
+###### Macro [NO\_OPTIMIZE\_PY\_PROTOS][]() <a name="macro_NO_OPTIMIZE_PY_PROTOS"></a>
+Disable Python proto optimization using embedding corresponding C++ code into binary.
+Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+This is default mode only for some system libraries.
+
+###### Macro [NO\_PLATFORM][]() <a name="macro_NO_PLATFORM"></a>
+Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO\_PLATFORM variable for special processing.
+Note: use this with care. libc most likely will be linked into executable anyway,
+so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_PLATFORM\_RESOURCES][]() _# internal_ <a name="macro_NO_PLATFORM_RESOURCES"></a>
+Exclude dependency on platform resources libraries.
+Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+
+###### Macro [NO\_PYTHON\_COVERAGE][]() <a name="macro_NO_PYTHON_COVERAGE"></a>
+Disable python coverage for module
+
+###### Macro [NO\_PYTHON\_INCLUDES][]() _# internal_ <a name="macro_NO_PYTHON_INCLUDES"></a>
+Disable dependencies on libraries providing Python headers.
+This is only used in Python libraries themselves to avoid PEERDIR loops.
+
+###### Macro [NO\_RUNTIME][]() <a name="macro_NO_RUNTIME"></a>
+This macro:
+1. Sets the ENABLE(NOUTIL) + DISABLE(USE\_INTERNAL\_STL);
+2. If the project that contains the macro NO\_RUNTIME(), peerdir-it project does not contain NO\_RUNTIME() => Warning.
+Note: use this with care. Arcadia STL most likely will be linked into executable anyway, so using STL headers/functions/classes
+may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_SANITIZE][]() <a name="macro_NO_SANITIZE"></a>
+Disable all sanitizers for the module.
+
+###### Macro [NO\_SANITIZE\_COVERAGE][]() <a name="macro_NO_SANITIZE_COVERAGE"></a>
+Disable lightweight coverage (-fsanitize-coverage) for the module.
+
+###### Macro [NO\_SSE4][]() <a name="macro_NO_SSE4"></a>
+Compile module without SSE4
+
+###### Macro [NO\_UTIL][]() <a name="macro_NO_UTIL"></a>
+Build module without dependency on util.
+Note: use this with care. Util most likely will be linked into executable anyway,
+so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_WERROR][]() <a name="macro_NO_WERROR"></a>
+Override WERROR() behavior
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [NO\_WSHADOW][]() <a name="macro_NO_WSHADOW"></a>
+Disable C++ shadowing warnings.
+
+###### Macro [NVCC\_DEVICE\_LINK][](file.cu...) <a name="macro_NVCC_DEVICE_LINK"></a>
+Run nvcc --device-link on objects compiled from srcs with --device-c.
+This generates a stub object devlink.o that supplies missing pieces for the
+host linker to link relocatable device objects into the final executable.
+
+###### Macro [ONLY\_TAGS][](tags...) _# builtin_ <a name="macro_ONLY_TAGS"></a>
+Instantiate from multimodule only variants with tags listed
+
+###### Macro [OPENSOURCE\_EXPORT\_REPLACEMENT][](CMAKE PkgName CMAKE\_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE\_COMPONENT OptCmakePkgComponent) <a name="macro_OPENSOURCE_EXPORT_REPLACEMENT"></a>
+Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
+for opensource publication.
+
+###### Macro [OPTIMIZE\_PY\_PROTOS][]() _# internal_ <a name="macro_OPTIMIZE_PY_PROTOS"></a>
+Enable Python proto optimization by embedding corresponding C++ code into binary.
+Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+This is default mode for most PROTO\_LIBRARY's and PY2\_LIBRARY's, some system ones being exceptions.
+
+###### Macro [ORIGINAL\_SOURCE][](Source) <a name="macro_ORIGINAL_SOURCE"></a>
+This macro specifies the source repository for contrib
+Does nothing now (just a placeholder for future functionality)
+See https://st.yandex-team.ru/DTCC-316
+
+###### Macro [OWNER][](owners...) _# builtin_ <a name="macro_OWNER"></a>
+Add reviewers/responsibles of the code.
+In the OWNER macro you can use:
+1. login-s from staff.yandex-team.ru
+2. Review group (to specify the Code-review group need to use the prefix g:)
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [PACK][](archive\_type) <a name="macro_PACK"></a>
+When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz`
+
+Is not allowed other module types than PACKAGE().
+
+@see: [PACKAGE()](#module\_PACKAGE)
+
+###### Macro [PACKAGE\_STRICT][]() <a name="macro_PACKAGE_STRICT"></a>
+Not documented yet.
+
+###### Macro [PACK\_GLOBALS\_IN\_LIBRARY][]() <a name="macro_PACK_GLOBALS_IN_LIBRARY"></a>
+Not documented yet.
+
+###### Macro [PARTITIONED\_RECURSE][]([BALANCING\_CONFIG config] [LOCAL] dirs...) _# builtin_ <a name="macro_PARTITIONED_RECURSE"></a>
+Add directories to the build
+All projects must be reachable from the root chain RECURSE() for monorepo continuous integration functionality.
+Arguments are processed in chunks
+
+###### Macro [PARTITIONED\_RECURSE\_FOR\_TESTS][]([BALANCING\_CONFIG config] [LOCAL] dirs...) _# builtin_ <a name="macro_PARTITIONED_RECURSE_FOR_TESTS"></a>
+Add directories to the build if tests are demanded.
+Arguments are processed in chunks
+
+###### Macro [PARTITIONED\_RECURSE\_ROOT\_RELATIVE][]([BALANCING\_CONFIG config] dirlist) _# builtin_ <a name="macro_PARTITIONED_RECURSE_ROOT_RELATIVE"></a>
+In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA\_ROOT}).
+Arguments are processed in chunks
+
+###### Macro [PEERDIR][](dirs...) _# builtin_ <a name="macro_PEERDIR"></a>
+Specify project dependencies
+Indicates that the project depends on all of the projects from the list of dirs.
+Libraries from these directories will be collected and linked to the current target if the target is executable or sharedlib/dll.
+If the current target is a static library, the specified directories will not be built, but they will be linked to any executable target that will link the current library.
+@params:
+1. As arguments PEERDIR you can only use the LIBRARY directory (the directory with the PROGRAM/DLL and derived from them are prohibited to use as arguments PEERDIR).
+2. ADDINCL Keyword ADDINCL (written before the specified directory), adds the flag -I<path to library> the flags to compile the source code of the current project.
+Perhaps it may be removed in the future (in favor of a dedicated ADDINCL)
+
+###### Macro [PIRE\_INLINE][](FILES...) <a name="macro_PIRE_INLINE"></a>
+Not documented yet.
+
+###### Macro [PIRE\_INLINE\_CMD][](SRC) <a name="macro_PIRE_INLINE_CMD"></a>
+Not documented yet.
+
+###### Macro [PRIMARY\_OUTPUT][]\_VALUE(Output) _# internal_ <a name="macro_PRIMARY_OUTPUT"></a>
+The use of this module is strictly prohibited!!!
+
+###### Macro [PRINT\_MODULE\_TYPE][] <a name="macro_PRINT_MODULE_TYPE"></a>
+Not documented yet.
+
+###### Macro [PROCESS\_DOCS][] <a name="macro_PROCESS_DOCS"></a>
+Not documented yet.
+
+###### Macro PROGURAD\_RULES(ProguardRuleFiles...) <a name="macro_PROGUARD_RULES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [PROTO2FBS][](InputProto) <a name="macro_PROTO2FBS"></a>
+Produce flatbuf schema out of protobuf description.
+
+###### Macro [PROTO\_ADDINCL][]([GLOBAL] [WITH\_GEN] Path) <a name="macro_PROTO_ADDINCL"></a>
+This macro introduces proper ADDINCLs for .proto-files found in sources and
+.cpp/.h generated files, supplying them to appropriate commands and allowing
+proper dependency resolution at configure-time.
+
+Note: you normally shouldn't use this macro. ADDINCLs should be sent to user
+from dependency via PROTO\_NAMESPACE macro
+
+###### Macro [PROTO\_NAMESPACE][]([GLOBAL] [WITH\_GEN] Namespace) <a name="macro_PROTO_NAMESPACE"></a>
+Defines protobuf namespace (import/export path prefix) which should be used for imports and
+which defines output path for .proto generation.
+
+For proper importing and configure-time depenedency management it sets ADDINCLs
+for both .cpp headers includes and .proto imports. If .proto expected to be used outsed of the
+processing module use GLOBAL to send proper ADDINCLs to all (transitive) users. PEERDIR to
+PROTO\_LIBRARY with PROTO\_NAMESPACE(GLOBAL ) is enough at user side to correctly use the library.
+If generated .proto files are going to be used for building a module than use of WITH\_GEN
+parameter will add appropriate dir from the build root for .proto files search.
+
+###### Macro [PROVIDES][](Name...) <a name="macro_PROVIDES"></a>
+Specifies provided features. The names must be correct C identifiers.
+This prevents different libraries providing the same features to be linked into one program.
+
+###### Macro [PYTHON][](script\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...] [REQUIREMENTS reqs]) <a name="macro_PYTHON"></a>
+Run a python script with $(PYTHON)/python built from devtools/huge\_python.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- script\_path - Path to the script.
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files.
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+
+###### Macro [PYTHON2\_ADDINCL][]() <a name="macro_PYTHON2_ADDINCL"></a>
+This macro adds include path for Python headers (Python 2.x variant) without PEERDIR.
+This should be used in 2 cases only:
+- In PY2MODULE since it compiles into .so and uses external Python runtime;
+- In system Python libraries themselves since proper PEERDIR there may create a loop;
+In all other cases use USE\_PYTHON2 macro instead.
+
+Never use this macro in PY2\_PROGRAM, PY2\_LIBRARY and PY23\_LIBRARY: they have everything needed by default.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs
+
+###### Macro [PYTHON2\_MODULE][]() <a name="macro_PYTHON2_MODULE"></a>
+Use in PY\_ANY\_MODULE to set it up for Python 2.x.
+
+###### Macro [PYTHON3\_ADDINCL][]() <a name="macro_PYTHON3_ADDINCL"></a>
+This macro adds include path for Python headers (Python 3.x variant).
+This should be used in 2 cases only:
+- In PY2MODULE since it compiles into .so and uses external Python runtime;
+- In system Python libraries themselves since peerdir there may create a loop;
+In all other cases use USE\_PYTHON3() macro instead.
+
+Never use this macro in PY3\_PROGRAM and PY3\_LIBRARY and PY23\_LIBRARY: they have everything by default.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs
+
+###### Macro [PYTHON3\_MODULE][]() <a name="macro_PYTHON3_MODULE"></a>
+Use in PY\_ANY\_MODULE to set it up for Python 3.x.
+
+###### Macro [PYTHON\_PATH][](Path) <a name="macro_PYTHON_PATH"></a>
+Set path to Python that will be used to runs scripts in tests
+
+###### Macro [PY\_CONSTRUCTOR][](package.module[:func]) <a name="macro_PY_CONSTRUCTOR"></a>
+Specifies the module or function which will be started before python's main()
+init() is expected in the target module if no function is specified
+Can be considered as \_\_attribute\_\_((constructor)) for python
+
+###### Macro PY\_DOCTEST(Packages...) <a name="macro_PY_DOCTESTS"></a>
+Add to the test doctests for specified Python packages
+The packages should be part of a test (listed as sources of the test or its PEERDIRs).
+
+###### Macro [PY\_ENUMS\_SERIALIZATION][] <a name="macro_PY_ENUMS_SERIALIZATION"></a>
+Not documented yet.
+
+###### Macro [PY\_EXTRA\_LINT\_FILES][](files...) <a name="macro_PY_EXTRA_LINT_FILES"></a>
+Add extra Python files for linting. This macro allows adding
+Python files which has no .py extension.
+
+###### Macro [PY\_MAIN][](package.module[:func]) <a name="macro_PY_MAIN"></a>
+Specifies the module or function from which to start executing a python program
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain
+
+###### Macro [PY\_NAMESPACE][](prefix) <a name="macro_PY_NAMESPACE"></a>
+Sets default Python namespace for all python sources in the module.
+Especially suitable in PROTO\_LIBRARY where Python sources are generated and there is no PY\_SRCS to place NAMESPACE parameter.
+
+###### Macro [PY\_PROTOS\_FOR][](path/to/module) _#builtin, deprecated_ <a name="macro_PY_PROTOS_FOR"></a>
+Use PROTO\_LIBRARY() in order to have .proto compiled into Python.
+Generates pb2.py files out of .proto files and saves those into PACKAGE module
+
+###### Macro [PY\_PROTO\_PLUGIN][](Name Ext Tool DEPS <Dependencies>) <a name="macro_PY_PROTO_PLUGIN"></a>
+Define protoc plugin for python with given Name that emits extra output with provided Extension
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [PY\_PROTO\_PLUGIN2][](Name Ext1 Ext2 Tool DEPS <Dependencies>) <a name="macro_PY_PROTO_PLUGIN2"></a>
+Define protoc plugin for python with given Name that emits 2 extra outputs with provided Extensions
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [PY\_REGISTER][]([package.]module\_name) <a name="macro_PY_REGISTER"></a>
+Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter.
+All modules from the sources listed in PY\_SRCS() are registered automatically.
+To register the modules from the sources in the SRCS(), you need to use PY\_REGISTER().
+
+PY\_REGISTER(module\_name) initializes module globally via call to initmodule\_name()
+PY\_REGISTER(package.module\_name) initializes module in the specified package
+It renames its init function with CFLAGS(-Dinitmodule\_name=init7package11module\_name)
+or CFLAGS(-DPyInit\_module\_name=PyInit\_7package11module\_name)
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister
+
+###### Macro [PY\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_PY_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all Python build commands
+
+###### Macro [PY\_SRCS][]({| CYTHON\_C} { | TOP\_LEVEL | NAMESPACE ns} Files...) <a name="macro_PY_SRCS"></a>
+Build specified Python sources according to Arcadia binary Python build. Basically creates precompiled and source resources keyed with module paths.
+The resources eventually are linked into final program and can be accessed as regular Python modules.
+This custom loader linked into the program will add them to sys.meta\_path.
+
+PY\_SRCS also support .proto, .ev, .pyx and .swg files. The .proto and .ev are compiled to .py-code by protoc and than handled as usual .py files.
+.pyx and .swg lead to C/C++ Python extensions generation, that are automatically registered in Python as built-in modules.
+
+By default .pyx files are built as C++-extensions. Use CYTHON\_C to build them as C (similar to BUILDWITH\_CYTHON\_C, but with the ability to specify namespace).
+
+\_\_init\_\_.py never required, but if present (and specified in PY\_SRCS), it will be imported when you import package modules with \_\_init\_\_.py Oh.
+
+@example
+
+ PY2_LIBRARY(mymodule)
+ PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
+ END()
+
+PY\_SRCS honors Python2 and Python3 differences and adjusts itself to Python version of a current module.
+PY\_SRCS can be used in any Arcadia Python build modules like PY\*\_LIBRARY, PY\*\_PROGRAM, PY\*TEST.
+PY\_SRCS in LIBRARY or PROGRAM effectively converts these into PY2\_LIBRARY and PY2\_PROGRAM respectively.
+It is strongly advised to make this conversion explicit. Never use PY\_SRCS in a LIBRARY if you plan to use it from external Python extension module.
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
+
+###### Macro [PY\_SSQLS\_SRCS][](Srcs...) <a name="macro_PY_SSQLS_SRCS"></a>
+Not documented yet.
+
+###### Macro [REAL\_LINK\_DYN\_LIB\_IMPL][] <a name="macro_REAL_LINK_DYN_LIB_IMPL"></a>
+$usage: REAL\_LINK\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL][] <a name="macro_REAL_LINK_EXEC_DYN_LIB_IMPL"></a>
+$usage: REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [REAL\_LINK\_EXE\_IMPL][] <a name="macro_REAL_LINK_EXE_IMPL"></a>
+$usage: REAL\_LINK\_EXE\_IMPL(peers...) # internal
+
+###### Macro [RECURSE][]([LOCAL] dirs...) _# builtin_ <a name="macro_RECURSE"></a>
+Add directories to the build
+All projects must be reachable from the root chain RECURSE() for monorepo continuous integration functionality
+
+###### Macro [RECURSE\_FOR\_TESTS][]([LOCAL] dirs...) _# builtin_ <a name="macro_RECURSE_FOR_TESTS"></a>
+Add directories to the build if tests are demanded.
+Use --force-build-depends flag if you want to build testing modules without tests running
+
+###### Macro [RECURSE\_ROOT\_RELATIVE][](dirlist) _# builtin_ <a name="macro_RECURSE_ROOT_RELATIVE"></a>
+In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA\_ROOT})
+
+###### Macro [REGISTER\_SANDBOX\_IMPORT][] <a name="macro_REGISTER_SANDBOX_IMPORT"></a>
+Not documented yet.
+
+###### Macro [REGISTER\_YQL\_PYTHON\_UDF][] <a name="macro_REGISTER_YQL_PYTHON_UDF"></a>
+Not documented yet.
+
+###### Macro [REQUIREMENTS][]([cpu:<count>] [disk\_usage:<size>] [ram:<size>] [ram\_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64]) <a name="macro_REQUIREMENTS"></a>
+Allows you to specify the requirements of the test.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [REQUIRES][](dirs...) <a name="macro_REQUIRES"></a>
+Specify list of dirs which this module must depend on indirectly.
+
+This macro can be used if module depends on the directories specified but they can't be listed
+as direct PEERDIR dependencies (due to public include order or link order issues).
+
+###### Macro [RESOLVE\_PROTO][]() <a name="macro_RESOLVE_PROTO"></a>
+Enable include resolving within UNIONs and let system .proto being resolved
+among .proto/.gztproto imports
+
+Note: it is currently impossible to enbale resolving only for .proto, so resolving is enabled for all supported files
+also we only add ADDINCL for stock protobuf. So use this macro with care: it may cause resolving problems those are
+to be addressed by either ADDINCLs or marking them as TEXT. Please contact devtools for details.
+
+###### Macro [RESOURCE][]([FORCE\_TEXT ][Src Key]\* [- Key=Value]\*) _# built-in_ <a name="macro_RESOURCE"></a>
+Add data (resources, random files, strings) to the program)
+The common usage is to place Src file into binary. The Key is used to access it using library/cpp/resource or library/python/resource.
+Alternative syntax with '- Key=Value' allows placing Value string as resource data into binary and make it accessible by Key.
+
+This is a simpler but less flexible option than ARCHIVE(), because in the case of ARCHIVE(), you have to use the data explicitly,
+and in the case of RESOURCE(), the data will fall through SRCS() or SRCS(GLOBAL) to binary linking.
+
+Use the FORCE\_TEXT parameter to explicitly mark all Src files as text files: they will not be parsed unless used elsewhere.
+
+@example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a2ispolzujjtekomanduresource
+
+@example:
+
+ LIBRARY()
+ OWNER(user1)
+
+ RESOURCE(
+ path/to/file1 /key/in/program/1
+ path/to/file2 /key2
+ )
+ END()
+
+###### Macro [RESOURCE\_FILES][]([DONT\_PARSE] [PREFIX {prefix}] [STRIP prefix\_to\_strip] {path}) <a name="macro_RESOURCE_FILES"></a>
+This macro expands into
+RESOURCE([DONT\_PARSE] {path} resfs/file/{prefix}{path}
+ - resfs/src/resfs/file/{prefix}{remove\_prefix(path, prefix\_to\_strip)}={rootrel\_arc\_src(path)}
+)
+
+resfs/src/{key} stores a source root (or build root) relative path of the
+source of the value of the {key} resource.
+
+resfs/file/{key} stores any value whose source was a file on a filesystem.
+resfs/src/resfs/file/{key} must store its path.
+
+DONT\_PARSE disables parsing for source code files (determined by extension)
+ Please don't abuse: use separate DONT\_PARSE macro call only for files subject to parsing
+
+This form is for use from other plugins:
+RESOURCE\_FILES([DEST {dest}] {path}) expands into RESOURCE({path} resfs/file/{dest})
+
+@see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/
+
+###### Macro [RESTRICT\_LICENSES][](ALLOW\_ONLY|DENY LicenseProperty...) <a name="macro_RESTRICT_LICENSES"></a>
+Restrict licenses of direct and indirect module dependencies.
+
+ALLOW\_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions
+list.
+
+DENY restriction type forbids dependency on module with no license without any listed propery from the list.
+
+Note: Can be used multiple times on the same module all specified constraints will be checked.
+All macro invocation for the same module must use same constraints type (DENY or ALLOW\_ONLY)
+
+###### Macro [RESTRICT\_PATH][] <a name="macro_RESTRICT_PATH"></a>
+Not documented yet.
+
+###### Macro [RUN][] <a name="macro_RUN"></a>
+Not documented yet.
+
+###### Macro [RUN\_ANTLR][](Args...) <a name="macro_RUN_ANTLR"></a>
+Macro to invoke ANTLR3 generator (general case)
+
+###### Macro [RUN\_ANTLR4][](Args...) <a name="macro_RUN_ANTLR4"></a>
+Macro to invoke ANTLR4 generator (general case)
+
+###### Macro [RUN\_ANTLR4\_CPP][](GRAMMAR, OUTPUT\_INCLUDES, LISTENER, VISITOR, Args...) <a name="macro_RUN_ANTLR4_CPP"></a>
+Macro to invoke ANTLR4 generator (Cpp)
+
+###### Macro [RUN\_ANTLR4\_GO][](GRAMMAR, OUTPUT\_INCLUDES, LISTENER, VISITOR, Args...) <a name="macro_RUN_ANTLR4_GO"></a>
+Macro to invoke ANTLR4 generator (Go)
+
+###### Macro [RUN\_JAVA\_PROGRAM][](Args...) <a name="macro_RUN_JAVA_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [RUN\_PROGRAM][](tool\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...] [REQUIREMENTS reqs]) <a name="macro_RUN_PROGRAM"></a>
+Run a program from arcadia.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- tool\_path - Path to the directory of the tool.
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows).
+
+###### Macro [RUN\_PYTHON][](Args...) <a name="macro_RUN_PYTHON"></a>
+Version of RUN() macro to invoke Python scripts
+@see: [RUN()](#macro\_RUN)
+
+###### Macro [SDBUS\_CPP\_ADAPTOR][](File) <a name="macro_SDBUS_CPP_ADAPTOR"></a>
+Not documented yet.
+
+###### Macro [SDBUS\_CPP\_PROXY][](File) <a name="macro_SDBUS_CPP_PROXY"></a>
+Not documented yet.
+
+###### Macro [SECONDARY\_OUTPUT][](filename) _# internal_ <a name="macro_SECONDARY_OUTPUT"></a>
+The use of this macro is strictly prohibited!!!
+
+###### Macro [SET][](varname value) _#builtin_ <a name="macro_SET"></a>
+Sets varname to value
+
+###### Macro [SETUP\_EXECTEST][] <a name="macro_SETUP_EXECTEST"></a>
+Not documented yet.
+
+###### Macro [SETUP\_PYTEST\_BIN][] <a name="macro_SETUP_PYTEST_BIN"></a>
+Not documented yet.
+
+###### Macro [SETUP\_RUN\_PYTHON][] <a name="macro_SETUP_RUN_PYTHON"></a>
+Not documented yet.
+
+###### Macro [SET\_APPEND][](varname appendvalue) _#builtin_ <a name="macro_SET_APPEND"></a>
+Appends appendvalue to varname's value using space as a separator
+
+###### Macro [SET\_APPEND\_WITH\_GLOBAL][](varname appendvalue) _#builtin_ <a name="macro_SET_APPEND_WITH_GLOBAL"></a>
+Appends appendvalue to varname's value using space as a separator.
+New value is propagated to dependants
+
+###### Macro [SET\_COMPILE\_OUTPUTS\_MODIFIERS][](NOREL?";norel":"") <a name="macro_SET_COMPILE_OUTPUTS_MODIFIERS"></a>
+Not documented yet.
+
+###### Macro [SIZE][](SMALL/MEDIUM/LARGE) <a name="macro_SIZE"></a>
+Set the 'size' for the test. Each 'size' has own set of resrtictions, SMALL bein the most restricted and LARGE being the list.
+See documentation on test system for more details.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [SKIP\_TEST][](Reason) <a name="macro_SKIP_TEST"></a>
+Skip the suite defined by test module. Provide a reason to be output in test execution report.
+
+###### Macro [SOURCE\_GROUP][](...) _#builtin, deprecated_ <a name="macro_SOURCE_GROUP"></a>
+Ignored
+
+###### Macro [SPLIT\_CODEGEN][](tool prefix opts... [OUT\_NUM num] [OUTPUT\_INCLUDES output\_includes...]) <a name="macro_SPLIT_CODEGEN"></a>
+Generator of a certain number of parts of the .cpp file + one header .h file from .in
+
+Supports keywords:
+1. OUT\_NUM <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)>
+2. OUTPUT\_INCLUDES <path to files that will be included in generalnyj of macro files>
+
+###### Macro [SPLIT\_DWARF][]() <a name="macro_SPLIT_DWARF"></a>
+Emit debug info for the PROGRAM/DLL as a separate file <module\_name>.debug.
+NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
+
+###### Macro [SPLIT\_FACTOR][](x) <a name="macro_SPLIT_FACTOR"></a>
+Sets the number of chunks for parallel run tests when used in test module with FORK\_TESTS() or FORK\_SUBTESTS().
+If none of those is specified this macro implies FORK\_TESTS().
+
+Supports C++ ut and PyTest.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [SRC][](File Flags...) <a name="macro_SRC"></a>
+Compile single file with extra Flags.
+Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
+
+###### Macro [SRCDIR][](dirlist) _# builtin_ <a name="macro_SRCDIR"></a>
+Add the specified directories to the list of those in which the source files will be searched
+Available only for arcadia/contrib
+
+###### Macro [SRCS][](<[GLOBAL] File> ...) <a name="macro_SRCS"></a>
+Source files of the project. Files are built according to their extension and put int module output or fed to ultimate PROGRAM/DLL depending on GLOBAL presence.
+Arcadia Paths from the root and is relative to the project's LIST are supported
+
+GLOBAL marks next file as direct input to link phase of the program/shared library project built into. This prevents symbols of the file to be excluded by linker as unused.
+The scope of the GLOBAL keyword is the following file (that is, in the case of SRCS(GLOBAL foo.cpp bar.cpp) global will be only foo.cpp)
+
+@example:
+
+ LIBRARY(test_global)
+ SRCS(GLOBAL foo.cpp)
+ END()
+
+This will produce foo.o and feed it to any PROGRAM/DLL module transitively depending on test\_global library. The library itself will be empty and won't produce .a file.
+
+###### Macro [SRC\_CPP\_AVX][](File Flags...) <a name="macro_SRC_CPP_AVX"></a>
+Compile single .cpp-file with AVX and extra Flags.
+
+###### Macro [SRC\_CPP\_AVX2][](File Flags...) <a name="macro_SRC_CPP_AVX2"></a>
+Compile single .cpp-file with AVX2 and extra Flags.
+
+###### Macro [SRC\_CPP\_PIC][](File Flags...) <a name="macro_SRC_CPP_PIC"></a>
+Compile single .c-file with -fPIC and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE2][](File Flags...) <a name="macro_SRC_CPP_SSE2"></a>
+Compile single .cpp-file with SSE2 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE3][](File Flags...) <a name="macro_SRC_CPP_SSE3"></a>
+Compile single .cpp-file with SSE3 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE4][](File Flags...) <a name="macro_SRC_CPP_SSE4"></a>
+Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE41][](File Flags...) <a name="macro_SRC_CPP_SSE41"></a>
+Compile single .cpp-file with SSE4.1 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSSE3][](File Flags...) <a name="macro_SRC_CPP_SSSE3"></a>
+Compile single .cpp-file with SSSE3 and extra Flags.
+
+###### Macro [SRC\_C\_AVX][](File Flags...) <a name="macro_SRC_C_AVX"></a>
+Compile single .c-file with AVX and extra Flags.
+
+###### Macro [SRC\_C\_AVX2][](File Flags...) <a name="macro_SRC_C_AVX2"></a>
+Compile single .c-file with AVX2 and extra Flags.
+
+###### Macro [SRC\_C\_SSE2][](File Flags...) <a name="macro_SRC_C_SSE2"></a>
+Compile single .c-file with SSE2 and extra Flags.
+
+###### Macro [SRC\_C\_SSE3][](File Flags...) <a name="macro_SRC_C_SSE3"></a>
+Compile single .c-file with SSE3 and extra Flags.
+
+###### Macro [SRC\_C\_SSE4][](File Flags...) <a name="macro_SRC_C_SSE4"></a>
+Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+
+###### Macro [SRC\_C\_SSE41][](File Flags...) <a name="macro_SRC_C_SSE41"></a>
+Compile single .c-file with SSE4.1 and extra Flags.
+
+###### Macro [SRC\_C\_SSSE3][](File Flags...) <a name="macro_SRC_C_SSSE3"></a>
+Compile single .c-file with SSSE3 and extra Flags.
+
+###### Macro [SRC\_RESOURCE][](Id) <a name="macro_SRC_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [STRIP][]() <a name="macro_STRIP"></a>
+Strip debug info from a PROGRAM, DLL or TEST.
+This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
+
+###### Macro [STRUCT\_CODEGEN][](Prefix) <a name="macro_STRUCT_CODEGEN"></a>
+A special case BASE\_CODEGEN, in which the kernel/struct\_codegen/codegen\_tool tool is used.
+
+###### Macro [STYLE][](Globs...) <a name="macro_STYLE"></a>
+Not documented yet.
+
+###### Macro [SUBSCRIBER][](subscribers...) _# builtin_ <a name="macro_SUBSCRIBER"></a>
+Add observers of the code.
+In the SUBSCRIBER macro you can use:
+1. login-s from staff.yandex-team.ru
+2. Review group (to specify the Code-review group need to use the prefix g:)
+
+Note: current behavior of SUBSCRIBER is almost the same as OWNER. The are only 2 differences: SUBSCRIBER is not mandatory and it may be separately processed by external tools
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [SUPPRESSIONS][] <a name="macro_SUPPRESSIONS"></a>
+SUPPRESSIONS() - allows to specify files with suppression notation which will be used by
+address, leak or thread sanitizer runtime by default.
+Use asan.supp filename for address sanitizer, lsan.supp for leak sanitizer
+and tsan.supp for thread sanitizer suppressions respectively.
+See https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-memory-leaks
+for details.
+
+###### Macro [SYMLINK][](from to) <a name="macro_SYMLINK"></a>
+Add symlink
+
+###### Macro [SYSTEM\_PROPERTIES][]([<Key Value>...] [<File Path>...]) <a name="macro_SYSTEM_PROPERTIES"></a>
+List of Key,Value pairs that will be available to test via System.getProperty().
+FILE means that parst should be read from file specifies as Path.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [TAG][] ([tag...]) <a name="macro_TAG"></a>
+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
+
+###### Macro [TASKLET][]() <a name="macro_TASKLET"></a>
+Not documented yet.
+
+###### Macro [TASKLET\_REG][](Name, Lang, Impl, Includes...) <a name="macro_TASKLET_REG"></a>
+Not documented yet.
+
+###### Macro [TASKLET\_REG\_EXT][](Name, Lang, Impl, Wrapper, Includes...) <a name="macro_TASKLET_REG_EXT"></a>
+Not documented yet.
+
+###### Macro [TEST\_CWD][](path) <a name="macro_TEST_CWD"></a>
+Defines working directory for test runs. Othen used in conjunction with DATA() macro.
+Is only used inside of the TEST modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [TEST\_DATA][] <a name="macro_TEST_DATA"></a>
+Not documented yet.
+
+###### Macro [TEST\_JAVA\_CLASSPATH\_CMD\_TYPE][](Type) <a name="macro_TEST_JAVA_CLASSPATH_CMD_TYPE"></a>
+Availible types: MANIFEST(default), COMMAND\_FILE, LIST
+Method for passing a classpath value to a java command line
+MANIFEST via empty jar file with manifest that cantains Class-Path attribute
+COMMAND\_FILE via @command\_file
+LIST via flat args
+
+###### Macro [TEST\_SRCS][](Files...) <a name="macro_TEST_SRCS"></a>
+In PY2TEST, PY3TEST and PY\*\_LIBRARY modules used as PY\_SRCS macro and additionally used to mine test cases to be executed by testing framework.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+
+###### Macro [TIMEOUT][](TIMEOUT) <a name="macro_TIMEOUT"></a>
+Sets a timeout on test execution
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [TOUCH][](Outputs...) _# internal_ <a name="macro_TOUCH"></a>
+Just introduce outputs
+
+###### Macro [UBERJAR][]() <a name="macro_UBERJAR"></a>
+UBERJAR is a single all-in-one jar-archive that includes all its Java dependencies (reachable PEERDIR).
+It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin).
+Use UBERJAR inside JAVA\_PROGRAM module.
+
+You can use the following macros to configure the archive:
+1. UBERJAR\_HIDING\_PREFIX prefix for classes to shade (classes remain in their packages by default)
+2. UBERJAR\_HIDE\_EXCLUDE\_PATTERN exclude classes matching this patterns from shading (if enabled).
+3. UBERJAR\_PATH\_EXCLUDE\_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default)
+4. UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN add ManifestResourceTransformer class to uberjar processing and specify main-class
+5. UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE add ManifestResourceTransformer class to uberjar processing and specify some attribute
+6. UBERJAR\_APPENDING\_TRANSFORMER add AppendingTransformer class to uberjar processing
+7. UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER add ServicesResourceTransformer class to uberjar processing
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+@see: [JAVA\_PROGRAM](#module\_JAVA\_PROGRAM), [UBERJAR\_HIDING\_PREFIX](#macro\_UBERJAR\_HIDING\_PREFIX), [UBERJAR\_HIDE\_EXCLUDE\_PATTERN](#macro\_UBERJAR\_HIDE\_EXCLUDE\_PATTERN), [UBERJAR\_PATH\_EXCLUDE\_PREFIX](#macro\_UBERJAR\_PATH\_EXCLUDE\_PREFIX)
+
+###### Macro [UBERJAR\_APPENDING\_TRANSFORMER][](Resource) <a name="macro_UBERJAR_APPENDING_TRANSFORMER"></a>
+Add AppendingTransformer for UBERJAR() java programs
+
+Parameters:
+- Resource - Resource name
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_HIDE\_EXCLUDE\_PATTERN][](Args...) <a name="macro_UBERJAR_HIDE_EXCLUDE_PATTERN"></a>
+Exculude classes matching this patterns from shading (if enabled).
+Pattern may contain '\*' and '\*\*' globs.
+Shading is enabled for UBERJAR program using UBERJAR\_HIDING\_PREFIX macro. If this macro is not specified all classes are shaded.
+
+@see: [UBERJAR](#macro\_UBERJAR), [UBERJAR\_HIDING\_PREFIX](#macro\_UBERJAR\_HIDING\_PREFIX)
+
+###### Macro [UBERJAR\_HIDING\_PREFIX][](Arg) <a name="macro_UBERJAR_HIDING_PREFIX"></a>
+Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg.
+Classes remain in their packages by default.
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE][](Key, Value) <a name="macro_UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE"></a>
+Transform manifest.mf for UBERJAR() java programs, set attribute
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN][](Main) <a name="macro_UBERJAR_MANIFEST_TRANSFORMER_MAIN"></a>
+Transform manifest.mf for UBERJAR() java programs, set main-class attribute
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_PATH\_EXCLUDE\_PREFIX][](Args...) <a name="macro_UBERJAR_PATH_EXCLUDE_PREFIX"></a>
+Exculude classes matching this patterns from UBERJAR.
+By default all dependencies of UBERJAR program will lend in a .jar archive.
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER][]() <a name="macro_UBERJAR_SERVICES_RESOURCE_TRANSFORMER"></a>
+Add ServicesResourceTransformer for UBERJAR() java programs
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UDF\_NO\_PROBE][]() <a name="macro_UDF_NO_PROBE"></a>
+Disable UDF import check at build stage
+
+###### Macro [UPDATE\_VCS\_JAVA\_INFO\_NODEP][](Jar) <a name="macro_UPDATE_VCS_JAVA_INFO_NODEP"></a>
+Not documented yet.
+
+###### Macro [USE\_COMMON\_GOOGLE\_APIS][](APIS...) <a name="macro_USE_COMMON_GOOGLE_APIS"></a>
+Not documented yet.
+
+###### Macro [USE\_CXX][]() <a name="macro_USE_CXX"></a>
+Add dependency on C++ runtime
+Note: This macro is inteneded for use in \_GO\_BASE\_UNIT like module when the module is built without C++ runtime by default
+
+###### Macro [USE\_ERROR\_PRONE][]() <a name="macro_USE_ERROR_PRONE"></a>
+Use errorprone instead of javac for .java compilation.
+
+###### Macro [USE\_EXT\_PROTO][](peerdir\_tag...) <a name="macro_USE_EXT_PROTO"></a>
+Configure module to use proto files from existing PROTO\_LIBRARY module.
+Additional PEERDIR tags required to build a module can be passed through
+EXTRA\_TAGS vararg parameter.
+
+###### Macro [USE\_JAVALITE][]() <a name="macro_USE_JAVALITE"></a>
+Use protobuf-javalite for Java
+
+###### Macro [USE\_LINKER\_BFD][]() <a name="macro_USE_LINKER_BFD"></a>
+Use bfd linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_LINKER\_GOLD][]() <a name="macro_USE_LINKER_GOLD"></a>
+Use gold linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_LINKER\_LLD][]() <a name="macro_USE_LINKER_LLD"></a>
+Use lld linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_PERL\_514\_LIB][]() <a name="macro_USE_PERL_514_LIB"></a>
+Add dependency on Perl 5.14 to your LIBRARY
+
+###### Macro [USE\_PERL\_LIB][]() <a name="macro_USE_PERL_LIB"></a>
+Add dependency on Perl to your LIBRARY
+
+###### Macro [USE\_PLANTUML][]() <a name="macro_USE_PLANTUML"></a>
+Use PlantUML plug-in for yfm builder to render UML diagrams into documentation
+
+###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a>
+This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible.
+Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+
+If you'd like to use #include <Python.h> with Python2 specify USE\_PYTHON2 or better make it PY2\_LIBRARY.
+If you'd like to use #include <Python.h> with Python3 specify USE\_PYTHON3 or better make it PY3\_LIBRARY.
+If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23\_LIBRARY.
+
+@see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY)
+
+###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a>
+This adds Python3 library to your LIBRARY and makes it Python3-compatible.
+Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+
+If you'd like to use #include <Python.h> with Python3 specify USE\_PYTHON3 or better make it PY3\_LIBRARY.
+If you'd like to use #include <Python.h> with Python2 specify USE\_PYTHON2 or better make it PY2\_LIBRARY.
+If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23\_LIBRARY.
+
+@see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY)
+
+###### Macro [USE\_RECIPE][](path [arg1 arg2...]) <a name="macro_USE_RECIPE"></a>
+Provides prepared environment via recipe for test.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
+
+###### Macro [USE\_SKIFF][]() _#wip, do not use_ <a name="macro_USE_SKIFF"></a>
+Use mapreduce/yt/skiff\_proto/plugin for C++
+
+###### Macro [USE\_UTIL][]() <a name="macro_USE_UTIL"></a>
+Add dependency on util and C++ runtime
+Note: This macro is intended for use in \_GO\_BASE\_UNIT like module when the module is build without util by default
+
+###### Macro [VALIDATE\_DATA\_RESTART][](ext) <a name="macro_VALIDATE_DATA_RESTART"></a>
+Change uid for resource validation tests. May be useful when sandbox resource ttl is changed, but test status is cached in CI.
+You can change ext to change test's uid. For example VALIDATE\_DATA\_RESTART(X), where is X is current revision.
+
+###### Macro [VERSION][](Args...) <a name="macro_VERSION"></a>
+Specify version of a module. Currently unused by build system, only informative.
+
+###### Macro [VISIBILITY][](level) <a name="macro_VISIBILITY"></a>
+This macro sets visibility level for symbols compiled for the current module. 'level'
+may take only one of the following values: DEFAULT, HIDDEN.
+
+###### Macro [WERROR][]() <a name="macro_WERROR"></a>
+Consider warnings as errors in the current module.
+In the bright future will be removed, since WERROR is the default.
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [WHOLE\_ARCHIVE][](dirnames...) _# internal_ <a name="macro_WHOLE_ARCHIVE"></a>
+Not documented yet.
+
+###### Macro [WINDOWS\_MANIFEST][](Manifest) <a name="macro_WINDOWS_MANIFEST"></a>
+Not documented yet.
+
+###### Macro [WITHOUT\_LICENSE\_TEXTS][]() <a name="macro_WITHOUT_LICENSE_TEXTS"></a>
+This macro indicates that the module has no license text
+
+###### Macro [WITH\_DYNAMIC\_LIBS][] <a name="macro_WITH_DYNAMIC_LIBS"></a>
+$usage: WITH\_DYNAMIC\_LIBS() # restricted
+
+Include dynamic libraries as extra PROGRAM/DLL outputs
+
+###### Macro [WITH\_GROOVY][]() <a name="macro_WITH_GROOVY"></a>
+Compile groovy source code in this java module
+
+###### Macro [WITH\_JDK][]() <a name="macro_WITH_JDK"></a>
+Add directory with JDK to JAVA\_PROGRAM output
+
+###### Macro [WITH\_KOTLIN][]() <a name="macro_WITH_KOTLIN"></a>
+Compile kotlin source code in this java module
+
+###### Macro [WITH\_KOTLINC\_ALLOPEN][](-flags) <a name="macro_WITH_KOTLINC_ALLOPEN"></a>
+Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html
+
+###### Macro [WITH\_KOTLINC\_NOARG][](-flags) <a name="macro_WITH_KOTLINC_NOARG"></a>
+Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html
+
+###### Macro [XS\_PROTO][](InputProto Dir Outputs...) _# deprecated_ <a name="macro_XS_PROTO"></a>
+Generate Perl code from protobuf.
+In order to use this macro one should predict all outputs protoc will emit from input\_proto file and enlist those as outputs.
+
+###### Macro [YABS\_GENERATE\_CONF][] <a name="macro_YABS_GENERATE_CONF"></a>
+Not documented yet.
+
+###### Macro [YABS\_GENERATE\_PHANTOM\_CONF\_PATCH][] <a name="macro_YABS_GENERATE_PHANTOM_CONF_PATCH"></a>
+Not documented yet.
+
+###### Macro [YABS\_GENERATE\_PHANTOM\_CONF\_TEST\_CHECK][] <a name="macro_YABS_GENERATE_PHANTOM_CONF_TEST_CHECK"></a>
+Not documented yet.
+
+###### Macro [YDL\_DESC\_USE\_BINARY][]() <a name="macro_YDL_DESC_USE_BINARY"></a>
+Used in conjunction with BUILD\_YDL\_DESC. When enabled, all generated descriptors are binary.
+
+@example:
+
+ PACKAGE()
+ YDL_DESC_USE_BINARY()
+ BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+ END()
+
+This will generate descriptor Event.ydld in a binary format.
+
+###### Macro [YMAPS\_SPROTO][](ProtoFiles...) _# maps-specific_ <a name="macro_YMAPS_SPROTO"></a>
+Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
+
+###### Macro [YP\_PROTO\_YSON][](Files... OUT\_OPTS Opts...) <a name="macro_YP_PROTO_YSON"></a>
+Genereate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
+
+###### Macro [YQL\_ABI\_VERSION][](major minor release)) <a name="macro_YQL_ABI_VERSION"></a>
+Specifying the supported ABI for YQL\_UDF.
+
+@see: [YQL\_UDF()](#multimodule\_YQL\_UDF)
+
+###### Macro [YQL\_LAST\_ABI\_VERSION][]() <a name="macro_YQL_LAST_ABI_VERSION"></a>
+Use the last ABI for YQL\_UDF
+
+###### Macro [YT\_SPEC][](path1 [path2...]) <a name="macro_YT_SPEC"></a>
+Allows you to specify json-files with YT task and operation specs,
+which will be used to run test node in the YT.
+Test must be marked with ya:yt tag.
+Files must be relative to the root of Arcadia.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [\_AAR\_CMD\_IMPL][](EXTRA\_INPUTS...) _#internal_ <a name="macro__AAR_CMD_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_CLASSPATH\_CLASH\_CHECK][] _#internal_ <a name="macro__ADD_CLASSPATH_CLASH_CHECK"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_CPP\_PROTO\_OUT][](Suf) _#internal_ <a name="macro__ADD_CPP_PROTO_OUT"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_GEN\_JAVA\_SCRIPT][](Out, Template, Props...) _#internal_ <a name="macro__ADD_GEN_JAVA_SCRIPT"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_HIDDEN\_INPUTS][](Inputs...) _#internal_ <a name="macro__ADD_HIDDEN_INPUTS"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_JAVA\_STYLE\_CHECKS][] _#internal_ <a name="macro__ADD_JAVA_STYLE_CHECKS"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_PY\_PROTO\_OUT][](Suf) _#internal_ <a name="macro__ADD_PY_PROTO_OUT"></a>
+Not documented yet.
+
+###### Macro [\_ADD\_YQL\_UDF\_DEPS][]() _#internal_ <a name="macro__ADD_YQL_UDF_DEPS"></a>
+Add all needed PEERDIRs to a YQL\_UDF.
+
+https://yql.yandex-team.ru/docs/yt/udf/cpp/
+
+###### Macro [\_ALL\_PY\_SRCS2][](TOP\_LEVEL?"TOP\_LEVEL":"", RECURSIVE?"/\*\*":"", NAMESPACE[], REST[]) _#internal_ <a name="macro__ALL_PY_SRCS2"></a>
+Not documented yet.
+
+###### Macro [\_ARCADIA\_PYTHON3\_ADDINCL][]() _# internal_ <a name="macro__ARCADIA_PYTHON3_ADDINCL"></a>
+This macro sets up Python3 headers for modules with Arcadia python (e.g. PY3\_LIBRARY) and configures module as Python 3.x.
+
+###### Macro [\_ARCADIA\_PYTHON\_ADDINCL][]() _# internal_ <a name="macro__ARCADIA_PYTHON_ADDINCL"></a>
+This macro sets up Python headers for modules with Arcadia python (e.g. PY2\_LIBRARY) and configures module as Python 2.x.
+
+###### Macro [\_BARE\_LINK\_MODULE][]() _# internal_ <a name="macro__BARE_LINK_MODULE"></a>
+Remove unwanted dependencies for "empty" link module
+
+###### Macro [\_BARE\_MODULE][]() _# internal_ <a name="macro__BARE_MODULE"></a>
+Remove unwanted dependencies for "empty" library module
+
+###### Macro [\_BUILDWITH\_CYTHON\_CPP\_DEP][](Src Dep Options...) _# internal_ <a name="macro__BUILDWITH_CYTHON_CPP_DEP"></a>
+Generates .cpp file from .pyx and attach extra input Dep.
+If Dep changes the .cpp file will be re-generated.
+
+###### Macro [\_BUILDWITH\_CYTHON\_C\_API\_H][](Src Dep Options...) _# internal_ <a name="macro__BUILDWITH_CYTHON_C_API_H"></a>
+BUILDWITH\_CYTHON\_C\_H with cdef api \_api.h file.
+
+###### Macro [\_BUILDWITH\_CYTHON\_C\_DEP][](Src Dep Options...) _# internal_ <a name="macro__BUILDWITH_CYTHON_C_DEP"></a>
+Generates .c file from .pyx and attach extra input Dep.
+If Dep changes the .c file will be re-generated.
+
+###### Macro [\_BUILDWITH\_CYTHON\_C\_H][](Src Dep Options...) _# internal_ <a name="macro__BUILDWITH_CYTHON_C_H"></a>
+BUILDWITH\_CYTHON\_C without .pyx infix and with cdef public .h file.
+
+###### Macro [\_BUILD\_MNS\_CPP][](NAME="", CHECK?, RANKING\_SUFFIX="", Files...) _#internal_ <a name="macro__BUILD_MNS_CPP"></a>
+Not documented yet.
+
+###### Macro [\_BUILD\_MNS\_FILE][](Input, Name, Output, Suffix, Check, Fml\_tool, AsmDataName) _#internal_ <a name="macro__BUILD_MNS_FILE"></a>
+Not documented yet.
+
+###### Macro [\_BUILD\_MNS\_FILES][] _#internal_ <a name="macro__BUILD_MNS_FILES"></a>
+Not documented yet.
+
+###### Macro [\_BUILD\_MNS\_HEADER][](NAME="", CHECK?, RANKING\_SUFFIX="", Files...) _#internal_ <a name="macro__BUILD_MNS_HEADER"></a>
+Not documented yet.
+
+###### Macro [\_BUNDLE\_TARGET][](Target, Destination) _#internal_ <a name="macro__BUNDLE_TARGET"></a>
+Not documented yet.
+
+###### Macro [\_CHECK\_JAVA\_SRCDIR][] _#internal_ <a name="macro__CHECK_JAVA_SRCDIR"></a>
+Not documented yet.
+
+###### Macro [\_CHECK\_RUN\_JAVA\_PROG\_CLASSPATH][] _#internal_ <a name="macro__CHECK_RUN_JAVA_PROG_CLASSPATH"></a>
+Not documented yet.
+
+###### Macro [\_COMPILE\_ASRC\_IMPL][](EXTRA\_INPUTS...) _#internal_ <a name="macro__COMPILE_ASRC_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_CONDITIONAL\_SRCS][]([USE\_CONDITIONAL\_SRCS] Files...) _# internal_ <a name="macro__CONDITIONAL_SRCS"></a>
+Adds Files... to SRCS if first word is `USE\_CONDITIONAL\_SRCS`
+To be used with some variable which is set to `USE\_CONDITIONAL\_SRCS` under condition
+
+###### Macro [\_COPY\_FILE\_IMPL][](FILE, AUTO\_DST="", NOAUTO\_DST="", OUTPUT\_INCLUDES[], REQUIREMENTS[]) _#internal_ <a name="macro__COPY_FILE_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_CFGPROTO\_CMD][](File) _#internal_ <a name="macro__CPP_CFGPROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_EVLOG\_CMD][](File) _#internal_ <a name="macro__CPP_EVLOG_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_FLATC64\_CMD][](SRC, SRCFLAGS...) _#internal_ <a name="macro__CPP_FLATC64_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_FLATC\_CMD][](SRC, SRCFLAGS...) _#internal_ <a name="macro__CPP_FLATC_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_PROTO\_CMD][](File) _#internal_ <a name="macro__CPP_PROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_PROTO\_EVLOG\_CMD][](File) _#internal_ <a name="macro__CPP_PROTO_EVLOG_CMD"></a>
+Not documented yet.
+
+###### Macro [\_CPP\_VANILLA\_PROTO\_CMD][](File) _#internal_ <a name="macro__CPP_VANILLA_PROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_DOCS\_EPILOGUE][] _#internal_ <a name="macro__DOCS_EPILOGUE"></a>
+\_DOCS\_EPILOOGUE() # internal
+
+This macro executes macros which should be envoked after all user
+specified macros in the ya.make file
+
+###### Macro [\_DOCS\_MKDOCS\_CMD\_IMPL][](CONFIG, INCLUDE\_SRCS[], EXTRA\_INPUTS[]) _#internal_ <a name="macro__DOCS_MKDOCS_CMD_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_DOCS\_YFM\_BOOK\_IMPL][](CONFIG, INCLUDE\_SRCS[], EXTRA\_INPUTS[]) _#internal_ <a name="macro__DOCS_YFM_BOOK_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_DOCS\_YFM\_USE\_PLANTUML][] _#internal_ <a name="macro__DOCS_YFM_USE_PLANTUML"></a>
+\_DOCS\_YFM\_USE\_PLANTUML() # internal
+
+This macr sets appropriate dependencies for use of plantuml plugin
+
+###### Macro [\_DO\_1\_RUN\_JAR\_PROGRAM][](IN\_DIRS\_VAR="uniq", Args...) _#internal_ <a name="macro__DO_1_RUN_JAR_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [\_DO\_2\_RUN\_JAR\_PROGRAM][](IN\_DIRS\_VAR="uniq\_", IN\_DIRS\_INPUTS[], IN{input}[], IN\_DIR[], OUT\_NOAUTO{output}[], OUT{output}[], TOOL{tool}[], OUT\_DIR[], CLASSPATH[], REQUIREMENTS[], ADD\_SRCS\_TO\_CLASSPATH?"yes":"no", CWD="${ARCADIA\_BUILD\_ROOT}", Args...) _#internal_ <a name="macro__DO_2_RUN_JAR_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [\_EVAL\_HIDE\_INPUTS][](ARGS...) _#internal_ <a name="macro__EVAL_HIDE_INPUTS"></a>
+Not documented yet.
+
+###### Macro [\_EVAL\_HIDE\_TOOLS][](ARGS...) _#internal_ <a name="macro__EVAL_HIDE_TOOLS"></a>
+Not documented yet.
+
+###### Macro [\_FAT\_OBJECT\_ARGS\_BASE][](Flag, Lib) _#internal_ <a name="macro__FAT_OBJECT_ARGS_BASE"></a>
+Not documented yet.
+
+###### Macro [\_FBS\_NAMESPACE\_IMPL][](NAMESPACE, PATH, DUMMY...) _#internal_ <a name="macro__FBS_NAMESPACE_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_FETCH\_CONTRIB][](Id, Out, SBR="sbr:") _#internal_ <a name="macro__FETCH_CONTRIB"></a>
+Not documented yet.
+
+###### Macro [\_FILL\_JAR\_COPY\_RESOURCES\_CMD][] _#internal_ <a name="macro__FILL_JAR_COPY_RESOURCES_CMD"></a>
+Not documented yet.
+
+###### Macro [\_FILL\_JAR\_GEN\_SRCS][] _#internal_ <a name="macro__FILL_JAR_GEN_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_FILTER\_EXTS][](SKIP="", FLAGS...) _#internal_ <a name="macro__FILTER_EXTS"></a>
+Not documented yet.
+
+###### Macro [\_FROM\_EXTERNAL][](ExtFile [AUTOUPDATED script] [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE]) _#internal_ <a name="macro__FROM_EXTERNAL"></a>
+requirements;hide
+ Use resource described as .external file as [FROM\_SANDBOX()](#macro\_FROM\_SANDBOX)/[FROM\_MDS()](#macro\_FROM\_MDS).
+
+###### Macro [\_FROM\_NPM\_LOCKFILES][] _#internal_ <a name="macro__FROM_NPM_LOCKFILES"></a>
+Not documented yet.
+
+###### Macro [\_GENERATE\_PY\_EVS\_INTERNAL][](FILES...) _#internal_ <a name="macro__GENERATE_PY_EVS_INTERNAL"></a>
+Not documented yet.
+
+###### Macro [\_GENERATE\_PY\_PROTOS\_INTERNAL][](FILES...) _#internal_ <a name="macro__GENERATE_PY_PROTOS_INTERNAL"></a>
+Not documented yet.
+
+###### Macro [\_GENTAR\_HELPER][](OUT\_DIR[], Args...) _#internal_ <a name="macro__GENTAR_HELPER"></a>
+Not documented yet.
+
+###### Macro [\_GEN\_JAVA\_SCRIPT\_IMPL][](Out, Template, Props...) _#internal_ <a name="macro__GEN_JAVA_SCRIPT_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GLOB][](varname globs...) _#builtin, internal_ <a name="macro__GLOB"></a>
+Sets varname to results of globs application.
+
+In globs are supported:
+1. Globstar option: '\*\*' recursively matches directories (allowed once per glob).
+2. Wildcard patterns for files and directories with '?' and '\*' special characters.
+
+Note: globs may slow down builds and may match to garbage if extra files present in working copy. Use with care and only if ultimately needed.
+
+###### Macro [\_GO\_COMPILE\_CGO1][](NAME, FLAGS[], FILES...) _#internal_ <a name="macro__GO_COMPILE_CGO1"></a>
+Not documented yet.
+
+###### Macro [\_GO\_COMPILE\_CGO2][](NAME, C\_FILES[], S\_FILES[], OBJ\_FILES[], FILES...) _#internal_ <a name="macro__GO_COMPILE_CGO2"></a>
+Not documented yet.
+
+###### Macro [\_GO\_COMPILE\_SYMABIS][](FLAGS[], ASM\_FILES...) _#internal_ <a name="macro__GO_COMPILE_SYMABIS"></a>
+Not documented yet.
+
+###### Macro [\_GO\_EMBED\_DIR][](PATTERN) _# internal_ <a name="macro__GO_EMBED_DIR"></a>
+Define an embed directory DIR.
+
+###### Macro [\_GO\_EMBED\_PATTERN][](PATTERN) _# internal_ <a name="macro__GO_EMBED_PATTERN"></a>
+Define an embed pattern.
+
+###### Macro [\_GO\_FLATC\_CMD][](fbs\_file flags...) _# internal_ <a name="macro__GO_FLATC_CMD"></a>
+Create a tar archive of .go files generated by flatc for Go. Output tar archive
+wiil have .fbs.gosrc extension. This .fbs.gosrc is specially processed when
+--add-protobuf-result flag is specified on the command line for 'ya make ...'
+(tar archive is extracted to output directory).
+
+###### Macro [\_GO\_GEN\_COVER\_GO][](GO\_FILE, VAR\_ID) _#internal_ <a name="macro__GO_GEN_COVER_GO"></a>
+Not documented yet.
+
+###### Macro [\_GO\_GRPC][]() _#internal_ <a name="macro__GO_GRPC"></a>
+Not documented yet.
+
+###### Macro [\_GO\_GRPC\_GATEWAY\_SRCS][](Files...) _#internal_ <a name="macro__GO_GRPC_GATEWAY_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_GO\_GRPC\_GATEWAY\_SRCS\_IMPL][](Files...) _#internal_ <a name="macro__GO_GRPC_GATEWAY_SRCS_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS][](Files...) _#internal_ <a name="macro__GO_GRPC_GATEWAY_SWAGGER_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_GO\_LINK\_EXE\_IMPL][](CGO\_FILES[], EXTRA\_INPUTS[], GO\_FILES...) _#internal_ <a name="macro__GO_LINK_EXE_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_LINK\_LIB\_IMPL][](CGO\_FILES[], EXTRA\_INPUTS[], GO\_FILES...) _#internal_ <a name="macro__GO_LINK_LIB_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_LINK\_TEST\_IMPL][](CGO\_FILES[], EXTRA\_INPUTS[], GO\_TEST\_FILES[], GO\_XTEST\_FILES[], GO\_FILES...) _#internal_ <a name="macro__GO_LINK_TEST_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_PROCESS\_SRCS][] _#internal_ <a name="macro__GO_PROCESS_SRCS"></a>
+\_GO\_PROCESS\_SRCS() macro processes only 'CGO' files. All remaining \*.go files
+and other input files are currently processed by a link command of the
+GO module (GO\_LIBRARY, GO\_PROGRAM)
+
+###### Macro [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE][](Name, Tool, MAP[], PLUGINS[]) _#internal_ <a name="macro__GO_PROTOC_PLUGIN_ARGS_BASE"></a>
+Not documented yet.
+
+###### Macro [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE\_IMPL][](Name, Tool, PLUGINS...) _#internal_ <a name="macro__GO_PROTOC_PLUGIN_ARGS_BASE_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE\_PROXY][](Name, Tool, MAP[], PLUGINS[]) _#internal_ <a name="macro__GO_PROTOC_PLUGIN_ARGS_BASE_PROXY"></a>
+Not documented yet.
+
+###### Macro [\_GO\_PROTO\_CMD][](File) _#internal_ <a name="macro__GO_PROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_GO\_PROTO\_CMD\_IMPL][](File, OPTS[], OUTS[]) _#internal_ <a name="macro__GO_PROTO_CMD_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_GO\_RESOURCE][] _#internal_ <a name="macro__GO_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [\_GO\_SRCS][](Files...) _# internal_ <a name="macro__GO_SRCS"></a>
+This macro shouldn't be used in ya.make files, use SRCS() instead.
+This is internal macro collecting .go sources for processing within Go modules (GO\_PROGRAM and GO\_LIBRARY)
+
+###### Macro [\_GO\_UNUSED\_SRCS][](FLAGS...) _#internal_ <a name="macro__GO_UNUSED_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_HASH\_HELPER][](Args...) _#internal_ <a name="macro__HASH_HELPER"></a>
+Not documented yet.
+
+###### Macro [\_INPUT\_WITH\_FLAG][](Flag, IN[]) _#internal_ <a name="macro__INPUT_WITH_FLAG"></a>
+Not documented yet.
+
+###### Macro [\_INPUT\_WITH\_FLAG\_IMPL][](IN{input}[], Args...) _#internal_ <a name="macro__INPUT_WITH_FLAG_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_IOS\_ASSETS][](AssetsDir, Content...) _#internal_ <a name="macro__IOS_ASSETS"></a>
+Not documented yet.
+
+###### Macro [\_JAR\_ANN\_PROC\_OPTS][](Classes...) _#internal_ <a name="macro__JAR_ANN_PROC_OPTS"></a>
+Not documented yet.
+
+###### Macro [\_JAR\_SRCS][](SRCDIR=".", PACKAGE\_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"yes":"no", Globs...) _#internal_ <a name="macro__JAR_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_JAVAC\_RUN\_HELPER][](JAVAC\_CMD\_WITH\_ARGS...) _#internal_ <a name="macro__JAVAC_RUN_HELPER"></a>
+Not documented yet.
+
+###### Macro [\_JAVA\_EVLOG\_CMD][](File) _#internal_ <a name="macro__JAVA_EVLOG_CMD"></a>
+Not documented yet.
+
+###### Macro [\_JAVA\_FLATC\_CMD][](fbs\_file) _# internal_ <a name="macro__JAVA_FLATC_CMD"></a>
+Create a tar archive of .java files generated by flatc for Java. Output tar
+acrchive will have .fbs.jsrc extension. Files with .fbs.jsrc extension will
+be added to results when --add-flatbuf-result flag is specified on the command
+line for 'ya make ...'
+
+###### Macro [\_JAVA\_PROTO\_CMD][](File) _#internal_ <a name="macro__JAVA_PROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_JAVA\_PROTO\_PLUGIN\_ARGS\_BASE][](Name, Tool, OutParm...) _#internal_ <a name="macro__JAVA_PROTO_PLUGIN_ARGS_BASE"></a>
+Not documented yet.
+
+###### Macro [\_JDK\_VERSION\_MACRO\_CHECK][] _#internal_ <a name="macro__JDK_VERSION_MACRO_CHECK"></a>
+Not documented yet.
+
+###### Macro [\_JSRC\_PROXY\_MOBILE\_LIBRARY\_CMD\_IMPL][](EXTRA\_INPUTS...) _#internal_ <a name="macro__JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_LANG\_CFLAGS][](SRC) _#internal_ <a name="macro__LANG_CFLAGS"></a>
+Not documented yet.
+
+###### Macro [\_LUAJIT\_21\_OBJDUMP][](Src, OUT="") _#internal_ <a name="macro__LUAJIT_21_OBJDUMP"></a>
+Not documented yet.
+
+###### Macro [\_LUAJIT\_OBJDUMP][](Src, OUT="") _#internal_ <a name="macro__LUAJIT_OBJDUMP"></a>
+Not documented yet.
+
+###### Macro [\_MAKE\_YQL\_PYTHON\_UDF\_TEST][]() _#internal_ <a name="macro__MAKE_YQL_PYTHON_UDF_TEST"></a>
+Not documented yet.
+
+###### Macro [\_MAKE\_YQL\_UDF][]() _#internal_ <a name="macro__MAKE_YQL_UDF"></a>
+Make module definition an YQL UDF: add all needed dependencies, properties and flags
+
+https://yql.yandex-team.ru/docs/yt/udf/cpp/
+
+###### Macro [\_MAPKITIDL\_PROXY][](args...) _# internal_ <a name="macro__MAPKITIDL_PROXY"></a>
+Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources
+
+###### Macro [\_MARK\_JAVA\_PROG\_WITH\_SOURCES][](Args...) _#internal_ <a name="macro__MARK_JAVA_PROG_WITH_SOURCES"></a>
+Not documented yet.
+
+###### Macro [\_MCU\_CONVERT][](Bin) _#internal_ <a name="macro__MCU_CONVERT"></a>
+Not documented yet.
+
+###### Macro [\_MOBILE\_DLL\_PREREQUISITES\_CMD][](EXTRA\_INPUTS...) _#internal_ <a name="macro__MOBILE_DLL_PREREQUISITES_CMD"></a>
+Not documented yet.
+
+###### Macro [\_MOBILE\_LIBRARY\_PREREQUISITES\_CMD][](OUTPUT, EXTRA\_INPUTS...) _#internal_ <a name="macro__MOBILE_LIBRARY_PREREQUISITES_CMD"></a>
+Not documented yet.
+
+###### Macro [\_MOBILE\_LIBRARY\_PREREQUISITES\_IMPL][](OUTPUT, EXTRA\_INPUTS...) _#internal_ <a name="macro__MOBILE_LIBRARY_PREREQUISITES_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_MOBILE\_TEST\_APK\_CMD\_IMPL][](OUTPUT, EXTRA\_INPUTS...) _#internal_ <a name="macro__MOBILE_TEST_APK_CMD_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_MSVC\_FLAGS\_WINDOWS\_IMPL][](target\_platform compiler\_flags) _# internal_ <a name="macro__MSVC_FLAGS_WINDOWS_IMPL"></a>
+Add CFLAGS when the firts argument is WINDOWS
+
+###### Macro [\_MX\_BIN\_TO\_INFO][](Src) _#internal_ <a name="macro__MX_BIN_TO_INFO"></a>
+Not documented yet.
+
+###### Macro [\_MX\_GEN\_TABLE][](Srcs...) _#internal_ <a name="macro__MX_GEN_TABLE"></a>
+Not documented yet.
+
+###### Macro [\_NODE\_MODULES][](IN{input}[], OUT{output}[]) _#internal_ <a name="macro__NODE_MODULES"></a>
+Not documented yet.
+
+###### Macro [\_NOOP\_MACRO][](Args...) _#internal_ <a name="macro__NOOP_MACRO"></a>
+Not documented yet.
+
+###### Macro [\_ORDER\_ADDINCL][]([BUILD ...] [SOURCE ...] Args...) _# internal_ <a name="macro__ORDER_ADDINCL"></a>
+Order and filter ADDINCLs (Args - is intentionally omitted in ADDINCL macro)
+
+###### Macro [\_PACK\_JAR\_HELPER][](Out) _#internal_ <a name="macro__PACK_JAR_HELPER"></a>
+Not documented yet.
+
+###### Macro [\_PROTO\_DESC\_CMD][](File) _#internal_ <a name="macro__PROTO_DESC_CMD"></a>
+Not documented yet.
+
+###### Macro [\_PROTO\_PLUGIN\_ARGS\_BASE][](Name, Tool, OutParm...) _#internal_ <a name="macro__PROTO_PLUGIN_ARGS_BASE"></a>
+Not documented yet.
+
+###### Macro [\_PY3\_COMPILE\_BYTECODE][](SrcX Src) _# internal_ <a name="macro__PY3_COMPILE_BYTECODE"></a>
+Compile Python 3.x .py source file into Arcadia binary form suitable for PY3\_PROGRAM
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+
+###### Macro [\_PY3\_REGISTER][]() _# internal_ <a name="macro__PY3_REGISTER"></a>
+Register Python 3.x module in internal resource file system. Arcadia Python 3.x importer will be retrieve these on import directive
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+
+###### Macro [\_PYCR\_GENERATE\_CONFIGS][](Package, App) _#internal_ <a name="macro__PYCR_GENERATE_CONFIGS"></a>
+Not documented yet.
+
+###### Macro [\_PYCR\_GENERATE\_CONFIGS\_INTL][](Package, App, Configs...) _#internal_ <a name="macro__PYCR_GENERATE_CONFIGS_INTL"></a>
+Not documented yet.
+
+###### Macro \_PYTHON\_ADDINCL() _# internal_ <a name="macro__PYTHON3_ADDINCL"></a>
+This macro sets up Python 3.x headers for both Arcadia and non-Arcadia python.
+
+###### Macro [\_PYTHON\_ADDINCL][]() _# internal_ <a name="macro__PYTHON_ADDINCL"></a>
+This macro sets up Python 2.x headers for both Arcadia and non-Arcadia python.
+
+###### Macro [\_PY\_COMPILE\_BYTECODE][](SrcX Src) _# internal_ <a name="macro__PY_COMPILE_BYTECODE"></a>
+Compile Python 2.x .py source file into Arcadia binary form suitable for PY2\_PROGRAM
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+
+###### Macro [\_PY\_ENUM\_SERIALIZATION\_TO\_JSON][](File) _#internal_ <a name="macro__PY_ENUM_SERIALIZATION_TO_JSON"></a>
+Not documented yet.
+
+###### Macro [\_PY\_ENUM\_SERIALIZATION\_TO\_PY][](File) _#internal_ <a name="macro__PY_ENUM_SERIALIZATION_TO_PY"></a>
+Not documented yet.
+
+###### Macro [\_PY\_EVLOG\_CMD][](File) _#internal_ <a name="macro__PY_EVLOG_CMD"></a>
+Not documented yet.
+
+###### Macro [\_PY\_EVLOG\_CMD\_BASE][](File, Suf, Args...) _#internal_ <a name="macro__PY_EVLOG_CMD_BASE"></a>
+Not documented yet.
+
+###### Macro [\_PY\_EVLOG\_CMD\_INTERNAL][](File) _#internal_ <a name="macro__PY_EVLOG_CMD_INTERNAL"></a>
+Not documented yet.
+
+###### Macro [\_PY\_PROGRAM][] _#internal_ <a name="macro__PY_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [\_PY\_PROTO\_CMD][](File) _#internal_ <a name="macro__PY_PROTO_CMD"></a>
+Not documented yet.
+
+###### Macro [\_PY\_PROTO\_CMD\_BASE][](File, Suf, Args...) _#internal_ <a name="macro__PY_PROTO_CMD_BASE"></a>
+Not documented yet.
+
+###### Macro [\_PY\_PROTO\_CMD\_INTERNAL][](File) _#internal_ <a name="macro__PY_PROTO_CMD_INTERNAL"></a>
+Not documented yet.
+
+###### Macro [\_PY\_REGISTER][]() _# internal_ <a name="macro__PY_REGISTER"></a>
+Register Python 2.x module in internal resource file system. Arcadia Python 2.x importer will be retrieve these on import directive.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+
+###### Macro [\_PY\_SSQLS\_SRC][](EXT, SRC, SRCFLAGS...) _#internal_ <a name="macro__PY_SSQLS_SRC"></a>
+Not documented yet.
+
+###### Macro [\_PY\_SSQLS\_SRCS][](Srcs...) _#internal_ <a name="macro__PY_SSQLS_SRCS"></a>
+Not documented yet.
+
+###### Macro \_PY\_SSQLS\_SRC("ssqls", SRC, SRCFLAGS...) _#internal_ <a name="macro__PY_SSQLS_SRC____ssqls"></a>
+Not documented yet.
+
+###### Macro [\_PY\_TEST][] _#internal_ <a name="macro__PY_TEST"></a>
+Not documented yet.
+
+###### Macro [\_RAW\_PROTO\_SRCS][](files...) _# internal_ <a name="macro__RAW_PROTO_SRCS"></a>
+\_RAW\_PROTO\_SRCS is a proxy macro to FILES macro which filters out
+GLOBAL keyword from the list of files (NOTE! The order of files listed
+originally in call to \_RAW\_PROTO\_SRCS() macro is changed in call to
+FILES() macro). Currently this macro copies only files with the following
+extensions: .proto, .gztproto, .ev
+
+###### Macro [\_REGISTER\_NO\_CHECK\_IMPORTS][] _#internal_ <a name="macro__REGISTER_NO_CHECK_IMPORTS"></a>
+Not documented yet.
+
+###### Macro [\_REQUIRE\_EXPLICIT\_LICENSE][](Prefix...) _#internal_ <a name="macro__REQUIRE_EXPLICIT_LICENSE"></a>
+Not documented yet.
+
+###### Macro [\_RUN\_JAVA][](IN{input}[], OUT{output}[], OUT\_NOAUTO{output}[], OUTPUT\_INCLUDES[], TOOL[], STDOUT="", STDOUT\_NOAUTO="", CWD="", ENV[], HIDE\_OUTPUT?"stderr2stdout":"stdout2stderr", REQUIREMENTS[], Args...) _#internal_ <a name="macro__RUN_JAVA"></a>
+Not documented yet.
+
+###### Macro [\_RUN\_JBUILD\_PROGRAM][] _#internal_ <a name="macro__RUN_JBUILD_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [\_SEM\_URL\_ARGS][](SCHEME="file://", Args...) _#internal_ <a name="macro__SEM_URL_ARGS"></a>
+Not documented yet.
+
+###### Macro [\_SETUP\_GO\_GRPC\_GATEWAY][]() _#internal_ <a name="macro__SETUP_GO_GRPC_GATEWAY"></a>
+Not documented yet.
+
+###### Macro [\_SET\_FIRST\_VALUE][](name args...) _# interanl internal_ <a name="macro__SET_FIRST_VALUE"></a>
+This macro sets the value of `name` vraiable to the value of next argument
+
+###### Macro [\_SPLIT\_CODEGEN\_BASE][](tool prefix OUTS[] OUTPUT\_INCLUDES[]) _# internal_ <a name="macro__SPLIT_CODEGEN_BASE"></a>
+Generator of a certain number .the. cpp file + one header .h file from .in.
+This is the call of the generator. Python macro SPLIT\_CODEGEN() is defined in order to properly fill command outputs from OUT\_NUM argument.
+
+###### Macro [\_SRC][](Ext Src Flags) _# internal_ <a name="macro__SRC"></a>
+Basic building block of extension-based command dispatching
+To enable specific extension processing define \_SRC() macro with fixed first argument (Ext).
+Internal logic will apply this macro to all files with this Ext listed in SRC/SRCS macros or outputs
+of other commands (except ones marked as noauto)
+
+###### Macro [\_SRCS\_NO\_GLOBAL][](files...) _# internal_ <a name="macro__SRCS_NO_GLOBAL"></a>
+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 \_SRC("C", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____C"></a>
+Not documented yet.
+
+###### Macro \_SRC("S", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____S"></a>
+Not documented yet.
+
+###### Macro \_SRC("asm", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____asm"></a>
+Not documented yet.
+
+###### Macro \_SRC("asp", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____asp"></a>
+Not documented yet.
+
+###### Macro \_SRC("c", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____c"></a>
+Not documented yet.
+
+###### Macro \_SRC("cc", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____cc"></a>
+Not documented yet.
+
+###### Macro \_SRC("cfgproto", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____cfgproto"></a>
+Not documented yet.
+
+###### Macro \_SRC("cpp", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____cpp"></a>
+Not documented yet.
+
+###### Macro \_SRC("cu", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____cu"></a>
+Not documented yet.
+
+###### Macro \_SRC("cxx", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____cxx"></a>
+Not documented yet.
+
+###### Macro \_SRC("ev", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____ev"></a>
+Not documented yet.
+
+###### Macro \_SRC("f", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____f"></a>
+Not documented yet.
+
+###### Macro \_SRC("fbs", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____fbs"></a>
+Not documented yet.
+
+###### Macro \_SRC("fbs64", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____fbs64"></a>
+Not documented yet.
+
+###### Macro \_SRC("fml", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____fml"></a>
+Not documented yet.
+
+###### Macro \_SRC("fml2", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____fml2"></a>
+Not documented yet.
+
+###### Macro \_SRC("fml3", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____fml3"></a>
+Not documented yet.
+
+###### Macro \_SRC("gperf", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____gperf"></a>
+Not documented yet.
+
+###### Macro \_SRC("gztproto", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____gztproto"></a>
+Not documented yet.
+
+###### Macro \_SRC("in", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____in"></a>
+Not documented yet.
+
+###### Macro \_SRC("l", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____l"></a>
+Not documented yet.
+
+###### Macro \_SRC("lex", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____lex"></a>
+Not documented yet.
+
+###### Macro \_SRC("lpp", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____lpp"></a>
+Not documented yet.
+
+###### Macro \_SRC("lua", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____lua"></a>
+Not documented yet.
+
+###### Macro \_SRC("m", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____m"></a>
+Not documented yet.
+
+###### Macro \_SRC("masm", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____masm"></a>
+Not documented yet.
+
+###### Macro \_SRC("mm", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____mm"></a>
+Not documented yet.
+
+###### Macro \_SRC("pln", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____pln"></a>
+Not documented yet.
+
+###### Macro \_SRC("po", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____po"></a>
+Not documented yet.
+
+###### Macro \_SRC("proto", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____proto"></a>
+Not documented yet.
+
+###### Macro \_SRC("pysrc", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____pysrc"></a>
+Not documented yet.
+
+###### Macro \_SRC("pyx", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____pyx"></a>
+Not documented yet.
+
+###### Macro \_SRC("rl", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____rl"></a>
+Not documented yet.
+
+###### Macro \_SRC("rl5", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____rl5"></a>
+Not documented yet.
+
+###### Macro \_SRC("rl6", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____rl6"></a>
+Not documented yet.
+
+###### Macro \_SRC("s", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____s"></a>
+Not documented yet.
+
+###### Macro \_SRC("s79", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____s79"></a>
+Not documented yet.
+
+###### Macro \_SRC("sc", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____sc"></a>
+Not documented yet.
+
+###### Macro \_SRC("sfdl", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____sfdl"></a>
+Not documented yet.
+
+###### Macro \_SRC("ssqls", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____ssqls"></a>
+Not documented yet.
+
+###### Macro \_SRC("storyboard", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____storyboard"></a>
+Not documented yet.
+
+###### Macro \_SRC("xib", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____xib"></a>
+Not documented yet.
+
+###### Macro \_SRC("xs", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____xs"></a>
+Not documented yet.
+
+###### Macro \_SRC("xsyn", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____xsyn"></a>
+Not documented yet.
+
+###### Macro \_SRC("y", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____y"></a>
+Not documented yet.
+
+###### Macro \_SRC("yasm", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____yasm"></a>
+Not documented yet.
+
+###### Macro \_SRC("ydl", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____ydl"></a>
+Not documented yet.
+
+###### Macro \_SRC("ypp", SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC____ypp"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_c][](SRC, COMPILE\_OUT\_SUFFIX="", SRCFLAGS...) _#internal_ <a name="macro__SRC_c"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_c\_nodeps][](SRC, OUTFILE, INC...) _#internal_ <a name="macro__SRC_c_nodeps"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_cpp][](SRC, COMPILE\_OUT\_SUFFIX="", SRCFLAGS...) _#internal_ <a name="macro__SRC_cpp"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_lua\_21][](SRC [SRCFLAGS...]) _# internal_ <a name="macro__SRC_lua_21"></a>
+Compile LUA source file to object code using LUA 2.1
+
+###### Macro [\_SRC\_m][](SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC_m"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_masm][](SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC_masm"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_py2src][](SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC_py2src"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_py3src][](SRC, SRCFLAGS...) _#internal_ <a name="macro__SRC_py3src"></a>
+Not documented yet.
+
+###### Macro [\_SRC\_yasm][](SRC, PREINCLUDES[], SRCFLAGS...) _#internal_ <a name="macro__SRC_yasm"></a>
+Not documented yet.
+
+###### Macro [\_STYLE][] _#internal_ <a name="macro__STYLE"></a>
+Not documented yet.
+
+###### Macro [\_SWIG\_LANG\_FILTERED\_SRCS][] _#internal_ <a name="macro__SWIG_LANG_FILTERED_SRCS"></a>
+Not documented yet.
+
+###### Macro [\_SWIG\_PYTHON\_C][](Src, DstSubPrefix) _# internal_ <a name="macro__SWIG_PYTHON_C"></a>
+Like \_SWIG\_PYTHON\_CPP but generate DstSubPrefix\_swg.c.
+
+###### Macro [\_SWIG\_PYTHON\_CPP][](Src, DstSubPrefix) _# internal_ <a name="macro__SWIG_PYTHON_CPP"></a>
+Run swig on Src to produce DstSubPrefix.py and DstSubPrefix\_swg.cpp that
+provides DstSubPrefix\_swg python module.
+
+###### Macro [\_TS\_CONFIGURE][] _#internal_ <a name="macro__TS_CONFIGURE"></a>
+Not documented yet.
+
+###### Macro [\_UNITTEST][] _#internal_ <a name="macro__UNITTEST"></a>
+Not documented yet.
+
+###### Macro [\_USE\_LINKER][]() _#internal_ <a name="macro__USE_LINKER"></a>
+Not documented yet.
+
+###### Macro [\_USE\_LINKER\_IMPL][](LINKER\_ID...) _#internal_ <a name="macro__USE_LINKER_IMPL"></a>
+Not documented yet.
+
+###### Macro [\_YCR\_GENERATE\_CONFIGS][](Package, App) _#internal_ <a name="macro__YCR_GENERATE_CONFIGS"></a>
+Not documented yet.
+
+###### Macro [\_YCR\_GENERATE\_CONFIGS\_INTL][](Package, App, Configs...) _#internal_ <a name="macro__YCR_GENERATE_CONFIGS_INTL"></a>
+Not documented yet.
+
+###### Macro [\_YMAKE\_GENERATE\_SCRIPT][] _#internal_ <a name="macro__YMAKE_GENERATE_SCRIPT"></a>
+Not documented yet.
+
+###### Macro [\_YMAPS\_GENERATE\_SPROTO\_HEADER][](File) _#internal_ <a name="macro__YMAPS_GENERATE_SPROTO_HEADER"></a>
+Not documented yet.
+
+###### Macro [\_YTEST][] _#internal_ <a name="macro__YTEST"></a>
+Not documented yet.
+
+ [DLL\_JAVA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L165
+ [DOCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3244
+ [DYNAMIC\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2901
+ [FBS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7721
+ [JAR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3942
+ [JAVA\_CONTRIB\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L140
+ [JAVA\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L32
+ [JTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L82
+ [JTEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L111
+ [JTEST\_YMAKE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3992
+ [JUNIT5]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L56
+ [JUNIT5\_YMAKE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3973
+ [MAPS\_IDL\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L86
+ [PROTO\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7473
+ [PY23\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8784
+ [PY23\_NATIVE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8816
+ [PY23\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9013
+ [PY3TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2219
+ [PY3\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1731
+ [SANDBOX\_PY23\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5014
+ [SANDBOX\_PY3\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5057
+ [SANDBOX\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4989
+ [SSQLS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9119
+ [YQL\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L118
+ [AAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L312
+ [AAR\_PROXY\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L347
+ [ASRC\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L51
+ [BOOSTTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1944
+ [BOOSTTEST\_WITH\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1964
+ [CI\_GROUP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3030
+ [CONTAINER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9151
+ [CONTAINER\_LAYER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9144
+ [CPP\_STYLE\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2231
+ [CUSTOM\_BUILD\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9163
+ [DEFAULT\_IOS\_INTERFACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8892
+ [DEV\_DLL\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2846
+ [DLL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2798
+ [DLL\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2870
+ [DLL\_PROXY\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7829
+ [DLL\_TOOL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2815
+ [DLL\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2589
+ [EXECTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2284
+ [EXTERNAL\_JAVA\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3404
+ [FAT\_OBJECT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2543
+ [FUZZ]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1900
+ [GO\_DLL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8624
+ [GO\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8527
+ [GO\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8545
+ [GO\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8644
+ [GTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1882
+ [GTEST\_UGLY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2250
+ [G\_BENCHMARK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2311
+ [IOS\_INTERFACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8881
+ [JAR\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3751
+ [JAVA\_CONTRIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3579
+ [JAVA\_CONTRIB\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3540
+ [JAVA\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L22
+ [JSRC\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7773
+ [JSRC\_PROXY\_MOBILE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L95
+ [LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2430
+ [MCU\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9236
+ [METAQUERY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4424
+ [MOBILE\_BOOST\_TEST\_APK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L163
+ [MOBILE\_DLL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L25
+ [MOBILE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L81
+ [MOBILE\_TEST\_APK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L123
+ [NPM\_CONTRIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L19
+ [PACKAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3006
+ [PREBUILT\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7840
+ [PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1672
+ [PROTO\_DESCRIPTIONS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7678
+ [PROTO\_REGISTRY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7690
+ [PY2MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2711
+ [PY2TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2177
+ [PY2\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4023
+ [PY2\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1700
+ [PY3MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2730
+ [PY3TEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2192
+ [PY3\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4090
+ [PY3\_PROGRAM\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4211
+ [PYCR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1793
+ [PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2162
+ [PY\_ANY\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2659
+ [PY\_PACKAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3092
+ [RECURSIVE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2572
+ [RESOURCES\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2503
+ [R\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2768
+ [SO\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2826
+ [TS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L97
+ [UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L30
+ [UDF\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L16
+ [UDF\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L37
+ [UNION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3067
+ [UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1852
+ [UNITTEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2339
+ [UNITTEST\_WITH\_CUSTOM\_ENTRY\_POINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1871
+ [YCR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1771
+ [YQL\_PYTHON3\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L210
+ [YQL\_PYTHON3\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L258
+ [YQL\_PYTHON\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L159
+ [YQL\_PYTHON\_UDF\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L185
+ [YQL\_PYTHON\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L244
+ [YQL\_UDF\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L99
+ [YQL\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L55
+ [YT\_UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1862
+ [Y\_BENCHMARK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2300
+ [\_BARE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1119
+ [\_BASE\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1606
+ [\_BASE\_PY3\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4165
+ [\_BASE\_PYTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2143
+ [\_BASE\_PY\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4104
+ [\_BASE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1143
+ [\_BASE\_UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1835
+ [\_COMPILABLE\_JAR\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3729
+ [\_DLL\_COMPATIBLE\_JAVA\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L154
+ [\_DLL\_COMPATIBLE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2970
+ [\_DOCS\_BASE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3177
+ [\_GO\_BASE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8363
+ [\_GO\_DLL\_BASE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8583
+ [\_JAR\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3517
+ [\_JAR\_RUNABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3902
+ [\_JAR\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3961
+ [\_JAVA\_PLACEHOLDER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4854
+ [\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2349
+ [\_LINK\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1569
+ [\_PROXY\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7797
+ [\_PY2\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1682
+ [\_PY3\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4053
+ [\_PY\_PACKAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3079
+ [\_TS\_BASE\_UNIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L67
+ [\_YQL\_UDF\_PROGRAM\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L105
+ [AARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L20
+ [AAR\_AARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L194
+ [AAR\_AIDL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L207
+ [AAR\_ASSETS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L214
+ [AAR\_BUNDLES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L221
+ [AAR\_COMPILE\_ONLY\_AARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L200
+ [AAR\_GRADLE\_SCRIPT\_GENERATOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L255
+ [AAR\_JAVA\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L235
+ [AAR\_JNI\_LIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L228
+ [AAR\_LOCAL\_MAVEN\_REPO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L249
+ [AAR\_MANIFEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L182
+ [AAR\_PROGUARD\_RULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L188
+ [AAR\_RES\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L242
+ [ACCELEO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L12
+ [ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ADDINCLSELF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5703
+ [ADD\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L546
+ [ADD\_CHECK\_PY\_IMPORTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L654
+ [ADD\_CLANG\_TIDY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1596
+ [ADD\_COMPILABLE\_TRANSLATE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5396
+ [ADD\_COMPILABLE\_TRANSLIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5406
+ [ADD\_DLLS\_TO\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4729
+ [ADD\_PERL\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5244
+ [ADD\_PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L727
+ [ADD\_PYTEST\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L698
+ [ADD\_YTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L416
+ [ALLOCATOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5274
+ [ALL\_PY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8762
+ [ALL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2960
+ [ANNOTATION\_PROCESSOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4684
+ [ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6422
+ [ARCHIVE\_ASM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6401
+ [ARCHIVE\_BY\_KEYS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6432
+ [ASM\_PREINCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7314
+ [ASSERT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L25
+ [BASE\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6504
+ [BPF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7199
+ [BPF\_STATIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7208
+ [BUILDWITH\_CYTHON\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6294
+ [BUILDWITH\_CYTHON\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6275
+ [BUILDWITH\_RAGEL6]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6349
+ [BUILD\_CATBOOST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/other.conf?rev=9113063#L9
+ [BUILD\_MN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6841
+ [BUILD\_MNS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6866
+ [BUILD\_ONLY\_IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [BUILD\_PLNS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6876
+ [BUILD\_YDL\_DESC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6114
+ [BUNDLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/bundle.py?rev=9113063#L4
+ [BUNDLE\_AIDL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L14
+ [BUNDLE\_ASSETS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L35
+ [BUNDLE\_EXTRA\_INPUTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L8
+ [BUNDLE\_JAVA\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L21
+ [BUNDLE\_RES\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L28
+ [CC\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5287
+ [CFG\_VARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6488
+ [CFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6554
+ [CGO\_CFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8155
+ [CGO\_LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8164
+ [CGO\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8138
+ [CHECK\_CONFIG\_H]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L444
+ [CHECK\_CONTRIB\_CREDITS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/credits.py?rev=9113063#L8
+ [CHECK\_DEPENDENT\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L478
+ [CHECK\_JAVA\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4461
+ [CLANG\_EMIT\_AST\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7172
+ [COLLECT\_FRONTEND\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8961
+ [COLLECT\_JINJA\_TEMPLATES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7859
+ [COLLECT\_YDB\_API\_SPECS\_LEGACY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9268
+ [COMPILE\_C\_AS\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7118
+ [COMPILE\_LUA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6056
+ [COMPILE\_LUA\_21]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6074
+ [COMPILE\_NLG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6886
+ [COMPILE\_SWIFT\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8975
+ [CONFIGURE\_FILE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6497
+ [CONFTEST\_LOAD\_POLICY\_LOCAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2079
+ [CONLYFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6569
+ [COPY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/cp.py?rev=9113063#L6
+ [COPY\_FILE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5461
+ [COPY\_FILES\_TO\_BUILD\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/copy_files_to_build_prefix.py?rev=9113063#L10
+ [COPY\_FILE\_WITH\_CONTEXT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5470
+ [CPP\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7366
+ [CPP\_ENUMS\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L641
+ [CPP\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L687
+ [CPP\_PROTO\_PLUGIN0]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L674
+ [CPP\_PROTO\_PLUGIN2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L698
+ [CREATE\_BUILDINFO\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6469
+ [CREATE\_INIT\_PY\_STRUCTURE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/create_init_py.py?rev=9113063#L6
+ [CREDITS\_DISCLAIMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/credits.py?rev=9113063#L4
+ [CTEMPLATE\_VARNAMES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7134
+ [CUDA\_NVCC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6583
+ [CUSTOM\_LINK\_STEP\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1828
+ [CXXFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6576
+ [DARWIN\_SIGNED\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8872
+ [DARWIN\_STRINGS\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8868
+ [DATA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2039
+ [DEB\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6830
+ [DECIMAL\_MD5\_LOWER\_32\_BITS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6480
+ [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_BUNDLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_PACK]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DECLARE\_EXTERNAL\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DEFAULT]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DEPENDENCY\_MANAGEMENT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4767
+ [DEPENDS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DIRECT\_DEPS\_ONLY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4838
+ [DISABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DISABLE\_DATA\_VALIDATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2024
+ [DLL\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DOCS\_BUILDER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3302
+ [DOCS\_CONFIG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3328
+ [DOCS\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3313
+ [DOCS\_INCLUDE\_SOURCES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3352
+ [DOCS\_VARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3340
+ [DUMPERF\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6534
+ [DYNAMIC\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2890
+ [DYNAMIC\_LIBRARY\_FROM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2784
+ [ELSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ELSEIF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EMBED\_JAVA\_VCS\_INFO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3394
+ [ENABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENABLE\_PREVIEW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4651
+ [END]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENDIF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENV]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2072
+ [EXCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4693
+ [EXCLUDE\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXPORTS\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1804
+ [EXPORT\_ALL\_DYNAMIC\_SYMBOLS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1818
+ [EXPORT\_MAPKIT\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L57
+ [EXPORT\_YMAPS\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/sproto.conf?rev=9113063#L4
+ [EXPOSE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7440
+ [EXTERNAL\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L251
+ [EXTERNAL\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRADIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRALIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRALIBS\_STATIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5389
+ [FAT\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/res.py?rev=9113063#L37
+ [FBS\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7703
+ [FBS\_TO\_PYSRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1049
+ [FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/files.py?rev=9113063#L1
+ [FLATC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1035
+ [FLAT\_JOIN\_SRCS\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5596
+ [FORK\_SUBTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5524
+ [FORK\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5510
+ [FORK\_TEST\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5550
+ [FROM\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7103
+ [FROM\_MDS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7073
+ [FROM\_NPM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L45
+ [FROM\_NPM\_LOCKFILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L38
+ [FROM\_SANDBOX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7065
+ [FUZZ\_DICTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1976
+ [FUZZ\_OPTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1995
+ [GENERATED\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7163
+ [GENERATE\_ENUM\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6809
+ [GENERATE\_ENUM\_SERIALIZATION\_WITH\_HEADER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6821
+ [GENERATE\_PY\_PROTOS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5424
+ [GENERATE\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L60
+ [GEN\_SCHEEME2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6959
+ [GLOBAL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2942
+ [GO\_ASM\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7982
+ [GO\_BENCH\_TIMEOUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8633
+ [GO\_CGO1\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7990
+ [GO\_CGO2\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7998
+ [GO\_COMPILE\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8006
+ [GO\_EMBED\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8237
+ [GO\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8201
+ [GO\_EMBED\_TEST\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8245
+ [GO\_EMBED\_XTEST\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8253
+ [GO\_FAKE\_OUTPUT]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/plugins/plugin_go_fake_output_handler.cpp?rev=9113063#L110
+ [GO\_GRPC\_GATEWAY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8300
+ [GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8308
+ [GO\_LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8147
+ [GO\_LINK\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8014
+ [GO\_MOCKGEN\_FROM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8668
+ [GO\_MOCKGEN\_MOCKS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8693
+ [GO\_MOCKGEN\_REFLECT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8679
+ [GO\_MOCKGEN\_TYPES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8673
+ [GO\_PACKAGE\_NAME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8097
+ [GO\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L798
+ [GO\_SKIP\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8175
+ [GO\_TEST\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8209
+ [GO\_TEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [GO\_TEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8115
+ [GO\_XTEST\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8217
+ [GO\_XTEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8124
+ [GRADLE\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L6
+ [GRPC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1019
+ [IDEA\_EXCLUDE\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4612
+ [IDEA\_JAR\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3456
+ [IDEA\_MODULE\_NAME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4632
+ [IDEA\_RESOURCE\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4622
+ [IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INCLUDE\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INDUCED\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [IOS\_APP\_ASSETS\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8864
+ [IOS\_APP\_COMMON\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8858
+ [IOS\_APP\_SETTINGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ios_app_settings.py?rev=9113063#L5
+ [IOS\_ASSETS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ios_assets.py?rev=9113063#L6
+ [JAR\_ANNOTATION\_PROCESSOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3498
+ [JAR\_EXCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4972
+ [JAR\_INCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4964
+ [JAR\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3559
+ [JAVAC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4641
+ [JAVA\_DEPENDENCIES\_CONFIGURATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4948
+ [JAVA\_EXTERNAL\_DEPENDENCIES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4847
+ [JAVA\_IGNORE\_CLASSPATH\_CLASH\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8704
+ [JAVA\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L77
+ [JAVA\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L651
+ [JAVA\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5311
+ [JAVA\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3720
+ [JAVA\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4723
+ [JAVA\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L795
+ [JAVA\_TEST\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L886
+ [JDK\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8929
+ [JOINSRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6722
+ [JOIN\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5575
+ [JOIN\_SRCS\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5586
+ [JVM\_ARGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4450
+ [KOTLINC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4804
+ [LARGE\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7094
+ [LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6544
+ [LD\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5303
+ [LIB\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5295
+ [LICENSE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/license.conf?rev=9113063#L360
+ [LICENSE\_TEXTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9204
+ [LINKER\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/linker_script.py?rev=9113063#L1
+ [LINK\_EXEC\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1561
+ [LINK\_EXE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1555
+ [LINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2127
+ [LJ\_21\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/lj_archive.py?rev=9113063#L23
+ [LJ\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/lj_archive.py?rev=9113063#L1
+ [LLVM\_BC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/llvm_bc.py?rev=9113063#L6
+ [LLVM\_COMPILE\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7190
+ [LLVM\_COMPILE\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7181
+ [LLVM\_COMPILE\_LL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7217
+ [LLVM\_LINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7226
+ [LLVM\_OPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7235
+ [LOCAL\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3569
+ [LOCAL\_SOURCES\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3574
+ [LUA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7013
+ [MACROS\_WITH\_ERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L8
+ [MAPKITIDL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/plugins/plugin_mapkitidl_handler.cpp?rev=9113063#L397
+ [MAPKIT\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L2
+ [MAPKIT\_ENABLE\_WHOLE\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L76
+ [MAPSMOBI\_COLLECT\_AIDL\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L119
+ [MAPSMOBI\_COLLECT\_ASSETS\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L111
+ [MAPSMOBI\_COLLECT\_JAVA\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L127
+ [MAPSMOBI\_COLLECT\_JNI\_LIBS\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L135
+ [MAPSMOBI\_COLLECT\_RES\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L143
+ [MAPSMOBI\_COLLECT\_TPL\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L151
+ [MAPSMOBI\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L49
+ [MAPS\_GARDEN\_COLLECT\_MODULE\_TRAITS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L159
+ [MAPS\_IDL\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L10
+ [MAPS\_IDL\_GLOBAL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L35
+ [MAPS\_IDL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L28
+ [MASMFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6561
+ [MAVEN\_GROUP\_ID]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4674
+ [MESSAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [METAQUERYFILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9244
+ [MOBILE\_TEST\_APK\_AAR\_AARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L51
+ [MOBILE\_TEST\_APK\_AAR\_BUNDLES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L57
+ [MOBILE\_TEST\_APK\_AAR\_MANIFEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L39
+ [MOBILE\_TEST\_APK\_AAR\_PROGUARD\_RULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L45
+ [MOBILE\_TEST\_APK\_TEMPLATE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L64
+ [MSVC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9261
+ [MX\_FORMULAS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/mx_archive.py?rev=9113063#L1
+ [NEED\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6896
+ [NEED\_REVIEW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6914
+ [NGINX\_MODULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9132
+ [NODE\_MODULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L54
+ [NO\_BUILD\_IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [NO\_CHECK\_IMPORTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7268
+ [NO\_CLANG\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6746
+ [NO\_CLANG\_TIDY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6750
+ [NO\_CODENAVIGATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6649
+ [NO\_COMPILER\_WARNINGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6612
+ [NO\_CPU\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5696
+ [NO\_CYTHON\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6767
+ [NO\_DEBUG\_INFO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7125
+ [NO\_DOCTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2135
+ [NO\_EXPORT\_DYNAMIC\_SYMBOLS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1811
+ [NO\_EXTENDED\_SOURCE\_SEARCH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1719
+ [NO\_JOIN\_SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6715
+ [NO\_LIBC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6679
+ [NO\_LINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2120
+ [NO\_MYPY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L888
+ [NO\_NEED\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6904
+ [NO\_OPTIMIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6605
+ [NO\_OPTIMIZE\_PY\_PROTOS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L602
+ [NO\_PLATFORM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6689
+ [NO\_PLATFORM\_RESOURCES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6641
+ [NO\_PYTHON\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6758
+ [NO\_PYTHON\_INCLUDES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5079
+ [NO\_RUNTIME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6668
+ [NO\_SANITIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6730
+ [NO\_SANITIZE\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6738
+ [NO\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5688
+ [NO\_UTIL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6657
+ [NO\_WERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6627
+ [NO\_WSHADOW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6633
+ [NVCC\_DEVICE\_LINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6592
+ [ONLY\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [OPENSOURCE\_EXPORT\_REPLACEMENT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9188
+ [OPTIMIZE\_PY\_PROTOS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L592
+ [ORIGINAL\_SOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9176
+ [OWNER]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PACK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2986
+ [PACKAGE\_STRICT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2991
+ [PACK\_GLOBALS\_IN\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2525
+ [PARTITIONED\_RECURSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PARTITIONED\_RECURSE\_FOR\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PARTITIONED\_RECURSE\_ROOT\_RELATIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PEERDIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PIRE\_INLINE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6411
+ [PIRE\_INLINE\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6406
+ [PRIMARY\_OUTPUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7819
+ [PRINT\_MODULE\_TYPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/print_module_type.py?rev=9113063#L1
+ [PROCESS\_DOCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/docs.py?rev=9113063#L26
+ [PROGUARD\_RULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L13
+ [PROTO2FBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L954
+ [PROTO\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L564
+ [PROTO\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L581
+ [PROVIDES]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7037
+ [PYTHON2\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5095
+ [PYTHON2\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2740
+ [PYTHON3\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5142
+ [PYTHON3\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2752
+ [PYTHON\_PATH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2102
+ [PY\_CONSTRUCTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L611
+ [PY\_DOCTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L538
+ [PY\_ENUMS\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L625
+ [PY\_EXTRA\_LINT\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8772
+ [PY\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L594
+ [PY\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3364
+ [PY\_PROTOS\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PY\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L624
+ [PY\_PROTO\_PLUGIN2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L636
+ [PY\_REGISTER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L556
+ [PY\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5320
+ [PY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8734
+ [PY\_SSQLS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9103
+ [REAL\_LINK\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1549
+ [REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1543
+ [REAL\_LINK\_EXE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1537
+ [RECURSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [RECURSE\_FOR\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [RECURSE\_ROOT\_RELATIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [REGISTER\_SANDBOX\_IMPORT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/sandbox_registry.py?rev=9113063#L6
+ [REGISTER\_YQL\_PYTHON\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yql_python_udf.py?rev=9113063#L10
+ [REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2063
+ [REQUIRES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L456
+ [RESOLVE\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3053
+ [RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L543
+ [RESOURCE\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/res.py?rev=9113063#L53
+ [RESTRICT\_LICENSES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/license.conf?rev=9113063#L376
+ [RESTRICT\_PATH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L13
+ [RUN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1025
+ [RUN\_ANTLR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7331
+ [RUN\_ANTLR4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7339
+ [RUN\_ANTLR4\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7352
+ [RUN\_ANTLR4\_GO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7360
+ [RUN\_JAVA\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3491
+ [RUN\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6989
+ [RUN\_PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7323
+ [SDBUS\_CPP\_ADAPTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9073
+ [SDBUS\_CPP\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9079
+ [SECONDARY\_OUTPUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L338
+ [SET]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SETUP\_EXECTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1031
+ [SETUP\_PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1015
+ [SETUP\_RUN\_PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1043
+ [SET\_APPEND]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SET\_APPEND\_WITH\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SET\_COMPILE\_OUTPUTS\_MODIFIERS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5716
+ [SIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5562
+ [SKIP\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2111
+ [SOURCE\_GROUP]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SPLIT\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/split_codegen.py?rev=9113063#L9
+ [SPLIT\_DWARF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5373
+ [SPLIT\_FACTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5538
+ [SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6140
+ [SRCDIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6159
+ [SRC\_CPP\_AVX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6259
+ [SRC\_CPP\_AVX2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6266
+ [SRC\_CPP\_PIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6217
+ [SRC\_CPP\_SSE2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6224
+ [SRC\_CPP\_SSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6231
+ [SRC\_CPP\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6252
+ [SRC\_CPP\_SSE41]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6245
+ [SRC\_CPP\_SSSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6238
+ [SRC\_C\_AVX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6203
+ [SRC\_C\_AVX2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6210
+ [SRC\_C\_SSE2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6168
+ [SRC\_C\_SSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6175
+ [SRC\_C\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6196
+ [SRC\_C\_SSE41]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6189
+ [SRC\_C\_SSSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6182
+ [SRC\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3564
+ [STRIP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6599
+ [STRUCT\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6527
+ [STYLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2236
+ [SUBSCRIBER]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SUPPRESSIONS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/suppressions.py?rev=9113063#L1
+ [SYMLINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6965
+ [SYSTEM\_PROPERTIES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4439
+ [TAG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2052
+ [TASKLET]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7380
+ [TASKLET\_REG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7400
+ [TASKLET\_REG\_EXT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7415
+ [TEST\_CWD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4480
+ [TEST\_DATA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L41
+ [TEST\_JAVA\_CLASSPATH\_CMD\_TYPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4930
+ [TEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2020
+ [TIMEOUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5483
+ [TOUCH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7254
+ [UBERJAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4504
+ [UBERJAR\_APPENDING\_TRANSFORMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4588
+ [UBERJAR\_HIDE\_EXCLUDE\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4532
+ [UBERJAR\_HIDING\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4517
+ [UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4572
+ [UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4559
+ [UBERJAR\_PATH\_EXCLUDE\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4546
+ [UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4601
+ [UDF\_NO\_PROBE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L45
+ [UPDATE\_VCS\_JAVA\_INFO\_NODEP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6461
+ [USE\_COMMON\_GOOGLE\_APIS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L757
+ [USE\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6699
+ [USE\_ERROR\_PRONE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4469
+ [USE\_EXT\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7659
+ [USE\_JAVALITE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L913
+ [USE\_LINKER\_BFD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1366
+ [USE\_LINKER\_GOLD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1371
+ [USE\_LINKER\_LLD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1376
+ [USE\_PERL\_514\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5235
+ [USE\_PERL\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5228
+ [USE\_PLANTUML]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3290
+ [USE\_PYTHON2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5191
+ [USE\_PYTHON3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5208
+ [USE\_RECIPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2090
+ [USE\_SKIFF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L708
+ [USE\_UTIL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6707
+ [VALIDATE\_DATA\_RESTART]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5493
+ [VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6922
+ [VISIBILITY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9051
+ [WERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6620
+ [WHOLE\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7373
+ [WINDOWS\_MANIFEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9036
+ [WITHOUT\_LICENSE\_TEXTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9212
+ [WITH\_DYNAMIC\_LIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1531
+ [WITH\_GROOVY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4795
+ [WITH\_JDK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4777
+ [WITH\_KOTLIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4786
+ [WITH\_KOTLINC\_ALLOPEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4813
+ [WITH\_KOTLINC\_NOARG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4823
+ [XS\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L944
+ [YABS\_GENERATE\_CONF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L10
+ [YABS\_GENERATE\_PHANTOM\_CONF\_PATCH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L35
+ [YABS\_GENERATE\_PHANTOM\_CONF\_TEST\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L53
+ [YDL\_DESC\_USE\_BINARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6131
+ [YMAPS\_SPROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/sproto.conf?rev=9113063#L16
+ [YP\_PROTO\_YSON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L838
+ [YQL\_ABI\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L139
+ [YQL\_LAST\_ABI\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L148
+ [YT\_SPEC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2009
+ [\_AAR\_CMD\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L305
+ [\_ADD\_CLASSPATH\_CLASH\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L240
+ [\_ADD\_CPP\_PROTO\_OUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L658
+ [\_ADD\_GEN\_JAVA\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3862
+ [\_ADD\_HIDDEN\_INPUTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3675
+ [\_ADD\_JAVA\_STYLE\_CHECKS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L235
+ [\_ADD\_PY\_PROTO\_OUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L612
+ [\_ADD\_YQL\_UDF\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L71
+ [\_ALL\_PY\_SRCS2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8744
+ [\_ARCADIA\_PYTHON3\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5152
+ [\_ARCADIA\_PYTHON\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5104
+ [\_BARE\_LINK\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2479
+ [\_BARE\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2464
+ [\_BUILDWITH\_CYTHON\_CPP\_DEP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6285
+ [\_BUILDWITH\_CYTHON\_C\_API\_H]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6322
+ [\_BUILDWITH\_CYTHON\_C\_DEP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6304
+ [\_BUILDWITH\_CYTHON\_C\_H]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6313
+ [\_BUILD\_MNS\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6851
+ [\_BUILD\_MNS\_FILE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6845
+ [\_BUILD\_MNS\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/build_mn_files.py?rev=9113063#L4
+ [\_BUILD\_MNS\_HEADER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6855
+ [\_BUNDLE\_TARGET]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5474
+ [\_CHECK\_JAVA\_SRCDIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L262
+ [\_CHECK\_RUN\_JAVA\_PROG\_CLASSPATH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L318
+ [\_COMPILE\_ASRC\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L42
+ [\_CONDITIONAL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2489
+ [\_COPY\_FILE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5444
+ [\_CPP\_CFGPROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L872
+ [\_CPP\_EVLOG\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L859
+ [\_CPP\_FLATC64\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1066
+ [\_CPP\_FLATC\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1060
+ [\_CPP\_PROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L846
+ [\_CPP\_PROTO\_EVLOG\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L865
+ [\_CPP\_VANILLA\_PROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L853
+ [\_DOCS\_EPILOGUE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3210
+ [\_DOCS\_MKDOCS\_CMD\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3167
+ [\_DOCS\_YFM\_BOOK\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3152
+ [\_DOCS\_YFM\_USE\_PLANTUML]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3221
+ [\_DO\_1\_RUN\_JAR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3486
+ [\_DO\_2\_RUN\_JAR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3478
+ [\_EVAL\_HIDE\_INPUTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3110
+ [\_EVAL\_HIDE\_TOOLS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3105
+ [\_FAT\_OBJECT\_ARGS\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2521
+ [\_FBS\_NAMESPACE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7698
+ [\_FETCH\_CONTRIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3544
+ [\_FILL\_JAR\_COPY\_RESOURCES\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L285
+ [\_FILL\_JAR\_GEN\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L296
+ [\_FILTER\_EXTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6014
+ [\_FROM\_EXTERNAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7082
+ [\_FROM\_NPM\_LOCKFILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/nots.py?rev=9113063#L19
+ [\_GENERATE\_PY\_EVS\_INTERNAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5438
+ [\_GENERATE\_PY\_PROTOS\_INTERNAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5431
+ [\_GENTAR\_HELPER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3465
+ [\_GEN\_JAVA\_SCRIPT\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3856
+ [\_GLOB]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [\_GO\_COMPILE\_CGO1]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8055
+ [\_GO\_COMPILE\_CGO2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8060
+ [\_GO\_COMPILE\_SYMABIS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8049
+ [\_GO\_EMBED\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8225
+ [\_GO\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8186
+ [\_GO\_FLATC\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1078
+ [\_GO\_GEN\_COVER\_GO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8044
+ [\_GO\_GRPC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8291
+ [\_GO\_GRPC\_GATEWAY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8336
+ [\_GO\_GRPC\_GATEWAY\_SRCS\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8317
+ [\_GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8342
+ [\_GO\_LINK\_EXE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8072
+ [\_GO\_LINK\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8067
+ [\_GO\_LINK\_TEST\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8077
+ [\_GO\_PROCESS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/gobuild.py?rev=9113063#L87
+ [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L815
+ [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L805
+ [\_GO\_PROTOC\_PLUGIN\_ARGS\_BASE\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L810
+ [\_GO\_PROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L830
+ [\_GO\_PROTO\_CMD\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L823
+ [\_GO\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/gobuild.py?rev=9113063#L278
+ [\_GO\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8106
+ [\_GO\_UNUSED\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8130
+ [\_HASH\_HELPER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3461
+ [\_INPUT\_WITH\_FLAG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L4
+ [\_INPUT\_WITH\_FLAG\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L8
+ [\_IOS\_ASSETS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8853
+ [\_JAR\_ANN\_PROC\_OPTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3507
+ [\_JAR\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3442
+ [\_JAVAC\_RUN\_HELPER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3672
+ [\_JAVA\_EVLOG\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L980
+ [\_JAVA\_FLATC\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1090
+ [\_JAVA\_PROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L934
+ [\_JAVA\_PROTO\_PLUGIN\_ARGS\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L642
+ [\_JDK\_VERSION\_MACRO\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L377
+ [\_JSRC\_PROXY\_MOBILE\_LIBRARY\_CMD\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L88
+ [\_LANG\_CFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6019
+ [\_LUAJIT\_21\_OBJDUMP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6780
+ [\_LUAJIT\_OBJDUMP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6774
+ [\_MAKE\_YQL\_PYTHON\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L227
+ [\_MAKE\_YQL\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L81
+ [\_MAPKITIDL\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L17
+ [\_MARK\_JAVA\_PROG\_WITH\_SOURCES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3897
+ [\_MCU\_CONVERT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9226
+ [\_MOBILE\_DLL\_PREREQUISITES\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L112
+ [\_MOBILE\_LIBRARY\_PREREQUISITES\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L69
+ [\_MOBILE\_LIBRARY\_PREREQUISITES\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/asrc.conf?rev=9113063#L65
+ [\_MOBILE\_TEST\_APK\_CMD\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L114
+ [\_MSVC\_FLAGS\_WINDOWS\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9252
+ [\_MX\_BIN\_TO\_INFO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6784
+ [\_MX\_GEN\_TABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6796
+ [\_NODE\_MODULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L60
+ [\_NOOP\_MACRO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3512
+ [\_ORDER\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L551
+ [\_PACK\_JAR\_HELPER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3667
+ [\_PROTO\_DESC\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7446
+ [\_PROTO\_PLUGIN\_ARGS\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L607
+ [\_PY3\_COMPILE\_BYTECODE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6392
+ [\_PY3\_REGISTER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6371
+ [\_PYCR\_GENERATE\_CONFIGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1781
+ [\_PYCR\_GENERATE\_CONFIGS\_INTL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1776
+ [\_PYTHON3\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5163
+ [\_PYTHON\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5113
+ [\_PY\_COMPILE\_BYTECODE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6382
+ [\_PY\_ENUM\_SERIALIZATION\_TO\_JSON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9109
+ [\_PY\_ENUM\_SERIALIZATION\_TO\_PY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9114
+ [\_PY\_EVLOG\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L970
+ [\_PY\_EVLOG\_CMD\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L964
+ [\_PY\_EVLOG\_CMD\_INTERNAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L975
+ [\_PY\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L150
+ [\_PY\_PROTO\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L898
+ [\_PY\_PROTO\_CMD\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L893
+ [\_PY\_PROTO\_CMD\_INTERNAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L903
+ [\_PY\_REGISTER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6360
+ [\_PY\_SSQLS\_SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9086
+ [\_PY\_SSQLS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9096
+ [\_PY\_SSQLS\_SRC\_\_\_\_ssqls]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9091
+ [\_PY\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest2.py?rev=9113063#L53
+ [\_RAW\_PROTO\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7672
+ [\_REGISTER\_NO\_CHECK\_IMPORTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L648
+ [\_REQUIRE\_EXPLICIT\_LICENSE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/license.conf?rev=9113063#L350
+ [\_RUN\_JAVA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7042
+ [\_RUN\_JBUILD\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L34
+ [\_SEM\_URL\_ARGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5566
+ [\_SETUP\_GO\_GRPC\_GATEWAY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8330
+ [\_SET\_FIRST\_VALUE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3100
+ [\_SPLIT\_CODEGEN\_BASE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6513
+ [\_SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5730
+ [\_SRCS\_NO\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3374
+ [\_SRC\_\_\_\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5914
+ [\_SRC\_\_\_\_S]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5735
+ [\_SRC\_\_\_\_asm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5941
+ [\_SRC\_\_\_\_asp]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5807
+ [\_SRC\_\_\_\_c]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5919
+ [\_SRC\_\_\_\_cc]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5908
+ [\_SRC\_\_\_\_cfgproto]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5863
+ [\_SRC\_\_\_\_cpp]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5897
+ [\_SRC\_\_\_\_cu]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5953
+ [\_SRC\_\_\_\_cxx]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5903
+ [\_SRC\_\_\_\_ev]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5844
+ [\_SRC\_\_\_\_f]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5890
+ [\_SRC\_\_\_\_fbs]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5959
+ [\_SRC\_\_\_\_fbs64]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5964
+ [\_SRC\_\_\_\_fml]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5756
+ [\_SRC\_\_\_\_fml2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5761
+ [\_SRC\_\_\_\_fml3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5766
+ [\_SRC\_\_\_\_gperf]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5792
+ [\_SRC\_\_\_\_gztproto]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5855
+ [\_SRC\_\_\_\_in]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5875
+ [\_SRC\_\_\_\_l]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5818
+ [\_SRC\_\_\_\_lex]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5824
+ [\_SRC\_\_\_\_lpp]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5829
+ [\_SRC\_\_\_\_lua]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5947
+ [\_SRC\_\_\_\_m]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5925
+ [\_SRC\_\_\_\_masm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5930
+ [\_SRC\_\_\_\_mm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5751
+ [\_SRC\_\_\_\_pln]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5834
+ [\_SRC\_\_\_\_po]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6088
+ [\_SRC\_\_\_\_proto]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5849
+ [\_SRC\_\_\_\_pysrc]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5969
+ [\_SRC\_\_\_\_pyx]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5868
+ [\_SRC\_\_\_\_rl]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5797
+ [\_SRC\_\_\_\_rl5]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5802
+ [\_SRC\_\_\_\_rl6]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5812
+ [\_SRC\_\_\_\_s]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5741
+ [\_SRC\_\_\_\_s79]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5746
+ [\_SRC\_\_\_\_sc]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5880
+ [\_SRC\_\_\_\_sfdl]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5771
+ [\_SRC\_\_\_\_ssqls]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5885
+ [\_SRC\_\_\_\_storyboard]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8841
+ [\_SRC\_\_\_\_xib]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8846
+ [\_SRC\_\_\_\_xs]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5776
+ [\_SRC\_\_\_\_xsyn]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5839
+ [\_SRC\_\_\_\_y]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5781
+ [\_SRC\_\_\_\_yasm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5935
+ [\_SRC\_\_\_\_ydl]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6097
+ [\_SRC\_\_\_\_ypp]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5787
+ [\_SRC\_c]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6037
+ [\_SRC\_c\_nodeps]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5992
+ [\_SRC\_cpp]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6032
+ [\_SRC\_lua\_21]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6064
+ [\_SRC\_m]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6042
+ [\_SRC\_masm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6047
+ [\_SRC\_py2src]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5974
+ [\_SRC\_py3src]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5979
+ [\_SRC\_yasm]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7307
+ [\_STYLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/cpp_style.py?rev=9113063#L6
+ [\_SWIG\_LANG\_FILTERED\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/swig.py?rev=9113063#L156
+ [\_SWIG\_PYTHON\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6341
+ [\_SWIG\_PYTHON\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6332
+ [\_TS\_CONFIGURE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/nots.py?rev=9113063#L33
+ [\_UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest2.py?rev=9113063#L42
+ [\_USE\_LINKER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1360
+ [\_USE\_LINKER\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1356
+ [\_YCR\_GENERATE\_CONFIGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1754
+ [\_YCR\_GENERATE\_CONFIGS\_INTL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1749
+ [\_YMAKE\_GENERATE\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L373
+ [\_YMAPS\_GENERATE\_SPROTO\_HEADER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/sproto.conf?rev=9113063#L8
+ [\_YTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest2.py?rev=9113063#L49
diff --git a/build/docs/empty/ya.make b/build/docs/empty/ya.make
new file mode 100644
index 0000000000..3540411405
--- /dev/null
+++ b/build/docs/empty/ya.make
@@ -0,0 +1,5 @@
+UNION()
+
+OWNER(g:ymake)
+
+END()
diff --git a/build/docs/readme.md b/build/docs/readme.md
new file mode 100644
index 0000000000..f7cd05b918
--- /dev/null
+++ b/build/docs/readme.md
@@ -0,0 +1,3168 @@
+*Do not edit, this file is generated from comments to macros definitions using `ya dump conf-docs`.*
+
+# ya.make commands
+
+General info: [How to write ya.make files](https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles)
+
+## Table of contents
+
+ * [Multimodules](#multimodules)
+ - Multimodule [DLL_JAVA](#multimodule_DLL_JAVA)
+ - Multimodule [DOCS](#multimodule_DOCS)
+ - Multimodule [FBS_LIBRARY](#multimodule_FBS_LIBRARY)
+ - Multimodule [JAR_PROGRAM](#multimodule_JAR_PROGRAM)
+ - Multimodule [JAVA_CONTRIB_PROGRAM](#multimodule_JAVA_CONTRIB_PROGRAM)
+ - Multimodule [JAVA_PROGRAM](#multimodule_JAVA_PROGRAM)
+ - Multimodule [JTEST](#multimodule_JTEST)
+ - Multimodule [JTEST_FOR](#multimodule_JTEST_FOR)
+ - Multimodule [JTEST_YMAKE](#multimodule_JTEST_YMAKE)
+ - Multimodule [JUNIT5](#multimodule_JUNIT5)
+ - Multimodule [JUNIT5_YMAKE](#multimodule_JUNIT5_YMAKE)
+ - Multimodule [MAPS_IDL_LIBRARY](#multimodule_MAPS_IDL_LIBRARY)
+ - Multimodule [PROTO_LIBRARY](#multimodule_PROTO_LIBRARY)
+ - Multimodule [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
+ - Multimodule [PY23_NATIVE_LIBRARY](#multimodule_PY23_NATIVE_LIBRARY)
+ - Multimodule [PY23_TEST](#multimodule_PY23_TEST)
+ - Multimodule [PY3TEST](#multimodule_PY3TEST)
+ - Multimodule [PY3_PROGRAM](#multimodule_PY3_PROGRAM)
+ - Multimodule [SANDBOX_PY23_TASK](#multimodule_SANDBOX_PY23_TASK)
+ - Multimodule [SANDBOX_PY3_TASK](#multimodule_SANDBOX_PY3_TASK)
+ - Multimodule [SANDBOX_TASK](#multimodule_SANDBOX_TASK)
+ - Multimodule [SSQLS_LIBRARY](#multimodule_SSQLS_LIBRARY)
+ - Multimodule [YQL_UDF](#multimodule_YQL_UDF)
+ * [Modules](#modules)
+ - Module [BOOSTTEST](#module_BOOSTTEST)
+ - Module [BOOSTTEST_WITH_MAIN](#module_BOOSTTEST_WITH_MAIN)
+ - Module [CI_GROUP](#module_CI_GROUP)
+ - Module [CONTAINER](#module_CONTAINER)
+ - Module [CONTAINER_LAYER](#module_CONTAINER_LAYER)
+ - Module [CPP_STYLE_TEST](#module_CPP_STYLE_TEST)
+ - Module [CUSTOM_BUILD_LIBRARY](#module_CUSTOM_BUILD_LIBRARY)
+ - Module [DEFAULT_IOS_INTERFACE](#module_DEFAULT_IOS_INTERFACE)
+ - Module [DLL](#module_DLL)
+ - Module [DLL_TOOL](#module_DLL_TOOL)
+ - Module [EXECTEST](#module_EXECTEST)
+ - Module [FAT_OBJECT](#module_FAT_OBJECT)
+ - Module [FUZZ](#module_FUZZ)
+ - Module [GO_DLL](#module_GO_DLL)
+ - Module [GO_LIBRARY](#module_GO_LIBRARY)
+ - Module [GO_PROGRAM](#module_GO_PROGRAM)
+ - Module [GO_TEST](#module_GO_TEST)
+ - Module [GTEST](#module_GTEST)
+ - Module [GTEST_UGLY](#module_GTEST_UGLY)
+ - Module [G_BENCHMARK](#module_G_BENCHMARK)
+ - Module [IOS_INTERFACE](#module_IOS_INTERFACE)
+ - Module [JAVA_CONTRIB](#module_JAVA_CONTRIB)
+ - Module [JAVA_CONTRIB_PROXY](#module_JAVA_CONTRIB_PROXY)
+ - Module [JAVA_LIBRARY](#module_JAVA_LIBRARY)
+ - Module [LIBRARY](#module_LIBRARY)
+ - Module [MCU_PROGRAM](#module_MCU_PROGRAM)
+ - Module [METAQUERY](#module_METAQUERY)
+ - Module [PACKAGE](#module_PACKAGE)
+ - Module [PROGRAM](#module_PROGRAM)
+ - Module [PROTO_DESCRIPTIONS](#module_PROTO_DESCRIPTIONS)
+ - Module [PROTO_REGISTRY](#module_PROTO_REGISTRY)
+ - Module [PY2MODULE](#module_PY2MODULE)
+ - Module [PY2TEST](#module_PY2TEST)
+ - Module [PY2_LIBRARY](#module_PY2_LIBRARY)
+ - Module [PY2_PROGRAM](#module_PY2_PROGRAM)
+ - Module [PY3MODULE](#module_PY3MODULE)
+ - Module [PY3TEST_BIN](#module_PY3TEST_BIN)
+ - Module [PY3_LIBRARY](#module_PY3_LIBRARY)
+ - Module [PY3_PROGRAM_BIN](#module_PY3_PROGRAM_BIN)
+ - Module [PYCR_PROGRAM](#module_PYCR_PROGRAM)
+ - Module [PYTEST_BIN](#module_PYTEST_BIN)
+ - Module [PY_ANY_MODULE](#module_PY_ANY_MODULE)
+ - Module [RECURSIVE_LIBRARY](#module_RECURSIVE_LIBRARY)
+ - Module [RESOURCES_LIBRARY](#module_RESOURCES_LIBRARY)
+ - Module [R_MODULE](#module_R_MODULE)
+ - Module [SO_PROGRAM](#module_SO_PROGRAM)
+ - Module [TS_LIBRARY](#module_TS_LIBRARY)
+ - Module [UDF](#module_UDF)
+ - Module [UDF_LIB](#module_UDF_LIB)
+ - Module [UNION](#module_UNION)
+ - Module [UNITTEST](#module_UNITTEST)
+ - Module [UNITTEST_FOR](#module_UNITTEST_FOR)
+ - Module [UNITTEST_WITH_CUSTOM_ENTRY_POINT](#module_UNITTEST_WITH_CUSTOM_ENTRY_POINT)
+ - Module [YCR_PROGRAM](#module_YCR_PROGRAM)
+ - Module [YQL_PYTHON3_UDF](#module_YQL_PYTHON3_UDF)
+ - Module [YQL_PYTHON3_UDF_TEST](#module_YQL_PYTHON3_UDF_TEST)
+ - Module [YQL_PYTHON_UDF](#module_YQL_PYTHON_UDF)
+ - Module [YQL_PYTHON_UDF_PROGRAM](#module_YQL_PYTHON_UDF_PROGRAM)
+ - Module [YQL_PYTHON_UDF_TEST](#module_YQL_PYTHON_UDF_TEST)
+ - Module [YQL_UDF_MODULE](#module_YQL_UDF_MODULE)
+ - Module [YQL_UDF_TEST](#module_YQL_UDF_TEST)
+ - Module [YT_UNITTEST](#module_YT_UNITTEST)
+ - Module [Y_BENCHMARK](#module_Y_BENCHMARK)
+ * [Macros](#macros)
+ - Macros [AARS](#macro_AARS) .. [ADD_COMPILABLE_TRANSLATE](#macro_ADD_COMPILABLE_TRANSLATE)
+ - Macros [ADD_COMPILABLE_TRANSLIT](#macro_ADD_COMPILABLE_TRANSLIT) .. [ANNOTATION_PROCESSOR](#macro_ANNOTATION_PROCESSOR)
+ - Macros [ARCHIVE](#macro_ARCHIVE) .. [BUILDWITH_CYTHON_CPP](#macro_BUILDWITH_CYTHON_CPP)
+ - Macros [BUILDWITH_RAGEL6](#macro_BUILDWITH_RAGEL6) .. [CFLAGS](#macro_CFLAGS)
+ - Macros [CGO_CFLAGS](#macro_CGO_CFLAGS) .. [COLLECT_YDB_API_SPECS_LEGACY](#macro_COLLECT_YDB_API_SPECS_LEGACY)
+ - Macros [COMPILE_C_AS_CXX](#macro_COMPILE_C_AS_CXX) .. [COPY_FILE](#macro_COPY_FILE)
+ - Macros [COPY_FILES_TO_BUILD_PREFIX](#macro_COPY_FILES_TO_BUILD_PREFIX) .. [CREDITS_DISCLAIMER](#macro_CREDITS_DISCLAIMER)
+ - Macros [CTEMPLATE_VARNAMES](#macro_CTEMPLATE_VARNAMES) .. [DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE](#macro_DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE)
+ - Macros [DECLARE_EXTERNAL_HOST_RESOURCES_PACK](#macro_DECLARE_EXTERNAL_HOST_RESOURCES_PACK) .. [DOCS_BUILDER](#macro_DOCS_BUILDER)
+ - Macros [DOCS_CONFIG](#macro_DOCS_CONFIG) .. [ENABLE](#macro_ENABLE)
+ - Macros [ENABLE_PREVIEW](#macro_ENABLE_PREVIEW) .. [EXPOSE](#macro_EXPOSE)
+ - Macros [EXTERNAL_JAR](#macro_EXTERNAL_JAR) .. [FLAT_JOIN_SRCS_GLOBAL](#macro_FLAT_JOIN_SRCS_GLOBAL)
+ - Macros [FORK_SUBTESTS](#macro_FORK_SUBTESTS) .. [GENERATED_SRCS](#macro_GENERATED_SRCS)
+ - Macros [GENERATE_ENUM_SERIALIZATION](#macro_GENERATE_ENUM_SERIALIZATION) .. [GO_CGO2_FLAGS](#macro_GO_CGO2_FLAGS)
+ - Macros [GO_COMPILE_FLAGS](#macro_GO_COMPILE_FLAGS) .. [GO_LINK_FLAGS](#macro_GO_LINK_FLAGS)
+ - Macros [GO_MOCKGEN_FROM](#macro_GO_MOCKGEN_FROM) .. [GO_TEST_SRCS](#macro_GO_TEST_SRCS)
+ - Macros [GO_XTEST_EMBED_PATTERN](#macro_GO_XTEST_EMBED_PATTERN) .. [INCLUDE_TAGS](#macro_INCLUDE_TAGS)
+ - Macros [INDUCED_DEPS](#macro_INDUCED_DEPS) .. [JAVAC_FLAGS](#macro_JAVAC_FLAGS)
+ - Macros [JAVA_DEPENDENCIES_CONFIGURATION](#macro_JAVA_DEPENDENCIES_CONFIGURATION) .. [JAVA_TEST_DEPS](#macro_JAVA_TEST_DEPS)
+ - Macros [JDK_VERSION](#macro_JDK_VERSION) .. [LIB_REQUIREMENTS](#macro_LIB_REQUIREMENTS)
+ - Macros [LICENSE](#macro_LICENSE) .. [LLVM_COMPILE_C](#macro_LLVM_COMPILE_C)
+ - Macros [LLVM_COMPILE_CXX](#macro_LLVM_COMPILE_CXX) .. [MAPKIT_ADDINCL](#macro_MAPKIT_ADDINCL)
+ - Macros [MASMFLAGS](#macro_MASMFLAGS) .. [NODE_MODULES](#macro_NODE_MODULES)
+ - Macros [NO_BUILD_IF](#macro_NO_BUILD_IF) .. [NO_EXPORT_DYNAMIC_SYMBOLS](#macro_NO_EXPORT_DYNAMIC_SYMBOLS)
+ - Macros [NO_EXTENDED_SOURCE_SEARCH](#macro_NO_EXTENDED_SOURCE_SEARCH) .. [NO_PYTHON_COVERAGE](#macro_NO_PYTHON_COVERAGE)
+ - Macros [NO_RUNTIME](#macro_NO_RUNTIME) .. [OPENSOURCE_EXPORT_REPLACEMENT](#macro_OPENSOURCE_EXPORT_REPLACEMENT)
+ - Macros [ORIGINAL_SOURCE](#macro_ORIGINAL_SOURCE) .. [PIRE_INLINE](#macro_PIRE_INLINE)
+ - Macros [PIRE_INLINE_CMD](#macro_PIRE_INLINE_CMD) .. [PYTHON2_ADDINCL](#macro_PYTHON2_ADDINCL)
+ - Macros [PYTHON2_MODULE](#macro_PYTHON2_MODULE) .. [PY_NAMESPACE](#macro_PY_NAMESPACE)
+ - Macros [PY_PROTOS_FOR](#macro_PY_PROTOS_FOR) .. [REAL_LINK_EXE_IMPL](#macro_REAL_LINK_EXE_IMPL)
+ - Macros [RECURSE](#macro_RECURSE) .. [RESOURCE_FILES](#macro_RESOURCE_FILES)
+ - Macros [RESTRICT_LICENSES](#macro_RESTRICT_LICENSES) .. [RUN_PYTHON](#macro_RUN_PYTHON)
+ - Macros [SDBUS_CPP_ADAPTOR](#macro_SDBUS_CPP_ADAPTOR) .. [SIZE](#macro_SIZE)
+ - Macros [SKIP_TEST](#macro_SKIP_TEST) .. [SRC_CPP_AVX2](#macro_SRC_CPP_AVX2)
+ - Macros [SRC_CPP_PIC](#macro_SRC_CPP_PIC) .. [SRC_C_SSE3](#macro_SRC_C_SSE3)
+ - Macros [SRC_C_SSE4](#macro_SRC_C_SSE4) .. [SYMLINK](#macro_SYMLINK)
+ - Macros [SYSTEM_PROPERTIES](#macro_SYSTEM_PROPERTIES) .. [TIMEOUT](#macro_TIMEOUT)
+ - Macros [UBERJAR](#macro_UBERJAR) .. [UPDATE_VCS_JAVA_INFO_NODEP](#macro_UPDATE_VCS_JAVA_INFO_NODEP)
+ - Macros [USE_COMMON_GOOGLE_APIS](#macro_USE_COMMON_GOOGLE_APIS) .. [USE_PERL_LIB](#macro_USE_PERL_LIB)
+ - Macros [USE_PLANTUML](#macro_USE_PLANTUML) .. [WERROR](#macro_WERROR)
+ - Macros [WINDOWS_MANIFEST](#macro_WINDOWS_MANIFEST) .. [YABS_GENERATE_CONF](#macro_YABS_GENERATE_CONF)
+ - Macros [YABS_GENERATE_PHANTOM_CONF_PATCH](#macro_YABS_GENERATE_PHANTOM_CONF_PATCH) .. [YT_SPEC](#macro_YT_SPEC)
+## Multimodules <a name="multimodules"></a>
+
+###### Multimodule [DLL\_JAVA][]() <a name="multimodule_DLL_JAVA"></a>
+DLL built using swig for Java. Produces dynamic library and a .jar.
+Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+.jar goes on the classpath.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+
+###### Multimodule [DOCS][]() <a name="multimodule_DOCS"></a>
+Documentation project multimodule.
+
+When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder).
+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 [FBS\_LIBRARY][]() <a name="multimodule_FBS_LIBRARY"></a>
+Build some variant of Flatbuffers library.
+
+The particular variant is selected based on where PEERDIR to FBS\_LIBRARY
+comes from.
+
+Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+When PEERDIR comes from module for particular language appropriate variant
+is selected.
+
+Notes: FBS\_NAMESPACE must be specified in all dependent FBS\_LIBRARY modules
+ if build of Go code is requested.
+
+###### Multimodule [JAR\_PROGRAM][] <a name="multimodule_JAR_PROGRAM"></a>
+Not documented yet.
+
+###### Multimodule [JAVA\_CONTRIB\_PROGRAM][] <a name="multimodule_JAVA_CONTRIB_PROGRAM"></a>
+Not documented yet.
+
+###### Multimodule [JAVA\_PROGRAM][]() <a name="multimodule_JAVA_PROGRAM"></a>
+The module describing java programs build.
+Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Multimodule [JTEST][] <a name="multimodule_JTEST"></a>
+Not documented yet.
+
+###### Multimodule [JTEST\_FOR][] <a name="multimodule_JTEST_FOR"></a>
+Not documented yet.
+
+###### Multimodule [JTEST\_YMAKE][] <a name="multimodule_JTEST_YMAKE"></a>
+Not documented yet.
+
+###### Multimodule [JUNIT5][] <a name="multimodule_JUNIT5"></a>
+Not documented yet.
+
+###### Multimodule [JUNIT5\_YMAKE][] <a name="multimodule_JUNIT5_YMAKE"></a>
+Not documented yet.
+
+###### Multimodule [MAPS\_IDL\_LIBRARY][]() <a name="multimodule_MAPS_IDL_LIBRARY"></a>
+Definition of multimodule that builds various variants of libraries.
+The particular variant is selected based on where PEERDIR to IDL\_LIBRARY comes from.
+Now supported 2 variants: C++, Java
+Java version is not really a library but an archive of generated Java sources
+
+###### Multimodule [PROTO\_LIBRARY][]() <a name="multimodule_PROTO_LIBRARY"></a>
+Build some varian of protocol buffers library.
+
+The particular variant is selected based on where PEERDIR to PROTO\_LIBRARY comes from.
+
+Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+When PEERDIR comes from module for particular language appropriate variant is selected.
+PROTO\_LIBRARY also supports emission of GRPC code if GRPC() macro is specified.
+Notes:
+- Python versions emit C++ code in addition to Python as optimization.
+- In some PROTO\_LIBRARY-es Java or Python versions are excluded via EXCLUDE\_TAGS macros due to incompatibilities.
+- Use from DEPENDS or BUNDLE is not allowed
+
+Documentation: https://wiki.yandex-team.ru/yatool/proto\_library/
+
+See: [GRPC()](#macro\_GRPC), [OPTIMIZE\_PY\_PROTOS()](#macro\_OPTIMIZE\_PY\_PROTOS), [INCLUDE\_TAGS()](#macro\_INCLUDE\_TAGS), [EXCLUDE\_TAGS()](#macro\_EXCLUDE\_TAGS)
+
+###### Multimodule [PY23\_LIBRARY][]([name]) <a name="multimodule_PY23_LIBRARY"></a>
+Build PY2\_LIBRARY or PY3\_LIBRARY depending on incoming PEERDIR.
+Direct build or build by RECURSE creates both variants.
+This multimodule doesn't define any final targets, so use from DEPENDS or BUNDLE is not allowed.
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs
+
+###### Multimodule [PY23\_NATIVE\_LIBRARY][]([name]) <a name="multimodule_PY23_NATIVE_LIBRARY"></a>
+Build LIBRARY compatible with either Python 2.x or Python 3.x depending on incoming PEERDIR.
+
+This multimodule doesn't depend on Arcadia Python binary build. It is intended only for C++ code and cannot contain PY\_SRCS and USE\_PYTHON2 macros.
+Use these multimodule instead of PY23\_LIBRARY if the C++ extension defined in it will be used in PY2MODULE.
+While it doesn't bring Arcadia Python dependency itself, it is still compatible with Arcadia Python build and can be PEERDIR-ed from PY2\_LIBRARY and alikes.
+Proper version will be selected according to Python version of the module PEERDIR comes from.
+
+This mulrtimodule doesn't define any final targets so cannot be used from DEPENDS or BUNDLE macros.
+
+For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary
+
+@see [LIBRARY()](#module\_LIBRARY), [PY2MODULE()](#module\_PY2MODULE)
+
+###### Multimodule [PY23\_TEST][] <a name="multimodule_PY23_TEST"></a>
+Not documented yet.
+
+###### Multimodule [PY3TEST][]([name]) <a name="multimodule_PY3TEST"></a>
+The test module for Python 3.x based on py.test
+
+This module is compatible only with PYTHON3-tagged modules and selects peers from multimodules accordingly.
+This module is only compatible with Arcadia Python build (to avoid tests duplication from Python2/3-tests). For non-Arcadia python use PYTEST.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Multimodule [PY3\_PROGRAM][]([progname]) <a name="multimodule_PY3_PROGRAM"></a>
+Python 3.x binary program. Links all Python 3.x libraries and Python 3.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.
+This only compatible with PYTHON3-tagged modules and selects those from multimodules.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Multimodule [SANDBOX\_PY23\_TASK][] <a name="multimodule_SANDBOX_PY23_TASK"></a>
+Not documented yet.
+
+###### Multimodule [SANDBOX\_PY3\_TASK][]([Name]) <a name="multimodule_SANDBOX_PY3_TASK"></a>
+Multimodule describing Sandbox task (Python3 code that can be executed by Sandbox system).
+
+When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX\_PY3\_TASKs as libraries.
+The final artifact is provided when SANDBOX\_PY3\_TASK is referred to by DEPENDS and BUNDLE macros.
+As PEERDIR target, it works like regular PY3\_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX\_PY3\_TASKs.
+
+Currently Sandbox supports Python 3.x only in binary tasks, both variants will be compatible only with Python 3.x and py23 libraries
+and will select multimodule variants accordingly.
+
+Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+
+###### Multimodule [SANDBOX\_TASK][]([Name]) <a name="multimodule_SANDBOX_TASK"></a>
+Multimodule describing Sandbox task (Python code that can be executed by Sandbox system).
+
+When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX\_TASKs as libraries.
+The final artifact is provided when SANDBOX\_TASK is referred to by DEPENDS and BUNDLE macros.
+As PEERDIR target, it works like regular PY2\_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX\_TASKs.
+
+Currently Sandbox supports only Python 2.x, so both variants will be compatible only with Python 2.x modules
+and will select multimodule variants accordingly.
+
+Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+
+###### Multimodule [SSQLS\_LIBRARY][] <a name="multimodule_SSQLS_LIBRARY"></a>
+Not documented yet.
+
+###### Multimodule [YQL\_UDF][](name) <a name="multimodule_YQL_UDF"></a>
+User-defined function for YQL
+
+Multimodule which is YQL\_UDF\_MODULE when built directly or referred by BUNDLE and DEPENDS macros.
+If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs.
+
+@see: [YQL\_UDF\_MODULE()](#module\_YQL\_UDF\_MODULE)
+
+## Modules <a name="modules"></a>
+
+###### Module [BOOSTTEST][]([name]) _#deprecated_ <a name="module_BOOSTTEST"></a>
+Test module based on boost/test/unit\_test.hpp.
+As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects.
+No new module of this type should be introduced unless it is explicitly approved by C++ committee.
+
+###### Module [BOOSTTEST\_WITH\_MAIN][]([name]) _#deprecated_ <a name="module_BOOSTTEST_WITH_MAIN"></a>
+Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation
+
+###### Module [CI\_GROUP][]() <a name="module_CI_GROUP"></a>
+Module collects what is described directly inside it transitively by PEERDIRs.
+No particular layout of built artifacts is implied. This module is needed primarilly for CI dependency analysis and may not trigger builds at all.
+
+Is only used together with the macro PEERDIR() and FILES(). Don't use SRCS inside CI\_GROUP().
+
+###### Module [CONTAINER][]: \_BARE\_UNIT <a name="module_CONTAINER"></a>
+Not documented yet.
+
+###### Module [CONTAINER\_LAYER][]: \_BARE\_UNIT <a name="module_CONTAINER_LAYER"></a>
+Not documented yet.
+
+###### Module [CPP\_STYLE\_TEST][]: PY3TEST\_BIN <a name="module_CPP_STYLE_TEST"></a>
+Not documented yet.
+
+###### Module [CUSTOM\_BUILD\_LIBRARY][]: LIBRARY <a name="module_CUSTOM_BUILD_LIBRARY"></a>
+Not documented yet.
+
+###### Module [DEFAULT\_IOS\_INTERFACE][]: IOS\_INTERFACE <a name="module_DEFAULT_IOS_INTERFACE"></a>
+Not documented yet.
+
+###### Module [DLL][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_DLL"></a>
+Dynamic library module defintion.
+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").
+
+DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
+
+###### Module [DLL\_TOOL][] <a name="module_DLL_TOOL"></a>
+DLL\_TOOL is a DLL that can be used as a LD\_PRELOAD tool.
+
+###### Module [EXECTEST][]() <a name="module_EXECTEST"></a>
+Module definition of generic test that executes a binary.
+Use macro RUN to specify binary to run.
+
+@example:
+
+ EXECTEST()
+ OWNER(g:yatool)
+
+ RUN(
+ cat input.txt
+ )
+ DATA(
+ arcadia/devtools/ya/test/tests/exectest/data
+ )
+ DEPENDS(
+ devtools/dummy_arcadia/cat
+ )
+ TEST_CWD(devtools/ya/test/tests/exectest/data)
+ END()
+
+More examples: https://wiki.yandex-team.ru/yatool/test/#exec-testy
+
+@see: [RUN()](#macro\_RUN)
+
+###### Module [FAT\_OBJECT][]() <a name="module_FAT_OBJECT"></a>
+The "fat" object module. It will contain all its transitive dependencies reachable by PEERDIRs:
+static libraries, local (from own SRCS) and global (from peers') object files.
+
+Designed for use in XCode projects for iOS.
+
+###### Module [FUZZ][]() <a name="module_FUZZ"></a>
+In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput().
+This module should be reachable by RECURSE from /autocheck project in order for the corpus to be regularly updated.
+AFL and Libfuzzer are supported in Arcadia via a single interface, but the automatic fuzzing still works only through Libfuzzer.
+
+Example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2\_fuzzer.cc?rev=2919463#L58
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Module [GO\_DLL][](name major\_ver [minor\_ver] [PREFIX prefix]) <a name="module_GO_DLL"></a>
+Go ishared object module definition.
+Compile and link Go module to a shared object.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_LIBRARY][]([name]) <a name="module_GO_LIBRARY"></a>
+Go library module definition.
+Compile Go module as a library suitable for PEERDIR from other Go modules.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_PROGRAM][]([name]) <a name="module_GO_PROGRAM"></a>
+Go program module definition.
+Compile and link Go module to an executable program.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GO\_TEST][]([name]) <a name="module_GO_TEST"></a>
+Go test module definition.
+Compile and link Go module as a test suitable for running with Arcadia testing support.
+All usual testing support macros like DATA, DEPENDS, SIZE, REQUIREMENTS etc. are supported.
+Will select Go implementation on PEERDIR to PROTO\_LIBRARY.
+
+###### Module [GTEST][]([name]) <a name="module_GTEST"></a>
+Unit test module based on library/cpp/testing/gtest.
+It is recommended not to specify the name.
+
+Documentation: https://docs.yandex-team.ru/arcadia-cpp/cpp\_test
+
+###### Module [GTEST\_UGLY][]([name]) <a name="module_GTEST_UGLY"></a>
+Deprecated, do not use in new projects. Use GTEST instead.
+
+The test module based on gtest (contrib/libs/gtest contrib/libs/gmock).
+Use public documentation on gtest for details.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [G\_BENCHMARK][]([benchmarkname]) <a name="module_G_BENCHMARK"></a>
+Benchmark test based on the google benchmark.
+
+For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md
+
+###### Module [IOS\_INTERFACE][]() <a name="module_IOS_INTERFACE"></a>
+iOS GUI module definition
+
+###### Module [JAVA\_CONTRIB][]: \_JAR\_BASE <a name="module_JAVA_CONTRIB"></a>
+Not documented yet.
+
+###### Module [JAVA\_CONTRIB\_PROXY][]: \_JAR\_BASE <a name="module_JAVA_CONTRIB_PROXY"></a>
+Not documented yet.
+
+###### Module [JAVA\_LIBRARY][]() <a name="module_JAVA_LIBRARY"></a>
+The module describing java library build.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Module [LIBRARY][]() <a name="module_LIBRARY"></a>
+The regular static library module.
+
+The LIBRARY() is intermediate module, so when built directly it won't build its dependencies.
+It transitively provides its PEERDIRs to ultimate final target, where all LIBRARY() modules are built and linked together.
+
+This is C++ library, and it selects peers from multimodules accordingly.
+
+It makes little sense to mention LIBRARY in DEPENDS or BUNDLE, package and deploy it since it is not a standalone entity.
+In order to use library in tests PEERDIR it to link into tests.
+If you think you need to distribute static library please contact devtools@ for assistance.
+
+###### Module [MCU\_PROGRAM][]([progname]) <a name="module_MCU_PROGRAM"></a>
+Program module for microcontrollers. Converts binary to Intel HEX and Motorola S-record file formats.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [METAQUERY][]() _#deprecated_ <a name="module_METAQUERY"></a>
+Project Definition - KIWI Meta query. (Objected)
+
+https://wiki.yandex-team.ru/robot/manual/kiwi/techdoc/design/metaquery/
+
+###### Module [PACKAGE][](name) <a name="module_PACKAGE"></a>
+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.
+
+Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+
+@see: [PACK()](#macro\_PACK)
+
+###### Module [PROGRAM][]([progname]) <a name="module_PROGRAM"></a>
+Regular program module.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [PROTO\_DESCRIPTIONS][]: \_BARE\_UNIT <a name="module_PROTO_DESCRIPTIONS"></a>
+Not documented yet.
+
+###### Module [PROTO\_REGISTRY][]: PROTO\_DESCRIPTIONS <a name="module_PROTO_REGISTRY"></a>
+Not documented yet.
+
+###### Module [PY2MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY2MODULE"></a>
+The Python external module for Python2 and any system Python
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: this module will always PEERDIR Python2 version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR PY2\_LIBRARY or PY23\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY2TEST][]([name]) <a name="module_PY2TEST"></a>
+The test module for Python 2.x based on py.test
+
+This module is compatible only with PYTHON2-tagged modules and selects peers from multimodules accordingly.
+This module is compatible with non-Arcadia Python builds.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#python
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [PY2\_LIBRARY][]() _# deprecated_ <a name="module_PY2_LIBRARY"></a>
+Deprecated. Use PY23\_LIBRARY or PY3\_LIBRARY instead.
+Python 2.x binary built library. Builds sources from PY\_SRCS to data suitable for PY2\_PROGRAM.
+Adds dependencies to Python 2.x runtime library from Arcadia.
+This module is only compatible with PYTHON2-tagged modules and selects those from multimodules.
+This module is only compatible with Arcadia Python build.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY2\_PROGRAM][]([progname]) _# deprecated_ <a name="module_PY2_PROGRAM"></a>
+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.
+This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY3MODULE"></a>
+The Python external module for Python3 and any system Python
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: this module will always PEERDIR Python3 version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR PY3\_LIBRARY or PY23\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3TEST\_BIN][]() _#deprecated_ <a name="module_PY3TEST_BIN"></a>
+Same as PY3TEST. Don't use this, use PY3TEST instead.
+
+###### Module [PY3\_LIBRARY][]() <a name="module_PY3_LIBRARY"></a>
+Python 3.x binary library. Builds sources from PY\_SRCS to data suitable for PY2\_PROGRAM
+Adds dependencies to Python 2.x runtime library from Arcadia.
+This module is only compatible with PYTHON3-tagged modules and selects those from multimodules.
+This module is only compatible with Arcadia Python build.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [PY3\_PROGRAM\_BIN][]([progname]) <a name="module_PY3_PROGRAM_BIN"></a>
+Use instead of PY3\_PROGRAM only if ya.make with PY3\_PROGRAM() included in another ya.make
+In all other cases use PY3\_PROGRAM
+
+###### Module [PYCR\_PROGRAM][]([progname]) <a name="module_PYCR_PROGRAM"></a>
+pycare-specific program module. Generates pycare configs in addition to producing the program.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [PYTEST\_BIN][]() _#deprecated_ <a name="module_PYTEST_BIN"></a>
+Same as PY2TEST. Don't use this, use PY2TEST instead.
+
+###### Module [PY\_ANY\_MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_PY_ANY_MODULE"></a>
+The Python external module for any versio of Arcadia or system Python.
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+Note: Use PYTHON2\_MODULE()/PYTHON3\_MODULE() in order to PEERDIR proper version of PY23\_NATIVE\_LIBRARY.
+Do not PEERDIR any PY\*\_LIBRARY: this will link Python in and render artifact unusable as Python module.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/
+
+###### Module [RECURSIVE\_LIBRARY][]() <a name="module_RECURSIVE_LIBRARY"></a>
+The recursive ("fat") library module. It will contain all its transitive dependencies reachable by PEERDIRs:
+from static libraries, local (from own SRCS) and global (from peers') object files.
+
+Designed for use in XCode projects for iOS.
+
+###### Module [RESOURCES\_LIBRARY][]() <a name="module_RESOURCES_LIBRARY"></a>
+Definition of a module that brings its content from external source (Sandbox) via DECLARE\_EXTERNAL\_RESOURCE macro.
+This can participate in PEERDIRs of others as library but it cannot have own sources and PEERDIRs.
+
+@see: [DECLARE\_EXTERNAL\_RESOURCE()](#macro\_DECLARE\_EXTERNAL\_RESOURCE)
+
+###### Module [R\_MODULE][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_R_MODULE"></a>
+The external module for R language.
+1. major\_ver and minor\_ver must be integers.
+2. The resulting .so will have the prefix "lib".
+3. Processing EXPORTS and PREFIX is the same as for DLL module
+This is native DLL, so it will select C++ version from PROTO\_LIBRARY.
+
+###### Module [SO\_PROGRAM][](name major\_ver [minor\_ver] [EXPORTS symlist\_file] [PREFIX prefix]) <a name="module_SO_PROGRAM"></a>
+Executable dynamic library module defintion.
+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.
+
+###### Module [TS\_LIBRARY][]([name]) <a name="module_TS_LIBRARY"></a>
+The TypeScript/JavaScript library module, compiles TypeScript sources to JavaScript.
+Build results are JavaScript files, typings and source mappings (depending on local tsconfig.json settings).
+
+@see [NODE\_MODULES()](#macro\_NODE\_MODULES)
+@example
+
+ TS_LIBRARY()
+ SRCS(src/index.ts)
+ NODE_MODULES()
+ END()
+
+###### Module [UDF][](name [EXPORTS symlist\_file] [PREFIX prefix]) _# deprecated_ <a name="module_UDF"></a>
+The KiWi UDF module.
+Processing EXPORTS and PREFIX is the same as for DLL.
+
+https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
+
+###### Module [UDF\_LIB][]([name]) _# deprecated_ <a name="module_UDF_LIB"></a>
+The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib.
+
+###### Module [UNION][](name) <a name="module_UNION"></a>
+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/
+
+###### Module [UNITTEST][]([name]) <a name="module_UNITTEST"></a>
+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
+
+###### Module [UNITTEST\_FOR][](path/to/lib) <a name="module_UNITTEST_FOR"></a>
+Convenience extension of UNITTEST module.
+The UNINTTEST module with additional SRCDIR + ADDINCL + PEERDIR on path/to/lib.
+path/to/lib is the path to the directory with the LIBRARY project.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [UNITTEST\_WITH\_CUSTOM\_ENTRY\_POINT][]([name]) <a name="module_UNITTEST_WITH_CUSTOM_ENTRY_POINT"></a>
+Generic unit test module.
+
+###### Module [YCR\_PROGRAM][]([progname]) <a name="module_YCR_PROGRAM"></a>
+yacare-specific program module. Generates yacare configs in addition to producing the program.
+If name is not specified it will be generated from the name of the containing project directory.
+
+###### Module [YQL\_PYTHON3\_UDF][](name) <a name="module_YQL_PYTHON3_UDF"></a>
+The extension module for YQL with Python 3.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON3\_UDF\_TEST][](name) <a name="module_YQL_PYTHON3_UDF_TEST"></a>
+The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL\_PYTHON3\_UDF.
+
+This module will basically build itself as UDF and run as test using yql/tools/run\_python\_udf/run\_python\_udf tool.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+@see: [YQL\_PYTHON3\_UDF()](#module\_YQL\_PYTHON3\_UDF)
+
+###### Module [YQL\_PYTHON\_UDF][](name) <a name="module_YQL_PYTHON_UDF"></a>
+Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON\_UDF\_PROGRAM][](name) <a name="module_YQL_PYTHON_UDF_PROGRAM"></a>
+Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL).
+Unlike YQL\_UDF this is plain DLL module, so PEERDIRs to it are not allowed.
+
+https://yql.yandex-team.ru/docs/yt/udf/python/
+
+###### Module [YQL\_PYTHON\_UDF\_TEST][](name) <a name="module_YQL_PYTHON_UDF_TEST"></a>
+The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL\_PYTHON\_UDF.
+
+This module will basically build itself as UDF and run as test using yql/tools/run\_python\_udf/run\_python\_udf tool.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/
+
+@example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make
+
+@see: [YQL\_PYTHON\_UDF()](#module\_YQL\_PYTHON\_UDF)
+
+###### Module [YQL\_UDF\_MODULE][](name) <a name="module_YQL_UDF_MODULE"></a>
+The extension module for YQL with C++ UDF (User Defined Function YQL)
+
+https://yql.yandex-team.ru/docs/yt/udf/cpp/
+
+###### Module [YQL\_UDF\_TEST][]([name]) <a name="module_YQL_UDF_TEST"></a>
+The module to test YQL C++ UDF.
+
+Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Module [YT\_UNITTEST][]([name]) <a name="module_YT_UNITTEST"></a>
+YT Unit test module based on mapreduce/yt/library/utlib
+
+###### Module [Y\_BENCHMARK][]([benchmarkname]) <a name="module_Y_BENCHMARK"></a>
+Benchmark test based on the library/cpp/testing/benchmark.
+
+For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
+
+## Macros <a name="macros"></a>
+
+###### Macro [AARS][](Aars...) <a name="macro_AARS"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [AAR\_GRADLE\_SCRIPT\_GENERATOR][](python\_script) <a name="macro_AAR_GRADLE_SCRIPT_GENERATOR"></a>
+Not documented yet.
+
+###### Macro [AAR\_LOCAL\_MAVEN\_REPO][](repo...) <a name="macro_AAR_LOCAL_MAVEN_REPO"></a>
+Not documented yet.
+
+###### Macro [ACCELEO][](XSD{input}[], MTL{input}[], MTL\_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT\_NOAUTO{output}[], OUTPUT\_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") <a name="macro_ACCELEO"></a>
+Not documented yet.
+
+###### Macro [ADDINCL][]([FOR <lang>][GLOBAL dir]\* dirlist) _# builtin_ <a name="macro_ADDINCL"></a>
+The macro adds the directories to include/import search path to compilation flags of the current project.
+By default settings apply to C/C++ compilation namely sets -I<library path> flag, use FOR argument to change target command.
+@params:
+`FOR <lang>` - adds inclues/import serach path for othe language. E.g. `FOR proto` adds import search path for .proto files processing.
+`GLOBAL` - extends the search for headers (-I) on the dependent projects.
+
+###### Macro [ADDINCLSELF][]() <a name="macro_ADDINCLSELF"></a>
+The macro adds the -I<project source path> flag to the source compilation flags of the current project.
+
+###### Macro [ADD\_CHECK][] <a name="macro_ADD_CHECK"></a>
+Not documented yet.
+
+###### Macro [ADD\_CHECK\_PY\_IMPORTS][] <a name="macro_ADD_CHECK_PY_IMPORTS"></a>
+Not documented yet.
+
+###### Macro [ADD\_CLANG\_TIDY][]() <a name="macro_ADD_CLANG_TIDY"></a>
+Not documented yet.
+
+###### Macro [ADD\_COMPILABLE\_TRANSLATE][](Dict Name Options...) <a name="macro_ADD_COMPILABLE_TRANSLATE"></a>
+Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
+
+###### Macro [ADD\_COMPILABLE\_TRANSLIT][](TranslitTable NGrams Name Options...) <a name="macro_ADD_COMPILABLE_TRANSLIT"></a>
+Generate transliteration dictionary code
+This will emit both translit, untranslit and ngrams table codes those will be than further compiled into library
+
+###### Macro [ADD\_DLLS\_TO\_JAR][]() <a name="macro_ADD_DLLS_TO_JAR"></a>
+Not documented yet.
+
+###### Macro [ADD\_PERL\_MODULE][](Dir ModuleName) <a name="macro_ADD_PERL_MODULE"></a>
+Add dependency on specified Perl module to the library
+
+###### Macro [ADD\_PYTEST\_BIN][] <a name="macro_ADD_PYTEST_BIN"></a>
+Not documented yet.
+
+###### Macro [ADD\_PYTEST\_SCRIPT][] <a name="macro_ADD_PYTEST_SCRIPT"></a>
+Not documented yet.
+
+###### Macro [ADD\_YTEST][] <a name="macro_ADD_YTEST"></a>
+Not documented yet.
+
+###### Macro [ALLOCATOR][](Alloc) _# Default: LF_ <a name="macro_ALLOCATOR"></a>
+Set memory allocator implementation for the PROGRAM()/DLL() module.
+This may only be specified for programs and dlls, use in other modules leads to configuration errors.
+
+Available allocators are: "LF", "LF\_YT", "LF\_DBG", "YT", "J", "B", "BM", "C", "TCMALLOC", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE", "MIM", "HU".
+ - LF - lfalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc)
+ - LF\_YT - Allocator selection for YT (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/yt/ya.make)
+ - LF\_DBG - Debug allocator selection (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/dbg/ya.make)
+ - YT - The YTAlloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/ytalloc/impl/ya.make)
+ - J - The JEMalloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/jemalloc)
+ - B - The balloc allocator named Pyotr Popov and Anton Samokhvalov
+ - Discussion: https://ironpeter.at.yandex-team.ru/replies.xml?item\_no=126
+ - Code: https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/balloc
+ - BM - The balloc for market (agri@ commits from july 2018 till November 2018 saved)
+ - C - Like B, but can be disabled for each thread to LF or SYSTEM one (B can be disabled only to SYSTEM)
+ - MIM - Microsoft's mimalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/mimalloc)
+ - TCMALLOC - Google TCMalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/tcmalloc)
+ - GOOGLE - Google TCMalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/galloc)
+ - LOCKLESS - Allocator based upon lockless queues (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/lockless)
+ - SYSTEM - Use target system allocator
+ - FAKE - Don't link with any allocator
+
+More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/
+
+###### Macro [ALL\_PY\_SRCS][]([RECURSIVE] { | TOP\_LEVEL | NAMESPACE ns} [Dirs...]) <a name="macro_ALL_PY_SRCS"></a>
+Puts all .py-files from given Dirs (relative to projects') into PY\_SRCS of the current module.
+If Dirs is ommitted project directory is used
+
+`RECURSIVE` makes lookup recursive with resprect to Dirs
+`TOP\_LEVEL` and `NAMESPACE` are forwarded to `PY\_SRCS`
+
+Note: Only one such macro per module is allowed
+Note: Macro is designed to reject any ya.make files in Dirs except current one
+
+@see [PY\_SRCS()](#macro\_PY\_SRCS)
+
+###### Macro [ALL\_SRCS][]([GLOBAL] filenames...) <a name="macro_ALL_SRCS"></a>
+Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
+Call to ALL\_SRCS macro is equivalent to call to GLOBAL\_SRCS macro when GLOBAL keyword is specified
+as the first argument and is equivalent to call to SRCS macro otherwise.
+
+@example:
+
+ LIBRARY()
+ SET(MAKE_IT_GLOBAL GLOBAL)
+ ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
+ END()
+
+@see: [GLOBAL\_SRCS()](#macro\_GLOBAL\_SRCS), [SRCS()](#macro\_SRCS)
+
+###### Macro [ANNOTATION\_PROCESSOR][](processors...) <a name="macro_ANNOTATION_PROCESSOR"></a>
+The macro is in development.
+Used to specify annotation processors to build JAVA\_PROGRAM() and JAVA\_LIBRARY().
+
+###### Macro [ARCHIVE][](archive\_name [DONT\_COMPRESS] files...) <a name="macro_ARCHIVE"></a>
+Add arbitrary data to a modules. Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+
+Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+
+###### Macro [ARCHIVE\_ASM][](NAME archive\_name files...) <a name="macro_ARCHIVE_ASM"></a>
+Similar to the macro ARCHIVE, but:
+1. works faster and it is better to use for large files.
+2. Different syntax (see examples in codesearch or users/pg/tests/archive\_test)
+
+###### Macro [ARCHIVE\_BY\_KEYS][](archive\_name key [DONT\_COMPRESS] files...) <a name="macro_ARCHIVE_BY_KEYS"></a>
+Add arbitrary data to a module be accessible by specified key.
+Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+
+Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+
+###### Macro [ASM\_PREINCLUDE][](AsmFiles...) <a name="macro_ASM_PREINCLUDE"></a>
+Supply additional .asm files to all assembler calls within a module
+
+###### Macro [ASSERT][] <a name="macro_ASSERT"></a>
+Not documented yet.
+
+###### Macro [BASE\_CODEGEN][](tool\_path prefix) <a name="macro_BASE_CODEGEN"></a>
+Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
+
+###### Macro [BPF][](Input Output Opts...) <a name="macro_BPF"></a>
+Emit eBPF bytecode from .c file.
+Note: Output name is used as is, no extension added.
+
+###### Macro [BPF\_STATIC][](Input Output Opts...) <a name="macro_BPF_STATIC"></a>
+Emit eBPF bytecode from .c file.
+Note: Output name is used as is, no extension added.
+
+###### Macro [BUILDWITH\_CYTHON\_C][](Src Options...) <a name="macro_BUILDWITH_CYTHON_C"></a>
+Generates .c file from .pyx.
+
+###### Macro [BUILDWITH\_CYTHON\_CPP][](Src Options...) <a name="macro_BUILDWITH_CYTHON_CPP"></a>
+Generates .cpp file from .pyx.
+
+###### Macro [BUILDWITH\_RAGEL6][](Src Options...) <a name="macro_BUILDWITH_RAGEL6"></a>
+Compile .rl file using Ragel6.
+
+###### Macro [BUILD\_CATBOOST][](cbmodel cbname) <a name="macro_BUILD_CATBOOST"></a>
+Generate catboost model and access code.
+cbmodel - CatBoost model file name (\*.cmb).
+cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code.
+CatBoost specific macro.
+
+###### Macro [BUILD\_MN][]([CHECK] [PTR] [MULTI] mninfo mnname) _# matrixnet_ <a name="macro_BUILD_MN"></a>
+Generate MatrixNet data and access code using single command.
+Alternative macro BUILD\_MNS() works faster and better for large files.
+
+###### Macro [BUILD\_MNS][]([CHECK] NAME listname mninfos...) _# matrixnet_ <a name="macro_BUILD_MNS"></a>
+Generate MatrixNet data and access code using separate commands for support code, interface and data.
+Faster version of BUILD\_MN() macro for large files.
+
+###### Macro [BUILD\_ONLY\_IF][](variables) _# builtin_ <a name="macro_BUILD_ONLY_IF"></a>
+Print warning if all variables are false. For example, BUILD\_ONLY\_IF(LINUX WIN32)
+
+###### Macro [BUILD\_PLNS][](Src...) <a name="macro_BUILD_PLNS"></a>
+Generate interface header plnmodels.h for Relev model (PLN).
+Relev specific macro.
+
+###### Macro [BUILD\_YDL\_DESC][](Input Symbol Output) <a name="macro_BUILD_YDL_DESC"></a>
+Generate a descriptor for a Symbol located in a ydl module Input, and put it to the file Output.
+
+@example:
+
+ PACKAGE()
+ BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+ END()
+
+This will parse file ../types.ydl, generate a descriptor for a symbol Event defined in the said file, and put the descriptor to the Event.ydld.
+
+###### Macro [BUNDLE][](<Dir [NAME Name]>...) <a name="macro_BUNDLE"></a>
+Brings build artefact from module Dir under optional Name to the current module (e.g. UNION)
+If NAME is not specified, the name of the Dir's build artefact will be preserved
+It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice.
+Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one.
+
+###### Macro [CC\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_CC_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all C/C++ compilation commands in the module
+
+###### Macro [CFLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_CFLAGS"></a>
+Add the specified flags to the compilation command of C and C++ files.
+@params: GLOBAL - Propagates these flags to dependent projects
+Note: remember about the incompatibility flags for clang and cl (to set flags specifically for cl.exe use MSVC\_FLAGS).
+
+###### Macro [CGO\_CFLAGS][](Flags...) <a name="macro_CGO_CFLAGS"></a>
+Compiler flags specific to CGO compilation
+
+###### Macro [CGO\_LDFLAGS][](Files...) <a name="macro_CGO_LDFLAGS"></a>
+Linker flags specific to CGO linking
+
+###### Macro [CGO\_SRCS][](Files...) <a name="macro_CGO_SRCS"></a>
+.go sources to be built with CGO
+
+###### Macro [CHECK\_CONTRIB\_CREDITS][] <a name="macro_CHECK_CONTRIB_CREDITS"></a>
+Not documented yet.
+
+###### Macro [CHECK\_DEPENDENT\_DIRS][](DENY|ALLOW\_ONLY ([ALL|PEERDIRS|GLOB] dir)...) <a name="macro_CHECK_DEPENDENT_DIRS"></a>
+Specify project transitive dependencies constraints.
+
+@params:
+ 1. DENY: current module can not depend on module from any specified directory neither directly nor transitively.
+ 2. ALLOW\_ONLY: current module can not depend on module from a dir not specified in the directory list neither directly nor transitively.
+ 3. ALL: directory constraints following after this modifier are applied to both transitive PEERDIR dependencies and tool dependencies.
+ 4. PEERDIRS: directory constraints following after this modifier are applied to transitive PEERDIR dependencies only.
+ 5. GLOB: next directory constraint is an ANT glob pattern.
+ 6. EXCEPT: next constraint is an excption for the rest of other rules.
+
+Direcory constraints added before either ALL or PEERDIRS modifier is used are treated as ALL directory constraints.
+
+Note: Can be used multiple times on the same module all specified constraints will be checked.
+All macro invocation for the same module must use same constraints type (DENY or ALLOW\_ONLY)
+
+###### Macro [CHECK\_JAVA\_DEPS][](<yes|no>) <a name="macro_CHECK_JAVA_DEPS"></a>
+Check for different classes with duplicate name in classpath.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [CLANG\_EMIT\_AST\_CXX][](Input Output Opts...) <a name="macro_CLANG_EMIT_AST_CXX"></a>
+Emit Clang AST from .cpp file. CXXFLAGS and LLVM\_OPTS are passed in, while CFLAGS and C\_FLAGS\_PLATFORM are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [COLLECT\_FRONTEND\_FILES][](Varname, Dir) <a name="macro_COLLECT_FRONTEND_FILES"></a>
+Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
+
+###### Macro [COLLECT\_JINJA\_TEMPLATES][](varname path) <a name="macro_COLLECT_JINJA_TEMPLATES"></a>
+This macro collects all jinja and yaml files in the directory specified by second argument and
+stores result in the variable with mane specified by first parameter.
+
+###### Macro [COLLECT\_YDB\_API\_SPECS\_LEGACY][](VarName Paths...) _#deprecated_ <a name="macro_COLLECT_YDB_API_SPECS_LEGACY"></a>
+This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited
+
+###### Macro [COMPILE\_C\_AS\_CXX][]() <a name="macro_COMPILE_C_AS_CXX"></a>
+Compile .c files as .cpp ones within a module.
+
+###### Macro [COMPILE\_LUA][](Src, [NAME <import\_name>]) <a name="macro_COMPILE_LUA"></a>
+Compile LUA source file to object code using LUA 2.0
+Optionally override import name which is by default reflects Src name
+
+###### Macro [COMPILE\_LUA\_21][](Src, [NAME <import\_name>]) <a name="macro_COMPILE_LUA_21"></a>
+Compile LUA source file to object code using LUA 2.1
+Optionally override import name which is by default reflects Src name
+
+###### Macro [COMPILE\_NLG][](Src...) <a name="macro_COMPILE_NLG"></a>
+Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
+
+Alice-specific macro
+
+###### Macro [COMPILE\_SWIFT\_MODULE][](SRCS{input}[], BRIDGE\_HEADER{input}="", Flags...) <a name="macro_COMPILE_SWIFT_MODULE"></a>
+Not documented yet.
+
+###### Macro [CONFIGURE\_FILE][](from to) <a name="macro_CONFIGURE_FILE"></a>
+Copy file with the replacement of configuration variables in form of @ANY\_CONF\_VAR@ with their values.
+The values are collected during configure stage, while replacement itself happens during build stage.
+Used implicitly for .in-files processing.
+
+###### Macro [CONFTEST\_LOAD\_POLICY\_LOCAL][]() <a name="macro_CONFTEST_LOAD_POLICY_LOCAL"></a>
+Loads conftest.py files in a way that pytest does it
+
+###### Macro [CONLYFLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_CONLYFLAGS"></a>
+Add the specified flags to the compilation command of .c (but not .cpp) files.
+@params: GLOBAL - Distributes these flags on dependent projects
+
+###### Macro [COPY][] <a name="macro_COPY"></a>
+Not documented yet.
+
+###### Macro [COPY\_FILE][](File Destination [AUTO] [OUTPUT\_INCLUDES Deps...]) <a name="macro_COPY_FILE"></a>
+Copy file to build root. It is possible to change both location and the name.
+
+Parameters:
+- File - Source file name.
+- Destination - Output file name.
+- AUTO - Consider copied file for further processing automtically.
+- OUTPUT\_INCLUDES output\_includes... - Output file dependencies.
+
+The file will be just copied if AUTO boolean parameter is not specified. You should explicitly
+mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
+
+###### Macro [COPY\_FILES\_TO\_BUILD\_PREFIX][] <a name="macro_COPY_FILES_TO_BUILD_PREFIX"></a>
+Not documented yet.
+
+###### Macro [COPY\_FILE\_WITH\_CONTEXT][](FILE DEST [AUTO] [OUTPUT\_INCLUDES DEPS...]) <a name="macro_COPY_FILE_WITH_CONTEXT"></a>
+Copy file to build root the same way as it is done for COPY\_FILE, but also
+propagates the context of the source file.
+
+###### Macro [CPP\_ADDINCL][](Dirs...) <a name="macro_CPP_ADDINCL"></a>
+Not documented yet.
+
+###### Macro [CPP\_ENUMS\_SERIALIZATION][] <a name="macro_CPP_ENUMS_SERIALIZATION"></a>
+Not documented yet.
+
+###### Macro [CPP\_PROTO\_PLUGIN][](Name Tool Suf DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN"></a>
+Define protoc plugin for C++ with given Name that emits code into 1 extra output
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CPP\_PROTO\_PLUGIN0][](Name Tool DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN0"></a>
+Define protoc plugin for C++ with given Name that emits code into regular outputs
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CPP\_PROTO\_PLUGIN2][](Name Tool Suf1 Suf2 DEPS <Dependencies>) <a name="macro_CPP_PROTO_PLUGIN2"></a>
+Define protoc plugin for C++ with given Name that emits code into 2 extra outputs
+using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [CREATE\_BUILDINFO\_FOR][](GenHdr) <a name="macro_CREATE_BUILDINFO_FOR"></a>
+Creates header file to access some information about build specified via configuration variables.
+Unlike CREATE\_SVNVERSION\_FOR() it doesn't take revion information from VCS, it uses revision and SandboxTaskId passed via -D options to ya make
+
+###### Macro [CREATE\_INIT\_PY\_STRUCTURE][] <a name="macro_CREATE_INIT_PY_STRUCTURE"></a>
+Not documented yet.
+
+###### Macro [CREDITS\_DISCLAIMER][] <a name="macro_CREDITS_DISCLAIMER"></a>
+Not documented yet.
+
+###### Macro [CTEMPLATE\_VARNAMES][](File) <a name="macro_CTEMPLATE_VARNAMES"></a>
+Generate File.varnames.h using contrib/libs/ctemplate/make\_tpl\_varnames\_h
+
+Documentation: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/ctemplate/README.md
+
+###### Macro [CUDA\_NVCC\_FLAGS][](compiler flags) <a name="macro_CUDA_NVCC_FLAGS"></a>
+Add the specified flags to the compile line .cu-files.
+
+###### Macro [CUSTOM\_LINK\_STEP\_SCRIPT][](name) <a name="macro_CUSTOM_LINK_STEP_SCRIPT"></a>
+Specifies name of a script for custom link step. The scripts
+should be placed in the build/scripts directory and are subject to
+review by devtools@.
+
+###### Macro [CXXFLAGS][](compiler\_flags) <a name="macro_CXXFLAGS"></a>
+Add the specified flags to the compilation command of .cpp (but not .c) files.
+
+###### Macro [DARWIN\_SIGNED\_RESOURCE][](Resource, Relpath) <a name="macro_DARWIN_SIGNED_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [DARWIN\_STRINGS\_RESOURCE][](Resource, Relpath) <a name="macro_DARWIN_STRINGS_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [DATA][]([path...]) <a name="macro_DATA"></a>
+Specifies the path to the data necessary test.
+Valid values are: arcadia/<path> , arcadia\_tests\_data/<path> and sbr://<resource\_id>.
+In the latter case resource will be brought to the working directory of the test before it is started
+
+Used only inside TEST modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#dannyeizrepozitorija
+
+###### Macro [DEB\_VERSION][](File) <a name="macro_DEB_VERSION"></a>
+Creates a header file DebianVersion.h define the DEBIAN\_VERSION taken from the File.
+
+###### Macro [DECIMAL\_MD5\_LOWER\_32\_BITS][](<fileName> [FUNCNAME funcName] [inputs...]) <a name="macro_DECIMAL_MD5_LOWER_32_BITS"></a>
+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 [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_BUNDLE][](name sbr:id FOR platform1 sbr:id FOR platform2...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE"></a>
+Associate name with sbr-id on platform.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_PACK][](RESOURCE\_NAME name sbr:id FOR platform1 sbr:id FOR platform2... RESOURCE\_NAME name1 sbr:id1 FOR platform1...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_HOST_RESOURCES_PACK"></a>
+Associate name with sbr-id on platform.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DECLARE\_EXTERNAL\_RESOURCE][](name sbr:id name1 sbr:id1...) _#builtin_ <a name="macro_DECLARE_EXTERNAL_RESOURCE"></a>
+Associate name with sbr-id.
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [DEFAULT][](varname value) _#builtin_ <a name="macro_DEFAULT"></a>
+Sets varname to value if value is not set yet
+
+###### Macro [DEPENDENCY\_MANAGEMENT][](path/to/lib1 path/to/lib2 ...) <a name="macro_DEPENDENCY_MANAGEMENT"></a>
+Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version.
+
+For example, if the moduse has PEERDIR (contrib/java/junit/junit), and
+ 1. specifies DEPENDENCY\_MANAGEMENT(contrib/java/junit/junit/4.12),
+ the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12;
+ 2. doesn't specify DEPENDENCY\_MANAGEMENT, PEERDIR automatically replaced
+ with the default from contrib/java/junit/junit/ya.make.
+ These defaults are always there and are supported by maven-import, which puts
+ there the maximum version available in contrib/java.
+
+The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B.
+
+If some module has both DEPENDENCY\_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins.
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+###### Macro [DEPENDS][](path1 [path2...]) _# builtin_ <a name="macro_DEPENDS"></a>
+Buildable targets that should be brought to the test run. This dependency isonly used when tests run is requested. It will build the specified modules andbring them to the working directory of the test (in their Arcadia paths). Itis reasonable to specify only final targets her (like programs, DLLs orpackages). DEPENDS to UNION is the only exception: UNIONs aretransitively closed at DEPENDS bringing all dependencies to the test.
+
+DEPENDS on multimodule will select and bring single final target. If more noneor more than one final target available in multimodule DEPENDS to it willproduce configuration error.
+
+###### Macro [DIRECT\_DEPS\_ONLY][] <a name="macro_DIRECT_DEPS_ONLY"></a>
+Add direct PEERDIR's only in java compile classpath
+
+###### Macro [DISABLE][](varname) _#builtin_ <a name="macro_DISABLE"></a>
+Sets varname to 'no'
+
+###### Macro [DISABLE\_DATA\_VALIDATION][]() <a name="macro_DISABLE_DATA_VALIDATION"></a>
+Not documented yet.
+
+###### Macro [DLL\_FOR][](path/to/lib [libname] [major\_ver [minor\_ver]] [EXPORTS symlist\_file]) _#builtin_ <a name="macro_DLL_FOR"></a>
+DLL module definition based on specified LIBRARY
+
+###### Macro [DOCS\_BUILDER][](tool) <a name="macro_DOCS_BUILDER"></a>
+Specify docs builder tool.
+Avalialbe tools: mkdocs and yfm (by default).
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DOCS\_CONFIG][](path) <a name="macro_DOCS_CONFIG"></a>
+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\_DIR][](path) <a name="macro_DOCS_DIR"></a>
+Specify directory with source .md files for DOCS multimodule if it differs from project directory.
+Path must be Arcadia root relative.
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DOCS\_INCLUDE\_SOURCES][](path...) <a name="macro_DOCS_INCLUDE_SOURCES"></a>
+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\_VARS][](variable1=value1 variable2=value2 ...) <a name="macro_DOCS_VARS"></a>
+Specify a set of default values of template variables for DOCS multimodule.
+There must be no spaces around "=". Values will be treated as strings.
+
+@see: [DOCS](#multimodule\_DOCS)
+
+###### Macro [DUMPERF\_CODEGEN][](Prefix) <a name="macro_DUMPERF_CODEGEN"></a>
+A special case BASE\_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
+
+###### Macro [DYNAMIC\_LIBRARY\_FROM][](Paths) <a name="macro_DYNAMIC_LIBRARY_FROM"></a>
+Use specified libraries as sources of DLL
+
+###### Macro IF(condition) .. [ELSE][]IF(other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_ELSE"></a>
+Apply macros if none of previous conditions hold
+
+###### Macro IF(condition) .. [ELSEIF][](other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_ELSEIF"></a>
+Apply macros if other\_condition holds while none of previous conditions hold
+
+###### Macro [EMBED\_JAVA\_VCS\_INFO][]() <a name="macro_EMBED_JAVA_VCS_INFO"></a>
+Embed manifest with vcs info into `EXTERNAL\_JAVA\_LIBRARY`
+By default this is disabled.
+
+###### Macro [ENABLE][](varname) _#builtin_ <a name="macro_ENABLE"></a>
+Sets varname to 'yes'
+
+###### Macro [ENABLE\_PREVIEW][]() <a name="macro_ENABLE_PREVIEW"></a>
+Enable java preview features.
+
+###### Macro [END][]() _# builtin_ <a name="macro_END"></a>
+The end of the module
+
+###### Macro IF(condition) .. ELSEIF(other\_condition) .. ELSE() .. [ENDIF][]() _#builtin_ <a name="macro_ENDIF"></a>
+End of conditional construct
+
+###### Macro [ENV][](key[=value]) <a name="macro_ENV"></a>
+Sets env variable key to value (gets value from system env by default).
+
+###### Macro [EXCLUDE][] <a name="macro_EXCLUDE"></a>
+EXCLUDE(prefixes)
+
+The macro is in development.
+Specifies which libraries should be excluded from the classpath.
+
+###### Macro [EXCLUDE\_TAGS][](tags...) _# builtin_ <a name="macro_EXCLUDE_TAGS"></a>
+Instantiate from multimodule all variants except ones with tags listed
+
+###### Macro [EXPORTS\_SCRIPT][](exports\_file) <a name="macro_EXPORTS_SCRIPT"></a>
+Specify exports script within PROGRAM, DLL and DLL-derived modules.
+This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files.
+The other option use EXPORTS parameter of the DLL module itself.
+
+@see: [DLL](#module\_DLL)
+
+###### Macro [EXPORT\_ALL\_DYNAMIC\_SYMBOLS][]() <a name="macro_EXPORT_ALL_DYNAMIC_SYMBOLS"></a>
+Export all non-hidden symbols as dynamic when linking a PROGRAM.
+
+###### Macro [EXPORT\_YMAPS\_PROTO][]() _# maps-specific_ <a name="macro_EXPORT_YMAPS_PROTO"></a>
+Maps-specific .proto handling: IMPORT\_YMAPS\_PROTO() + maps protobuf namespace.
+
+###### Macro [EXPOSE][](OutputsToExport...) <a name="macro_EXPOSE"></a>
+Allows to mark outputs of macro command as unused in the current module but intended
+to be used in modules consuming current via PEERDIR.
+
+TODO(DEVTOOLS-9000) proper implementation needed
+
+###### Macro [EXTERNAL\_JAR][] <a name="macro_EXTERNAL_JAR"></a>
+Not documented yet.
+
+###### Macro [EXTERNAL\_RESOURCE][](...) _#builtin, deprecated_ <a name="macro_EXTERNAL_RESOURCE"></a>
+Don't use this. Use RESOURCE\_LIBRARY or FROM\_SANDBOX instead
+
+###### Macro [EXTRADIR][](...) _#builtin, deprecated_ <a name="macro_EXTRADIR"></a>
+Ignored
+
+###### Macro [EXTRALIBS][](liblist) _# builtin_ <a name="macro_EXTRALIBS"></a>
+Add external dynamic libraries during program linkage stage
+
+###### Macro [EXTRALIBS\_STATIC][](Libs...) <a name="macro_EXTRALIBS_STATIC"></a>
+Add the specified external static libraries to the program link
+
+###### Macro [FAT\_RESOURCE][] <a name="macro_FAT_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [FBS\_NAMESPACE][](NAMESPACE, PATH...) <a name="macro_FBS_NAMESPACE"></a>
+Not documented yet.
+
+###### Macro [FILES][] <a name="macro_FILES"></a>
+Not documented yet.
+
+###### Macro [FLATC\_FLAGS][](flags...) <a name="macro_FLATC_FLAGS"></a>
+Add flags to flatc command line
+
+###### Macro [FLAT\_JOIN\_SRCS\_GLOBAL][](Out Src...) <a name="macro_FLAT_JOIN_SRCS_GLOBAL"></a>
+Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+This macro places all files into single file, so will work with any sources.
+You should specify file name with the extension as Out. Further processing will be done according to this extension.
+
+###### Macro [FORK\_SUBTESTS][]() <a name="macro_FORK_SUBTESTS"></a>
+Splits the test run in chunks on subtests.
+The number of chunks can be overridden using the macro SPLIT\_FACTOR.
+
+Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FORK\_TESTS][]() <a name="macro_FORK_TESTS"></a>
+Splits a test run on chunks by test classes.
+The number of chunks can be overridden using the macro SPLIT\_FACTOR.
+
+Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FORK\_TEST\_FILES][]() <a name="macro_FORK_TEST_FILES"></a>
+Only for PY2TEST and PY3TEST: splits a file executable with the tests on chunks in the files listed in TEST\_SRCS
+Compatible with FORK\_(SUB)TESTS.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [FROM\_ARCHIVE][](Src [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE]) <a name="macro_FROM_ARCHIVE"></a>
+Process file archive as [FROM\_SANDBOX()](#macro\_FROM\_SANDBOX).
+
+###### Macro [FROM\_MDS][]([FILE] key [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE]) <a name="macro_FROM_MDS"></a>
+Download resource from MDS with the specified key and process like [FROM\_SANDBOX()](#macro\_FROM\_SANDBOX).
+
+###### Macro [FROM\_NPM][](NAME VERSION SKY\_ID INTEGRITY INTEGRITY\_ALGO TARBALL\_PATH) <a name="macro_FROM_NPM"></a>
+Not documented yet.
+
+###### Macro [FROM\_SANDBOX][]([FILE] resource\_id [AUTOUPDATED script] [RENAME <resource files>] OUT\_[NOAUTO] <output files> [EXECUTABLE] [OUTPUT\_INCLUDES <include files>]) <a name="macro_FROM_SANDBOX"></a>
+Download the resource from the Sandbox, unpack (if not explicitly specified word FILE) and add OUT files to the build. EXECUTABLE makes them executable.
+You may specify extra dependencies that output files bring using OUTPUT\_INCLUDES. The change of these may e.g. lead to recompilation of .cpp files extracted from resource.
+If there is no default processing for OUT files or you need process them specially use OUT\_NOAUTO instead of OUT.
+
+It is disallowed to specify directory as OUT/OUT\_NOAUTO since all outputs of commands shall be known to build system.
+
+RENAME renames files to the corresponding OUT and OUT\_NOAUTO outputs:
+FROM\_SANDBOX(resource\_id RENAME in\_file1 in\_file2 OUT out\_file1 out\_file2 out\_file3)
+FROM\_SANDBOX(resource\_id RENAME in\_file1 OUT out\_file1 RENAME in\_file2 OUT out\_file2)
+FROM\_SANDBOX(FILE resource\_id RENAME resource\_file OUT out\_name)
+
+RENAME RESOURCE allows to rename the resource without specifying its file name.
+
+If AUTOUPDATED is specified than macro will be regularly updated according to autoupdate script. The dedicated Sandbox task scans the arcadia and
+changes resource\_ids in such macros if newer resource of specified type is available. Note that the task seeks AUTOUPDATED in specific position,
+so you shall place it immediately after resource\_id.
+
+###### Macro [FUZZ\_DICTS][](path1 [path2...]) <a name="macro_FUZZ_DICTS"></a>
+Allows you to specify dictionaries, relative to the root of Arcadia, which will be used in Fuzzing.
+Libfuzzer and AFL use a single syntax for dictionary descriptions.
+Should only be used in FUZZ modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Macro [FUZZ\_OPTS][](opt1 [Opt2...]) <a name="macro_FUZZ_OPTS"></a>
+Overrides or adds options to the corpus mining and fuzzer run.
+Currently supported only Libfuzzer, so you should use the options for it.
+Should only be used in FUZZ modules.
+
+@example:
+
+ FUZZ_OPTS (
+ -max_len=1024
+ -rss_limit_mb=8192
+ )
+
+Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+
+###### Macro [GENERATED\_SRCS][](srcs... PARSE\_META\_FROM cpp\_srcs... [OUTPUT\_INCLUDES output\_includes...] [OPTIONS]) <a name="macro_GENERATED_SRCS"></a>
+Generate sources using Jinja 2 template engine.
+
+srcs... - list of text files which will be generated during build time by templates. Each template must be
+ placed to the place in source tree where corresponding source file should be generated. Name of
+ template must be "<name\_of\_src\_file>.markettemplate". For example if you want to generate file "example.cpp"
+ then template should be named "example.cpp.markettemplate".
+PARSE\_META\_FROM cpp\_srcs... - list of C++ source files (.cpp, .h) which will be parsed using clang library
+ and metainformation extracted from the files will be made available for templates. Example of
+ template code fragment using metainformation: {{ meta.objects["@N@std@S@string"].name }}
+OUTPUT\_INCLUDES output\_includes... - in cases when build system parser fails to determine all headers
+ which generated files include, you can specify additional headers here. In a normal situation this should
+ not be needed and this feature could be removed in the future.
+OPTIONS - additional options for code\_generator utility
+
+Examples of templates can be found in directory market/tools/code\_generator/templates.
+Metainformation does not contain entries for every object declared in C++ files specified in PARSE\_META\_FROM
+parameter. To include some object into consideration you need to mark it by attribute. Attributes can
+automatically add more attributes to dependent objects. This behavior depends on attribute definition.
+
+More information will be available (eventually:) here: https://wiki.yandex-team.ru/Users/denisk/codegenerator/
+
+###### Macro [GENERATE\_ENUM\_SERIALIZATION][](File.h) <a name="macro_GENERATE_ENUM_SERIALIZATION"></a>
+Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.
+
+Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+
+###### Macro [GENERATE\_ENUM\_SERIALIZATION\_WITH\_HEADER][](File.h) <a name="macro_GENERATE_ENUM_SERIALIZATION_WITH_HEADER"></a>
+Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module
+Provide access to serialization functions via generated header File\_serialized.h
+
+Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+
+###### Macro [GENERATE\_PY\_PROTOS][](ProtoFiles...) _# deprecated_ <a name="macro_GENERATE_PY_PROTOS"></a>
+Generate python bindings for protobuf files.
+Macro is obsolete and not recommended for use!
+
+###### Macro [GENERATE\_SCRIPT][] <a name="macro_GENERATE_SCRIPT"></a>
+heretic@ promised to make tutorial here
+Don't forget
+Feel free to remind
+
+###### Macro [GEN\_SCHEEME2][](scheeme\_name from\_file dependent\_files...) <a name="macro_GEN_SCHEEME2"></a>
+Generates a C++ description for structure(contains the field RecordSig) in the specified file (and connected).
+
+1. ${scheeme\_name}.inc - the name of the generated file.
+2. Use an environment variable - DATAWORK\_SCHEEME\_EXPORT\_FLAGS that allows to specify flags to tools/structparser
+
+@example:
+
+ SET(DATAWORK_SCHEEME_EXPORT_FLAGS --final_only -m "::")
+
+all options are passed to structparser (in this example --final\_only - do not export heirs with public base that contains the required field,,- m "::" only from the root namespace)
+sets in extra option
+
+@example:
+
+ SET(EXTRACT_STRUCT_INFO_FLAGS -f \"const static ui32 RecordSig\"
+ -u \"RecordSig\" -n${scheeme_name}SchemeInfo ----gcc44_no_typename no_complex_overloaded_func_export
+ ${DATAWORK_SCHEEME_EXPORT_FLAGS})
+
+for compatibility with C++ compiler and the external environment.
+See tools/structparser for more details.
+
+###### Macro [GLOBAL\_SRCS][](filenames...) <a name="macro_GLOBAL_SRCS"></a>
+Make all source files listed as GLOBAL.
+Call to GLOBAL\_SRCS macro is equivalent to call to SRCS macro when each source file is marked with GLOBAL keyword.
+Arcadia root relative or project dir relative paths are supported for filenames arguments. GLOBAL keyword is not
+recognized for GLOBAL\_SRCS in contrast to SRCS macro.
+
+@example:
+Consider the file to ya.make:
+
+ LIBRARY()
+ GLOBAL_SRCS(foo.cpp bar.cpp)
+ END()
+
+@see: [SRCS()](#macro\_SRCS)
+
+###### Macro [GO\_ASM\_FLAGS][](flags) <a name="macro_GO_ASM_FLAGS"></a>
+Add the specified flags to the go asm compile command line.
+
+###### Macro [GO\_BENCH\_TIMEOUT][](x) <a name="macro_GO_BENCH_TIMEOUT"></a>
+Sets timeout in seconds for 1 Benchmark in go benchmark suite
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [GO\_CGO1\_FLAGS][](flags) <a name="macro_GO_CGO1_FLAGS"></a>
+Add the specified flags to the go cgo compile command line.
+
+###### Macro [GO\_CGO2\_FLAGS][](flags) <a name="macro_GO_CGO2_FLAGS"></a>
+Add the specified flags to the go cgo compile command line.
+
+###### Macro [GO\_COMPILE\_FLAGS][](flags) <a name="macro_GO_COMPILE_FLAGS"></a>
+Add the specified flags to the go compile command line.
+
+###### Macro [GO\_EMBED\_DIR][](DIR) <a name="macro_GO_EMBED_DIR"></a>
+Define an embed directory DIR.
+
+###### Macro [GO\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_EMBED_PATTERN"></a>
+Define an embed pattern.
+
+###### Macro GO\_TEST\_EMBED\_DIR(DIR) <a name="macro_GO_EMBED_TEST_DIR"></a>
+Define an embed directory DIR for internal go tests.
+
+###### Macro GO\_XTEST\_EMBED\_DIR(DIR) <a name="macro_GO_EMBED_XTEST_DIR"></a>
+Define an embed directory DIR for external go tests.
+
+###### Macro [GO\_FAKE\_OUTPUT][](go-src-files...) <a name="macro_GO_FAKE_OUTPUT"></a>
+Not documented yet.
+
+###### Macro [GO\_GRPC\_GATEWAY\_SRCS][]() <a name="macro_GO_GRPC_GATEWAY_SRCS"></a>
+Use of grpc-gateway plugin (Supported for Go only).
+
+###### Macro [GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS][]() <a name="macro_GO_GRPC_GATEWAY_SWAGGER_SRCS"></a>
+Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
+
+###### Macro [GO\_LDFLAGS][](Flags...) <a name="macro_GO_LDFLAGS"></a>
+Link flags for GO\_PROGRAM linking from .go sources
+
+###### Macro [GO\_LINK\_FLAGS][](flags) <a name="macro_GO_LINK_FLAGS"></a>
+Add the specified flags to the go link command line.
+
+###### Macro [GO\_MOCKGEN\_FROM][](Path) <a name="macro_GO_MOCKGEN_FROM"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_MOCKS][]() <a name="macro_GO_MOCKGEN_MOCKS"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_REFLECT][]() <a name="macro_GO_MOCKGEN_REFLECT"></a>
+Not documented yet.
+
+###### Macro [GO\_MOCKGEN\_TYPES][](First, Rest...) <a name="macro_GO_MOCKGEN_TYPES"></a>
+Not documented yet.
+
+###### Macro [GO\_PACKAGE\_NAME][](Name) <a name="macro_GO_PACKAGE_NAME"></a>
+Override name of a Go package.
+
+###### Macro [GO\_PROTO\_PLUGIN][](Name Ext Tool [DEPS dependencies...]) <a name="macro_GO_PROTO_PLUGIN"></a>
+Define protoc plugin for GO with given Name that emits extra output with provided extension
+Ext using Tool. Extra dependencies are passed via DEPS.
+
+###### Macro [GO\_SKIP\_TESTS][](TestNames...) <a name="macro_GO_SKIP_TESTS"></a>
+Define a set of tests that should not be run.
+NB! Subtests are not taken into account!
+
+###### Macro [GO\_TEST\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_TEST_EMBED_PATTERN"></a>
+Define an embed pattern for internal go tests.
+
+###### Macro [GO\_TEST\_FOR][](path/to/module) _#builtin_ <a name="macro_GO_TEST_FOR"></a>
+Produces go test for specified module
+
+###### Macro [GO\_TEST\_SRCS][](Files...) <a name="macro_GO_TEST_SRCS"></a>
+.go sources for internal tests of a module
+
+###### Macro [GO\_XTEST\_EMBED\_PATTERN][](PATTERN) <a name="macro_GO_XTEST_EMBED_PATTERN"></a>
+Define an embed pattern for external go tests.
+
+###### Macro [GO\_XTEST\_SRCS][](Files...) <a name="macro_GO_XTEST_SRCS"></a>
+.go sources for external tests of a module
+
+###### Macro [GRPC][]() <a name="macro_GRPC"></a>
+Emit GRPC code for all .proto files in a PROTO\_LIBRARY.
+This works for all available PROTO\_LIBRARY versions (C++, Python 2.x, Pyton 3.x, Java and Go).
+
+###### Macro [IDEA\_EXCLUDE\_DIRS][](<excluded dirs>) <a name="macro_IDEA_EXCLUDE_DIRS"></a>
+Exclude specified directories from an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IDEA\_JAR\_SRCS][](Args...) <a name="macro_IDEA_JAR_SRCS"></a>
+Not documented yet.
+
+###### Macro [IDEA\_MODULE\_NAME][](module\_name) <a name="macro_IDEA_MODULE_NAME"></a>
+Set module name in an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IDEA\_RESOURCE\_DIRS][](<additional dirs>) <a name="macro_IDEA_RESOURCE_DIRS"></a>
+Set specified resource directories in an idea project generated by ya ide idea
+Have no effect on regular build.
+
+###### Macro [IF][](condition) .. ELSEIF(other\_condition) .. ELSE() .. ENDIF() _#builtin_ <a name="macro_IF"></a>
+Apply macros if condition holds
+
+###### Macro [INCLUDE][](filename) _#builtin_ <a name="macro_INCLUDE"></a>
+Include file textually and process it as a part of the ya.make
+
+###### Macro [INCLUDE\_TAGS][](tags...) _# builtin_ <a name="macro_INCLUDE_TAGS"></a>
+Additionally instantiate from multimodule all variants with tags listed (overrides default)
+
+###### Macro [INDUCED\_DEPS][](Extension Path...) _#builtin_ <a name="macro_INDUCED_DEPS"></a>
+States that files wih the Extension generated by the PROGRAM will depend on files in Path.
+This only useful in PROGRAM and similar modules. It will be applied if the PROGRAM is used in RUN\_PROGRAM macro.
+All Paths specified must be absolute arcadia paths i.e. start with ${ARCADIA\_ROOT} ${ARCADIA\_BUILD\_ROOT}, ${CURDIR} or ${BINDIR}.
+
+###### Macro [IOS\_APP\_ASSETS\_FLAGS][](Flags...) <a name="macro_IOS_APP_ASSETS_FLAGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_APP\_COMMON\_FLAGS][](Flags...) <a name="macro_IOS_APP_COMMON_FLAGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_APP\_SETTINGS][] <a name="macro_IOS_APP_SETTINGS"></a>
+Not documented yet.
+
+###### Macro [IOS\_ASSETS][] <a name="macro_IOS_ASSETS"></a>
+Not documented yet.
+
+###### Macro [JAR\_ANNOTATION\_PROCESSOR][](Classes...) <a name="macro_JAR_ANNOTATION_PROCESSOR"></a>
+Not documented yet.
+
+###### Macro [JAR\_EXCLUDE][](Filters...) <a name="macro_JAR_EXCLUDE"></a>
+Filter .jar file content: remove matched files
+\* and \*\* patterns are supported (like JAVA\_SRCS)
+
+###### Macro [JAR\_INCLUDE][](Filters...) <a name="macro_JAR_INCLUDE"></a>
+Filter .jar file content: keep only matched files
+\* and \*\* patterns are supported (like JAVA\_SRCS)
+
+###### Macro [JAR\_RESOURCE][](Id) <a name="macro_JAR_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [JAVAC\_FLAGS][](Args...) <a name="macro_JAVAC_FLAGS"></a>
+Set additional Java compilation flags.
+
+###### Macro [JAVA\_DEPENDENCIES\_CONFIGURATION][](Vetos...) <a name="macro_JAVA_DEPENDENCIES_CONFIGURATION"></a>
+Validate contrib/java dependencies
+Valid arguments
+FORBID\_DIRECT\_PEERDIRS - fail when module have direct PEERDIR (with version) (non-transitive)
+FORBID\_DEFAULT\_VERSIONS - fail when module have PEERDIR to library with default (last) version (transitive)
+FORBID\_CONFLICT - fail when module have resolved without DEPENDENCY\_MANAGEMENT version conflict (transitive)
+FORBID\_CONFLICT\_DM - fail when module have resolved with DEPENDENCY\_MANAGEMENT version conflict (transitive)
+FORBID\_CONFLICT\_DM\_RECENT - like FORBID\_CONFLICT\_DM but fail only when dependency have more recent version than specified in DEPENDENCY\_MANAGEMENT
+REQUIRE\_DM - all dependencies must be specified in DEPENDENCY\_MANAGEMENT (transitive)
+
+###### Macro [JAVA\_EXTERNAL\_DEPENDENCIES][](file1 file2 ...) <a name="macro_JAVA_EXTERNAL_DEPENDENCIES"></a>
+Add non-source java external build dependency (like lombok config file)
+
+###### Macro [JAVA\_IGNORE\_CLASSPATH\_CLASH\_FOR][]([classes]) <a name="macro_JAVA_IGNORE_CLASSPATH_CLASH_FOR"></a>
+Ignore classpath clash test fails for classes
+
+###### Macro [JAVA\_MODULE][] <a name="macro_JAVA_MODULE"></a>
+Not documented yet.
+
+###### Macro [JAVA\_PROTO\_PLUGIN][](Name Tool DEPS <Dependencies>) <a name="macro_JAVA_PROTO_PLUGIN"></a>
+Define protoc plugin for Java with given Name that emits extra outputs
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [JAVA\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_JAVA_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all C/C++ compilation commands in the module
+
+###### Macro [JAVA\_RESOURCE][](JAR, SOURCES="") <a name="macro_JAVA_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [JAVA\_SRCS][](srcs) <a name="macro_JAVA_SRCS"></a>
+Specify java source files and resources. A macro can be contained in any of four java modules.
+Keywords:
+1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory.
+2. PACKAGE\_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE\_PREFIX package.name.
+
+@example:
+ - example/ya.make
+
+ JAVA_PROGRAM()
+ JAVA_SRCS(SRCDIR src/main/java **/*)
+ END()
+
+ - example/src/main/java/ru/yandex/example/HelloWorld.java
+
+ package ru.yandex.example;
+ public class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+ }
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs
+
+###### Macro [JAVA\_TEST][] <a name="macro_JAVA_TEST"></a>
+Not documented yet.
+
+###### Macro [JAVA\_TEST\_DEPS][] <a name="macro_JAVA_TEST_DEPS"></a>
+Not documented yet.
+
+###### Macro MODULE\_JDK(Version) <a name="macro_JDK_VERSION"></a>
+Specify JDK version for module
+
+###### Macro [JOINSRC][]() _# deprecated, does-nothing_ <a name="macro_JOINSRC"></a>
+This macro currently does nothing. Use JOIN\_SRCS and similar macros to make one file of set of sources.
+
+###### Macro [JOIN\_SRCS][](Out Src...) <a name="macro_JOIN_SRCS"></a>
+Join set of sources into single file named Out and send it for further processing.
+This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+You should specify file name with the extension as Out. Futher processing will be done according this extension.
+
+###### Macro [JOIN\_SRCS\_GLOBAL][](Out Src...) <a name="macro_JOIN_SRCS_GLOBAL"></a>
+Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+You should specify file name with the extension as Out. Further processing will be done according to this extension.
+
+###### Macro [JVM\_ARGS][](Args...) <a name="macro_JVM_ARGS"></a>
+Arguments to run Java programs in tests.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [KOTLINC\_FLAGS][](-flags) <a name="macro_KOTLINC_FLAGS"></a>
+Set additional Kotlin compilation flags.
+
+###### Macro [LARGE\_FILES][]([AUTOUPDATED] Files...) <a name="macro_LARGE_FILES"></a>
+Use large file ether from working copy or from remote storage via placeholder <File>.external
+If <File> is present locally (and not a symlink!) it will be copied to build directory.
+Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
+
+###### Macro [LDFLAGS][](LinkerFlags...) <a name="macro_LDFLAGS"></a>
+Add flags to the link command line of executable or shared library/dll.
+Note: LDFLAGS are always global. When set in the LIBRARY module they will affect all programs/dlls/tests the library is linked into.
+Note: remember about the incompatibility of flags for gcc and cl.
+
+###### Macro [LD\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_LD_REQUIREMENTS"></a>
+Override CPU and RAM requirements for link command in the module
+
+###### Macro [LIB\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_LIB_REQUIREMENTS"></a>
+Override CPU and RAM requirements for library creation comand of a x\_LIBRARY modules
+
+###### Macro [LICENSE][](licenses...) <a name="macro_LICENSE"></a>
+Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this
+library satisfying all conditions of any of the listed licenses.
+
+A license must be prescribed for contribs
+
+###### Macro [LICENSE\_TEXTS][](File) <a name="macro_LICENSE_TEXTS"></a>
+This macro specifies the filename with all library licenses texts
+
+###### Macro [LINKER\_SCRIPT][](Files...) <a name="macro_LINKER_SCRIPT"></a>
+Specify files to be used as a linker script
+
+###### Macro [LINK\_EXEC\_DYN\_LIB\_IMPL][] <a name="macro_LINK_EXEC_DYN_LIB_IMPL"></a>
+$usage: LINK\_EXEC\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [LINK\_EXE\_IMPL][] <a name="macro_LINK_EXE_IMPL"></a>
+$usage: LINK\_EXE\_IMPL(peers...) # internal
+
+###### Macro [LINT][](<none|base|strict>) <a name="macro_LINT"></a>
+Set linting levem for sources of the module
+
+###### Macro [LJ\_21\_ARCHIVE][](NAME Name LuaFiles...) _# deprecated_ <a name="macro_LJ_21_ARCHIVE"></a>
+Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys
+
+###### Macro [LJ\_ARCHIVE][](NAME Name LuaFiles...) <a name="macro_LJ_ARCHIVE"></a>
+Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys
+
+###### Macro [LLVM\_BC][] <a name="macro_LLVM_BC"></a>
+Not documented yet.
+
+###### Macro [LLVM\_COMPILE\_C][](Input Output Opts...) <a name="macro_LLVM_COMPILE_C"></a>
+Emit LLVM bytecode from .c file. BC\_CFLAGS, LLVM\_OPTS and C\_FLAGS\_PLATFORM are passed in, while CFLAGS are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_COMPILE\_CXX][](Input Output Opts...) <a name="macro_LLVM_COMPILE_CXX"></a>
+Emit LLVM bytecode from .cpp file. BC\_CXXFLAGS, LLVM\_OPTS and C\_FLAGS\_PLATFORM are passed in, while CFLAGS are not.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_COMPILE\_LL][](Input Output Opts...) <a name="macro_LLVM_COMPILE_LL"></a>
+Compile LLVM bytecode to object representation.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LLVM\_LINK][](Output Inputs...) <a name="macro_LLVM_LINK"></a>
+Call llvm-link on set of Inputs to produce Output.
+Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
+
+###### Macro [LLVM\_OPT][](Input Output Opts...) <a name="macro_LLVM_OPT"></a>
+Call llvm-opt with set of Opts on Input to produce Output.
+Note: Output name is used as is, no extension added.
+
+###### Macro [LOCAL\_JAR][](File) <a name="macro_LOCAL_JAR"></a>
+Not documented yet.
+
+###### Macro [LOCAL\_SOURCES\_JAR][](File) <a name="macro_LOCAL_SOURCES_JAR"></a>
+Not documented yet.
+
+###### Macro [LUA][](script\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...][ REQUIREMENTS reqs]) <a name="macro_LUA"></a>
+Run a lua script.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- script\_path - Path to the script.3
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files.
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+
+###### Macro [MACROS\_WITH\_ERROR][] <a name="macro_MACROS_WITH_ERROR"></a>
+Not documented yet.
+
+###### Macro [MAPKITIDL][](idl-file-name... <a name="macro_MAPKITIDL"></a>
+[OUT\_DIR output-dir]
+[IDL\_INCLUDES idl-dirs...]
+[FILTER filters...])
+[FILTER\_OUT filters...])
+[GLOBAL\_OUTPUTS]
+Generate bindings to target platform language.
+(Used for mobile MapKit project)
+1. idl-file-name... - a list of \*.idl files to process
+2. output-dir - a base root of output directory
+3. idl-dirs - a list of directories where to search for imported \*.idl files
+4. filters - a list of extensions used to filter outputs and output includes
+
+###### Macro [MAPKIT\_ADDINCL][](Dirs...) <a name="macro_MAPKIT_ADDINCL"></a>
+Not documented yet.
+
+###### Macro [MASMFLAGS][](compiler flags) <a name="macro_MASMFLAGS"></a>
+Add the specified flags to the compilation command of .masm files.
+
+###### Macro [MAVEN\_GROUP\_ID][](group\_id\_for\_maven\_export) <a name="macro_MAVEN_GROUP_ID"></a>
+Set maven export group id for JAVA\_PROGRAM() and JAVA\_LIBRARY().
+Have no effect on regular build.
+
+###### Macro [MESSAGE][]([severity] message) _# builtin_ <a name="macro_MESSAGE"></a>
+Print message with given severity level (STATUS, FATAL\_ERROR)
+
+###### Macro [METAQUERYFILES][](filenames...) _#deprecated_ <a name="macro_METAQUERYFILES"></a>
+This macro does nothing and will be removed
+
+###### Macro [MSVC\_FLAGS][]([GLOBAL compiler\_flag]\* compiler\_flags) <a name="macro_MSVC_FLAGS"></a>
+Add the specified flags to the compilation line of C/C++files.
+Flags apply only if the compiler used is MSVC (cl.exe)
+
+###### Macro [MX\_FORMULAS][](BinFiles...) _# deprecated, matrixnet_ <a name="macro_MX_FORMULAS"></a>
+Create MatrixNet formulas archive
+
+###### Macro [NEED\_CHECK][]() <a name="macro_NEED_CHECK"></a>
+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\_REVIEW][]() _# deprecated_ <a name="macro_NEED_REVIEW"></a>
+Mark the project as needing review.
+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 [NGINX\_MODULES][](Modules...) <a name="macro_NGINX_MODULES"></a>
+Not documented yet.
+
+###### Macro [NODE\_MODULES][]() <a name="macro_NODE_MODULES"></a>
+Materializes `node\_modules.tar` bundle according to the module's lockfile.
+
+@see [NPM\_CONTRIBS()](#module\_NPM\_CONTRIBS)
+
+###### Macro [NO\_BUILD\_IF][](variables) _# builtin_ <a name="macro_NO_BUILD_IF"></a>
+Print warning if some variable is true
+
+###### Macro [NO\_CHECK\_IMPORTS][]([patterns]) <a name="macro_NO_CHECK_IMPORTS"></a>
+Do not run checks on imports of Python modules.
+Optional parameter mask patterns describes the names of the modules that do not need to check.
+
+###### Macro [NO\_CLANG\_COVERAGE][]() <a name="macro_NO_CLANG_COVERAGE"></a>
+Disable heavyweight clang coverage for the module
+
+###### Macro [NO\_CLANG\_TIDY][]() <a name="macro_NO_CLANG_TIDY"></a>
+Not documented yet.
+
+###### Macro [NO\_COMPILER\_WARNINGS][]() <a name="macro_NO_COMPILER_WARNINGS"></a>
+Disable all compiler warnings in the module.
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [NO\_CPU\_CHECK][]() <a name="macro_NO_CPU_CHECK"></a>
+Compile module without startup CPU features check
+
+###### Macro [NO\_CYTHON\_COVERAGE][]() <a name="macro_NO_CYTHON_COVERAGE"></a>
+Disable cython and cythonized python coverage (CYTHONIZE\_PY)
+Implies NO\_CLANG\_COVERAGE() - right now, we can't disable instrumentation for .py.cpp files, but enable for .cpp
+
+###### Macro [NO\_DEBUG\_INFO][]() <a name="macro_NO_DEBUG_INFO"></a>
+Compile files without debug info collection.
+
+###### Macro [NO\_DOCTESTS][]() <a name="macro_NO_DOCTESTS"></a>
+Disable doctests in PY[|3|23\_]TEST
+
+###### Macro [NO\_EXPORT\_DYNAMIC\_SYMBOLS][]() <a name="macro_NO_EXPORT_DYNAMIC_SYMBOLS"></a>
+Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM.
+
+###### Macro [NO\_EXTENDED\_SOURCE\_SEARCH][]() <a name="macro_NO_EXTENDED_SOURCE_SEARCH"></a>
+Prevent module using in extended python source search.
+Use the macro if module contains python2-only files (or other python sources which shouldn't be imported by python3 interpreter)
+which resides in the same directories with python 3 usefull code. contrib/python/future is a example.
+Anyway, preferred way is to move such files into separate dir and don't use this macro at all.
+
+Also see: https://docs.yandex-team.ru/ya-make/manual/python/vars#y\_python\_extended\_source\_search for details
+
+###### Macro [NO\_JOIN\_SRC][]() _# deprecated, does-nothing_ <a name="macro_NO_JOIN_SRC"></a>
+This macro currently does nothing. This is default behavior which cannot be overridden at module level.
+
+###### Macro [NO\_LIBC][]() <a name="macro_NO_LIBC"></a>
+Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata).
+Note: use this with care. libc most likely will be linked into executable anyway,
+so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_LINT][]() <a name="macro_NO_LINT"></a>
+Do not check for style files included in PY\_SRCS, TEST\_SRCS, JAVA\_SRCS.
+
+###### Macro [NO\_MYPY][]() <a name="macro_NO_MYPY"></a>
+Not documented yet.
+
+###### Macro [NO\_NEED\_CHECK][]() <a name="macro_NO_NEED_CHECK"></a>
+Commits to the project marked with this macro will not be affected by higher-level NEED\_CHECK macro.
+
+###### Macro [NO\_OPTIMIZE][]() <a name="macro_NO_OPTIMIZE"></a>
+Build code without any optimizations (-O0 mode).
+
+###### Macro [NO\_OPTIMIZE\_PY\_PROTOS][]() <a name="macro_NO_OPTIMIZE_PY_PROTOS"></a>
+Disable Python proto optimization using embedding corresponding C++ code into binary.
+Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+This is default mode only for some system libraries.
+
+###### Macro [NO\_PLATFORM][]() <a name="macro_NO_PLATFORM"></a>
+Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO\_PLATFORM variable for special processing.
+Note: use this with care. libc most likely will be linked into executable anyway,
+so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_PYTHON\_COVERAGE][]() <a name="macro_NO_PYTHON_COVERAGE"></a>
+Disable python coverage for module
+
+###### Macro [NO\_RUNTIME][]() <a name="macro_NO_RUNTIME"></a>
+This macro:
+1. Sets the ENABLE(NOUTIL) + DISABLE(USE\_INTERNAL\_STL);
+2. If the project that contains the macro NO\_RUNTIME(), peerdir-it project does not contain NO\_RUNTIME() => Warning.
+Note: use this with care. Arcadia STL most likely will be linked into executable anyway, so using STL headers/functions/classes
+may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_SANITIZE][]() <a name="macro_NO_SANITIZE"></a>
+Disable all sanitizers for the module.
+
+###### Macro [NO\_SANITIZE\_COVERAGE][]() <a name="macro_NO_SANITIZE_COVERAGE"></a>
+Disable lightweight coverage (-fsanitize-coverage) for the module.
+
+###### Macro [NO\_SSE4][]() <a name="macro_NO_SSE4"></a>
+Compile module without SSE4
+
+###### Macro [NO\_UTIL][]() <a name="macro_NO_UTIL"></a>
+Build module without dependency on util.
+Note: use this with care. Util most likely will be linked into executable anyway,
+so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time.
+
+###### Macro [NO\_WERROR][]() <a name="macro_NO_WERROR"></a>
+Override WERROR() behavior
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [NO\_WSHADOW][]() <a name="macro_NO_WSHADOW"></a>
+Disable C++ shadowing warnings.
+
+###### Macro [NVCC\_DEVICE\_LINK][](file.cu...) <a name="macro_NVCC_DEVICE_LINK"></a>
+Run nvcc --device-link on objects compiled from srcs with --device-c.
+This generates a stub object devlink.o that supplies missing pieces for the
+host linker to link relocatable device objects into the final executable.
+
+###### Macro [ONLY\_TAGS][](tags...) _# builtin_ <a name="macro_ONLY_TAGS"></a>
+Instantiate from multimodule only variants with tags listed
+
+###### Macro [OPENSOURCE\_EXPORT\_REPLACEMENT][](CMAKE PkgName CMAKE\_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE\_COMPONENT OptCmakePkgComponent) <a name="macro_OPENSOURCE_EXPORT_REPLACEMENT"></a>
+Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
+for opensource publication.
+
+###### Macro [ORIGINAL\_SOURCE][](Source) <a name="macro_ORIGINAL_SOURCE"></a>
+This macro specifies the source repository for contrib
+Does nothing now (just a placeholder for future functionality)
+See https://st.yandex-team.ru/DTCC-316
+
+###### Macro [OWNER][](owners...) _# builtin_ <a name="macro_OWNER"></a>
+Add reviewers/responsibles of the code.
+In the OWNER macro you can use:
+1. login-s from staff.yandex-team.ru
+2. Review group (to specify the Code-review group need to use the prefix g:)
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [PACK][](archive\_type) <a name="macro_PACK"></a>
+When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz`
+
+Is not allowed other module types than PACKAGE().
+
+@see: [PACKAGE()](#module\_PACKAGE)
+
+###### Macro [PACKAGE\_STRICT][]() <a name="macro_PACKAGE_STRICT"></a>
+Not documented yet.
+
+###### Macro [PACK\_GLOBALS\_IN\_LIBRARY][]() <a name="macro_PACK_GLOBALS_IN_LIBRARY"></a>
+Not documented yet.
+
+###### Macro [PARTITIONED\_RECURSE][]([BALANCING\_CONFIG config] [LOCAL] dirs...) _# builtin_ <a name="macro_PARTITIONED_RECURSE"></a>
+Add directories to the build
+All projects must be reachable from the root chain RECURSE() for monorepo continuous integration functionality.
+Arguments are processed in chunks
+
+###### Macro [PARTITIONED\_RECURSE\_FOR\_TESTS][]([BALANCING\_CONFIG config] [LOCAL] dirs...) _# builtin_ <a name="macro_PARTITIONED_RECURSE_FOR_TESTS"></a>
+Add directories to the build if tests are demanded.
+Arguments are processed in chunks
+
+###### Macro [PARTITIONED\_RECURSE\_ROOT\_RELATIVE][]([BALANCING\_CONFIG config] dirlist) _# builtin_ <a name="macro_PARTITIONED_RECURSE_ROOT_RELATIVE"></a>
+In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA\_ROOT}).
+Arguments are processed in chunks
+
+###### Macro [PEERDIR][](dirs...) _# builtin_ <a name="macro_PEERDIR"></a>
+Specify project dependencies
+Indicates that the project depends on all of the projects from the list of dirs.
+Libraries from these directories will be collected and linked to the current target if the target is executable or sharedlib/dll.
+If the current target is a static library, the specified directories will not be built, but they will be linked to any executable target that will link the current library.
+@params:
+1. As arguments PEERDIR you can only use the LIBRARY directory (the directory with the PROGRAM/DLL and derived from them are prohibited to use as arguments PEERDIR).
+2. ADDINCL Keyword ADDINCL (written before the specified directory), adds the flag -I<path to library> the flags to compile the source code of the current project.
+Perhaps it may be removed in the future (in favor of a dedicated ADDINCL)
+
+###### Macro [PIRE\_INLINE][](FILES...) <a name="macro_PIRE_INLINE"></a>
+Not documented yet.
+
+###### Macro [PIRE\_INLINE\_CMD][](SRC) <a name="macro_PIRE_INLINE_CMD"></a>
+Not documented yet.
+
+###### Macro [PRINT\_MODULE\_TYPE][] <a name="macro_PRINT_MODULE_TYPE"></a>
+Not documented yet.
+
+###### Macro [PROCESS\_DOCS][] <a name="macro_PROCESS_DOCS"></a>
+Not documented yet.
+
+###### Macro PROGURAD\_RULES(ProguardRuleFiles...) <a name="macro_PROGUARD_RULES"></a>
+This macro is strictly prohibited to use outside of mapsmobi project
+
+###### Macro [PROTO2FBS][](InputProto) <a name="macro_PROTO2FBS"></a>
+Produce flatbuf schema out of protobuf description.
+
+###### Macro [PROTO\_ADDINCL][]([GLOBAL] [WITH\_GEN] Path) <a name="macro_PROTO_ADDINCL"></a>
+This macro introduces proper ADDINCLs for .proto-files found in sources and
+.cpp/.h generated files, supplying them to appropriate commands and allowing
+proper dependency resolution at configure-time.
+
+Note: you normally shouldn't use this macro. ADDINCLs should be sent to user
+from dependency via PROTO\_NAMESPACE macro
+
+###### Macro [PROTO\_NAMESPACE][]([GLOBAL] [WITH\_GEN] Namespace) <a name="macro_PROTO_NAMESPACE"></a>
+Defines protobuf namespace (import/export path prefix) which should be used for imports and
+which defines output path for .proto generation.
+
+For proper importing and configure-time depenedency management it sets ADDINCLs
+for both .cpp headers includes and .proto imports. If .proto expected to be used outsed of the
+processing module use GLOBAL to send proper ADDINCLs to all (transitive) users. PEERDIR to
+PROTO\_LIBRARY with PROTO\_NAMESPACE(GLOBAL ) is enough at user side to correctly use the library.
+If generated .proto files are going to be used for building a module than use of WITH\_GEN
+parameter will add appropriate dir from the build root for .proto files search.
+
+###### Macro [PROVIDES][](Name...) <a name="macro_PROVIDES"></a>
+Specifies provided features. The names must be correct C identifiers.
+This prevents different libraries providing the same features to be linked into one program.
+
+###### Macro [PYTHON][](script\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...] [REQUIREMENTS reqs]) <a name="macro_PYTHON"></a>
+Run a python script with $(PYTHON)/python built from devtools/huge\_python.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- script\_path - Path to the script.
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files.
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+
+###### Macro [PYTHON2\_ADDINCL][]() <a name="macro_PYTHON2_ADDINCL"></a>
+This macro adds include path for Python headers (Python 2.x variant) without PEERDIR.
+This should be used in 2 cases only:
+- In PY2MODULE since it compiles into .so and uses external Python runtime;
+- In system Python libraries themselves since proper PEERDIR there may create a loop;
+In all other cases use USE\_PYTHON2 macro instead.
+
+Never use this macro in PY2\_PROGRAM, PY2\_LIBRARY and PY23\_LIBRARY: they have everything needed by default.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs
+
+###### Macro [PYTHON2\_MODULE][]() <a name="macro_PYTHON2_MODULE"></a>
+Use in PY\_ANY\_MODULE to set it up for Python 2.x.
+
+###### Macro [PYTHON3\_ADDINCL][]() <a name="macro_PYTHON3_ADDINCL"></a>
+This macro adds include path for Python headers (Python 3.x variant).
+This should be used in 2 cases only:
+- In PY2MODULE since it compiles into .so and uses external Python runtime;
+- In system Python libraries themselves since peerdir there may create a loop;
+In all other cases use USE\_PYTHON3() macro instead.
+
+Never use this macro in PY3\_PROGRAM and PY3\_LIBRARY and PY23\_LIBRARY: they have everything by default.
+
+Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs
+
+###### Macro [PYTHON3\_MODULE][]() <a name="macro_PYTHON3_MODULE"></a>
+Use in PY\_ANY\_MODULE to set it up for Python 3.x.
+
+###### Macro [PYTHON\_PATH][](Path) <a name="macro_PYTHON_PATH"></a>
+Set path to Python that will be used to runs scripts in tests
+
+###### Macro [PY\_CONSTRUCTOR][](package.module[:func]) <a name="macro_PY_CONSTRUCTOR"></a>
+Specifies the module or function which will be started before python's main()
+init() is expected in the target module if no function is specified
+Can be considered as \_\_attribute\_\_((constructor)) for python
+
+###### Macro PY\_DOCTEST(Packages...) <a name="macro_PY_DOCTESTS"></a>
+Add to the test doctests for specified Python packages
+The packages should be part of a test (listed as sources of the test or its PEERDIRs).
+
+###### Macro [PY\_ENUMS\_SERIALIZATION][] <a name="macro_PY_ENUMS_SERIALIZATION"></a>
+Not documented yet.
+
+###### Macro [PY\_EXTRA\_LINT\_FILES][](files...) <a name="macro_PY_EXTRA_LINT_FILES"></a>
+Add extra Python files for linting. This macro allows adding
+Python files which has no .py extension.
+
+###### Macro [PY\_MAIN][](package.module[:func]) <a name="macro_PY_MAIN"></a>
+Specifies the module or function from which to start executing a python program
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain
+
+###### Macro [PY\_NAMESPACE][](prefix) <a name="macro_PY_NAMESPACE"></a>
+Sets default Python namespace for all python sources in the module.
+Especially suitable in PROTO\_LIBRARY where Python sources are generated and there is no PY\_SRCS to place NAMESPACE parameter.
+
+###### Macro [PY\_PROTOS\_FOR][](path/to/module) _#builtin, deprecated_ <a name="macro_PY_PROTOS_FOR"></a>
+Use PROTO\_LIBRARY() in order to have .proto compiled into Python.
+Generates pb2.py files out of .proto files and saves those into PACKAGE module
+
+###### Macro [PY\_PROTO\_PLUGIN][](Name Ext Tool DEPS <Dependencies>) <a name="macro_PY_PROTO_PLUGIN"></a>
+Define protoc plugin for python with given Name that emits extra output with provided Extension
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [PY\_PROTO\_PLUGIN2][](Name Ext1 Ext2 Tool DEPS <Dependencies>) <a name="macro_PY_PROTO_PLUGIN2"></a>
+Define protoc plugin for python with given Name that emits 2 extra outputs with provided Extensions
+using Tool. Extra dependencies are passed via DEPS
+
+###### Macro [PY\_REGISTER][]([package.]module\_name) <a name="macro_PY_REGISTER"></a>
+Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter.
+All modules from the sources listed in PY\_SRCS() are registered automatically.
+To register the modules from the sources in the SRCS(), you need to use PY\_REGISTER().
+
+PY\_REGISTER(module\_name) initializes module globally via call to initmodule\_name()
+PY\_REGISTER(package.module\_name) initializes module in the specified package
+It renames its init function with CFLAGS(-Dinitmodule\_name=init7package11module\_name)
+or CFLAGS(-DPyInit\_module\_name=PyInit\_7package11module\_name)
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister
+
+###### Macro [PY\_REQUIREMENTS][]([cpu: <value>] [ram: <value>]) <a name="macro_PY_REQUIREMENTS"></a>
+Override CPU and RAM requirements for all Python build commands
+
+###### Macro [PY\_SRCS][]({| CYTHON\_C} { | TOP\_LEVEL | NAMESPACE ns} Files...) <a name="macro_PY_SRCS"></a>
+Build specified Python sources according to Arcadia binary Python build. Basically creates precompiled and source resources keyed with module paths.
+The resources eventually are linked into final program and can be accessed as regular Python modules.
+This custom loader linked into the program will add them to sys.meta\_path.
+
+PY\_SRCS also support .proto, .ev, .pyx and .swg files. The .proto and .ev are compiled to .py-code by protoc and than handled as usual .py files.
+.pyx and .swg lead to C/C++ Python extensions generation, that are automatically registered in Python as built-in modules.
+
+By default .pyx files are built as C++-extensions. Use CYTHON\_C to build them as C (similar to BUILDWITH\_CYTHON\_C, but with the ability to specify namespace).
+
+\_\_init\_\_.py never required, but if present (and specified in PY\_SRCS), it will be imported when you import package modules with \_\_init\_\_.py Oh.
+
+@example
+
+ PY2_LIBRARY(mymodule)
+ PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
+ END()
+
+PY\_SRCS honors Python2 and Python3 differences and adjusts itself to Python version of a current module.
+PY\_SRCS can be used in any Arcadia Python build modules like PY\*\_LIBRARY, PY\*\_PROGRAM, PY\*TEST.
+PY\_SRCS in LIBRARY or PROGRAM effectively converts these into PY2\_LIBRARY and PY2\_PROGRAM respectively.
+It is strongly advised to make this conversion explicit. Never use PY\_SRCS in a LIBRARY if you plan to use it from external Python extension module.
+
+Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
+
+###### Macro [PY\_SSQLS\_SRCS][](Srcs...) <a name="macro_PY_SSQLS_SRCS"></a>
+Not documented yet.
+
+###### Macro [REAL\_LINK\_DYN\_LIB\_IMPL][] <a name="macro_REAL_LINK_DYN_LIB_IMPL"></a>
+$usage: REAL\_LINK\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL][] <a name="macro_REAL_LINK_EXEC_DYN_LIB_IMPL"></a>
+$usage: REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL(peers...) # internal
+
+###### Macro [REAL\_LINK\_EXE\_IMPL][] <a name="macro_REAL_LINK_EXE_IMPL"></a>
+$usage: REAL\_LINK\_EXE\_IMPL(peers...) # internal
+
+###### Macro [RECURSE][]([LOCAL] dirs...) _# builtin_ <a name="macro_RECURSE"></a>
+Add directories to the build
+All projects must be reachable from the root chain RECURSE() for monorepo continuous integration functionality
+
+###### Macro [RECURSE\_FOR\_TESTS][]([LOCAL] dirs...) _# builtin_ <a name="macro_RECURSE_FOR_TESTS"></a>
+Add directories to the build if tests are demanded.
+Use --force-build-depends flag if you want to build testing modules without tests running
+
+###### Macro [RECURSE\_ROOT\_RELATIVE][](dirlist) _# builtin_ <a name="macro_RECURSE_ROOT_RELATIVE"></a>
+In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA\_ROOT})
+
+###### Macro [REGISTER\_SANDBOX\_IMPORT][] <a name="macro_REGISTER_SANDBOX_IMPORT"></a>
+Not documented yet.
+
+###### Macro [REGISTER\_YQL\_PYTHON\_UDF][] <a name="macro_REGISTER_YQL_PYTHON_UDF"></a>
+Not documented yet.
+
+###### Macro [REQUIREMENTS][]([cpu:<count>] [disk\_usage:<size>] [ram:<size>] [ram\_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64]) <a name="macro_REQUIREMENTS"></a>
+Allows you to specify the requirements of the test.
+
+Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [REQUIRES][](dirs...) <a name="macro_REQUIRES"></a>
+Specify list of dirs which this module must depend on indirectly.
+
+This macro can be used if module depends on the directories specified but they can't be listed
+as direct PEERDIR dependencies (due to public include order or link order issues).
+
+###### Macro [RESOLVE\_PROTO][]() <a name="macro_RESOLVE_PROTO"></a>
+Enable include resolving within UNIONs and let system .proto being resolved
+among .proto/.gztproto imports
+
+Note: it is currently impossible to enbale resolving only for .proto, so resolving is enabled for all supported files
+also we only add ADDINCL for stock protobuf. So use this macro with care: it may cause resolving problems those are
+to be addressed by either ADDINCLs or marking them as TEXT. Please contact devtools for details.
+
+###### Macro [RESOURCE][]([FORCE\_TEXT ][Src Key]\* [- Key=Value]\*) _# built-in_ <a name="macro_RESOURCE"></a>
+Add data (resources, random files, strings) to the program)
+The common usage is to place Src file into binary. The Key is used to access it using library/cpp/resource or library/python/resource.
+Alternative syntax with '- Key=Value' allows placing Value string as resource data into binary and make it accessible by Key.
+
+This is a simpler but less flexible option than ARCHIVE(), because in the case of ARCHIVE(), you have to use the data explicitly,
+and in the case of RESOURCE(), the data will fall through SRCS() or SRCS(GLOBAL) to binary linking.
+
+Use the FORCE\_TEXT parameter to explicitly mark all Src files as text files: they will not be parsed unless used elsewhere.
+
+@example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a2ispolzujjtekomanduresource
+
+@example:
+
+ LIBRARY()
+ OWNER(user1)
+
+ RESOURCE(
+ path/to/file1 /key/in/program/1
+ path/to/file2 /key2
+ )
+ END()
+
+###### Macro [RESOURCE\_FILES][]([DONT\_PARSE] [PREFIX {prefix}] [STRIP prefix\_to\_strip] {path}) <a name="macro_RESOURCE_FILES"></a>
+This macro expands into
+RESOURCE([DONT\_PARSE] {path} resfs/file/{prefix}{path}
+ - resfs/src/resfs/file/{prefix}{remove\_prefix(path, prefix\_to\_strip)}={rootrel\_arc\_src(path)}
+)
+
+resfs/src/{key} stores a source root (or build root) relative path of the
+source of the value of the {key} resource.
+
+resfs/file/{key} stores any value whose source was a file on a filesystem.
+resfs/src/resfs/file/{key} must store its path.
+
+DONT\_PARSE disables parsing for source code files (determined by extension)
+ Please don't abuse: use separate DONT\_PARSE macro call only for files subject to parsing
+
+This form is for use from other plugins:
+RESOURCE\_FILES([DEST {dest}] {path}) expands into RESOURCE({path} resfs/file/{dest})
+
+@see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/
+
+###### Macro [RESTRICT\_LICENSES][](ALLOW\_ONLY|DENY LicenseProperty...) <a name="macro_RESTRICT_LICENSES"></a>
+Restrict licenses of direct and indirect module dependencies.
+
+ALLOW\_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions
+list.
+
+DENY restriction type forbids dependency on module with no license without any listed propery from the list.
+
+Note: Can be used multiple times on the same module all specified constraints will be checked.
+All macro invocation for the same module must use same constraints type (DENY or ALLOW\_ONLY)
+
+###### Macro [RESTRICT\_PATH][] <a name="macro_RESTRICT_PATH"></a>
+Not documented yet.
+
+###### Macro [RUN][] <a name="macro_RUN"></a>
+Not documented yet.
+
+###### Macro [RUN\_ANTLR][](Args...) <a name="macro_RUN_ANTLR"></a>
+Macro to invoke ANTLR3 generator (general case)
+
+###### Macro [RUN\_ANTLR4][](Args...) <a name="macro_RUN_ANTLR4"></a>
+Macro to invoke ANTLR4 generator (general case)
+
+###### Macro [RUN\_ANTLR4\_CPP][](GRAMMAR, OUTPUT\_INCLUDES, LISTENER, VISITOR, Args...) <a name="macro_RUN_ANTLR4_CPP"></a>
+Macro to invoke ANTLR4 generator (Cpp)
+
+###### Macro [RUN\_ANTLR4\_GO][](GRAMMAR, OUTPUT\_INCLUDES, LISTENER, VISITOR, Args...) <a name="macro_RUN_ANTLR4_GO"></a>
+Macro to invoke ANTLR4 generator (Go)
+
+###### Macro [RUN\_JAVA\_PROGRAM][](Args...) <a name="macro_RUN_JAVA_PROGRAM"></a>
+Not documented yet.
+
+###### Macro [RUN\_PROGRAM][](tool\_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[\_NOAUTO] outputs...] [STDOUT[\_NOAUTO] output] [OUTPUT\_INCLUDES output\_includes...] [REQUIREMENTS reqs]) <a name="macro_RUN_PROGRAM"></a>
+Run a program from arcadia.
+These macros are similar: RUN\_PROGRAM, LUA, PYTHON.
+
+Parameters:
+- tool\_path - Path to the directory of the tool.
+- args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+- CWD dir - Absolute path of the working directory.
+- ENV key=value... - Environment variables.
+- TOOL tools... - Auxiliary tool directories.
+- IN inputs... - Input files
+- OUT[\_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+- STDOUT[\_NOAUTO] output - Redirect the standard output to the output file.
+- OUTPUT\_INCLUDES output\_includes... - Includes of the output files that are needed to build them.
+- REQUIREMENTS - Override default requirements for CPU and RAM
+
+For absolute paths use ${ARCADIA\_ROOT} and ${ARCADIA\_BUILD\_ROOT}, or
+${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows).
+
+###### Macro [RUN\_PYTHON][](Args...) <a name="macro_RUN_PYTHON"></a>
+Version of RUN() macro to invoke Python scripts
+@see: [RUN()](#macro\_RUN)
+
+###### Macro [SDBUS\_CPP\_ADAPTOR][](File) <a name="macro_SDBUS_CPP_ADAPTOR"></a>
+Not documented yet.
+
+###### Macro [SDBUS\_CPP\_PROXY][](File) <a name="macro_SDBUS_CPP_PROXY"></a>
+Not documented yet.
+
+###### Macro [SET][](varname value) _#builtin_ <a name="macro_SET"></a>
+Sets varname to value
+
+###### Macro [SETUP\_EXECTEST][] <a name="macro_SETUP_EXECTEST"></a>
+Not documented yet.
+
+###### Macro [SETUP\_PYTEST\_BIN][] <a name="macro_SETUP_PYTEST_BIN"></a>
+Not documented yet.
+
+###### Macro [SETUP\_RUN\_PYTHON][] <a name="macro_SETUP_RUN_PYTHON"></a>
+Not documented yet.
+
+###### Macro [SET\_APPEND][](varname appendvalue) _#builtin_ <a name="macro_SET_APPEND"></a>
+Appends appendvalue to varname's value using space as a separator
+
+###### Macro [SET\_APPEND\_WITH\_GLOBAL][](varname appendvalue) _#builtin_ <a name="macro_SET_APPEND_WITH_GLOBAL"></a>
+Appends appendvalue to varname's value using space as a separator.
+New value is propagated to dependants
+
+###### Macro [SET\_COMPILE\_OUTPUTS\_MODIFIERS][](NOREL?";norel":"") <a name="macro_SET_COMPILE_OUTPUTS_MODIFIERS"></a>
+Not documented yet.
+
+###### Macro [SIZE][](SMALL/MEDIUM/LARGE) <a name="macro_SIZE"></a>
+Set the 'size' for the test. Each 'size' has own set of resrtictions, SMALL bein the most restricted and LARGE being the list.
+See documentation on test system for more details.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [SKIP\_TEST][](Reason) <a name="macro_SKIP_TEST"></a>
+Skip the suite defined by test module. Provide a reason to be output in test execution report.
+
+###### Macro [SOURCE\_GROUP][](...) _#builtin, deprecated_ <a name="macro_SOURCE_GROUP"></a>
+Ignored
+
+###### Macro [SPLIT\_CODEGEN][](tool prefix opts... [OUT\_NUM num] [OUTPUT\_INCLUDES output\_includes...]) <a name="macro_SPLIT_CODEGEN"></a>
+Generator of a certain number of parts of the .cpp file + one header .h file from .in
+
+Supports keywords:
+1. OUT\_NUM <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)>
+2. OUTPUT\_INCLUDES <path to files that will be included in generalnyj of macro files>
+
+###### Macro [SPLIT\_DWARF][]() <a name="macro_SPLIT_DWARF"></a>
+Emit debug info for the PROGRAM/DLL as a separate file <module\_name>.debug.
+NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
+
+###### Macro [SPLIT\_FACTOR][](x) <a name="macro_SPLIT_FACTOR"></a>
+Sets the number of chunks for parallel run tests when used in test module with FORK\_TESTS() or FORK\_SUBTESTS().
+If none of those is specified this macro implies FORK\_TESTS().
+
+Supports C++ ut and PyTest.
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [SRC][](File Flags...) <a name="macro_SRC"></a>
+Compile single file with extra Flags.
+Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
+
+###### Macro [SRCDIR][](dirlist) _# builtin_ <a name="macro_SRCDIR"></a>
+Add the specified directories to the list of those in which the source files will be searched
+Available only for arcadia/contrib
+
+###### Macro [SRCS][](<[GLOBAL] File> ...) <a name="macro_SRCS"></a>
+Source files of the project. Files are built according to their extension and put int module output or fed to ultimate PROGRAM/DLL depending on GLOBAL presence.
+Arcadia Paths from the root and is relative to the project's LIST are supported
+
+GLOBAL marks next file as direct input to link phase of the program/shared library project built into. This prevents symbols of the file to be excluded by linker as unused.
+The scope of the GLOBAL keyword is the following file (that is, in the case of SRCS(GLOBAL foo.cpp bar.cpp) global will be only foo.cpp)
+
+@example:
+
+ LIBRARY(test_global)
+ SRCS(GLOBAL foo.cpp)
+ END()
+
+This will produce foo.o and feed it to any PROGRAM/DLL module transitively depending on test\_global library. The library itself will be empty and won't produce .a file.
+
+###### Macro [SRC\_CPP\_AVX][](File Flags...) <a name="macro_SRC_CPP_AVX"></a>
+Compile single .cpp-file with AVX and extra Flags.
+
+###### Macro [SRC\_CPP\_AVX2][](File Flags...) <a name="macro_SRC_CPP_AVX2"></a>
+Compile single .cpp-file with AVX2 and extra Flags.
+
+###### Macro [SRC\_CPP\_PIC][](File Flags...) <a name="macro_SRC_CPP_PIC"></a>
+Compile single .c-file with -fPIC and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE2][](File Flags...) <a name="macro_SRC_CPP_SSE2"></a>
+Compile single .cpp-file with SSE2 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE3][](File Flags...) <a name="macro_SRC_CPP_SSE3"></a>
+Compile single .cpp-file with SSE3 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE4][](File Flags...) <a name="macro_SRC_CPP_SSE4"></a>
+Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+
+###### Macro [SRC\_CPP\_SSE41][](File Flags...) <a name="macro_SRC_CPP_SSE41"></a>
+Compile single .cpp-file with SSE4.1 and extra Flags.
+
+###### Macro [SRC\_CPP\_SSSE3][](File Flags...) <a name="macro_SRC_CPP_SSSE3"></a>
+Compile single .cpp-file with SSSE3 and extra Flags.
+
+###### Macro [SRC\_C\_AVX][](File Flags...) <a name="macro_SRC_C_AVX"></a>
+Compile single .c-file with AVX and extra Flags.
+
+###### Macro [SRC\_C\_AVX2][](File Flags...) <a name="macro_SRC_C_AVX2"></a>
+Compile single .c-file with AVX2 and extra Flags.
+
+###### Macro [SRC\_C\_SSE2][](File Flags...) <a name="macro_SRC_C_SSE2"></a>
+Compile single .c-file with SSE2 and extra Flags.
+
+###### Macro [SRC\_C\_SSE3][](File Flags...) <a name="macro_SRC_C_SSE3"></a>
+Compile single .c-file with SSE3 and extra Flags.
+
+###### Macro [SRC\_C\_SSE4][](File Flags...) <a name="macro_SRC_C_SSE4"></a>
+Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+
+###### Macro [SRC\_C\_SSE41][](File Flags...) <a name="macro_SRC_C_SSE41"></a>
+Compile single .c-file with SSE4.1 and extra Flags.
+
+###### Macro [SRC\_C\_SSSE3][](File Flags...) <a name="macro_SRC_C_SSSE3"></a>
+Compile single .c-file with SSSE3 and extra Flags.
+
+###### Macro [SRC\_RESOURCE][](Id) <a name="macro_SRC_RESOURCE"></a>
+Not documented yet.
+
+###### Macro [STRIP][]() <a name="macro_STRIP"></a>
+Strip debug info from a PROGRAM, DLL or TEST.
+This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
+
+###### Macro [STRUCT\_CODEGEN][](Prefix) <a name="macro_STRUCT_CODEGEN"></a>
+A special case BASE\_CODEGEN, in which the kernel/struct\_codegen/codegen\_tool tool is used.
+
+###### Macro [STYLE][](Globs...) <a name="macro_STYLE"></a>
+Not documented yet.
+
+###### Macro [SUBSCRIBER][](subscribers...) _# builtin_ <a name="macro_SUBSCRIBER"></a>
+Add observers of the code.
+In the SUBSCRIBER macro you can use:
+1. login-s from staff.yandex-team.ru
+2. Review group (to specify the Code-review group need to use the prefix g:)
+
+Note: current behavior of SUBSCRIBER is almost the same as OWNER. The are only 2 differences: SUBSCRIBER is not mandatory and it may be separately processed by external tools
+
+Ask devtools@yandex-team.ru if you need more information
+
+###### Macro [SUPPRESSIONS][] <a name="macro_SUPPRESSIONS"></a>
+SUPPRESSIONS() - allows to specify files with suppression notation which will be used by
+address, leak or thread sanitizer runtime by default.
+Use asan.supp filename for address sanitizer, lsan.supp for leak sanitizer
+and tsan.supp for thread sanitizer suppressions respectively.
+See https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-memory-leaks
+for details.
+
+###### Macro [SYMLINK][](from to) <a name="macro_SYMLINK"></a>
+Add symlink
+
+###### Macro [SYSTEM\_PROPERTIES][]([<Key Value>...] [<File Path>...]) <a name="macro_SYSTEM_PROPERTIES"></a>
+List of Key,Value pairs that will be available to test via System.getProperty().
+FILE means that parst should be read from file specifies as Path.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [TAG][] ([tag...]) <a name="macro_TAG"></a>
+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
+
+###### Macro [TASKLET][]() <a name="macro_TASKLET"></a>
+Not documented yet.
+
+###### Macro [TASKLET\_REG][](Name, Lang, Impl, Includes...) <a name="macro_TASKLET_REG"></a>
+Not documented yet.
+
+###### Macro [TASKLET\_REG\_EXT][](Name, Lang, Impl, Wrapper, Includes...) <a name="macro_TASKLET_REG_EXT"></a>
+Not documented yet.
+
+###### Macro [TEST\_CWD][](path) <a name="macro_TEST_CWD"></a>
+Defines working directory for test runs. Othen used in conjunction with DATA() macro.
+Is only used inside of the TEST modules.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [TEST\_DATA][] <a name="macro_TEST_DATA"></a>
+Not documented yet.
+
+###### Macro [TEST\_JAVA\_CLASSPATH\_CMD\_TYPE][](Type) <a name="macro_TEST_JAVA_CLASSPATH_CMD_TYPE"></a>
+Availible types: MANIFEST(default), COMMAND\_FILE, LIST
+Method for passing a classpath value to a java command line
+MANIFEST via empty jar file with manifest that cantains Class-Path attribute
+COMMAND\_FILE via @command\_file
+LIST via flat args
+
+###### Macro [TEST\_SRCS][](Files...) <a name="macro_TEST_SRCS"></a>
+In PY2TEST, PY3TEST and PY\*\_LIBRARY modules used as PY\_SRCS macro and additionally used to mine test cases to be executed by testing framework.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+
+###### Macro [TIMEOUT][](TIMEOUT) <a name="macro_TIMEOUT"></a>
+Sets a timeout on test execution
+
+Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+
+###### Macro [UBERJAR][]() <a name="macro_UBERJAR"></a>
+UBERJAR is a single all-in-one jar-archive that includes all its Java dependencies (reachable PEERDIR).
+It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin).
+Use UBERJAR inside JAVA\_PROGRAM module.
+
+You can use the following macros to configure the archive:
+1. UBERJAR\_HIDING\_PREFIX prefix for classes to shade (classes remain in their packages by default)
+2. UBERJAR\_HIDE\_EXCLUDE\_PATTERN exclude classes matching this patterns from shading (if enabled).
+3. UBERJAR\_PATH\_EXCLUDE\_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default)
+4. UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN add ManifestResourceTransformer class to uberjar processing and specify main-class
+5. UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE add ManifestResourceTransformer class to uberjar processing and specify some attribute
+6. UBERJAR\_APPENDING\_TRANSFORMER add AppendingTransformer class to uberjar processing
+7. UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER add ServicesResourceTransformer class to uberjar processing
+
+Documentation: https://wiki.yandex-team.ru/yatool/java/
+
+@see: [JAVA\_PROGRAM](#module\_JAVA\_PROGRAM), [UBERJAR\_HIDING\_PREFIX](#macro\_UBERJAR\_HIDING\_PREFIX), [UBERJAR\_HIDE\_EXCLUDE\_PATTERN](#macro\_UBERJAR\_HIDE\_EXCLUDE\_PATTERN), [UBERJAR\_PATH\_EXCLUDE\_PREFIX](#macro\_UBERJAR\_PATH\_EXCLUDE\_PREFIX)
+
+###### Macro [UBERJAR\_APPENDING\_TRANSFORMER][](Resource) <a name="macro_UBERJAR_APPENDING_TRANSFORMER"></a>
+Add AppendingTransformer for UBERJAR() java programs
+
+Parameters:
+- Resource - Resource name
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_HIDE\_EXCLUDE\_PATTERN][](Args...) <a name="macro_UBERJAR_HIDE_EXCLUDE_PATTERN"></a>
+Exculude classes matching this patterns from shading (if enabled).
+Pattern may contain '\*' and '\*\*' globs.
+Shading is enabled for UBERJAR program using UBERJAR\_HIDING\_PREFIX macro. If this macro is not specified all classes are shaded.
+
+@see: [UBERJAR](#macro\_UBERJAR), [UBERJAR\_HIDING\_PREFIX](#macro\_UBERJAR\_HIDING\_PREFIX)
+
+###### Macro [UBERJAR\_HIDING\_PREFIX][](Arg) <a name="macro_UBERJAR_HIDING_PREFIX"></a>
+Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg.
+Classes remain in their packages by default.
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE][](Key, Value) <a name="macro_UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE"></a>
+Transform manifest.mf for UBERJAR() java programs, set attribute
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN][](Main) <a name="macro_UBERJAR_MANIFEST_TRANSFORMER_MAIN"></a>
+Transform manifest.mf for UBERJAR() java programs, set main-class attribute
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_PATH\_EXCLUDE\_PREFIX][](Args...) <a name="macro_UBERJAR_PATH_EXCLUDE_PREFIX"></a>
+Exculude classes matching this patterns from UBERJAR.
+By default all dependencies of UBERJAR program will lend in a .jar archive.
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER][]() <a name="macro_UBERJAR_SERVICES_RESOURCE_TRANSFORMER"></a>
+Add ServicesResourceTransformer for UBERJAR() java programs
+
+@see: [UBERJAR](#macro\_UBERJAR)
+
+###### Macro [UDF\_NO\_PROBE][]() <a name="macro_UDF_NO_PROBE"></a>
+Disable UDF import check at build stage
+
+###### Macro [UPDATE\_VCS\_JAVA\_INFO\_NODEP][](Jar) <a name="macro_UPDATE_VCS_JAVA_INFO_NODEP"></a>
+Not documented yet.
+
+###### Macro [USE\_COMMON\_GOOGLE\_APIS][](APIS...) <a name="macro_USE_COMMON_GOOGLE_APIS"></a>
+Not documented yet.
+
+###### Macro [USE\_CXX][]() <a name="macro_USE_CXX"></a>
+Add dependency on C++ runtime
+Note: This macro is inteneded for use in \_GO\_BASE\_UNIT like module when the module is built without C++ runtime by default
+
+###### Macro [USE\_ERROR\_PRONE][]() <a name="macro_USE_ERROR_PRONE"></a>
+Use errorprone instead of javac for .java compilation.
+
+###### Macro [USE\_EXT\_PROTO][](peerdir\_tag...) <a name="macro_USE_EXT_PROTO"></a>
+Configure module to use proto files from existing PROTO\_LIBRARY module.
+Additional PEERDIR tags required to build a module can be passed through
+EXTRA\_TAGS vararg parameter.
+
+###### Macro [USE\_JAVALITE][]() <a name="macro_USE_JAVALITE"></a>
+Use protobuf-javalite for Java
+
+###### Macro [USE\_LINKER\_BFD][]() <a name="macro_USE_LINKER_BFD"></a>
+Use bfd linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_LINKER\_GOLD][]() <a name="macro_USE_LINKER_GOLD"></a>
+Use gold linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_LINKER\_LLD][]() <a name="macro_USE_LINKER_LLD"></a>
+Use lld linker for a program. This doesn't work in libraries
+
+###### Macro [USE\_PERL\_514\_LIB][]() <a name="macro_USE_PERL_514_LIB"></a>
+Add dependency on Perl 5.14 to your LIBRARY
+
+###### Macro [USE\_PERL\_LIB][]() <a name="macro_USE_PERL_LIB"></a>
+Add dependency on Perl to your LIBRARY
+
+###### Macro [USE\_PLANTUML][]() <a name="macro_USE_PLANTUML"></a>
+Use PlantUML plug-in for yfm builder to render UML diagrams into documentation
+
+###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a>
+This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible.
+Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+
+If you'd like to use #include <Python.h> with Python2 specify USE\_PYTHON2 or better make it PY2\_LIBRARY.
+If you'd like to use #include <Python.h> with Python3 specify USE\_PYTHON3 or better make it PY3\_LIBRARY.
+If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23\_LIBRARY.
+
+@see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY)
+
+###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a>
+This adds Python3 library to your LIBRARY and makes it Python3-compatible.
+Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+
+If you'd like to use #include <Python.h> with Python3 specify USE\_PYTHON3 or better make it PY3\_LIBRARY.
+If you'd like to use #include <Python.h> with Python2 specify USE\_PYTHON2 or better make it PY2\_LIBRARY.
+If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23\_LIBRARY.
+
+@see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY)
+
+###### Macro [USE\_RECIPE][](path [arg1 arg2...]) <a name="macro_USE_RECIPE"></a>
+Provides prepared environment via recipe for test.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
+
+###### Macro [USE\_SKIFF][]() _#wip, do not use_ <a name="macro_USE_SKIFF"></a>
+Use mapreduce/yt/skiff\_proto/plugin for C++
+
+###### Macro [USE\_UTIL][]() <a name="macro_USE_UTIL"></a>
+Add dependency on util and C++ runtime
+Note: This macro is intended for use in \_GO\_BASE\_UNIT like module when the module is build without util by default
+
+###### Macro [VALIDATE\_DATA\_RESTART][](ext) <a name="macro_VALIDATE_DATA_RESTART"></a>
+Change uid for resource validation tests. May be useful when sandbox resource ttl is changed, but test status is cached in CI.
+You can change ext to change test's uid. For example VALIDATE\_DATA\_RESTART(X), where is X is current revision.
+
+###### Macro [VERSION][](Args...) <a name="macro_VERSION"></a>
+Specify version of a module. Currently unused by build system, only informative.
+
+###### Macro [VISIBILITY][](level) <a name="macro_VISIBILITY"></a>
+This macro sets visibility level for symbols compiled for the current module. 'level'
+may take only one of the following values: DEFAULT, HIDDEN.
+
+###### Macro [WERROR][]() <a name="macro_WERROR"></a>
+Consider warnings as errors in the current module.
+In the bright future will be removed, since WERROR is the default.
+Priorities: NO\_COMPILER\_WARNINGS > NO\_WERROR > WERROR\_MODE > WERROR.
+
+###### Macro [WINDOWS\_MANIFEST][](Manifest) <a name="macro_WINDOWS_MANIFEST"></a>
+Not documented yet.
+
+###### Macro [WITHOUT\_LICENSE\_TEXTS][]() <a name="macro_WITHOUT_LICENSE_TEXTS"></a>
+This macro indicates that the module has no license text
+
+###### Macro [WITH\_DYNAMIC\_LIBS][] <a name="macro_WITH_DYNAMIC_LIBS"></a>
+$usage: WITH\_DYNAMIC\_LIBS() # restricted
+
+Include dynamic libraries as extra PROGRAM/DLL outputs
+
+###### Macro [WITH\_GROOVY][]() <a name="macro_WITH_GROOVY"></a>
+Compile groovy source code in this java module
+
+###### Macro [WITH\_JDK][]() <a name="macro_WITH_JDK"></a>
+Add directory with JDK to JAVA\_PROGRAM output
+
+###### Macro [WITH\_KOTLIN][]() <a name="macro_WITH_KOTLIN"></a>
+Compile kotlin source code in this java module
+
+###### Macro [WITH\_KOTLINC\_ALLOPEN][](-flags) <a name="macro_WITH_KOTLINC_ALLOPEN"></a>
+Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html
+
+###### Macro [WITH\_KOTLINC\_NOARG][](-flags) <a name="macro_WITH_KOTLINC_NOARG"></a>
+Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html
+
+###### Macro [XS\_PROTO][](InputProto Dir Outputs...) _# deprecated_ <a name="macro_XS_PROTO"></a>
+Generate Perl code from protobuf.
+In order to use this macro one should predict all outputs protoc will emit from input\_proto file and enlist those as outputs.
+
+###### Macro [YABS\_GENERATE\_CONF][] <a name="macro_YABS_GENERATE_CONF"></a>
+Not documented yet.
+
+###### Macro [YABS\_GENERATE\_PHANTOM\_CONF\_PATCH][] <a name="macro_YABS_GENERATE_PHANTOM_CONF_PATCH"></a>
+Not documented yet.
+
+###### Macro [YABS\_GENERATE\_PHANTOM\_CONF\_TEST\_CHECK][] <a name="macro_YABS_GENERATE_PHANTOM_CONF_TEST_CHECK"></a>
+Not documented yet.
+
+###### Macro [YDL\_DESC\_USE\_BINARY][]() <a name="macro_YDL_DESC_USE_BINARY"></a>
+Used in conjunction with BUILD\_YDL\_DESC. When enabled, all generated descriptors are binary.
+
+@example:
+
+ PACKAGE()
+ YDL_DESC_USE_BINARY()
+ BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+ END()
+
+This will generate descriptor Event.ydld in a binary format.
+
+###### Macro [YMAPS\_SPROTO][](ProtoFiles...) _# maps-specific_ <a name="macro_YMAPS_SPROTO"></a>
+Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
+
+###### Macro [YP\_PROTO\_YSON][](Files... OUT\_OPTS Opts...) <a name="macro_YP_PROTO_YSON"></a>
+Genereate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
+
+###### Macro [YQL\_ABI\_VERSION][](major minor release)) <a name="macro_YQL_ABI_VERSION"></a>
+Specifying the supported ABI for YQL\_UDF.
+
+@see: [YQL\_UDF()](#multimodule\_YQL\_UDF)
+
+###### Macro [YQL\_LAST\_ABI\_VERSION][]() <a name="macro_YQL_LAST_ABI_VERSION"></a>
+Use the last ABI for YQL\_UDF
+
+###### Macro [YT\_SPEC][](path1 [path2...]) <a name="macro_YT_SPEC"></a>
+Allows you to specify json-files with YT task and operation specs,
+which will be used to run test node in the YT.
+Test must be marked with ya:yt tag.
+Files must be relative to the root of Arcadia.
+
+Documentation: https://wiki.yandex-team.ru/yatool/test/
+
+ [DLL\_JAVA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L165
+ [DOCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3244
+ [FBS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7721
+ [JAR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3942
+ [JAVA\_CONTRIB\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L140
+ [JAVA\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L32
+ [JTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L82
+ [JTEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L111
+ [JTEST\_YMAKE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3992
+ [JUNIT5]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L56
+ [JUNIT5\_YMAKE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3973
+ [MAPS\_IDL\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L86
+ [PROTO\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7473
+ [PY23\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8784
+ [PY23\_NATIVE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8816
+ [PY23\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9013
+ [PY3TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2219
+ [PY3\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1731
+ [SANDBOX\_PY23\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5014
+ [SANDBOX\_PY3\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5057
+ [SANDBOX\_TASK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4989
+ [SSQLS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9119
+ [YQL\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L118
+ [BOOSTTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1944
+ [BOOSTTEST\_WITH\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1964
+ [CI\_GROUP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3030
+ [CONTAINER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9151
+ [CONTAINER\_LAYER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9144
+ [CPP\_STYLE\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2231
+ [CUSTOM\_BUILD\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9163
+ [DEFAULT\_IOS\_INTERFACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8892
+ [DLL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2798
+ [DLL\_TOOL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2815
+ [EXECTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2284
+ [FAT\_OBJECT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2543
+ [FUZZ]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1900
+ [GO\_DLL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8624
+ [GO\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8527
+ [GO\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8545
+ [GO\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8644
+ [GTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1882
+ [GTEST\_UGLY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2250
+ [G\_BENCHMARK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2311
+ [IOS\_INTERFACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8881
+ [JAVA\_CONTRIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3579
+ [JAVA\_CONTRIB\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3540
+ [JAVA\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L22
+ [LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2430
+ [MCU\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9236
+ [METAQUERY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4424
+ [PACKAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3006
+ [PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1672
+ [PROTO\_DESCRIPTIONS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7678
+ [PROTO\_REGISTRY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7690
+ [PY2MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2711
+ [PY2TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2177
+ [PY2\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4023
+ [PY2\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1700
+ [PY3MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2730
+ [PY3TEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2192
+ [PY3\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4090
+ [PY3\_PROGRAM\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4211
+ [PYCR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1793
+ [PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2162
+ [PY\_ANY\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2659
+ [RECURSIVE\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2572
+ [RESOURCES\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2503
+ [R\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2768
+ [SO\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2826
+ [TS\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L97
+ [UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L30
+ [UDF\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L37
+ [UNION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3067
+ [UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1852
+ [UNITTEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2339
+ [UNITTEST\_WITH\_CUSTOM\_ENTRY\_POINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1871
+ [YCR\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1771
+ [YQL\_PYTHON3\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L210
+ [YQL\_PYTHON3\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L258
+ [YQL\_PYTHON\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L159
+ [YQL\_PYTHON\_UDF\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L185
+ [YQL\_PYTHON\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L244
+ [YQL\_UDF\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L99
+ [YQL\_UDF\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L55
+ [YT\_UNITTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1862
+ [Y\_BENCHMARK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2300
+ [AARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L20
+ [AAR\_GRADLE\_SCRIPT\_GENERATOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L255
+ [AAR\_LOCAL\_MAVEN\_REPO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L249
+ [ACCELEO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/java.ymake.conf?rev=9113063#L12
+ [ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ADDINCLSELF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5703
+ [ADD\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L546
+ [ADD\_CHECK\_PY\_IMPORTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L654
+ [ADD\_CLANG\_TIDY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1596
+ [ADD\_COMPILABLE\_TRANSLATE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5396
+ [ADD\_COMPILABLE\_TRANSLIT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5406
+ [ADD\_DLLS\_TO\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4729
+ [ADD\_PERL\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5244
+ [ADD\_PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L727
+ [ADD\_PYTEST\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L698
+ [ADD\_YTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L416
+ [ALLOCATOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5274
+ [ALL\_PY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8762
+ [ALL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2960
+ [ANNOTATION\_PROCESSOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4684
+ [ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6422
+ [ARCHIVE\_ASM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6401
+ [ARCHIVE\_BY\_KEYS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6432
+ [ASM\_PREINCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7314
+ [ASSERT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L25
+ [BASE\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6504
+ [BPF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7199
+ [BPF\_STATIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7208
+ [BUILDWITH\_CYTHON\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6294
+ [BUILDWITH\_CYTHON\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6275
+ [BUILDWITH\_RAGEL6]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6349
+ [BUILD\_CATBOOST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/other.conf?rev=9113063#L9
+ [BUILD\_MN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6841
+ [BUILD\_MNS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6866
+ [BUILD\_ONLY\_IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [BUILD\_PLNS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6876
+ [BUILD\_YDL\_DESC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6114
+ [BUNDLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/bundle.py?rev=9113063#L4
+ [CC\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5287
+ [CFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6554
+ [CGO\_CFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8155
+ [CGO\_LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8164
+ [CGO\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8138
+ [CHECK\_CONTRIB\_CREDITS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/credits.py?rev=9113063#L8
+ [CHECK\_DEPENDENT\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L478
+ [CHECK\_JAVA\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4461
+ [CLANG\_EMIT\_AST\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7172
+ [COLLECT\_FRONTEND\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8961
+ [COLLECT\_JINJA\_TEMPLATES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7859
+ [COLLECT\_YDB\_API\_SPECS\_LEGACY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9268
+ [COMPILE\_C\_AS\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7118
+ [COMPILE\_LUA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6056
+ [COMPILE\_LUA\_21]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6074
+ [COMPILE\_NLG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6886
+ [COMPILE\_SWIFT\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8975
+ [CONFIGURE\_FILE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6497
+ [CONFTEST\_LOAD\_POLICY\_LOCAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2079
+ [CONLYFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6569
+ [COPY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/cp.py?rev=9113063#L6
+ [COPY\_FILE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5461
+ [COPY\_FILES\_TO\_BUILD\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/copy_files_to_build_prefix.py?rev=9113063#L10
+ [COPY\_FILE\_WITH\_CONTEXT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5470
+ [CPP\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7366
+ [CPP\_ENUMS\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L641
+ [CPP\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L687
+ [CPP\_PROTO\_PLUGIN0]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L674
+ [CPP\_PROTO\_PLUGIN2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L698
+ [CREATE\_BUILDINFO\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6469
+ [CREATE\_INIT\_PY\_STRUCTURE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/create_init_py.py?rev=9113063#L6
+ [CREDITS\_DISCLAIMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/credits.py?rev=9113063#L4
+ [CTEMPLATE\_VARNAMES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7134
+ [CUDA\_NVCC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6583
+ [CUSTOM\_LINK\_STEP\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1828
+ [CXXFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6576
+ [DARWIN\_SIGNED\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8872
+ [DARWIN\_STRINGS\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8868
+ [DATA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2039
+ [DEB\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6830
+ [DECIMAL\_MD5\_LOWER\_32\_BITS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6480
+ [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_BUNDLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DECLARE\_EXTERNAL\_HOST\_RESOURCES\_PACK]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DECLARE\_EXTERNAL\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DEFAULT]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DEPENDENCY\_MANAGEMENT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4767
+ [DEPENDS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DIRECT\_DEPS\_ONLY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4838
+ [DISABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DISABLE\_DATA\_VALIDATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2024
+ [DLL\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [DOCS\_BUILDER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3302
+ [DOCS\_CONFIG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3328
+ [DOCS\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3313
+ [DOCS\_INCLUDE\_SOURCES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3352
+ [DOCS\_VARS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3340
+ [DUMPERF\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6534
+ [DYNAMIC\_LIBRARY\_FROM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2784
+ [ELSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ELSEIF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EMBED\_JAVA\_VCS\_INFO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3394
+ [ENABLE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENABLE\_PREVIEW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4651
+ [END]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENDIF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [ENV]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2072
+ [EXCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4693
+ [EXCLUDE\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXPORTS\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1804
+ [EXPORT\_ALL\_DYNAMIC\_SYMBOLS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1818
+ [EXPORT\_YMAPS\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/sproto.conf?rev=9113063#L4
+ [EXPOSE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7440
+ [EXTERNAL\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L251
+ [EXTERNAL\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRADIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRALIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [EXTRALIBS\_STATIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5389
+ [FAT\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/res.py?rev=9113063#L37
+ [FBS\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7703
+ [FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/files.py?rev=9113063#L1
+ [FLATC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1035
+ [FLAT\_JOIN\_SRCS\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5596
+ [FORK\_SUBTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5524
+ [FORK\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5510
+ [FORK\_TEST\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5550
+ [FROM\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7103
+ [FROM\_MDS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7073
+ [FROM\_NPM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L45
+ [FROM\_SANDBOX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7065
+ [FUZZ\_DICTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1976
+ [FUZZ\_OPTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1995
+ [GENERATED\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7163
+ [GENERATE\_ENUM\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6809
+ [GENERATE\_ENUM\_SERIALIZATION\_WITH\_HEADER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6821
+ [GENERATE\_PY\_PROTOS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5424
+ [GENERATE\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L60
+ [GEN\_SCHEEME2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6959
+ [GLOBAL\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2942
+ [GO\_ASM\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7982
+ [GO\_BENCH\_TIMEOUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8633
+ [GO\_CGO1\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7990
+ [GO\_CGO2\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7998
+ [GO\_COMPILE\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8006
+ [GO\_EMBED\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8237
+ [GO\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8201
+ [GO\_EMBED\_TEST\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8245
+ [GO\_EMBED\_XTEST\_DIR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8253
+ [GO\_FAKE\_OUTPUT]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/plugins/plugin_go_fake_output_handler.cpp?rev=9113063#L110
+ [GO\_GRPC\_GATEWAY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8300
+ [GO\_GRPC\_GATEWAY\_SWAGGER\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8308
+ [GO\_LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8147
+ [GO\_LINK\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8014
+ [GO\_MOCKGEN\_FROM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8668
+ [GO\_MOCKGEN\_MOCKS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8693
+ [GO\_MOCKGEN\_REFLECT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8679
+ [GO\_MOCKGEN\_TYPES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8673
+ [GO\_PACKAGE\_NAME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8097
+ [GO\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L798
+ [GO\_SKIP\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8175
+ [GO\_TEST\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8209
+ [GO\_TEST\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [GO\_TEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8115
+ [GO\_XTEST\_EMBED\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8217
+ [GO\_XTEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8124
+ [GRPC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1019
+ [IDEA\_EXCLUDE\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4612
+ [IDEA\_JAR\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3456
+ [IDEA\_MODULE\_NAME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4632
+ [IDEA\_RESOURCE\_DIRS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4622
+ [IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INCLUDE\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [INDUCED\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [IOS\_APP\_ASSETS\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8864
+ [IOS\_APP\_COMMON\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8858
+ [IOS\_APP\_SETTINGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ios_app_settings.py?rev=9113063#L5
+ [IOS\_ASSETS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ios_assets.py?rev=9113063#L6
+ [JAR\_ANNOTATION\_PROCESSOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3498
+ [JAR\_EXCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4972
+ [JAR\_INCLUDE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4964
+ [JAR\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3559
+ [JAVAC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4641
+ [JAVA\_DEPENDENCIES\_CONFIGURATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4948
+ [JAVA\_EXTERNAL\_DEPENDENCIES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4847
+ [JAVA\_IGNORE\_CLASSPATH\_CLASH\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8704
+ [JAVA\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/java.py?rev=9113063#L77
+ [JAVA\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L651
+ [JAVA\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5311
+ [JAVA\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3720
+ [JAVA\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4723
+ [JAVA\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L795
+ [JAVA\_TEST\_DEPS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L886
+ [JDK\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8929
+ [JOINSRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6722
+ [JOIN\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5575
+ [JOIN\_SRCS\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5586
+ [JVM\_ARGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4450
+ [KOTLINC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4804
+ [LARGE\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7094
+ [LDFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6544
+ [LD\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5303
+ [LIB\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5295
+ [LICENSE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/license.conf?rev=9113063#L360
+ [LICENSE\_TEXTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9204
+ [LINKER\_SCRIPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/linker_script.py?rev=9113063#L1
+ [LINK\_EXEC\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1561
+ [LINK\_EXE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1555
+ [LINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2127
+ [LJ\_21\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/lj_archive.py?rev=9113063#L23
+ [LJ\_ARCHIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/lj_archive.py?rev=9113063#L1
+ [LLVM\_BC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/llvm_bc.py?rev=9113063#L6
+ [LLVM\_COMPILE\_C]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7190
+ [LLVM\_COMPILE\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7181
+ [LLVM\_COMPILE\_LL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7217
+ [LLVM\_LINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7226
+ [LLVM\_OPT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7235
+ [LOCAL\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3569
+ [LOCAL\_SOURCES\_JAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3574
+ [LUA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7013
+ [MACROS\_WITH\_ERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L8
+ [MAPKITIDL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/plugins/plugin_mapkitidl_handler.cpp?rev=9113063#L397
+ [MAPKIT\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/mapkit.conf?rev=9113063#L2
+ [MASMFLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6561
+ [MAVEN\_GROUP\_ID]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4674
+ [MESSAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [METAQUERYFILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9244
+ [MSVC\_FLAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9261
+ [MX\_FORMULAS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/mx_archive.py?rev=9113063#L1
+ [NEED\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6896
+ [NEED\_REVIEW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6914
+ [NGINX\_MODULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9132
+ [NODE\_MODULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/ts.conf?rev=9113063#L54
+ [NO\_BUILD\_IF]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [NO\_CHECK\_IMPORTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7268
+ [NO\_CLANG\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6746
+ [NO\_CLANG\_TIDY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6750
+ [NO\_COMPILER\_WARNINGS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6612
+ [NO\_CPU\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5696
+ [NO\_CYTHON\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6767
+ [NO\_DEBUG\_INFO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7125
+ [NO\_DOCTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2135
+ [NO\_EXPORT\_DYNAMIC\_SYMBOLS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1811
+ [NO\_EXTENDED\_SOURCE\_SEARCH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1719
+ [NO\_JOIN\_SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6715
+ [NO\_LIBC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6679
+ [NO\_LINT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2120
+ [NO\_MYPY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L888
+ [NO\_NEED\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6904
+ [NO\_OPTIMIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6605
+ [NO\_OPTIMIZE\_PY\_PROTOS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L602
+ [NO\_PLATFORM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6689
+ [NO\_PYTHON\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6758
+ [NO\_RUNTIME]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6668
+ [NO\_SANITIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6730
+ [NO\_SANITIZE\_COVERAGE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6738
+ [NO\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5688
+ [NO\_UTIL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6657
+ [NO\_WERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6627
+ [NO\_WSHADOW]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6633
+ [NVCC\_DEVICE\_LINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6592
+ [ONLY\_TAGS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [OPENSOURCE\_EXPORT\_REPLACEMENT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9188
+ [ORIGINAL\_SOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9176
+ [OWNER]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PACK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2986
+ [PACKAGE\_STRICT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2991
+ [PACK\_GLOBALS\_IN\_LIBRARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2525
+ [PARTITIONED\_RECURSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PARTITIONED\_RECURSE\_FOR\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PARTITIONED\_RECURSE\_ROOT\_RELATIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PEERDIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PIRE\_INLINE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6411
+ [PIRE\_INLINE\_CMD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6406
+ [PRINT\_MODULE\_TYPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/print_module_type.py?rev=9113063#L1
+ [PROCESS\_DOCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/docs.py?rev=9113063#L26
+ [PROGUARD\_RULES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/aar.conf?rev=9113063#L13
+ [PROTO2FBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L954
+ [PROTO\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L564
+ [PROTO\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L581
+ [PROVIDES]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7037
+ [PYTHON2\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5095
+ [PYTHON2\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2740
+ [PYTHON3\_ADDINCL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5142
+ [PYTHON3\_MODULE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2752
+ [PYTHON\_PATH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2102
+ [PY\_CONSTRUCTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L611
+ [PY\_DOCTESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L538
+ [PY\_ENUMS\_SERIALIZATION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L625
+ [PY\_EXTRA\_LINT\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8772
+ [PY\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L594
+ [PY\_NAMESPACE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3364
+ [PY\_PROTOS\_FOR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [PY\_PROTO\_PLUGIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L624
+ [PY\_PROTO\_PLUGIN2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L636
+ [PY\_REGISTER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/pybuild.py?rev=9113063#L556
+ [PY\_REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5320
+ [PY\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L8734
+ [PY\_SSQLS\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9103
+ [REAL\_LINK\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1549
+ [REAL\_LINK\_EXEC\_DYN\_LIB\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1543
+ [REAL\_LINK\_EXE\_IMPL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1537
+ [RECURSE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [RECURSE\_FOR\_TESTS]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [RECURSE\_ROOT\_RELATIVE]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [REGISTER\_SANDBOX\_IMPORT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/sandbox_registry.py?rev=9113063#L6
+ [REGISTER\_YQL\_PYTHON\_UDF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yql_python_udf.py?rev=9113063#L10
+ [REQUIREMENTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2063
+ [REQUIRES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L456
+ [RESOLVE\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3053
+ [RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L543
+ [RESOURCE\_FILES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/res.py?rev=9113063#L53
+ [RESTRICT\_LICENSES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/license.conf?rev=9113063#L376
+ [RESTRICT\_PATH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/macros_with_error.py?rev=9113063#L13
+ [RUN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1025
+ [RUN\_ANTLR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7331
+ [RUN\_ANTLR4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7339
+ [RUN\_ANTLR4\_CPP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7352
+ [RUN\_ANTLR4\_GO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7360
+ [RUN\_JAVA\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3491
+ [RUN\_PROGRAM]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6989
+ [RUN\_PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7323
+ [SDBUS\_CPP\_ADAPTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9073
+ [SDBUS\_CPP\_PROXY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9079
+ [SET]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SETUP\_EXECTEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1031
+ [SETUP\_PYTEST\_BIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1015
+ [SETUP\_RUN\_PYTHON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L1043
+ [SET\_APPEND]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SET\_APPEND\_WITH\_GLOBAL]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SET\_COMPILE\_OUTPUTS\_MODIFIERS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5716
+ [SIZE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5562
+ [SKIP\_TEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2111
+ [SOURCE\_GROUP]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SPLIT\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/split_codegen.py?rev=9113063#L9
+ [SPLIT\_DWARF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5373
+ [SPLIT\_FACTOR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5538
+ [SRC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6140
+ [SRCDIR]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6159
+ [SRC\_CPP\_AVX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6259
+ [SRC\_CPP\_AVX2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6266
+ [SRC\_CPP\_PIC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6217
+ [SRC\_CPP\_SSE2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6224
+ [SRC\_CPP\_SSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6231
+ [SRC\_CPP\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6252
+ [SRC\_CPP\_SSE41]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6245
+ [SRC\_CPP\_SSSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6238
+ [SRC\_C\_AVX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6203
+ [SRC\_C\_AVX2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6210
+ [SRC\_C\_SSE2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6168
+ [SRC\_C\_SSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6175
+ [SRC\_C\_SSE4]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6196
+ [SRC\_C\_SSE41]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6189
+ [SRC\_C\_SSSE3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6182
+ [SRC\_RESOURCE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3564
+ [STRIP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6599
+ [STRUCT\_CODEGEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6527
+ [STYLE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2236
+ [SUBSCRIBER]: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ymake/yndex/builtin.cpp?rev=9113063#L14
+ [SUPPRESSIONS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/suppressions.py?rev=9113063#L1
+ [SYMLINK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6965
+ [SYSTEM\_PROPERTIES]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4439
+ [TAG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2052
+ [TASKLET]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7380
+ [TASKLET\_REG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7400
+ [TASKLET\_REG\_EXT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7415
+ [TEST\_CWD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4480
+ [TEST\_DATA]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/ytest.py?rev=9113063#L41
+ [TEST\_JAVA\_CLASSPATH\_CMD\_TYPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4930
+ [TEST\_SRCS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2020
+ [TIMEOUT]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5483
+ [UBERJAR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4504
+ [UBERJAR\_APPENDING\_TRANSFORMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4588
+ [UBERJAR\_HIDE\_EXCLUDE\_PATTERN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4532
+ [UBERJAR\_HIDING\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4517
+ [UBERJAR\_MANIFEST\_TRANSFORMER\_ATTRIBUTE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4572
+ [UBERJAR\_MANIFEST\_TRANSFORMER\_MAIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4559
+ [UBERJAR\_PATH\_EXCLUDE\_PREFIX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4546
+ [UBERJAR\_SERVICES\_RESOURCE\_TRANSFORMER]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4601
+ [UDF\_NO\_PROBE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L45
+ [UPDATE\_VCS\_JAVA\_INFO\_NODEP]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6461
+ [USE\_COMMON\_GOOGLE\_APIS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L757
+ [USE\_CXX]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6699
+ [USE\_ERROR\_PRONE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4469
+ [USE\_EXT\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L7659
+ [USE\_JAVALITE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L913
+ [USE\_LINKER\_BFD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1366
+ [USE\_LINKER\_GOLD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1371
+ [USE\_LINKER\_LLD]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1376
+ [USE\_PERL\_514\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5235
+ [USE\_PERL\_LIB]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5228
+ [USE\_PLANTUML]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L3290
+ [USE\_PYTHON2]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5191
+ [USE\_PYTHON3]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5208
+ [USE\_RECIPE]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2090
+ [USE\_SKIFF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L708
+ [USE\_UTIL]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6707
+ [VALIDATE\_DATA\_RESTART]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L5493
+ [VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6922
+ [VISIBILITY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9051
+ [WERROR]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6620
+ [WINDOWS\_MANIFEST]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9036
+ [WITHOUT\_LICENSE\_TEXTS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L9212
+ [WITH\_DYNAMIC\_LIBS]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L1531
+ [WITH\_GROOVY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4795
+ [WITH\_JDK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4777
+ [WITH\_KOTLIN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4786
+ [WITH\_KOTLINC\_ALLOPEN]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4813
+ [WITH\_KOTLINC\_NOARG]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L4823
+ [XS\_PROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L944
+ [YABS\_GENERATE\_CONF]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L10
+ [YABS\_GENERATE\_PHANTOM\_CONF\_PATCH]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L35
+ [YABS\_GENERATE\_PHANTOM\_CONF\_TEST\_CHECK]: https://a.yandex-team.ru/arc/trunk/arcadia/build/plugins/yabs_generate_conf.py?rev=9113063#L53
+ [YDL\_DESC\_USE\_BINARY]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L6131
+ [YMAPS\_SPROTO]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/maps/sproto.conf?rev=9113063#L16
+ [YP\_PROTO\_YSON]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L838
+ [YQL\_ABI\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L139
+ [YQL\_LAST\_ABI\_VERSION]: https://a.yandex-team.ru/arc/trunk/arcadia/build/conf/project_specific/yql_udf.conf?rev=9113063#L148
+ [YT\_SPEC]: https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=9113063#L2009
diff --git a/build/external_resources/android_sdk/ya.make b/build/external_resources/android_sdk/ya.make
new file mode 100644
index 0000000000..bc01c12523
--- /dev/null
+++ b/build/external_resources/android_sdk/ya.make
@@ -0,0 +1,20 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+IF (OS_ANDROID)
+ # Android SDK for linux and darwin: Build-Tools 30.0.3, Platform 30
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ ANDROID_SDK
+ sbr:2564045529 FOR LINUX
+ sbr:2564523615 FOR DARWIN
+ )
+ IF (NOT HOST_OS_LINUX AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for ANDROID_SDK)
+ ENDIF()
+ DECLARE_EXTERNAL_RESOURCE(ANDROID_AVD sbr:2563860055)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform)
+ENDIF()
+
+END()
diff --git a/build/external_resources/antlr3/ya.make b/build/external_resources/antlr3/ya.make
new file mode 100644
index 0000000000..59043418d7
--- /dev/null
+++ b/build/external_resources/antlr3/ya.make
@@ -0,0 +1,7 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:yatool)
+
+DECLARE_EXTERNAL_RESOURCE(ANTLR3 sbr:164589140)
+
+END()
diff --git a/build/external_resources/antlr4/ya.make b/build/external_resources/antlr4/ya.make
new file mode 100644
index 0000000000..222d799d9c
--- /dev/null
+++ b/build/external_resources/antlr4/ya.make
@@ -0,0 +1,7 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:yatool)
+
+DECLARE_EXTERNAL_RESOURCE(ANTLR4 sbr:1861632725)
+
+END()
diff --git a/build/external_resources/codenavigation/ya.make b/build/external_resources/codenavigation/ya.make
new file mode 100644
index 0000000000..8cfdf0d3d5
--- /dev/null
+++ b/build/external_resources/codenavigation/ya.make
@@ -0,0 +1,14 @@
+OWNER(g:yatool)
+
+RESOURCES_LIBRARY()
+
+NO_CODENAVIGATION()
+NO_RUNTIME()
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(CPPYNDEXER sbr:2218884955)
+ DECLARE_EXTERNAL_RESOURCE(PYNDEXER sbr:2112287762)
+ DECLARE_EXTERNAL_RESOURCE(PY3YNDEXER sbr:2670411952)
+ENDIF()
+
+END()
diff --git a/build/external_resources/flake8_py2/ya.make b/build/external_resources/flake8_py2/ya.make
new file mode 100644
index 0000000000..412a014b9e
--- /dev/null
+++ b/build/external_resources/flake8_py2/ya.make
@@ -0,0 +1,23 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:yatool)
+
+IF (HOST_OS_DARWIN AND HOST_ARCH_ARM64 OR
+ HOST_OS_DARWIN AND HOST_ARCH_X86_64 OR
+ HOST_OS_LINUX AND HOST_ARCH_PPC64LE OR
+ HOST_OS_LINUX AND HOST_ARCH_X86_64 OR
+ HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host platform for FLAKE8_PY2)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ FLAKE8_PY2
+ sbr:2488549842 FOR DARWIN-ARM64
+ sbr:2488553184 FOR DARWIN
+ sbr:2488550572 FOR LINUX-PPC64LE
+ sbr:2488555532 FOR LINUX
+ sbr:2488554786 FOR WIN32
+)
+
+END()
diff --git a/build/external_resources/flake8_py3/ya.make b/build/external_resources/flake8_py3/ya.make
new file mode 100644
index 0000000000..c2192b2df6
--- /dev/null
+++ b/build/external_resources/flake8_py3/ya.make
@@ -0,0 +1,23 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:yatool)
+
+IF (HOST_OS_DARWIN AND HOST_ARCH_ARM64 OR
+ HOST_OS_DARWIN AND HOST_ARCH_X86_64 OR
+ HOST_OS_LINUX AND HOST_ARCH_PPC64LE OR
+ HOST_OS_LINUX AND HOST_ARCH_X86_64 OR
+ HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host platform for FLAKE8_PY3)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ FLAKE8_PY3
+ sbr:2617984240 FOR DARWIN-ARM64
+ sbr:2617985759 FOR DARWIN
+ sbr:2617984621 FOR LINUX-PPC64LE
+ sbr:2617987339 FOR LINUX
+ sbr:2617986064 FOR WIN32
+)
+
+END()
diff --git a/build/external_resources/go_fake_xcrun/ya.make b/build/external_resources/go_fake_xcrun/ya.make
new file mode 100644
index 0000000000..f82b5e750a
--- /dev/null
+++ b/build/external_resources/go_fake_xcrun/ya.make
@@ -0,0 +1,17 @@
+OWNER(g:ymake)
+
+RESOURCES_LIBRARY()
+
+IF (NOT HOST_OS_DARWIN AND NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS)
+ MESSAGE(FATAL_ERROR Unsupported host platform for GO_FAKE_XCRUN)
+ELSE()
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ GO_FAKE_XCRUN
+ sbr:2000736487 FOR DARWIN-ARM64
+ sbr:2000736487 FOR DARWIN
+ sbr:2000736769 FOR LINUX
+ sbr:2000736617 FOR WIN32
+ )
+ENDIF()
+
+END()
diff --git a/build/external_resources/go_tools/ya.make b/build/external_resources/go_tools/ya.make
new file mode 100644
index 0000000000..ff3f8f7f2a
--- /dev/null
+++ b/build/external_resources/go_tools/ya.make
@@ -0,0 +1,27 @@
+OWNER(g:ymake)
+
+RESOURCES_LIBRARY()
+
+IF (NOT HOST_OS_DARWIN AND NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS)
+ MESSAGE(FATAL_ERROR Unsupported host platform for GO_TOOLS)
+ELSEIF(GOSTD_VERSION == 1.17.6)
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ GO_TOOLS
+ sbr:2685555388 FOR DARWIN-ARM64
+ sbr:2685554692 FOR DARWIN
+ sbr:2685556023 FOR LINUX
+ sbr:2685556796 FOR WIN32
+ )
+ELSEIF(GOSTD_VERSION == 1.18beta2)
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ GO_TOOLS
+ sbr:2764476653 FOR DARWIN-ARM64
+ sbr:2764475951 FOR DARWIN
+ sbr:2764477456 FOR LINUX
+ sbr:2764478136 FOR WIN32
+ )
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported version [${GOSTD_VERSION}] of Go Standard Library)
+ENDIF()
+
+END()
diff --git a/build/external_resources/goyndexer/ya.make b/build/external_resources/goyndexer/ya.make
new file mode 100644
index 0000000000..8f0adef54a
--- /dev/null
+++ b/build/external_resources/goyndexer/ya.make
@@ -0,0 +1,16 @@
+OWNER(g:ymake)
+
+RESOURCES_LIBRARY()
+
+IF (NOT HOST_OS_DARWIN AND NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS)
+ MESSAGE(FATAL_ERROR Unsupported host platform for goyndexer)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ GOYNDEXER
+ sbr:2051948481 FOR DARWIN
+ sbr:2051949278 FOR LINUX
+ sbr:2051948796 FOR WIN32
+)
+
+END()
diff --git a/build/external_resources/gradle/ya.make b/build/external_resources/gradle/ya.make
new file mode 100644
index 0000000000..579d41e50e
--- /dev/null
+++ b/build/external_resources/gradle/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+# Gradle 6.1.1
+# Build time: 2020-01-24 22:30:24 UTC
+# Revision: a8c3750babb99d1894378073499d6716a1a1fa5d
+DECLARE_EXTERNAL_RESOURCE(GRADLE sbr:2566840956)
+DECLARE_EXTERNAL_RESOURCE(GRADLE_DEBUG_STORE sbr:1192738881)
+
+END()
diff --git a/build/external_resources/mapsmobi_ios_pods/ya.make b/build/external_resources/mapsmobi_ios_pods/ya.make
new file mode 100644
index 0000000000..a733c6beb4
--- /dev/null
+++ b/build/external_resources/mapsmobi_ios_pods/ya.make
@@ -0,0 +1,12 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+IF (OS_IOS)
+ DECLARE_EXTERNAL_RESOURCE(MAPSMOBI_IOS_PODS sbr:2586181384)
+ CFLAGS(GLOBAL "-I$MAPSMOBI_IOS_PODS_RESOURCE_GLOBAL/Pods/Headers/Public")
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform)
+ENDIF()
+
+END()
diff --git a/build/external_resources/mapsmobi_maven_repo/ya.make b/build/external_resources/mapsmobi_maven_repo/ya.make
new file mode 100644
index 0000000000..2487263d6b
--- /dev/null
+++ b/build/external_resources/mapsmobi_maven_repo/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+IF (OS_ANDROID)
+ DECLARE_EXTERNAL_RESOURCE(MAPSMOBI_MAVEN_REPO sbr:2586526945)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform)
+ENDIF()
+
+END()
diff --git a/build/external_resources/maven/ya.make b/build/external_resources/maven/ya.make
new file mode 100644
index 0000000000..44c39b6dd9
--- /dev/null
+++ b/build/external_resources/maven/ya.make
@@ -0,0 +1,8 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+# Apache Maven: version 3.6.1
+DECLARE_EXTERNAL_RESOURCE(MAVEN sbr:1231330972)
+
+END()
diff --git a/build/external_resources/pnpm/readme.md b/build/external_resources/pnpm/readme.md
new file mode 100644
index 0000000000..1deff50cd7
--- /dev/null
+++ b/build/external_resources/pnpm/readme.md
@@ -0,0 +1,4 @@
+# pnpm bundle
+
+Ресурс должен быть tar-архивом с собранным в один файл pnpm'ом – `pnpm.js`.
+Собранный файл можно взять в `dist/` пакета `pnpm`. Зависимости для актуальной версии (5.18.9) не требуются.
diff --git a/build/external_resources/pnpm/ya.make b/build/external_resources/pnpm/ya.make
new file mode 100644
index 0000000000..0e6fd426a1
--- /dev/null
+++ b/build/external_resources/pnpm/ya.make
@@ -0,0 +1,8 @@
+RESOURCES_LIBRARY()
+
+OWNER(dankolesnikov)
+
+# pnpm 5.18.9
+DECLARE_EXTERNAL_RESOURCE(PNPM sbr:2197487733)
+
+END()
diff --git a/build/external_resources/swift-demangle/package.json b/build/external_resources/swift-demangle/package.json
new file mode 100644
index 0000000000..64e87c0c3e
--- /dev/null
+++ b/build/external_resources/swift-demangle/package.json
@@ -0,0 +1,22 @@
+{
+ "meta": {
+ "name": "swift-demangle",
+ "maintainer": "Anton Saraev <dancingelf@yandex-team.ru>",
+ "description": "swift-demangle for using in docker build"
+ },
+ "data": [
+ {
+ "source": {
+ "type": "SANDBOX_RESOURCE",
+ "id": 2216593352,
+ "files": [
+ "*"
+ ],
+ "untar": true
+ },
+ "destination": {
+ "path": "/swift-demangle/"
+ }
+ }
+ ]
+}
diff --git a/build/external_resources/swift-demangle/ya.make b/build/external_resources/swift-demangle/ya.make
new file mode 100644
index 0000000000..a0e61214f6
--- /dev/null
+++ b/build/external_resources/swift-demangle/ya.make
@@ -0,0 +1,12 @@
+RESOURCES_LIBRARY()
+
+OWNER(orivej dancingelf rodion-m dmitrtol)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ SWIFT_DEMANGLE
+ sbr:2216593352 FOR LINUX
+ sbr:2218209370 FOR DARWIN
+ sbr:2218209370 FOR DARWIN-ARM64
+)
+
+END()
diff --git a/build/external_resources/typescript/readme.md b/build/external_resources/typescript/readme.md
new file mode 100644
index 0000000000..dba0d171f2
--- /dev/null
+++ b/build/external_resources/typescript/readme.md
@@ -0,0 +1,12 @@
+# typescript bundle
+
+Ресурс должен быть tar-архивом с собранным пакетом `typescript`.
+В tar должны быть включены тайпинги для поддерживаемых target/lib и `tsc.js`. Структура:
+
+```
+lib/
+ tsc.js
+ lib.*.d.td
+```
+
+Зависимости для актуальной версии не требуются.
diff --git a/build/external_resources/typescript/ya.make b/build/external_resources/typescript/ya.make
new file mode 100644
index 0000000000..e5141556e4
--- /dev/null
+++ b/build/external_resources/typescript/ya.make
@@ -0,0 +1,8 @@
+RESOURCES_LIBRARY()
+
+OWNER(dankolesnikov)
+
+# typescript 4.1.3
+DECLARE_EXTERNAL_RESOURCE(TS_COMPILER sbr:2202008231)
+
+END()
diff --git a/build/external_resources/ya.make b/build/external_resources/ya.make
new file mode 100644
index 0000000000..ba2ae38588
--- /dev/null
+++ b/build/external_resources/ya.make
@@ -0,0 +1,42 @@
+OWNER(g:ymake)
+
+RECURSE(
+ antlr3
+ antlr4
+ gradle
+ maven
+ swift-demangle
+)
+
+IF (OS_ANDROID)
+ RECURSE(
+ android_sdk
+ mapsmobi_maven_repo
+ )
+ENDIF()
+
+IF (OS_IOS)
+ RECURSE(
+ mapsmobi_ios_pods
+ )
+ENDIF()
+
+IF (OS_LINUX)
+ RECURSE(
+ codenavigation
+ )
+ENDIF()
+
+IF (OS_DARWIN OR OS_LINUX OR OS_WINDOWS)
+ RECURSE(
+ flake8_py2
+ flake8_py3
+ go_fake_xcrun
+ go_tools
+ goyndexer
+ pnpm
+ typescript
+ ymake
+ yolint
+ )
+ENDIF()
diff --git a/build/external_resources/ymake/ya.make b/build/external_resources/ymake/ya.make
new file mode 100644
index 0000000000..7e0fc1023b
--- /dev/null
+++ b/build/external_resources/ymake/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+RESOURCES_LIBRARY()
+
+INCLUDE(${ARCADIA_ROOT}/build/external_resources/ymake/ya.make.inc)
+
+END()
diff --git a/build/external_resources/ymake/ya.make.inc b/build/external_resources/ymake/ya.make.inc
new file mode 100644
index 0000000000..b88f36c4db
--- /dev/null
+++ b/build/external_resources/ymake/ya.make.inc
@@ -0,0 +1,13 @@
+IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64 OR HOST_OS_DARWIN AND HOST_ARCH_ARM64 OR HOST_OS_LINUX AND HOST_ARCH_PPC64LE OR HOST_OS_LINUX AND HOST_ARCH_X86_64 OR HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host platform for YMAKE)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ YMAKE
+ sbr:2763560807 FOR DARWIN
+ sbr:2763561138 FOR DARWIN-ARM64
+ sbr:2763560653 FOR LINUX-PPC64LE
+ sbr:2763560979 FOR LINUX
+ sbr:2763560492 FOR WIN32
+)
diff --git a/build/external_resources/yolint/ya.make b/build/external_resources/yolint/ya.make
new file mode 100644
index 0000000000..b19b80375d
--- /dev/null
+++ b/build/external_resources/yolint/ya.make
@@ -0,0 +1,25 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:ymake)
+
+IF (NOT HOST_OS_DARWIN AND NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS)
+ MESSAGE(FATAL_ERROR Unsupported host platform for yolint)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ YOLINT
+ sbr:2661110873 FOR DARWIN-ARM64
+ sbr:2661110873 FOR DARWIN
+ sbr:2661111772 FOR LINUX
+ sbr:2661111243 FOR WIN32
+)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ YOLINT_NEXT
+ sbr:2661110873 FOR DARWIN-ARM64
+ sbr:2661110873 FOR DARWIN
+ sbr:2661111772 FOR LINUX
+ sbr:2661111243 FOR WIN32
+)
+
+END()
diff --git a/build/platform.md b/build/platform.md
new file mode 100644
index 0000000000..deb8acfb09
--- /dev/null
+++ b/build/platform.md
@@ -0,0 +1,23 @@
+## `--target-platform`
+### `default`
+* `android`
+ * `i686`, `x86_64`, `armv7a`, `armv7a_neon`, `armv8a`
+ Clang 9.0.8, Android NDK r21b. API 16 for the 32-bit platforms, API 21 for 64-bit.
+* `darwin`
+ * `x86_64`
+ Clang 12.0.0, macOS SDK 10.13
+ * `arm64`
+ Clang 12.0.0, macOS SDK ???
+* `ios`
+ * `i386`, `x86_64`, `armv7`, `arm64`
+ Clang 12.0.0, iOS SDK and iOS Simulator SDK 11.1
+* `linux`
+ * `x86_64`
+ Clang 12.0.0, Ubuntu Linux 14.04 x86-64 SDK
+ * `aarch64`
+ Clang 12.0.0, Ubuntu Linux 16.04 aarch64 SDK
+ * `ppc64le`
+ Clang 12.0.0, Ubuntu Linux 14.04 ppc64le SDK
+* `win`
+ * `i686`, `x86_64`
+ Microsoft Visual C++ 2017 14.16.27023, Windows Kits 10.0.16299.0
diff --git a/build/platform/android_sdk/ya.make b/build/platform/android_sdk/ya.make
new file mode 100644
index 0000000000..1e726065da
--- /dev/null
+++ b/build/platform/android_sdk/ya.make
@@ -0,0 +1,20 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:mapkit)
+
+IF (NOT OS_ANDROID)
+ MESSAGE(FATAL_ERROR Unsupported platform)
+ENDIF()
+
+IF (HOST_OS_LINUX)
+ # Android SDK for linux: Build-Tools 30.0.3, Platform 30
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ ANDROID_SDK
+ sbr:2564045529 FOR LINUX
+ )
+ DECLARE_EXTERNAL_RESOURCE(ANDROID_AVD sbr:2563860055)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host platform)
+ENDIF()
+
+END()
diff --git a/build/platform/bfd/ya.make b/build/platform/bfd/ya.make
new file mode 100644
index 0000000000..67501f665f
--- /dev/null
+++ b/build/platform/bfd/ya.make
@@ -0,0 +1,9 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/binutils/binutils.resource)
+
+LDFLAGS(-fuse-ld=$BINUTILS_ROOT_RESOURCE_GLOBAL/bin/ld.bfd)
+
+END()
diff --git a/build/platform/binutils/binutils.resource b/build/platform/binutils/binutils.resource
new file mode 100644
index 0000000000..28823ecd80
--- /dev/null
+++ b/build/platform/binutils/binutils.resource
@@ -0,0 +1,7 @@
+IF (HOST_OS_DARWIN AND OS_LINUX AND ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(BINUTILS_ROOT sbr:333256689)
+ELSEIF (HOST_OS_LINUX AND OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(BINUTILS_ROOT sbr:360916612)
+ELSE()
+ MESSAGE(FATAL_ERROR "There is no binutils for selected build configuration")
+ENDIF()
diff --git a/build/platform/binutils/ya.make b/build/platform/binutils/ya.make
new file mode 100644
index 0000000000..aedcb12f23
--- /dev/null
+++ b/build/platform/binutils/ya.make
@@ -0,0 +1,8 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib somov)
+
+INCLUDE(binutils.resource)
+
+END()
+
diff --git a/build/platform/cctools/ya.make b/build/platform/cctools/ya.make
new file mode 100644
index 0000000000..c17a6abc67
--- /dev/null
+++ b/build/platform/cctools/ya.make
@@ -0,0 +1,12 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ CCTOOLS_ROOT
+ sbr:2135298496 FOR LINUX
+ sbr:2135992724 FOR DARWIN
+ sbr:2135992724 FOR DARWIN-ARM64
+)
+
+END()
diff --git a/build/platform/clang/arch.cmake b/build/platform/clang/arch.cmake
new file mode 100644
index 0000000000..db0ae243e6
--- /dev/null
+++ b/build/platform/clang/arch.cmake
@@ -0,0 +1,27 @@
+# See https://github.com/llvm/llvm-project/blob/master/compiler-rt/cmake/builtin-config-ix.cmake
+
+IF (ARCH_I386 OR ARCH_I686)
+ SET(CLANG_ARCH i386)
+ELSEIF (ARCH_X86_64)
+ SET(CLANG_ARCH x86_64)
+ELSEIF (ARCH_ARM7 OR ARCH_ARM7_NEON)
+ SET(CLANG_ARCH armv7)
+ELSEIF (ARCH_ARM64 OR ARCH_AARCH64)
+ IF (OS_DARWIN OR OS_IOS)
+ SET(CLANG_ARCH arm64)
+ ELSE()
+ SET(CLANG_ARCH aarch64)
+ ENDIF()
+ELSEIF (ARCH_PPC64LE)
+ SET(CLANG_ARCH powerpc64le)
+ELSE()
+ MESSAGE(FATAL_ERROR "Unknown architecture")
+ENDIF()
+
+IF (OS_DARWIN)
+ SET(CLANG_RT_SUFFIX "_osx")
+ SET(CLANG_RT_DLLSUFFIX "_osx_dynamic")
+ELSE()
+ SET(CLANG_RT_SUFFIX "-${CLANG_ARCH}")
+ SET(CLANG_RT_DLLSUFFIX "-${CLANG_ARCH}")
+ENDIF()
diff --git a/build/platform/clang/clang-windows.sh b/build/platform/clang/clang-windows.sh
new file mode 100755
index 0000000000..73552e62c8
--- /dev/null
+++ b/build/platform/clang/clang-windows.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+version="${1:-11.0.0}"
+major="${version%%.*}"
+
+arcadia="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../.. && pwd)"
+tmp="${TMPDIR:-/tmp}/clang"
+exe="LLVM-${version}-win64.exe"
+dir="clang-${version}-win"
+tar="${dir}.tar.gz"
+
+set -x
+
+mkdir -p "$tmp"
+cd "$tmp"
+test -e "$exe" || wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${exe}"
+
+rm -rf "$dir"
+mkdir -p "$dir"
+cd "$dir"
+7z x ../"$exe"
+
+"$arcadia"/ya \
+ make "$arcadia"/contrib/libs/llvm${major}/tools/{llvm-as,llvm-link,opt} \
+ -DNO_DEBUGINFO -r --target-platform=windows --no-src-links -I bin
+
+tar czf "../$tar" *
+
+printf '%q ' ya upload "$tmp/$tar" -d "Clang $version for Windows" --ttl inf --owner BUILD_TOOLS --type CLANG_TOOLKIT --attr platform=win32 --attr "version=$version"
+echo
diff --git a/build/platform/clang/ya.make b/build/platform/clang/ya.make
new file mode 100644
index 0000000000..342b928637
--- /dev/null
+++ b/build/platform/clang/ya.make
@@ -0,0 +1,24 @@
+RESOURCES_LIBRARY()
+
+LICENSE(BSD-3-Clause)
+
+OWNER(g:contrib)
+
+IF (CLANG10BC AND CLANG10 AND HOST_OS_LINUX)
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ CLANG # Clang 10
+ sbr:1871274282 FOR LINUX
+ sbr:1844539535 FOR DARWIN
+ )
+ELSE()
+ # Remove -std=c++17 flag from LLVM_COMPILE_CXX and CLANG_EMIT_AST_CXX macro when update clang to 11
+ # DEVTOOLS-7845
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ CLANG # Clang 7
+ sbr:707372498 FOR LINUX # In 942524429 and 958916803 llvm-link does not run.
+ sbr:942053644 FOR DARWIN
+ sbr:1006151596 FOR WIN32 # Generated by ./clang-windows.sh 7.1.0
+ )
+ENDIF()
+
+END()
diff --git a/build/platform/coverage_push_tool/ya.make b/build/platform/coverage_push_tool/ya.make
new file mode 100644
index 0000000000..675569dbe5
--- /dev/null
+++ b/build/platform/coverage_push_tool/ya.make
@@ -0,0 +1,10 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+IF(USE_SYSTEM_COVERAGE_PUSH_TOOL)
+ MESSAGE(WARNING System coverage push tool $USE_SYSTEM_COVERAGE_PUSH_TOOL will be used)
+ELSEIF(HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(COVERAGE_PUSH_TOOL sbr:1748856682)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host for COVERAGE_PUSH_TOOL)
+ENDIF()
+END()
diff --git a/build/platform/cuda/cuda_runtime_include.h b/build/platform/cuda/cuda_runtime_include.h
new file mode 100644
index 0000000000..e60aacc4fb
--- /dev/null
+++ b/build/platform/cuda/cuda_runtime_include.h
@@ -0,0 +1,13 @@
+#pragma once
+
+// Компилятор nvcc из CUDA Toolkit при компиляции файла включает неявную зависимость
+// $CUDA_ROOT/include/cuda_runtime.h, которая в свою очередь включает другие файлы
+// из $CUDA_ROOT, а так же из стандартной библиотеки C++. Файлы из внешних ресурсов
+// не доступны на этапе конфигурирования сборки, и зависимости из них не учитываются.
+// Это, в частности, приводит к поломке сборки с использованием nvcc в режиме sandboxing-а.
+
+// Здесь перечислены такие зависимости. Этот файл добавляется в качестве дополнительной
+// зависимости к каждой компиляции nvcc.
+
+#include <cmath>
+#include <new>
diff --git a/build/platform/cuda/stdtree/ya.make b/build/platform/cuda/stdtree/ya.make
new file mode 100644
index 0000000000..01feaee51e
--- /dev/null
+++ b/build/platform/cuda/stdtree/ya.make
@@ -0,0 +1,13 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib heretic)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(STD_TREE sbr:1094784663)
+ELSE()
+ MESSAGE(FATAL_ERROR "No stdc++ tree part for the selected platform found")
+ENDIF()
+LDFLAGS("-L$STD_TREE_RESOURCE_GLOBAL")
+EXTRALIBS(tree)
+
+END()
diff --git a/build/platform/cuda/ya.make b/build/platform/cuda/ya.make
new file mode 100644
index 0000000000..3615f682cd
--- /dev/null
+++ b/build/platform/cuda/ya.make
@@ -0,0 +1,195 @@
+RESOURCES_LIBRARY()
+
+# https://wiki.yandex-team.ru/devtools/cuda/
+
+OWNER(g:contrib somov)
+
+IF (NOT HAVE_CUDA)
+ MESSAGE(FATAL_ERROR "No CUDA Toolkit for your build")
+ENDIF()
+
+IF (USE_ARCADIA_CUDA)
+ IF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
+ IF (OS_LINUX AND ARCH_X86_64)
+ IF (CUDA_VERSION == "11.4")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2410761119) # CUDA Toolkit 11.4.2 for Linux x86-64
+ ELSEIF (CUDA_VERSION == "11.3")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2213063565) # CUDA Toolkit 11.3.1 for Linux x86-64
+ ELSEIF (CUDA_VERSION == "11.2")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2073566375) # CUDA Toolkit 11.2.2 for Linux x86-64
+ ELSEIF (CUDA_VERSION == "11.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:1882836946) # CUDA Toolkit 11.1.1 for Linux x86-64
+ ELSEIF (CUDA_VERSION == "11.0")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:1647896014) # CUDA Toolkit 11.0.2 for Linux x86-64
+ ELSEIF (CUDA_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2077988857) # CUDA Toolkit 10.1.168 for Linux x86-64
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+ ELSEIF(OS_LINUX AND ARCH_AARCH64)
+ IF (CUDA_VERSION == "11.3")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2227720086) # CUDA Toolkit 11.3.20210513 (11.3.1) for Linux x86-64 with linux-aarch64 support
+ # host tools installer https://sandbox.yandex-team.ru/resource/2227828799/view
+ # cross compile parts installer https://sandbox.yandex-team.ru/resource/2227885870/view
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_LINUX AND HOST_ARCH_PPC64LE)
+ IF (OS_LINUX AND ARCH_PPC64LE)
+ IF (CUDA_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:1586537264) # CUDA Toolkit 10.1.168 for Linux ppc64le
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
+ IF (OS_DARWIN AND ARCH_X86_64)
+ IF (CUDA_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:978727023) # CUDA Toolkit 10.1.168 for macOS x86-64
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ IF (OS_WINDOWS AND ARCH_X86_64)
+ IF (CUDA_VERSION == "11.3")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:2215101513) # CUDA Toolkit 11.3.1 for Windows x86-64
+ ELSEIF (CUDA_VERSION == "11.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:1896564605) # CUDA Toolkit 11.1.1 for Windows x86-64
+ ELSEIF (CUDA_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA sbr:978734165) # CUDA Toolkit 10.1.168 for Windows x86-64
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_NOT_FOUND)
+ ENDIF()
+ENDIF()
+
+IF (USE_ARCADIA_CUDA_HOST_COMPILER)
+ IF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
+ IF (OS_LINUX AND ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(CUDA_HOST_TOOLCHAIN sbr:1886578148) # Clang 11.0.0 for linux-x86_64
+ IF (CUDA_VERSION VERSION_LT "11.2")
+ # Equivalent to nvcc -allow-unsupported-compiler (present since 11.0).
+ CFLAGS(GLOBAL "-D__NV_NO_HOST_COMPILER_CHECK")
+ ENDIF()
+ ELSEIF(OS_LINUX AND ARCH_AARCH64)
+ DECLARE_EXTERNAL_RESOURCE(CUDA_HOST_TOOLCHAIN sbr:1886578148) # Clang 11.0.0 for linux-x86_64
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_LINUX AND HOST_ARCH_PPC64LE)
+ IF (OS_LINUX AND ARCH_PPC64LE)
+ IF (CUDA_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(CUDA_HOST_TOOLCHAIN sbr:1566513994) # Clang 7.0 for Linux ppc64le (not latest)
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
+ IF (OS_DARWIN AND ARCH_X86_64)
+ SET(__XCODE_RESOURCE_NAME CUDA_HOST_TOOLCHAIN)
+ IF (CUDA_VERSION == "10.1")
+ SET(__XCODE_TOOLCHAIN_VERSION "9.2") # (not latest)
+ ELSE()
+ SET(__XCODE_TOOLCHAIN_VERSION "")
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+ IF (__XCODE_TOOLCHAIN_VERSION)
+ INCLUDE(${ARCADIA_ROOT}/build/platform/xcode/ya.make.inc)
+ ENDIF()
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+
+ ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ IF (OS_WINDOWS AND ARCH_X86_64)
+ # To create this toolchain, install MSVS on Windows and run:
+ # devtools/tools_build/pack_sdk.py msvc out.tar
+ # Note: it will contain patched "VC/Auxiliary/Build/vcvarsall.bat"
+ # to prevent "nvcc fatal : Host compiler targets unsupported OS."
+ IF (CUDA_HOST_MSVC_VERSION == "14.28.29910")
+ DECLARE_EXTERNAL_RESOURCE(CUDA_HOST_TOOLCHAIN sbr:2153212401)
+ ELSE()
+ MESSAGE(FATAL_ERROR "Unexpected or unspecified Microsoft Visual C++ CUDA host compiler version")
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+
+ ELSE()
+ ENABLE(CUDA_HOST_COMPILER_NOT_FOUND)
+ ENDIF()
+ENDIF()
+
+IF (CUDA_NOT_FOUND)
+ MESSAGE(FATAL_ERROR "No CUDA Toolkit for the selected platform")
+ENDIF()
+
+IF (CUDA_HOST_COMPILER_NOT_FOUND)
+ MESSAGE(FATAL_ERROR "No CUDA host compiler for the selected platform and CUDA Toolkit version ${CUDA_VERSION}")
+ENDIF()
+
+# Use thrust and cub from Arcadia, not from HPC SDK
+# NB:
+# it would be better to use PEERDIR instead,
+# but ymake does not allow PEERDIRs from RESOURCES_LIBRARY.
+ADDINCL(
+ GLOBAL contrib/libs/nvidia/thrust
+ GLOBAL contrib/libs/nvidia/cub
+)
+
+IF (HOST_OS_WINDOWS)
+ SET_APPEND_WITH_GLOBAL(USER_CFLAGS GLOBAL "\"-I${CUDA_ROOT}/include\"")
+ELSE()
+ CFLAGS(GLOBAL "-I${CUDA_ROOT}/include")
+ENDIF()
+
+IF (HOST_OS_WINDOWS)
+ SET_APPEND(LDFLAGS_GLOBAL "\"/LIBPATH:${CUDA_ROOT}/lib/x64\"")
+ELSEIF(HOST_OS_LINUX AND OS_LINUX AND ARCH_AARCH64)
+ LDFLAGS("-L${CUDA_ROOT}/targets/sbsa-linux/lib")
+ELSEIF(HOST_OS_LINUX)
+ LDFLAGS("-L${CUDA_ROOT}/lib64")
+ELSE()
+ LDFLAGS("-L${CUDA_ROOT}/lib")
+ENDIF()
+
+IF (CUDA_REQUIRED)
+ IF(HOST_OS_LINUX)
+ LDFLAGS("-L${CUDA_ROOT}/lib64/stubs")
+ EXTRALIBS(-lcuda)
+ ELSEIF(HOST_OS_DARWIN)
+ LDFLAGS("-F${CUDA_ROOT}/lib/stubs -framework CUDA")
+ ENDIF()
+ENDIF()
+
+IF (HOST_OS_WINDOWS)
+ LDFLAGS(cudadevrt.lib cudart_static.lib)
+ELSE()
+ EXTRALIBS(-lcudadevrt -lcudart_static -lculibos)
+ENDIF()
+
+END()
diff --git a/build/platform/gold/ya.make b/build/platform/gold/ya.make
new file mode 100644
index 0000000000..91f01602f7
--- /dev/null
+++ b/build/platform/gold/ya.make
@@ -0,0 +1,12 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/binutils/binutils.resource)
+
+LDFLAGS(
+ -fuse-ld=$BINUTILS_ROOT_RESOURCE_GLOBAL/bin/ld.gold
+ -Wl,-z,noexecstack
+)
+
+END()
diff --git a/build/platform/intel_fpga_sdk/ya.make b/build/platform/intel_fpga_sdk/ya.make
new file mode 100644
index 0000000000..5cefb02250
--- /dev/null
+++ b/build/platform/intel_fpga_sdk/ya.make
@@ -0,0 +1,9 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+DECLARE_EXTERNAL_RESOURCE(INTEL_FPGA_SDK sbr:606576548)
+
+LDFLAGS(-L$INTEL_FPGA_SDK_RESOURCE_GLOBAL/lib)
+
+END()
diff --git a/build/platform/ios_sdk/ya.make b/build/platform/ios_sdk/ya.make
new file mode 100644
index 0000000000..b1246a70b9
--- /dev/null
+++ b/build/platform/ios_sdk/ya.make
@@ -0,0 +1,17 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(NEED_PLATFORM_PEERDIRS no)
+
+IF (OS_IOS AND NOT OS_IOSSIM)
+ # iOS 14.5 SDK / Xcode 12.5.1 (12E507)
+ DECLARE_EXTERNAL_RESOURCE(IOS_SDK_ROOT sbr:2661782168)
+ELSEIF (OS_IOSSIM)
+ # iOS Simulator 14.5 SDK / Xcode 12.5.1 (12E507)
+ DECLARE_EXTERNAL_RESOURCE(IOS_SDK_ROOT sbr:2661786760)
+ELSE()
+ MESSAGE(FATAL_ERROR "There is no iOS SDK for the selected target platform")
+ENDIF()
+
+END()
diff --git a/build/platform/java/error_prone/2.10.0/ya.make b/build/platform/java/error_prone/2.10.0/ya.make
new file mode 100644
index 0000000000..d08a624350
--- /dev/null
+++ b/build/platform/java/error_prone/2.10.0/ya.make
@@ -0,0 +1,4 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE_2_10_0 sbr:2649935593)
+END()
diff --git a/build/platform/java/error_prone/2.3.1/ya.make b/build/platform/java/error_prone/2.3.1/ya.make
new file mode 100644
index 0000000000..5d2267036f
--- /dev/null
+++ b/build/platform/java/error_prone/2.3.1/ya.make
@@ -0,0 +1,4 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE_2_3_1 sbr:616853779)
+END()
diff --git a/build/platform/java/error_prone/2.7.1/ya.make b/build/platform/java/error_prone/2.7.1/ya.make
new file mode 100644
index 0000000000..81a345ba98
--- /dev/null
+++ b/build/platform/java/error_prone/2.7.1/ya.make
@@ -0,0 +1,4 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE_2_7_1 sbr:2202855601)
+END()
diff --git a/build/platform/java/error_prone/ya.make b/build/platform/java/error_prone/ya.make
new file mode 100644
index 0000000000..ee2eceafc0
--- /dev/null
+++ b/build/platform/java/error_prone/ya.make
@@ -0,0 +1,28 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+IF(USE_SYSTEM_ERROR_PRONE)
+ MESSAGE(WARNING System Error Prone $USE_SYSTEM_ERROR_PRONE will be used)
+ELSEIF(ERROR_PRONE_VERSION == "2.3.1")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:616853779)
+ELSEIF(ERROR_PRONE_VERSION == "2.3.2")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:760800655)
+ELSEIF(ERROR_PRONE_VERSION == "2.3.3")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:919320393)
+ELSEIF(ERROR_PRONE_VERSION == "2.4.0")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:1585305794)
+ELSEIF(ERROR_PRONE_VERSION == "2.6.0")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:2139890169)
+ELSEIF(ERROR_PRONE_VERSION == "2.7.1")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:2202855601)
+ELSEIF(ERROR_PRONE_VERSION == "2.10.0")
+ DECLARE_EXTERNAL_RESOURCE(ERROR_PRONE sbr:2649935593)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported Error Prone version: $ERROR_PRONE_VERSION)
+ENDIF()
+END()
+
+RECURSE(
+ 2.10.0
+ 2.7.1
+ 2.3.1
+)
diff --git a/build/platform/java/groovy/ya.make b/build/platform/java/groovy/ya.make
new file mode 100644
index 0000000000..01058729b2
--- /dev/null
+++ b/build/platform/java/groovy/ya.make
@@ -0,0 +1,10 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+IF(USE_SYSTEM_GROOVY_COMPILER)
+ MESSAGE(WARNING System groovy $USE_SYSTEM_GROOVY_COMPILER will be used)
+ELSEIF(GROOVY_VERSION == "3.0.5")
+ DECLARE_EXTERNAL_RESOURCE(GROOVY_COMPILER sbr:1710622475)
+ELSE()
+ MESSAGE(FATAL_ERROR Unexpected groovy version ${GROOVY_VERSION})
+ENDIF()
+END()
diff --git a/build/platform/java/jacoco-agent/ya.make b/build/platform/java/jacoco-agent/ya.make
new file mode 100644
index 0000000000..c298dc9020
--- /dev/null
+++ b/build/platform/java/jacoco-agent/ya.make
@@ -0,0 +1,9 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+IF(USE_SYSTEM_JACOCO_AGENT)
+ MESSAGE(WARNING System jacoco agent $USE_SYSTEM_JACOCO_AGENT will be used)
+ELSE()
+ DECLARE_EXTERNAL_RESOURCE(JACOCO_AGENT sbr:2493693569)
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk10/ya.make b/build/platform/java/jdk/jdk10/ya.make
new file mode 100644
index 0000000000..83a420a81f
--- /dev/null
+++ b/build/platform/java/jdk/jdk10/ya.make
@@ -0,0 +1,20 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK10
+ ${JDK10_DARWIN} FOR DARWIN
+ ${JDK10_LINUX} FOR LINUX
+ ${JDK10_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK10 ${JDK10_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK10 ${JDK10_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK10 ${JDK10_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk11/ya.make b/build/platform/java/jdk/jdk11/ya.make
new file mode 100644
index 0000000000..ae450c9c97
--- /dev/null
+++ b/build/platform/java/jdk/jdk11/ya.make
@@ -0,0 +1,31 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK11
+ ${JDK11_DARWIN} FOR DARWIN
+ ${JDK11_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK11_LINUX} FOR LINUX
+ ${JDK11_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK11 ${JDK11_DARWIN_ARM64})
+ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK11 ${JDK11_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK11 ${JDK11_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK11 ${JDK11_WINDOWS})
+ENDIF()
+
+IF(SANITIZER_TYPE == "address")
+ IF(HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS11 ${JDK11_LINUX_ASAN})
+ ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK11 with asan)
+ ENDIF()
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk12/ya.make b/build/platform/java/jdk/jdk12/ya.make
new file mode 100644
index 0000000000..3ab3553338
--- /dev/null
+++ b/build/platform/java/jdk/jdk12/ya.make
@@ -0,0 +1,20 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK12
+ ${JDK12_DARWIN} FOR DARWIN
+ ${JDK12_LINUX} FOR LINUX
+ ${JDK12_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK12 ${JDK12_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK12 ${JDK12_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK12 ${JDK12_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk13/ya.make b/build/platform/java/jdk/jdk13/ya.make
new file mode 100644
index 0000000000..527af68fb2
--- /dev/null
+++ b/build/platform/java/jdk/jdk13/ya.make
@@ -0,0 +1,28 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK13
+ ${JDK13_DARWIN} FOR DARWIN
+ ${JDK13_LINUX} FOR LINUX
+ ${JDK13_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK13 ${JDK13_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK13 ${JDK13_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK13 ${JDK13_WINDOWS})
+ENDIF()
+
+IF(SANITIZER_TYPE == "address")
+ IF(HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK13_LINUX_ASAN})
+ ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK13 with asan)
+ ENDIF()
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk14/ya.make b/build/platform/java/jdk/jdk14/ya.make
new file mode 100644
index 0000000000..ed08c1a7fb
--- /dev/null
+++ b/build/platform/java/jdk/jdk14/ya.make
@@ -0,0 +1,20 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK14
+ ${JDK14_DARWIN} FOR DARWIN
+ ${JDK14_LINUX} FOR LINUX
+ ${JDK14_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK14 ${JDK14_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK14 ${JDK14_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK14 ${JDK14_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk15/ya.make b/build/platform/java/jdk/jdk15/ya.make
new file mode 100644
index 0000000000..0746e27405
--- /dev/null
+++ b/build/platform/java/jdk/jdk15/ya.make
@@ -0,0 +1,22 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK15
+ ${JDK15_DARWIN} FOR DARWIN
+ ${JDK15_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK15_LINUX} FOR LINUX
+ ${JDK15_WINDOWS} FOR WIN32
+)
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK15 ${JDK15_DARWIN_ARM64})
+ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK15 ${JDK15_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK15 ${JDK15_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK15 ${JDK15_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk16/ya.make b/build/platform/java/jdk/jdk16/ya.make
new file mode 100644
index 0000000000..2fc2f16418
--- /dev/null
+++ b/build/platform/java/jdk/jdk16/ya.make
@@ -0,0 +1,23 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK16
+ ${JDK16_DARWIN} FOR DARWIN
+ ${JDK16_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK16_LINUX} FOR LINUX
+ ${JDK16_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK16 ${JDK16_DARWIN_ARM64})
+ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK16 ${JDK16_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK16 ${JDK16_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK16 ${JDK16_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk17/ya.make b/build/platform/java/jdk/jdk17/ya.make
new file mode 100644
index 0000000000..97aa391945
--- /dev/null
+++ b/build/platform/java/jdk/jdk17/ya.make
@@ -0,0 +1,23 @@
+OWNER(heretic)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK17
+ ${JDK17_DARWIN} FOR DARWIN
+ ${JDK17_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK17_LINUX} FOR LINUX
+ ${JDK17_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK17 ${JDK17_DARWIN_ARM64})
+ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK17 ${JDK17_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK17 ${JDK17_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK17 ${JDK17_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/jdk8/ya.make b/build/platform/java/jdk/jdk8/ya.make
new file mode 100644
index 0000000000..7386b4731c
--- /dev/null
+++ b/build/platform/java/jdk/jdk8/ya.make
@@ -0,0 +1,23 @@
+OWNER(trenin17)
+RESOURCES_LIBRARY()
+INCLUDE(${ARCADIA_ROOT}/build/platform/java/jdk/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK8
+ ${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK8_DARWIN} FOR DARWIN
+ ${JDK8_LINUX} FOR LINUX
+ ${JDK8_WINDOWS} FOR WIN32
+)
+
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK8 ${JDK8_DARWIN_ARM64})
+ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK8 ${JDK8_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK8 ${JDK8_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK8 ${JDK8_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/java/jdk/resources.inc b/build/platform/java/jdk/resources.inc
new file mode 100644
index 0000000000..7413263cd9
--- /dev/null
+++ b/build/platform/java/jdk/resources.inc
@@ -0,0 +1,49 @@
+# JDK 17
+SET(JDK17_DARWIN_ARM64 sbr:2720893567)
+SET(JDK17_DARWIN sbr:2720886299)
+SET(JDK17_LINUX sbr:2720875090)
+SET(JDK17_WINDOWS sbr:2720881931)
+
+# JDK 16
+SET(JDK16_DARWIN_ARM64 sbr:2197985911)
+SET(JDK16_DARWIN sbr:2197936962)
+SET(JDK16_LINUX sbr:2197854301)
+SET(JDK16_WINDOWS sbr:2197964128)
+
+# JDK 15
+SET(JDK15_DARWIN sbr:1901471162)
+SET(JDK15_DARWIN_ARM64 sbr:2107376046)
+SET(JDK15_LINUX sbr:1901452000)
+SET(JDK15_WINDOWS sbr:1901563630)
+
+# JDK 14
+SET(JDK14_DARWIN sbr:1714972232)
+SET(JDK14_LINUX sbr:1714966923)
+SET(JDK14_WINDOWS sbr:1714975688)
+
+# JDK 13
+SET(JDK13_DARWIN sbr:1327581343)
+SET(JDK13_LINUX sbr:1327248424)
+SET(JDK13_WINDOWS sbr:1327617393)
+
+SET(JDK13_LINUX_ASAN sbr:1327513158)
+# JDK 12
+SET(JDK12_DARWIN sbr:1128561457)
+SET(JDK12_LINUX sbr:1128737735)
+SET(JDK12_WINDOWS sbr:1128743394)
+# JDK 11
+SET(JDK11_DARWIN sbr:1903539486)
+SET(JDK11_DARWIN_ARM64 sbr:2107253283)
+SET(JDK11_LINUX sbr:1903522585)
+SET(JDK11_WINDOWS sbr:1903567822)
+
+SET(JDK11_LINUX_ASAN sbr:1323637508)
+# JDK 10
+SET(JDK10_DARWIN sbr:545649998)
+SET(JDK10_LINUX sbr:545649806)
+SET(JDK10_WINDOWS sbr:545648079)
+# JDK 8
+SET(JDK8_DARWIN_ARM64 sbr:1901326056)
+SET(JDK8_DARWIN sbr:1901326056)
+SET(JDK8_LINUX sbr:1901306329)
+SET(JDK8_WINDOWS sbr:1901510679)
diff --git a/build/platform/java/jdk/ya.make b/build/platform/java/jdk/ya.make
new file mode 100644
index 0000000000..909ae36e18
--- /dev/null
+++ b/build/platform/java/jdk/ya.make
@@ -0,0 +1,311 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+
+INCLUDE(resources.inc)
+
+IF(JDK_VERSION == "17")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK17_DARWIN} FOR DARWIN
+ ${JDK17_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK17_LINUX} FOR LINUX
+ ${JDK17_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK17)
+ ENDIF()
+ELSEIF(JDK_VERSION == "16")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK16_DARWIN} FOR DARWIN
+ ${JDK16_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK16_LINUX} FOR LINUX
+ ${JDK16_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK16)
+ ENDIF()
+ELSEIF(JDK_VERSION == "15")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK15_DARWIN} FOR DARWIN
+ ${JDK15_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK15_LINUX} FOR LINUX
+ ${JDK15_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK15)
+ ENDIF()
+ELSEIF(JDK_VERSION == "14")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK14_DARWIN} FOR DARWIN
+ ${JDK14_LINUX} FOR LINUX
+ ${JDK14_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK14)
+ ENDIF()
+ELSEIF(JDK_VERSION == "13")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK13_DARWIN} FOR DARWIN
+ ${JDK13_LINUX} FOR LINUX
+ ${JDK13_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK13)
+ ENDIF()
+ELSEIF(JDK_VERSION == "12")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK12_DARWIN} FOR DARWIN
+ ${JDK12_LINUX} FOR LINUX
+ ${JDK12_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK12)
+ ENDIF()
+ELSEIF(JDK_VERSION == "11")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK11_DARWIN} FOR DARWIN
+ ${JDK11_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK11_LINUX} FOR LINUX
+ ${JDK11_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK11)
+ ENDIF()
+ELSEIF(JDK_VERSION == "10")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK10_DARWIN} FOR DARWIN
+ ${JDK10_LINUX} FOR LINUX
+ ${JDK10_WINDOWS} FOR WIN32
+ )
+ELSEIF(JDK_VERSION == "8")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK_DEFAULT
+ ${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK8_DARWIN} FOR DARWIN
+ ${JDK8_LINUX} FOR LINUX
+ ${JDK8_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK8)
+ ENDIF()
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported JDK version)
+ENDIF()
+
+IF(USE_SYSTEM_JDK)
+ MESSAGE(WARNING System JDK $USE_SYSTEM_JDK will be used)
+ELSEIF(JDK_VERSION == "17")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK17_DARWIN} FOR DARWIN
+ ${JDK17_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK17_LINUX} FOR LINUX
+ ${JDK17_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK17)
+ ENDIF()
+
+ IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_DARWIN_ARM64})
+ ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "16")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK16_DARWIN} FOR DARWIN
+ ${JDK16_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK16_LINUX} FOR LINUX
+ ${JDK16_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK16)
+ ENDIF()
+
+ IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_DARWIN_ARM64})
+ ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "15")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK15_DARWIN} FOR DARWIN
+ ${JDK15_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK15_LINUX} FOR LINUX
+ ${JDK15_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK15)
+ ENDIF()
+
+ IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_DARWIN_ARM64})
+ ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "14")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK14_DARWIN} FOR DARWIN
+ ${JDK14_LINUX} FOR LINUX
+ ${JDK14_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK14)
+ ENDIF()
+
+ IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "13")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK13_DARWIN} FOR DARWIN
+ ${JDK13_LINUX} FOR LINUX
+ ${JDK13_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK13)
+ ENDIF()
+ IF(SANITIZER_TYPE == "address")
+ IF(HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK13_LINUX_ASAN})
+ ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK13 with asan)
+ ENDIF()
+ ENDIF()
+
+ IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "12")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK12_DARWIN} FOR DARWIN
+ ${JDK12_LINUX} FOR LINUX
+ ${JDK12_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK12)
+ ENDIF()
+
+ IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "11")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK11_DARWIN} FOR DARWIN
+ ${JDK11_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK11_LINUX} FOR LINUX
+ ${JDK11_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK11)
+ ENDIF()
+ IF(SANITIZER_TYPE == "address")
+ IF(HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK11_LINUX_ASAN})
+ ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK11 with asan)
+ ENDIF()
+ ENDIF()
+
+ IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_DARWIN_ARM64})
+ ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "10")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK10_DARWIN} FOR DARWIN
+ ${JDK10_LINUX} FOR LINUX
+ ${JDK10_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK10)
+ ENDIF()
+
+ IF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_WINDOWS})
+ ENDIF()
+ELSEIF(JDK_VERSION == "8")
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ JDK
+ ${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${JDK8_DARWIN} FOR DARWIN
+ ${JDK8_LINUX} FOR LINUX
+ ${JDK8_WINDOWS} FOR WIN32
+ )
+ IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for JDK8)
+ ENDIF()
+
+ IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_DARWIN_ARM64})
+ ELSEIF(OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_DARWIN})
+ ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_LINUX})
+ ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_WINDOWS})
+ ENDIF()
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported JDK version)
+ENDIF()
+
+END()
+
+RECURSE(
+ jdk8
+ jdk10
+ jdk11
+ jdk12
+ jdk13
+ jdk14
+ jdk15
+ jdk16
+ jdk17
+)
diff --git a/build/platform/java/jni/ya.make b/build/platform/java/jni/ya.make
new file mode 100644
index 0000000000..9d8dab98b1
--- /dev/null
+++ b/build/platform/java/jni/ya.make
@@ -0,0 +1,29 @@
+LIBRARY()
+OWNER(heretic)
+
+PEERDIR(
+ build/platform/java/jdk
+ ${JDK_RESOURCE_PEERDIR}
+)
+
+IF(OS_DARWIN)
+ SET(PLATFORM_NAME darwin)
+ELSEIF(OS_LINUX)
+ SET(PLATFORM_NAME linux)
+ELSEIF(OS_WINDOWS)
+ SET(PLATFORM_NAME win32)
+ENDIF()
+
+IF (USE_SYSTEM_JDK)
+ SET(JDK_ROOT ${USE_SYSTEM_JDK})
+ELSE()
+ SET(JDK_ROOT ${JDK_DEFAULT_RESOURCE_GLOBAL})
+ENDIF()
+IF (PLATFORM_NAME)
+ CFLAGS(GLOBAL -I${JDK_ROOT}/include)
+ CFLAGS(GLOBAL -I${JDK_ROOT}/include/${PLATFORM_NAME})
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported platform for jni)
+ENDIF()
+
+END()
diff --git a/build/platform/java/jstyle_lib/ya.make b/build/platform/java/jstyle_lib/ya.make
new file mode 100644
index 0000000000..fa55e63071
--- /dev/null
+++ b/build/platform/java/jstyle_lib/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(heretic)
+
+IF (USE_SYSTEM_JSTYLE_LIB)
+ MESSAGE(WARNING System java codestyle library $USE_SYSTEM_JSTYLE_LIB will be used)
+ELSE()
+ DECLARE_EXTERNAL_RESOURCE(JSTYLE_LIB sbr:2525400095)
+ENDIF()
+
+END()
diff --git a/build/platform/java/kotlin/ya.make b/build/platform/java/kotlin/ya.make
new file mode 100644
index 0000000000..b4c0b0b83a
--- /dev/null
+++ b/build/platform/java/kotlin/ya.make
@@ -0,0 +1,31 @@
+# how to build: https://a.yandex-team.ru/arc/trunk/arcadia/devtools/kotlin_compiler_uberjar
+RESOURCES_LIBRARY()
+OWNER(heretic)
+IF(USE_SYSTEM_KOTLIN_COMPILER)
+ MESSAGE(WARNING System kotlin $USE_SYSTEM_KOTLIN_COMPILER will be used)
+ELSEIF(KOTLIN_VERSION == "1.3.72")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:1463870128)
+ELSEIF(KOTLIN_VERSION == "1.4.0")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:1708283452)
+ELSEIF(KOTLIN_VERSION == "1.4.10")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:1730522145)
+ELSEIF(KOTLIN_VERSION == "1.4.20")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:1869719387)
+ELSEIF(KOTLIN_VERSION == "1.4.30")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:1974389794)
+ELSEIF(KOTLIN_VERSION == "1.5.10")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2183338194)
+ELSEIF(KOTLIN_VERSION == "1.5.20")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2257446523)
+ELSEIF(KOTLIN_VERSION == "1.5.21")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2285312314)
+ELSEIF(KOTLIN_VERSION == "1.5.30")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2382793744)
+ELSEIF(KOTLIN_VERSION == "1.5.31")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2444978303)
+ELSEIF(KOTLIN_VERSION == "1.6.10")
+ DECLARE_EXTERNAL_RESOURCE(KOTLIN_COMPILER sbr:2754878302)
+ELSE()
+ MESSAGE(FATAL_ERROR Unexpected KOTLIN_VERSION ${KOTLIN_VERSION})
+ENDIF()
+END()
diff --git a/build/platform/java/kythe/ya.make b/build/platform/java/kythe/ya.make
new file mode 100644
index 0000000000..d5a9237f68
--- /dev/null
+++ b/build/platform/java/kythe/ya.make
@@ -0,0 +1,10 @@
+RESOURCES_LIBRARY()
+OWNER(g:ymake)
+
+IF(USE_SYSTEM_KYTHE)
+ MESSAGE(WARNING System Kythe $USE_SYSTEM_KYTHE will be used)
+ELSE()
+ DECLARE_EXTERNAL_RESOURCE(KYTHE sbr:837801347)
+ENDIF()
+
+END()
diff --git a/build/platform/java/scriptgen/ya.make b/build/platform/java/scriptgen/ya.make
new file mode 100644
index 0000000000..d296097f52
--- /dev/null
+++ b/build/platform/java/scriptgen/ya.make
@@ -0,0 +1,27 @@
+RESOURCES_LIBRARY()
+OWNER(g:ymake)
+
+SET(SCRIPTGEN_LINUX sbr:2654452283)
+SET(SCRIPTGEN_DARWIN_ARM64 sbr:2654451866)
+SET(SCRIPTGEN_DARWIN sbr:2654452096)
+SET(SCRIPTGEN_WIN32 sbr:2654451225)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ SCRIPTGEN
+ ${SCRIPTGEN_LINUX} FOR LINUX
+ ${SCRIPTGEN_DARWIN} FOR DARWIN
+ ${SCRIPTGEN_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${SCRIPTGEN_WIN32} FOR WIN32
+)
+
+IF(OS_DARWIN AND ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_DARWIN_ARM64})
+ELSEIF(OS_DARWIN AND ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_DARWIN})
+ELSEIF(OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_LINUX})
+ELSEIF(OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_WIN32})
+ENDIF()
+
+END()
diff --git a/build/platform/java/uberjar/uberjar10/ya.make b/build/platform/java/uberjar/uberjar10/ya.make
new file mode 100644
index 0000000000..29829b4cd0
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar10/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR10 sbr:720309903)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar11/ya.make b/build/platform/java/uberjar/uberjar11/ya.make
new file mode 100644
index 0000000000..69ae705253
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar11/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR11 sbr:962498940)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar12/ya.make b/build/platform/java/uberjar/uberjar12/ya.make
new file mode 100644
index 0000000000..88ff579eca
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar12/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR12 sbr:962498940)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar13/ya.make b/build/platform/java/uberjar/uberjar13/ya.make
new file mode 100644
index 0000000000..62c70ca3a1
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar13/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR13 sbr:1165818979)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar14/ya.make b/build/platform/java/uberjar/uberjar14/ya.make
new file mode 100644
index 0000000000..45e7deab2f
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar14/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR14 sbr:1407329657)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar15/ya.make b/build/platform/java/uberjar/uberjar15/ya.make
new file mode 100644
index 0000000000..49fdd64317
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar15/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR15 sbr:2074702997)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar16/ya.make b/build/platform/java/uberjar/uberjar16/ya.make
new file mode 100644
index 0000000000..ca4cefc1b1
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar16/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR16 sbr:2199772343)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar17/ya.make b/build/platform/java/uberjar/uberjar17/ya.make
new file mode 100644
index 0000000000..bc9bf4411b
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar17/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+# same resource as 16
+DECLARE_EXTERNAL_RESOURCE(UBERJAR17 sbr:2199772343)
+
+END()
diff --git a/build/platform/java/uberjar/uberjar8/ya.make b/build/platform/java/uberjar/uberjar8/ya.make
new file mode 100644
index 0000000000..45aec41508
--- /dev/null
+++ b/build/platform/java/uberjar/uberjar8/ya.make
@@ -0,0 +1,6 @@
+RESOURCES_LIBRARY()
+OWNER(trenin17)
+
+DECLARE_EXTERNAL_RESOURCE(UBERJAR8 sbr:962511340)
+
+END()
diff --git a/build/platform/java/uberjar/ya.make b/build/platform/java/uberjar/ya.make
new file mode 100644
index 0000000000..29c934d5b1
--- /dev/null
+++ b/build/platform/java/uberjar/ya.make
@@ -0,0 +1,39 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+
+IF(USE_SYSTEM_UBERJAR)
+ MESSAGE(WARNING System uberjar $USE_SYSTEM_UBERJAR will be used)
+ELSEIF(JDK_VERSION == "17")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2199772343)
+ELSEIF(JDK_VERSION == "16")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2199772343)
+ELSEIF(JDK_VERSION == "15")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2074702997)
+ELSEIF(JDK_VERSION == "14")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:1407329657)
+ELSEIF(JDK_VERSION == "13")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:1165818979)
+ELSEIF(JDK_VERSION == "12")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962498940)
+ELSEIF(JDK_VERSION == "11")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962498940)
+ELSEIF(JDK_VERSION == "10" OR JDK10) # !JDK10 flag is deprecated, this check should be removed later
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:720309903)
+ELSEIF(JDK_VERSION == "8")
+ DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962511340)
+ELSE()
+ MESSAGE(FATAL_ERROR Uberjar is not supported for selected JDK version)
+ENDIF()
+
+END()
+
+RECURSE(
+ uberjar8
+ uberjar10
+ uberjar11
+ uberjar12
+ uberjar13
+ uberjar14
+ uberjar15
+ uberjar16
+)
diff --git a/build/platform/java/ya.make b/build/platform/java/ya.make
new file mode 100644
index 0000000000..7194053b98
--- /dev/null
+++ b/build/platform/java/ya.make
@@ -0,0 +1,10 @@
+RECURSE(
+ jdk
+ jni
+ uberjar
+ error_prone
+ jacoco-agent
+ kotlin
+ jstyle_lib
+ scriptgen
+)
diff --git a/build/platform/linux_sdk/README.md b/build/platform/linux_sdk/README.md
new file mode 100644
index 0000000000..ff846cefbf
--- /dev/null
+++ b/build/platform/linux_sdk/README.md
@@ -0,0 +1,7 @@
+### Правки в Ubuntu 14.04 SDK
+* `lib/x86_64-linux-gnu/libc-2.19.so` — удалены dynamic версии символов
+ * `__cxa_thread_atexit_impl`
+ * `getauxval`
+ * `__getauxval`
+* `usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19` — удалены dynamic версии символов
+ * `__cxa_thread_atexit_impl`
diff --git a/build/platform/linux_sdk/ya.make b/build/platform/linux_sdk/ya.make
new file mode 100644
index 0000000000..add74eee9e
--- /dev/null
+++ b/build/platform/linux_sdk/ya.make
@@ -0,0 +1,55 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib somov)
+
+NO_PLATFORM_RESOURCES()
+
+SET(NEED_PLATFORM_PEERDIRS no)
+
+IF (OS_SDK == "local")
+ # Implementation is in $S/build/ymake.core.conf
+ELSEIF (ARCH_X86_64)
+ IF (OS_SDK == "ubuntu-10")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:244388930)
+ ELSEIF (OS_SDK == "ubuntu-12")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:244387436)
+ ELSEIF (OS_SDK == "ubuntu-14")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:1966560555)
+ ELSEIF (OS_SDK == "ubuntu-16")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:243881345)
+ ELSEIF (OS_SDK == "ubuntu-18")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:617908641)
+ ELSEIF (OS_SDK == "ubuntu-20")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:2635714620)
+ ELSE()
+ MESSAGE(FATAL_ERROR "There is no ${OS_SDK} SDK for x86-64")
+ ENDIF()
+ELSEIF (ARCH_AARCH64)
+ IF (OS_SDK == "ubuntu-16")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:309054781)
+ ELSE()
+ MESSAGE(FATAL_ERROR "There is no ${OS_SDK} SDK for AArch64/ARMv8 64 bit")
+ ENDIF()
+ELSEIF (ARCH_PPC64LE)
+ IF (OS_SDK == "ubuntu-14")
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:1570528338)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:233217651)
+ ENDIF()
+ ELSE()
+ MESSAGE(FATAL_ERROR "There is no ${OS_SDK} SDK for PPC64LE")
+ ENDIF()
+ELSEIF (ARCH_ARM7)
+ IF (ARM7_FLOAT_ABI == "hard" AND OS_SDK == "ubuntu-16")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:1323200692)
+ ELSEIF (ARM7_FLOAT_ABI == "softfp" AND OS_SDK == "ubuntu-18")
+ DECLARE_EXTERNAL_RESOURCE(OS_SDK_ROOT sbr:2402287545)
+ ELSE()
+ MESSAGE(FATAL_ERROR "There is no ${OS_SDK} SDK for ARMv7 32 bit (float ABI: ${ARM7_FLOAT_ABI})")
+ ENDIF()
+ELSE()
+ MESSAGE(FATAL_ERROR "Unexpected OS_SDK value: ${OS_SDK}")
+ENDIF()
+
+END()
diff --git a/build/platform/lld/ya.make b/build/platform/lld/ya.make
new file mode 100644
index 0000000000..c046e89098
--- /dev/null
+++ b/build/platform/lld/ya.make
@@ -0,0 +1,62 @@
+RESOURCES_LIBRARY()
+
+LICENSE(Service-Prebuilt-Tool)
+
+OWNER(somov)
+
+IF (USE_LTO OR USE_THINLTO)
+ IF (CLANG7 OR CLANG8)
+ # Use LLD 8 for old Clang because its IR code fails LLD 11 validation.
+ ENABLE(USE_LLD8)
+ ELSEIF (CLANG11)
+ # DEVTOOLSSUPPORT-9065
+ ENABLE(USE_LLD11)
+ ENDIF()
+ENDIF()
+
+IF (OS_ANDROID)
+ # Use LLD shipped with Android NDK.
+ LDFLAGS("-fuse-ld=lld")
+ELSEIF (USE_LLD8)
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1610790447)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1063258680)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1063258537)
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld")
+ELSEIF (USE_LLD11)
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843381106)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843327433)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:1843327928)
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld" "-Wl,--no-rosegment")
+ELSE()
+ IF (HOST_OS_LINUX)
+ IF (HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283417120)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283360772)
+ ENDIF()
+ ELSEIF (HOST_OS_DARWIN)
+ IF (HOST_ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283439721)
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(LLD_ROOT sbr:2283429958)
+ ENDIF()
+ ENDIF()
+
+ LDFLAGS("-fuse-ld=$LLD_ROOT_RESOURCE_GLOBAL/ld" "-Wl,--no-rosegment")
+ENDIF()
+
+END()
diff --git a/build/platform/local_so/readme.md b/build/platform/local_so/readme.md
new file mode 100644
index 0000000000..1bcad54581
--- /dev/null
+++ b/build/platform/local_so/readme.md
@@ -0,0 +1,3 @@
+This is supporting library for DYNAMIC_LIBRARY module.
+
+It sets LDFLAG that brings support of dynamic loading fron binary's directory on Linux, Darwin etc. On Windows this behavior is enabled by default.
diff --git a/build/platform/local_so/ya.make b/build/platform/local_so/ya.make
new file mode 100644
index 0000000000..70b72f653c
--- /dev/null
+++ b/build/platform/local_so/ya.make
@@ -0,0 +1,9 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:ymake)
+
+IF (NOT OS_WINDOWS)
+ SET_APPEND(RPATH_GLOBAL '-Wl,-rpath,$ORIGIN')
+ENDIF()
+
+END()
diff --git a/build/platform/macos_sdk/ya.make b/build/platform/macos_sdk/ya.make
new file mode 100644
index 0000000000..6fb8dc54c0
--- /dev/null
+++ b/build/platform/macos_sdk/ya.make
@@ -0,0 +1,20 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+# macOS 11.1 Big Sur SDK / Xcode 12.4 (12D4e)
+DECLARE_EXTERNAL_RESOURCE(MACOS_SDK sbr:2088833948)
+
+IF (USE_STL_SYSTEM)
+ SET(__XCODE_RESOURCE_NAME CPP_XCODE_TOOLCHAIN_ROOT)
+ SET(__XCODE_TOOLCHAIN_VERSION ${CPP_XCODE_TOOLCHAIN_VERSION})
+ INCLUDE(${ARCADIA_ROOT}/build/platform/xcode/ya.make.inc)
+ CFLAGS(
+ GLOBAL -F$MACOS_SDK_RESOURCE_GLOBAL/System/Library/Frameworks
+ )
+ LDFLAGS(
+ -F$MACOS_SDK_RESOURCE_GLOBAL/System/Library/Frameworks
+ )
+ENDIF()
+
+END()
diff --git a/build/platform/macos_system_stl/ya.make b/build/platform/macos_system_stl/ya.make
new file mode 100644
index 0000000000..4631bbc57a
--- /dev/null
+++ b/build/platform/macos_system_stl/ya.make
@@ -0,0 +1,15 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:cpp-contrib)
+
+# Taken from the default toolchain of the Xcode 12.5.1
+DECLARE_EXTERNAL_RESOURCE(MACOS_SYSTEM_STL sbr:2561940097)
+
+# xcode toolchain allready contains system headers
+IF (USE_STL_SYSTEM AND NOT XCODE)
+ CFLAGS(
+ GLOBAL -I${MACOS_SYSTEM_STL_RESOURCE_GLOBAL}/include
+ )
+ENDIF()
+
+END()
diff --git a/build/platform/mapkit/ya.make b/build/platform/mapkit/ya.make
new file mode 100644
index 0000000000..513dff5bcf
--- /dev/null
+++ b/build/platform/mapkit/ya.make
@@ -0,0 +1,32 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+NO_PLATFORM()
+
+IF (OS_ANDROID)
+ IF (MAPS_MOBILE_EXPORT_CPP_API)
+ # Sandbox Resource ID duplicates
+ # arcadia/sandbox/projects/maps/mobile/MapsMobileMakeArtifacts/__init__.py
+ DECLARE_EXTERNAL_RESOURCE(MAPKIT_ANDROID_LIBCXX_HEADERS sbr:2527848662)
+ CFLAGS(GLOBAL -nostdinc++ GLOBAL -cxx-isystem GLOBAL $MAPKIT_ANDROID_LIBCXX_HEADERS_RESOURCE_GLOBAL)
+ ENDIF()
+
+ DECLARE_EXTERNAL_RESOURCE(MAPKIT_ANDROID_LIBCXX_LIBRARIES sbr:2527853263)
+
+ IF (ARCH_ARM7)
+ SET(ARCH_NAME arm)
+ ELSEIF (ARCH_ARM64)
+ SET(ARCH_NAME arm64)
+ ELSEIF (ARCH_I686)
+ SET(ARCH_NAME x86)
+ ELSEIF (ARCH_X86_64)
+ SET(ARCH_NAME x86-64)
+ ENDIF()
+
+ SET(LIBS $MAPKIT_ANDROID_LIBCXX_LIBRARIES_RESOURCE_GLOBAL/$ARCH_NAME)
+
+ LDFLAGS(-L$LIBS)
+ENDIF()
+
+END()
diff --git a/build/platform/msvc/ya.make b/build/platform/msvc/ya.make
new file mode 100644
index 0000000000..ccb602c280
--- /dev/null
+++ b/build/platform/msvc/ya.make
@@ -0,0 +1,19 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+IF (WINDOWS_KITS_VERSION == "10.0.10586.0")
+ DECLARE_EXTERNAL_RESOURCE(WINDOWS_KITS sbr:544779014)
+ELSEIF (WINDOWS_KITS_VERSION == "10.0.16299.0")
+ DECLARE_EXTERNAL_RESOURCE(WINDOWS_KITS sbr:1379398385)
+ELSEIF (WINDOWS_KITS_VERSION == "10.0.18362.0")
+ DECLARE_EXTERNAL_RESOURCE(WINDOWS_KITS sbr:1939557911)
+ELSE()
+ MESSAGE(FATAL_ERROR "We have no Windows Kits version ${WINDOWS_KITS_VERSION}")
+ENDIF()
+
+IF (CLANG_CL)
+ DECLARE_EXTERNAL_RESOURCE(MSVC_FOR_CLANG sbr:1383387533) # Microsoft Visual C++ 2017 14.16.27023 (15.9.5)
+ENDIF()
+
+END()
diff --git a/build/platform/nodejs/readme.md b/build/platform/nodejs/readme.md
new file mode 100644
index 0000000000..92fbcfe699
--- /dev/null
+++ b/build/platform/nodejs/readme.md
@@ -0,0 +1,5 @@
+# Node.js bundle
+
+В бандле находится аркадийная Node.js (`contrib/libs/nodejs_12`) для Linux и Darwin.
+
+Ресурс должен быть tar-архивом с исполнимым бинарём `node`.
diff --git a/build/platform/nodejs/resources.inc b/build/platform/nodejs/resources.inc
new file mode 100644
index 0000000000..002466daeb
--- /dev/null
+++ b/build/platform/nodejs/resources.inc
@@ -0,0 +1,2 @@
+SET(NODEJS_12_18_4_LINUX sbr:2197482931)
+SET(NODEJS_12_18_4_DARWIN sbr:2197413902)
diff --git a/build/platform/nodejs/ya.make b/build/platform/nodejs/ya.make
new file mode 100644
index 0000000000..c872eca0d8
--- /dev/null
+++ b/build/platform/nodejs/ya.make
@@ -0,0 +1,17 @@
+RESOURCES_LIBRARY()
+
+OWNER(dankolesnikov)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/nodejs/resources.inc)
+
+IF (NOT HOST_OS_LINUX AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for Nodejs)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ NODEJS
+ ${NODEJS_12_18_4_LINUX} FOR LINUX
+ ${NODEJS_12_18_4_DARWIN} FOR DARWIN
+)
+
+END()
diff --git a/build/platform/opengl/ya.make b/build/platform/opengl/ya.make
new file mode 100644
index 0000000000..94f0431d18
--- /dev/null
+++ b/build/platform/opengl/ya.make
@@ -0,0 +1,27 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib heretic)
+
+IF (NOT OPENGL_REQUIRED)
+ MESSAGE(FATAL_ERROR "No OpenGL Toolkit for your build")
+ELSE()
+ IF (OS_LINUX)
+ IF (OPENGL_VERSION == "18.0.5")
+ DECLARE_EXTERNAL_RESOURCE(OPENGL sbr:1271121094)
+ SET(OS_SUFFIX "x86_64-linux-gnu")
+ ELSE()
+ ENABLE(OPENGL_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(OPENGL_NOT_FOUND)
+ ENDIF()
+
+ IF (OPENGL_NOT_FOUND)
+ MESSAGE(FATAL_ERROR "No OpenGL Toolkit for the selected platform")
+ ELSE()
+ CFLAGS(GLOBAL "-I$OPENGL_RESOURCE_GLOBAL/usr/include")
+ LDFLAGS("-L$OPENGL_RESOURCE_GLOBAL/usr/lib/$OS_SUFFIX")
+ ENDIF()
+ENDIF()
+
+END()
diff --git a/build/platform/perl/5.14/ya.make b/build/platform/perl/5.14/ya.make
new file mode 100644
index 0000000000..3db5747945
--- /dev/null
+++ b/build/platform/perl/5.14/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(PERL_SDK ubuntu-12)
+
+SRCDIR(build/platform/perl)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/perl/perl.inc)
+
+END()
diff --git a/build/platform/perl/5.18/ya.make b/build/platform/perl/5.18/ya.make
new file mode 100644
index 0000000000..1d17311066
--- /dev/null
+++ b/build/platform/perl/5.18/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(PERL_SDK ubuntu-14)
+
+SRCDIR(build/platform/perl)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/perl/perl.inc)
+
+END()
diff --git a/build/platform/perl/5.22/ya.make b/build/platform/perl/5.22/ya.make
new file mode 100644
index 0000000000..658bcc2552
--- /dev/null
+++ b/build/platform/perl/5.22/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(PERL_SDK ubuntu-16)
+
+SRCDIR(build/platform/perl)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/perl/perl.inc)
+
+END()
diff --git a/build/platform/perl/5.26/ya.make b/build/platform/perl/5.26/ya.make
new file mode 100644
index 0000000000..c510f6091a
--- /dev/null
+++ b/build/platform/perl/5.26/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(PERL_SDK ubuntu-18)
+
+SRCDIR(build/platform/perl)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/perl/perl.inc)
+
+END()
diff --git a/build/platform/perl/5.30/ya.make b/build/platform/perl/5.30/ya.make
new file mode 100644
index 0000000000..ba0132c6ba
--- /dev/null
+++ b/build/platform/perl/5.30/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(somov)
+
+SET(PERL_SDK ubuntu-20)
+
+SRCDIR(build/platform/perl)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/perl/perl.inc)
+
+END()
diff --git a/build/platform/perl/perl.inc b/build/platform/perl/perl.inc
new file mode 100644
index 0000000000..139e65bb33
--- /dev/null
+++ b/build/platform/perl/perl.inc
@@ -0,0 +1,33 @@
+PROVIDES(system_perl)
+
+IF (PERL_SDK == "ubuntu-12")
+ DECLARE_EXTERNAL_RESOURCE(SYSTEM_PERL_514 sbr:337748278)
+ELSEIF (PERL_SDK == "ubuntu-14")
+ DECLARE_EXTERNAL_RESOURCE(SYSTEM_PERL_518 sbr:1655582861)
+ELSEIF (PERL_SDK == "ubuntu-16")
+ DECLARE_EXTERNAL_RESOURCE(SYSTEM_PERL_522 sbr:323251590)
+ELSEIF (PERL_SDK == "ubuntu-18")
+ DECLARE_EXTERNAL_RESOURCE(SYSTEM_PERL_526 sbr:616700320)
+ELSEIF (PERL_SDK == "ubuntu-20")
+ DECLARE_EXTERNAL_RESOURCE(SYSTEM_PERL_530 sbr:2001114055)
+ELSE()
+ MESSAGE(FATAL_ERROR "Building against system perl is not supported on ${PERL_SDK}")
+ENDIF()
+
+IF (PERL_INCLUDE)
+ CFLAGS(GLOBAL $PERL_INCLUDE)
+ENDIF()
+
+CFLAGS(GLOBAL -I$PERL_ARCHLIB/CORE)
+
+IF (PERL_LIBS)
+ LDFLAGS(-L${PERL_LIBS})
+ENDIF()
+
+IF (NOT OS_WINDOWS)
+ LDFLAGS(-lperl)
+ELSE()
+ LDFLAGS(perl.lib)
+ENDIF()
+
+CFLAGS(GLOBAL -DUSE_PERL)
diff --git a/build/platform/perl/perl_5.18.patch b/build/platform/perl/perl_5.18.patch
new file mode 100644
index 0000000000..840227eb54
--- /dev/null
+++ b/build/platform/perl/perl_5.18.patch
@@ -0,0 +1,51 @@
+diff --unified --recursive a/perl5.18/lib/perl/5.18/CORE/pad.h b/perl5.18/lib/perl/5.18/CORE/pad.h
+--- a/perl5.18/lib/perl/5.18/CORE/pad.h 2020-08-10 09:58:43.970483379 +0300
++++ b/perl5.18/lib/perl/5.18/CORE/pad.h 2020-08-10 10:00:56.850097798 +0300
+@@ -320,7 +320,7 @@
+ PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]); \
+ PL_curpad = AvARRAY(PL_comppad); \
+ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \
+- "Pad 0x%"UVxf"[0x%"UVxf"] set_cur depth=%d\n", \
++ "Pad 0x%" UVxf "[0x%" UVxf "] set_cur depth=%d\n", \
+ PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(nth)));
+
+
+@@ -338,7 +338,7 @@
+ PL_comppad = (npad); \
+ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
+ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \
+- "Pad 0x%"UVxf"[0x%"UVxf"] save_local\n", \
++ "Pad 0x%" UVxf "[0x%" UVxf "] save_local\n", \
+ PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
+
+ #define PAD_RESTORE_LOCAL(opad) \
+@@ -346,7 +346,7 @@
+ PL_comppad = opad; \
+ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
+ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \
+- "Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n", \
++ "Pad 0x%" UVxf "[0x%" UVxf "] restore_local\n", \
+ PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
+
+
+diff --unified --recursive a/perl5.18/lib/perl/5.18/CORE/perl.h b/perl5.18/lib/perl/5.18/CORE/perl.h
+--- a/perl5.18/lib/perl/5.18/CORE/perl.h 2020-08-10 09:58:43.966483390 +0300
++++ b/perl5.18/lib/perl/5.18/CORE/perl.h 2020-08-10 10:01:44.649957846 +0300
+@@ -4254,7 +4254,7 @@
+ EXTCONST char PL_warn_uninit[]
+ INIT("Use of uninitialized value%s%s%s");
+ EXTCONST char PL_warn_uninit_sv[]
+- INIT("Use of uninitialized value%"SVf"%s%s");
++ INIT("Use of uninitialized value%" SVf "%s%s");
+ EXTCONST char PL_warn_nosemi[]
+ INIT("Semicolon seems to be missing");
+ EXTCONST char PL_warn_reserved[]
+@@ -4274,7 +4274,7 @@
+ EXTCONST char PL_no_aelem[]
+ INIT("Modification of non-creatable array value attempted, subscript %d");
+ EXTCONST char PL_no_helem_sv[]
+- INIT("Modification of non-creatable hash value attempted, subscript \"%"SVf"\"");
++ INIT("Modification of non-creatable hash value attempted, subscript \"%" SVf "\"");
+ EXTCONST char PL_no_modify[]
+ INIT("Modification of a read-only value attempted");
+ EXTCONST char PL_no_mem[sizeof("Out of memory!\n")]
diff --git a/build/platform/perl/ya.make b/build/platform/perl/ya.make
new file mode 100644
index 0000000000..cc50c05c26
--- /dev/null
+++ b/build/platform/perl/ya.make
@@ -0,0 +1,28 @@
+LIBRARY()
+
+OWNER(somov)
+
+NO_PLATFORM()
+
+IF (USE_PERL_SYSTEM)
+ IF (PERL_SDK == "ubuntu-12")
+ PEERDIR(build/platform/perl/5.14)
+ ELSEIF (PERL_SDK == "ubuntu-14")
+ PEERDIR(build/platform/perl/5.18)
+ ELSEIF (PERL_SDK == "ubuntu-16")
+ PEERDIR(build/platform/perl/5.22)
+ ELSEIF (PERL_SDK == "ubuntu-18")
+ PEERDIR(build/platform/perl/5.26)
+ ELSEIF (PERL_SDK == "ubuntu-20")
+ PEERDIR(build/platform/perl/5.30)
+ ELSE()
+ MESSAGE(FATAL_ERROR "Building against system perl is not supported on ${PERL_SDK}")
+ ENDIF()
+
+ELSE()
+
+ MESSAGE(FATAL_ERROR "There is no perl ready for static linkage. Try using the system one.")
+
+ENDIF()
+
+END()
diff --git a/build/platform/python/ldflags/ya.make b/build/platform/python/ldflags/ya.make
new file mode 100644
index 0000000000..d81ec31876
--- /dev/null
+++ b/build/platform/python/ldflags/ya.make
@@ -0,0 +1,17 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib)
+
+IF (USE_SYSTEM_PYTHON)
+ IF (OS_LINUX)
+ LDFLAGS("-L$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/lib/x86_64-linux-gnu -lpython${PY_VERSION}")
+ ELSEIF (OS_DARWIN)
+ LDFLAGS("-L$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/Python.framework/Versions/${PY_FRAMEWORK_VERSION}/lib -lpython${PY_VERSION}")
+ ELSEIF (OS_WINDOWS)
+ LDFLAGS("/LIBPATH:$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/libs")
+ ENDIF()
+ELSEIF (NOT USE_ARCADIA_PYTHON)
+ LDFLAGS($PYTHON_LDFLAGS $PYTHON_LIBRARIES)
+ENDIF()
+
+END()
diff --git a/build/platform/python/python27/ya.make b/build/platform/python/python27/ya.make
new file mode 100644
index 0000000000..35d2ef8405
--- /dev/null
+++ b/build/platform/python/python27/ya.make
@@ -0,0 +1,22 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ IF (ARCH_ARM64 OR ARCH_AARCH64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON27 ${PYTHON27_LINUX_ARM64})
+ ELSE()
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON27 ${PYTHON27_LINUX})
+ ENDIF()
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON27 ${PYTHON27_DARWIN})
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON27 ${PYTHON27_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python310/ya.make b/build/platform/python/python310/ya.make
new file mode 100644
index 0000000000..fea3696e6d
--- /dev/null
+++ b/build/platform/python/python310/ya.make
@@ -0,0 +1,30 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ PYTHON310
+ ${PYTHON310_DARWIN} FOR DARWIN
+ ${PYTHON310_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${PYTHON310_LINUX} FOR LINUX
+ ${PYTHON310_WINDOWS} FOR WIN32
+)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON310 ${PYTHON310_LINUX})
+ELSEIF (OS_DARWIN)
+ IF (ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON310 ${PYTHON310_DARWIN_ARM64})
+ ELSEIF(ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON310 ${PYTHON310_DARWIN})
+ ENDIF()
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON310 ${PYTHON310_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python34/ya.make b/build/platform/python/python34/ya.make
new file mode 100644
index 0000000000..61be788bec
--- /dev/null
+++ b/build/platform/python/python34/ya.make
@@ -0,0 +1,18 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON34 ${PYTHON34_LINUX})
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON34 ${PYTHON34_DARWIN})
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON34 ${PYTHON34_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python35/ya.make b/build/platform/python/python35/ya.make
new file mode 100644
index 0000000000..7a6292efa0
--- /dev/null
+++ b/build/platform/python/python35/ya.make
@@ -0,0 +1,18 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON35 ${PYTHON35_LINUX})
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON35 ${PYTHON35_DARWIN})
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON35 ${PYTHON35_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python36/ya.make b/build/platform/python/python36/ya.make
new file mode 100644
index 0000000000..c9dcf5d88b
--- /dev/null
+++ b/build/platform/python/python36/ya.make
@@ -0,0 +1,18 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON36 ${PYTHON36_LINUX})
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON36 ${PYTHON36_DARWIN})
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON36 ${PYTHON36_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python37/ya.make b/build/platform/python/python37/ya.make
new file mode 100644
index 0000000000..724c3f5b76
--- /dev/null
+++ b/build/platform/python/python37/ya.make
@@ -0,0 +1,18 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON37 ${PYTHON37_LINUX})
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON37 ${PYTHON37_DARWIN})
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON37 ${PYTHON37_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python38/ya.make b/build/platform/python/python38/ya.make
new file mode 100644
index 0000000000..b6820ca6ca
--- /dev/null
+++ b/build/platform/python/python38/ya.make
@@ -0,0 +1,23 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON38 ${PYTHON38_LINUX})
+ELSEIF (OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON38 ${PYTHON38_DARWIN})
+ IF (ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON38 ${PYTHON38_DARWIN_ARM64})
+ ELSEIF(ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON38 ${PYTHON38_DARWIN})
+ ENDIF()
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON38 ${PYTHON38_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/python39/ya.make b/build/platform/python/python39/ya.make
new file mode 100644
index 0000000000..2579542d1e
--- /dev/null
+++ b/build/platform/python/python39/ya.make
@@ -0,0 +1,22 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON39 ${PYTHON39_LINUX})
+ELSEIF (OS_DARWIN)
+ IF (ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON39 ${PYTHON39_DARWIN_ARM64})
+ ELSEIF(ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON39 ${PYTHON39_DARWIN})
+ ENDIF()
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON39 ${PYTHON39_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/python/readme.md b/build/platform/python/readme.md
new file mode 100644
index 0000000000..1eaafad35b
--- /dev/null
+++ b/build/platform/python/readme.md
@@ -0,0 +1,83 @@
+# Инструкция по добавлению нового бандла с системным питоном
+
+## Майним бандлы системного питона
+Бандлы системного питон майнятся для трех платформ: linux, darwin, windows.
+Подставляем под PYTHON_VERSION - версию нужного питона
+### Linux
+
+1. Устанавливаем систему с версией ubuntu, из которой планируется брать системный питон. Здесь есть два варианта
+ 1. Если нужно собрать системный питон, который будет запускать тесты на дистбилде, то нужно использовать ubuntu такой же версии, что и на дистбилде.
+ Тут стоит учитывать, что на дистбилде может быть достаточно старая версия ubuntu, на котором не будет нужной версии питона.
+ 2. Выбрать ту версию ubuntu, в которой есть нужный питон
+2. `mkdir -p ~/work/packages`
+3. `cd ~/work/packages`
+4. майним deb-пакеты питона
+ 1. Майним системный питон для запуска на дистбилде:
+
+ apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances python{PYTHON_VERSION}-dev python{|3}-pkg-resources python{|3}-setuptools | grep "^\w" | sort -u)
+ rm libc6* libc-*
+
+ 2. Майним системный питон для сборки сошек:
+
+ apt download python{PYTHON_VERSION} python{PYTHON_VERSION}-dev python{PYTHON_VERSION}-minimal libpython{PYTHON_VERSION} libpython{PYTHON_VERSION}-dev libpython{PYTHON_VERSION}-stdlib libpython{PYTHON_VERSION}-minimal
+
+5. `cd ..`
+6. `for path in $(ls packages); do ar -xf packages/$path; tar -xf data.tar.xz; done;`
+7. `mv usr python`
+8. `tar -czf python{PYTHON_VERSION}_linux.tar.gz python`
+9. `ya upload python{PYTHON_VERSION}_linux.tar.gz -d "Ubuntu {UBUNTU_VERSION} x86_64 python{PYTHON_VERSION} installation" --do-not-remove`
+
+UBUNTU_VERSION - версия ubuntu, на которой майнился системный питон
+
+### Darwin
+1. Находим macbook.
+2. Все установленные питоны лежат в `/Library/Frameworks/Python.framework/Versions`
+3. Копируем `/Library/Frameworks/Python.framework` в директорию с именем `python`
+4. Чистим `python/Python.framework/Versions/` от ненужных питонов
+5. Проверяем, что симлинки указывают в правильные места
+ 1. `python/Python.framework/Versions/Current -> {PYTHON_VERSION}`
+ 2. `python/Python.framework/Headers -> Versions/Current/Headers`
+ 3. `python/Python.framework/Python -> Versions/Current/Python`
+ 4. `python/Python.framework/Resources -> Versions/Current/Resources`
+6. `tar -czf python{PYTHON_VERSION}_darwin.tar.gz python`
+7. `ya upload python{PYTHON_VERSION}_darwin.tar.gz -d "Darwin x86_64 python{PYTHON_VERSION} installation" --do-not-remove`
+
+Если нужного питона нет в системе, его нужно установить из `python.org`, его установку можно найти в стандартном месте.
+
+Если нужен питон из `brew`, его установку можно найти в `/usr/local/Cellar/python*/{python_version}/Frameworks/`,
+ а дальше следовать стандартной инструкции
+
+### Windows
+1. Находим машинку с windows
+2. Устанавливаем нужную версию питона из `python.org`
+3. Копируем содержимое установки питона в директорию `python`
+4. Пакуем директорию `python` в `python{PYTHON_VERSION}_windows.tar.gz`
+5. `ya upload python{PYTHON_VERSION}_windows.tar.gz -d "Windows x86_64 python{PYTHON_VERSION} installation" --do-not-remove`
+
+## Добавляем бандлы системного питона в сборку
+
+1. Конфигурация бандлов системных питонов находится здесь [build/platform/python](https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python)
+2. Добавляем сендбокс ресурсы собранных бандлов в файл [resources.inc](https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python/resources.inc)
+
+ SET(PYTHON38_LINUX sbr:1211259884)
+
+3. Добавляем служебные переменные `_SYSTEM_PYTHON*, PY_VERSION, PY_FRAMEWORK_VERSION` для системного питона, если их еще нет,
+в [ymake.core.conf](https://a.yandex-team.ru/arc/trunk/arcadia/build/ymake.core.conf?rev=7640792#L380) по аналогии.
+
+ "3.8" ? {
+ _SYSTEM_PYTHON38=yes
+ PY_VERSION=3.8
+ PY_FRAMEWORK_VERSION=3.8
+ }
+
+4. Добавляем ресурс в [build/platform/python/ya.make](https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python/ya.make)
+
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_LINUX})
+
+## Проверяем сборку
+1. Создаем тривиальный PY2MODULE с использование `c api` положенного питона, или находим подходящий в репозитории
+2. Собираем его:
+ 1. linux `ya make -DUSE_SYSTEM_PYTHON=3.8 --target-platform linux`
+ 2. darwin `ya make -DUSE_SYSTEM_PYTHON=3.8 --target-platform darwin`
+ 3. windows `ya make -DUSE_SYSTEM_PYTHON=3.8 --target-platform win`
+3. Проверяем, что получившиеся модули импортятся в питонах на соответсвующих системах
diff --git a/build/platform/python/resources.inc b/build/platform/python/resources.inc
new file mode 100644
index 0000000000..a730a5039b
--- /dev/null
+++ b/build/platform/python/resources.inc
@@ -0,0 +1,32 @@
+SET(PYTHON27_LINUX sbr:1666107838) # Different from others(compatible with running tests) DEVTOOLS-7424
+SET(PYTHON34_LINUX sbr:419260733)
+SET(PYTHON35_LINUX sbr:1658217692) # Different from others(compatible with running tests) DEVTOOLS-7424
+SET(PYTHON36_LINUX sbr:2569180519) # Different from others(compatible with running tests) DEVTOOLS-7424
+SET(PYTHON37_LINUX sbr:616675620)
+SET(PYTHON38_LINUX sbr:1211259884)
+SET(PYTHON39_LINUX sbr:2019057022)
+SET(PYTHON310_LINUX sbr:2505611617)
+
+SET(PYTHON27_LINUX_ARM64 sbr:2145006545)
+
+SET(PYTHON27_DARWIN sbr:426406952)
+SET(PYTHON34_DARWIN sbr:426379328)
+SET(PYTHON35_DARWIN sbr:426409804)
+SET(PYTHON36_DARWIN sbr:426412777)
+SET(PYTHON37_DARWIN sbr:616740054)
+SET(PYTHON38_DARWIN sbr:1211286783)
+SET(PYTHON39_DARWIN sbr:2046345566)
+SET(PYTHON310_DARWIN sbr:2505677448)
+
+SET(PYTHON38_DARWIN_ARM64 sbr:2577173323)
+SET(PYTHON39_DARWIN_ARM64 sbr:2533263197)
+SET(PYTHON310_DARWIN_ARM64 sbr:2577250782)
+
+SET(PYTHON27_WINDOWS sbr:629001312)
+SET(PYTHON34_WINDOWS sbr:419220860)
+SET(PYTHON35_WINDOWS sbr:410155020)
+SET(PYTHON36_WINDOWS sbr:410161131)
+SET(PYTHON37_WINDOWS sbr:629042628)
+SET(PYTHON38_WINDOWS sbr:1211466284)
+SET(PYTHON39_WINDOWS sbr:2018972280)
+SET(PYTHON310_WINDOWS sbr:2506068927)
diff --git a/build/platform/python/tests/test_common.py b/build/platform/python/tests/test_common.py
new file mode 100644
index 0000000000..7a685330ea
--- /dev/null
+++ b/build/platform/python/tests/test_common.py
@@ -0,0 +1,31 @@
+import subprocess
+
+import pytest
+
+from build.platform.python.tests import testlib
+
+PYTHON_VERSIONS = ["2.7", "3.4", "3.5", "3.6"] # 3.7, 3.8 are not runnable
+
+
+@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
+def test_version_matched(pyver):
+ testlib.check_python_version(pyver)
+
+
+@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
+def test_python_max_unicode_bytes(pyver):
+ cmd = [testlib.get_python_bin(pyver), '-c', 'import sys; print(sys.maxunicode)']
+ maxunicode = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
+ assert int(maxunicode) > 65535, "Found UCS2 build"
+
+
+@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
+def test_python_imports(pyver):
+ imports = {
+ "2.7": ['pkg_resources'],
+ "3.4": [],
+ "3.5": ['pkg_resources'],
+ "3.6": [],
+ }
+ for imp in imports[pyver]:
+ subprocess.check_call([testlib.get_python_bin(pyver), '-c', 'import ' + imp])
diff --git a/build/platform/python/tests/testlib.py b/build/platform/python/tests/testlib.py
new file mode 100644
index 0000000000..d12f2815d4
--- /dev/null
+++ b/build/platform/python/tests/testlib.py
@@ -0,0 +1,21 @@
+import os
+import subprocess
+
+import yatest.common
+
+
+def get_python_bin(ver):
+ res_name = 'EXTERNAL_PYTHON{}_RESOURCE_GLOBAL'.format(ver.replace('.', ''))
+ gr = yatest.common.global_resources()
+ if res_name in gr:
+ bindir = os.path.join(gr[res_name], 'python', 'bin')
+ if ('python' + ver) in os.listdir(bindir):
+ return os.path.join(bindir, 'python' + ver)
+ return os.path.join(bindir, 'python')
+
+ raise AssertionError("Resource '{}' is not available: {}".format(res_name, gr))
+
+
+def check_python_version(version):
+ ver = subprocess.check_output([get_python_bin(version), '-V'], stderr=subprocess.STDOUT).decode('utf-8')
+ assert version in ver
diff --git a/build/platform/python/tests/ya.make b/build/platform/python/tests/ya.make
new file mode 100644
index 0000000000..0d8965240e
--- /dev/null
+++ b/build/platform/python/tests/ya.make
@@ -0,0 +1,36 @@
+PY3TEST()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+IF (OS_DARWIN)
+ SIZE(LARGE)
+
+ TAG(
+ ya:fat
+ ya:force_sandbox ya:exotic_platform
+ )
+ENDIF()
+
+PY_SRCS(
+ testlib.py
+)
+
+TEST_SRCS(
+ test_common.py
+)
+
+PEERDIR(
+ build/platform/python/python27
+ build/platform/python/python34
+ build/platform/python/python35
+ build/platform/python/python36
+ build/platform/python/python37
+ build/platform/python/python38
+ build/platform/python/python39
+ build/platform/python/python310
+)
+
+END()
diff --git a/build/platform/python/ya.make b/build/platform/python/ya.make
new file mode 100644
index 0000000000..247e65f4c9
--- /dev/null
+++ b/build/platform/python/ya.make
@@ -0,0 +1,136 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:contrib
+ g:yatool
+)
+
+INCLUDE(resources.inc)
+
+IF (USE_SYSTEM_PYTHON)
+ IF (OS_LINUX)
+ IF (ARCH_ARM64 OR ARCH_AARCH64)
+ IF (_SYSTEM_PYTHON27)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON27_LINUX_ARM64})
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSEIF (ARCH_X86_64)
+ IF (_SYSTEM_PYTHON27)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON27_LINUX})
+ ELSEIF (_SYSTEM_PYTHON34)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON34_LINUX})
+ ELSEIF (_SYSTEM_PYTHON35)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON35_LINUX})
+ ELSEIF (_SYSTEM_PYTHON36)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON36_LINUX})
+ ELSEIF (_SYSTEM_PYTHON37)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON37_LINUX})
+ ELSEIF (_SYSTEM_PYTHON38)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_LINUX})
+ ELSEIF (_SYSTEM_PYTHON39)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON39_LINUX})
+ ELSEIF (_SYSTEM_PYTHON310)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON310_LINUX})
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ CFLAGS(
+ GLOBAL "-isystem$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include"
+ GLOBAL "-isystem$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include/python${PY_VERSION}"
+ )
+ ELSEIF (OS_DARWIN)
+ IF (PYTHON_DISTR == "macos-brew")
+ IF (ARCH_X86_64)
+ IF (_SYSTEM_PYTHON27)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON sbr:562720527)
+ ELSEIF (_SYSTEM_PYTHON36)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON sbr:562721643)
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ IF (ARCH_X86_64)
+ IF (_SYSTEM_PYTHON27)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON27_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON34)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON34_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON35)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON35_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON36)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON36_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON37)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON37_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON38)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON39)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON39_DARWIN})
+ ELSEIF (_SYSTEM_PYTHON310)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON310_DARWIN})
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSEIF(ARCH_ARM64)
+ IF (_SYSTEM_PYTHON38)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_DARWIN_ARM64})
+ ELSEIF(_SYSTEM_PYTHON39)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON39_DARWIN_ARM64})
+ ELSEIF(_SYSTEM_PYTHON310)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON310_DARWIN_ARM64})
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ENDIF()
+ CFLAGS(GLOBAL "-isystem$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/Python.framework/Versions/${PY_FRAMEWORK_VERSION}/include/python${PY_VERSION}")
+ ELSEIF (OS_WINDOWS)
+ IF (ARCH_X86_64)
+ IF (_SYSTEM_PYTHON27)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON27_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON34)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON34_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON35)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON35_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON36)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON36_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON37)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON37_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON38)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON39)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON39_WINDOWS})
+ ELSEIF (_SYSTEM_PYTHON310)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON310_WINDOWS})
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ ELSE()
+ ENABLE(PYTHON_NOT_FOUND)
+ ENDIF()
+ CFLAGS(GLOBAL "/I$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include")
+ LDFLAGS("/LIBPATH:$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/libs")
+ ENDIF()
+
+ IF (PYTHON_NOT_FOUND)
+ MESSAGE(FATAL_ERROR "No system Python ${USE_SYSTEM_PYTHON} for the selected platform")
+ ENDIF()
+ELSEIF (NOT USE_ARCADIA_PYTHON)
+ CFLAGS(GLOBAL $PYTHON_FLAGS)
+ IF (OS_WINDOWS)
+ LDFLAGS($PYTHON_LDFLAGS $PYTHON_LIBRARIES)
+ ENDIF()
+ENDIF()
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/build/platform/python/ymake_python3/ya.make b/build/platform/python/ymake_python3/ya.make
new file mode 100644
index 0000000000..c781448641
--- /dev/null
+++ b/build/platform/python/ymake_python3/ya.make
@@ -0,0 +1,33 @@
+RESOURCES_LIBRARY()
+
+OWNER(
+ g:arcadia-devtools
+ g:yatool
+)
+
+SET(YMAKE_PYTHON3_LINUX sbr:2693706966)
+SET(YMAKE_PYTHON3_DARWIN sbr:2693705780)
+SET(YMAKE_PYTHON3_DARWIN_ARM64 sbr:2693704462)
+SET(YMAKE_PYTHON3_WINDOWS sbr:2693706398)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ YMAKE_PYTHON3
+ ${YMAKE_PYTHON3_DARWIN} FOR DARWIN
+ ${YMAKE_PYTHON3_DARWIN_ARM64} FOR DARWIN-ARM64
+ ${YMAKE_PYTHON3_LINUX} FOR LINUX
+ ${YMAKE_PYTHON3_WINDOWS} FOR WIN32
+)
+
+IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_LINUX})
+ELSEIF (OS_DARWIN)
+ IF (ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN_ARM64})
+ ELSEIF(ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN})
+ ENDIF()
+ELSEIF (OS_WINDOWS)
+ DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_WINDOWS})
+ENDIF()
+
+END()
diff --git a/build/platform/qt/ya.make b/build/platform/qt/ya.make
new file mode 100644
index 0000000000..e058ef99b1
--- /dev/null
+++ b/build/platform/qt/ya.make
@@ -0,0 +1,34 @@
+RESOURCES_LIBRARY()
+
+OWNER(g:contrib heretic)
+
+IF (NOT QT_REQUIRED)
+ MESSAGE(FATAL_ERROR "No QT Toolkit for your build")
+ELSE()
+ IF (OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(QT sbr:2694823276)
+ ELSEIF (OS_DARWIN)
+ CFLAGS(GLOBAL "-F$QT_RESOURCE_GLOBAL/lib")
+ LDFLAGS("-F$QT_RESOURCE_GLOBAL/lib")
+ DECLARE_EXTERNAL_RESOURCE(QT sbr:2694837565)
+ ELSE()
+ ENABLE(QT_NOT_FOUND)
+ ENDIF()
+
+ IF (HOST_OS_LINUX)
+ DECLARE_EXTERNAL_RESOURCE(HOST_QT sbr:2694823276)
+ ELSEIF (HOST_OS_DARWIN)
+ DECLARE_EXTERNAL_RESOURCE(HOST_QT sbr:2694837565)
+ ELSE()
+ ENABLE(QT_NOT_FOUND)
+ ENDIF()
+
+ IF (QT_NOT_FOUND)
+ MESSAGE(FATAL_ERROR "No QT Toolkit for the selected platform")
+ ELSE()
+ CFLAGS(GLOBAL "-isystem$QT_RESOURCE_GLOBAL/include")
+ LDFLAGS("-L$QT_RESOURCE_GLOBAL/lib")
+ ENDIF()
+ENDIF()
+
+END()
diff --git a/build/platform/test_tool/a.yaml b/build/platform/test_tool/a.yaml
new file mode 100644
index 0000000000..298148e450
--- /dev/null
+++ b/build/platform/test_tool/a.yaml
@@ -0,0 +1,16 @@
+service: devtools
+title: test_tool acceptance
+ci:
+ release-title-source: flow
+ secret: sec-01ekd5wc1dmdd544yp1xt3s9b8
+ runtime:
+ sandbox-owner: DEVTOOLS-LARGE
+ autocheck:
+ large-autostart:
+ - target: devtools/ya/build/tests/cross_compilation/mac_builds_linux
+ toolchains:
+ - default-darwin-x86_64-release
+ - target: devtools/ya/test/tests/port_manager/fat
+ toolchains:
+ - default-linux-x86_64-release-musl
+ - default-darwin-x86_64-release
diff --git a/build/platform/test_tool/host.ya.make.inc b/build/platform/test_tool/host.ya.make.inc
new file mode 100644
index 0000000000..c25f2b1326
--- /dev/null
+++ b/build/platform/test_tool/host.ya.make.inc
@@ -0,0 +1,16 @@
+IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:2764984950)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:2764990673)
+ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:2764984688)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:2764990185)
+ELSEIF (HOST_OS_LINUX AND HOST_ARCH_PPC64LE)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:2764984559)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:2764990014)
+ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:2764985330)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:2764990852)
+ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:2764984404)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:2764989842)
+ENDIF()
diff --git a/build/platform/test_tool/ya.make b/build/platform/test_tool/ya.make
new file mode 100644
index 0000000000..fd97d51ed8
--- /dev/null
+++ b/build/platform/test_tool/ya.make
@@ -0,0 +1,20 @@
+RESOURCES_LIBRARY()
+OWNER(
+ g:yatest
+ heretic
+)
+
+IF (TEST_TOOL_HOST_LOCAL)
+ MESSAGE(WARNING Host test tool $TEST_TOOL_HOST_LOCAL will be used)
+ENDIF()
+INCLUDE(host.ya.make.inc)
+IF (TEST_TOOL_TARGET_LOCAL)
+ MESSAGE(WARNING Target test tool $TEST_TOOL_TARGET_LOCAL will be used)
+ENDIF()
+IF (OS_IOS AND NOT BUILD_IOS_APP)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_TARGET sbr:707351393)
+ INCLUDE(${ARCADIA_ROOT}/build/platform/xcode/tools/ya.make.inc)
+ENDIF()
+
+END()
+
diff --git a/build/platform/wine/ya.make b/build/platform/wine/ya.make
new file mode 100644
index 0000000000..7d74cb279b
--- /dev/null
+++ b/build/platform/wine/ya.make
@@ -0,0 +1,10 @@
+RESOURCES_LIBRARY()
+
+OWNER(neksard)
+
+# do not forget to update resources in ya.conf.json
+DECLARE_EXTERNAL_RESOURCE(WINE_TOOL sbr:1093314933)
+DECLARE_EXTERNAL_RESOURCE(WINE32_TOOL sbr:2264052281)
+
+SET(NEED_PLATFORM_PEERDIRS no)
+END()
diff --git a/build/platform/xcode/swift/ya.make b/build/platform/xcode/swift/ya.make
new file mode 100644
index 0000000000..3d50525acb
--- /dev/null
+++ b/build/platform/xcode/swift/ya.make
@@ -0,0 +1,12 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+
+IF (HOST_OS_DARWIN)
+ SET(__XCODE_RESOURCE_NAME SWIFT_XCODE_TOOLCHAIN_ROOT)
+ SET(__XCODE_TOOLCHAIN_VERSION ${SWIFT_XCODE_TOOLCHAIN_VERSION})
+ INCLUDE(${ARCADIA_ROOT}/build/platform/xcode/ya.make.inc)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported host platform for swift compiler)
+ENDIF()
+
+END()
diff --git a/build/platform/xcode/tools/ya.make b/build/platform/xcode/tools/ya.make
new file mode 100644
index 0000000000..4c4e135179
--- /dev/null
+++ b/build/platform/xcode/tools/ya.make
@@ -0,0 +1,4 @@
+RESOURCES_LIBRARY()
+OWNER(heretic)
+INCLUDE(ya.make.inc)
+END()
diff --git a/build/platform/xcode/tools/ya.make.inc b/build/platform/xcode/tools/ya.make.inc
new file mode 100644
index 0000000000..a154917e33
--- /dev/null
+++ b/build/platform/xcode/tools/ya.make.inc
@@ -0,0 +1,9 @@
+IF (NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported host platform for Xcode tools)
+ENDIF()
+IF (LOCAL_XCODE_TOOLS) # Local XCode installation is used instead.
+ELSEIF (XCODE_TOOLS_VERSION == "10.1")
+ DECLARE_EXTERNAL_RESOURCE(XCODE_TOOLS_ROOT sbr:799017771)
+ELSE()
+ MESSAGE(FATAL_ERROR Unsupported Xcode tools version: $XCODE_TOOLS_VERSION)
+ENDIF()
diff --git a/build/platform/xcode/ya.make.inc b/build/platform/xcode/ya.make.inc
new file mode 100644
index 0000000000..3b24e18448
--- /dev/null
+++ b/build/platform/xcode/ya.make.inc
@@ -0,0 +1,16 @@
+IF (NOT __XCODE_RESOURCE_NAME)
+ MESSAGE(FATAL_ERROR "Unspecified __XCODE_RESOURCE_NAME variable")
+ENDIF()
+IF (NOT __XCODE_TOOLCHAIN_VERSION)
+ MESSAGE(FATAL_ERROR "Unspecified Xcode toolchain version for" $XCODE_RESOURCE_NAME)
+ELSEIF (__XCODE_TOOLCHAIN_VERSION == "10.2.1")
+ DECLARE_EXTERNAL_RESOURCE(${__XCODE_RESOURCE_NAME} sbr:971159365)
+ELSEIF (__XCODE_TOOLCHAIN_VERSION == "9.2")
+ DECLARE_EXTERNAL_RESOURCE(${__XCODE_RESOURCE_NAME} sbr:498971125)
+ELSEIF (__XCODE_TOOLCHAIN_VERSION == "8.3.3")
+ DECLARE_EXTERNAL_RESOURCE(${__XCODE_RESOURCE_NAME} sbr:701155000)
+ELSEIF (__XCODE_TOOLCHAIN_VERSION == "8.2.1")
+ DECLARE_EXTERNAL_RESOURCE(${__XCODE_RESOURCE_NAME} sbr:500014407)
+ELSE()
+ MESSAGE(FATAL_ERROR "Unsupported Xcode toolchain version" $__XCODE_TOOLCHAIN_VERSION "for" $XCODE_RESOURCE_NAME)
+ENDIF()
diff --git a/build/platform/yfm/ya.make b/build/platform/yfm/ya.make
new file mode 100644
index 0000000000..ece089e998
--- /dev/null
+++ b/build/platform/yfm/ya.make
@@ -0,0 +1,19 @@
+OWNER(
+ workfork
+)
+
+RESOURCES_LIBRARY()
+
+IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
+ MESSAGE(FATAL_ERROR Unsupported platform for YFM tool)
+ENDIF()
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ YFM_TOOL
+ sbr:2614616596 FOR DARWIN-ARM64
+ sbr:2614616596 FOR DARWIN
+ sbr:2614615780 FOR LINUX
+ sbr:2614617315 FOR WIN32
+)
+
+END()
diff --git a/build/platform/yocto_sdk/yocto_sdk/ya.make b/build/platform/yocto_sdk/yocto_sdk/ya.make
new file mode 100644
index 0000000000..37d1727168
--- /dev/null
+++ b/build/platform/yocto_sdk/yocto_sdk/ya.make
@@ -0,0 +1,11 @@
+RESOURCES_LIBRARY()
+
+OWNER(heretic)
+
+DECLARE_EXTERNAL_RESOURCE(YOCTO_SDK_ROOT sbr:882588946)
+CFLAGS(
+ GLOBAL -cxx-isystem GLOBAL $YOCTO_SDK_ROOT_RESOURCE_GLOBAL/usr/include/c++/5.3.0/arm-poky-linux-gnueabi
+ GLOBAL -cxx-isystem GLOBAL $YOCTO_SDK_ROOT_RESOURCE_GLOBAL/usr/include/c++/5.3.0
+)
+
+END()
diff --git a/build/plugins/_common.py b/build/plugins/_common.py
new file mode 100644
index 0000000000..2f831a94db
--- /dev/null
+++ b/build/plugins/_common.py
@@ -0,0 +1,201 @@
+import sys
+import hashlib
+import base64
+
+
+class Result(object):
+ pass
+
+
+def lazy(func):
+ result = Result()
+
+ def wrapper():
+ try:
+ return result._result
+ except AttributeError:
+ result._result = func()
+
+ return result._result
+
+ return wrapper
+
+
+def pathid(path):
+ return base64.b32encode(hashlib.md5(path).digest()).lower().strip('=')
+
+
+def listid(l):
+ return pathid(str(sorted(l)))
+
+
+def unpair(lst):
+ for x, y in lst:
+ yield x
+ yield y
+
+
+def iterpair(lst):
+ y = None
+
+ for x in lst:
+ if y:
+ yield (y, x)
+
+ y = None
+ else:
+ y = x
+
+
+def stripext(fname):
+ return fname[:fname.rfind('.')]
+
+
+def tobuilddir(fname):
+ if not fname:
+ return '$B'
+ if fname.startswith('$S'):
+ return fname.replace('$S', '$B', 1)
+ else:
+ return fname
+
+
+def before(s, ss):
+ p = s.find(ss)
+
+ if p == -1:
+ return s
+
+ return s[:p]
+
+
+def sort_by_keywords(keywords, args):
+ flat = []
+ res = {}
+
+ cur_key = None
+ limit = -1
+ for arg in args:
+ if arg in keywords:
+ limit = keywords[arg]
+ if limit == 0:
+ res[arg] = True
+ cur_key = None
+ limit = -1
+ else:
+ cur_key = arg
+ continue
+ if limit == 0:
+ cur_key = None
+ limit = -1
+ if cur_key:
+ if cur_key in res:
+ res[cur_key].append(arg)
+ else:
+ res[cur_key] = [arg]
+ limit -= 1
+ else:
+ flat.append(arg)
+ return (flat, res)
+
+
+def resolve_common_const(path):
+ if path.startswith('${ARCADIA_ROOT}'):
+ return path.replace('${ARCADIA_ROOT}', '$S', 1)
+ if path.startswith('${ARCADIA_BUILD_ROOT}'):
+ return path.replace('${ARCADIA_BUILD_ROOT}', '$B', 1)
+ return path
+
+
+def resolve_to_abs_path(path, source_root, build_root):
+ if path.startswith('$S') and source_root is not None:
+ return path.replace('$S', source_root, 1)
+ if path.startswith('$B') and build_root is not None:
+ return path.replace('$B', build_root, 1)
+ return path
+
+
+def resolve_to_ymake_path(path):
+ return resolve_to_abs_path(path, '${ARCADIA_ROOT}', '${ARCADIA_BUILD_ROOT}')
+
+
+def join_intl_paths(*args):
+ return '/'.join(args)
+
+
+def get(fun, num):
+ return fun()[num][0]
+
+
+def make_tuples(arg_list):
+ def tpl():
+ for x in arg_list:
+ yield (x, [])
+
+ return list(tpl())
+
+
+def resolve_includes(unit, src, paths):
+ return unit.resolve_include([src] + paths) if paths else []
+
+
+def rootrel_arc_src(src, unit):
+ if src.startswith('${ARCADIA_ROOT}/'):
+ return src[16:]
+
+ if src.startswith('${ARCADIA_BUILD_ROOT}/'):
+ return src[22:]
+
+ elif src.startswith('${CURDIR}/'):
+ return unit.path()[3:] + '/' + src[10:]
+
+ else:
+ resolved = unit.resolve_arc_path(src)
+
+ if resolved.startswith('$S/'):
+ return resolved[3:]
+
+ return src # leave as is
+
+
+def skip_build_root(x):
+ if x.startswith('${ARCADIA_BUILD_ROOT}'):
+ return x[len('${ARCADIA_BUILD_ROOT}'):].lstrip('/')
+
+ return x
+
+
+def get_interpreter_path():
+ interpreter_path = [sys.executable]
+ if 'ymake' in interpreter_path[0]:
+ interpreter_path.append('--python')
+ return interpreter_path
+
+
+def filter_out_by_keyword(test_data, keyword):
+ def _iterate():
+ i = 0
+ while i < len(test_data):
+ if test_data[i] == keyword:
+ i += 2
+ else:
+ yield test_data[i]
+ i += 1
+
+ return list(_iterate())
+
+
+def generate_chunks(lst, chunk_size):
+ for i in xrange(0, len(lst), chunk_size):
+ yield lst[i:(i + chunk_size)]
+
+
+def strip_roots(path):
+ for prefix in ["$B/", "$S/"]:
+ if path.startswith(prefix):
+ return path[len(prefix):]
+ return path
+
+
+def to_yesno(x):
+ return "yes" if x else "no"
diff --git a/build/plugins/_custom_command.py b/build/plugins/_custom_command.py
new file mode 100644
index 0000000000..9692214b22
--- /dev/null
+++ b/build/plugins/_custom_command.py
@@ -0,0 +1,65 @@
+import subprocess
+import sys
+import os
+
+import _common as common
+
+
+class CustomCommand(object):
+ def __setstate__(self, sdict):
+ if isinstance(sdict, tuple):
+ for elem in sdict:
+ if isinstance(elem, dict):
+ for key in elem:
+ setattr(self, key, elem[key])
+
+ self._source_root = None
+ self._build_root = None
+
+ def set_source_root(self, path):
+ self._source_root = path
+
+ def set_build_root(self, path):
+ self._build_root = path
+
+ def call(self, args, **kwargs):
+ cwd = self._get_call_specs('cwd', kwargs)
+ stdout_path = self._get_call_specs('stdout', kwargs)
+
+ resolved_args = []
+
+ for arg in args:
+ resolved_args.append(self.resolve_path(arg))
+
+ if stdout_path:
+ stdout = open(stdout_path, 'wb')
+ else:
+ stdout = None
+
+ env = os.environ.copy()
+ env['ASAN_OPTIONS'] = 'detect_leaks=0'
+
+ rc = subprocess.call(resolved_args, cwd=cwd, stdout=stdout, env=env)
+
+ if stdout:
+ stdout.close()
+ if rc:
+ sys.exit(rc)
+
+ def resolve_path(self, path):
+ return common.resolve_to_abs_path(path, self._source_root, self._build_root)
+
+ def _get_call_specs(self, name, kwargs):
+ if isinstance(kwargs, dict):
+ param = kwargs.get(name, None)
+ if param:
+ return self.resolve_path(param)
+ return None
+
+
+def addrule(*unused):
+ pass
+
+
+def addparser(*unused, **kwargs):
+ pass
diff --git a/build/plugins/_import_wrapper.py b/build/plugins/_import_wrapper.py
new file mode 100644
index 0000000000..883f662314
--- /dev/null
+++ b/build/plugins/_import_wrapper.py
@@ -0,0 +1,24 @@
+try:
+ from ymake import CustomCommand as RealCustomCommand
+ from ymake import addrule
+ from ymake import addparser
+ from ymake import subst
+
+ class CustomCommand(RealCustomCommand):
+ def __init__(self, *args, **kwargs):
+ RealCustomCommand.__init__(*args, **kwargs)
+
+ def resolve_path(self, path):
+ return subst(path)
+
+except ImportError:
+ from _custom_command import CustomCommand # noqa
+ from _custom_command import addrule # noqa
+ from _custom_command import addparser # noqa
+
+
+try:
+ from ymake import engine_version
+except ImportError:
+ def engine_version():
+ return -1
diff --git a/build/plugins/_requirements.py b/build/plugins/_requirements.py
new file mode 100644
index 0000000000..c27635e852
--- /dev/null
+++ b/build/plugins/_requirements.py
@@ -0,0 +1,49 @@
+import _test_const as consts
+
+
+def check_cpu(suite_cpu_requirements, test_size, is_kvm=False):
+ min_cpu_requirements = consts.TestRequirementsConstants.MinCpu
+ max_cpu_requirements = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu)
+ if isinstance(suite_cpu_requirements, str):
+ if all(consts.TestRequirementsConstants.is_all_cpu(req) for req in (max_cpu_requirements, suite_cpu_requirements)):
+ return None
+ return "Wrong 'cpu' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_cpu_requirements, min_cpu_requirements, max_cpu_requirements, test_size)
+
+ if not isinstance(suite_cpu_requirements, int):
+ return "Wrong 'cpu' requirements: {}, should be integer".format(suite_cpu_requirements)
+
+ if suite_cpu_requirements < min_cpu_requirements or suite_cpu_requirements > consts.TestRequirementsConstants.get_cpu_value(max_cpu_requirements):
+ return "Wrong 'cpu' requirement: {}, should be in [{}..{}] for {}-size tests".format(suite_cpu_requirements, min_cpu_requirements, max_cpu_requirements, test_size)
+
+ return None
+
+
+# TODO: Remove is_kvm param when there will be guarantees on RAM
+def check_ram(suite_ram_requirements, test_size, is_kvm=False):
+ if not isinstance(suite_ram_requirements, int):
+ return "Wrong 'ram' requirements: {}, should be integer".format(suite_ram_requirements)
+ min_ram_requirements = consts.TestRequirementsConstants.MinRam
+ max_ram_requirements = consts.MAX_RAM_REQUIREMENTS_FOR_KVM if is_kvm else consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram)
+ if suite_ram_requirements < min_ram_requirements or suite_ram_requirements > max_ram_requirements:
+ err_msg = "Wrong 'ram' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_requirements, min_ram_requirements, max_ram_requirements, test_size)
+ if is_kvm:
+ err_msg += ' with kvm requirements'
+ return err_msg
+ return None
+
+
+def check_ram_disk(suite_ram_disk, test_size, is_kvm=False):
+ min_ram_disk = consts.TestRequirementsConstants.MinRamDisk
+ max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk)
+ if isinstance(suite_ram_disk, str):
+ if all(consts.TestRequirementsConstants.is_all_ram_disk(req) for req in (max_ram_disk, suite_ram_disk)):
+ return None
+ return "Wrong 'ram_disk' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_disk, 0, max_ram_disk, test_size)
+
+ if not isinstance(suite_ram_disk, int):
+ return "Wrong 'ram_disk' requirements: {}, should be integer".format(suite_ram_disk)
+
+ if suite_ram_disk < min_ram_disk or suite_ram_disk > consts.TestRequirementsConstants.get_ram_disk_value(max_ram_disk):
+ return "Wrong 'ram_disk' requirement: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_disk, min_ram_disk, max_ram_disk, test_size)
+
+ return None
diff --git a/build/plugins/_test_const.py b/build/plugins/_test_const.py
new file mode 100644
index 0000000000..0d03cc3d17
--- /dev/null
+++ b/build/plugins/_test_const.py
@@ -0,0 +1,327 @@
+# coding: utf-8
+import re
+import sys
+
+
+RESTART_TEST_INDICATOR = '##restart-test##'
+INFRASTRUCTURE_ERROR_INDICATOR = '##infrastructure-error##'
+
+RESTART_TEST_INDICATORS = [
+ RESTART_TEST_INDICATOR,
+ "network error",
+]
+
+# testing
+BIN_DIRECTORY = 'bin'
+CANONIZATION_RESULT_FILE_NAME = "canonization_res.json"
+CONSOLE_SNIPPET_LIMIT = 5000
+LIST_NODE_LOG_FILE = "test_list.log"
+LIST_NODE_RESULT_FILE = "test_list.json"
+LIST_RESULT_NODE_LOG_FILE = "list_result.log"
+MAX_FILE_SIZE = 1024 * 1024 * 2 # 2 MB
+MAX_TEST_RESTART_COUNT = 3
+REPORT_SNIPPET_LIMIT = 10000
+SANITIZER_ERROR_RC = 100
+TEST_SUBTEST_SEPARATOR = '::'
+TESTING_OUT_DIR_NAME = "testing_out_stuff"
+TESTING_OUT_TAR_NAME = TESTING_OUT_DIR_NAME + ".tar"
+TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S.%f"
+TRACE_FILE_NAME = "ytest.report.trace"
+TRUNCATING_IGNORE_FILE_LIST = {TRACE_FILE_NAME, "run_test.log"}
+
+# kvm
+DEFAULT_RAM_REQUIREMENTS_FOR_KVM = 4
+MAX_RAM_REQUIREMENTS_FOR_KVM = 16
+
+# distbuild
+TEST_NODE_FINISHING_TIME = 5 * 60
+DEFAULT_TEST_NODE_TIMEOUT = 15 * 60
+
+# coverage
+COVERAGE_TESTS_TIMEOUT_FACTOR = 1.5
+COVERAGE_RESOLVED_FILE_NAME_PATTERN = "coverage_resolved.{}.json"
+CPP_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("cpp")
+JAVA_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("java")
+PYTHON_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("python")
+CLANG_COVERAGE_TEST_TYPES = ("unittest", "coverage_extractor", "pytest", "py3test", "gtest", "boost_test", "exectest")
+COVERAGE_TABLE_CHUNKS = 20
+COVERAGE_YT_PROXY = "hahn.yt.yandex.net"
+COVERAGE_YT_ROOT_PATH = "//home/codecoverage"
+COVERAGE_YT_TABLE_PREFIX = "datatable"
+
+# fuzzing
+CORPUS_DATA_FILE_NAME = 'corpus.json'
+CORPUS_DATA_ROOT_DIR = 'fuzzing'
+CORPUS_DIR_NAME = 'corpus'
+FUZZING_COMPRESSION_COEF = 1.1
+FUZZING_DEFAULT_TIMEOUT = 3600
+FUZZING_FINISHING_TIME = 600
+FUZZING_TIMEOUT_RE = re.compile(r'(^|\s)-max_total_time=(?P<max_time>\d+)')
+GENERATED_CORPUS_DIR_NAME = 'mined_corpus'
+MAX_CORPUS_RESOURCES_ALLOWED = 5
+
+TEST_TOOL_HOST = 'TEST_TOOL_HOST_RESOURCE_GLOBAL'
+TEST_TOOL_TARGET = 'TEST_TOOL_TARGET_RESOURCE_GLOBAL'
+TEST_TOOL_HOST_LOCAL = 'TEST_TOOL_HOST_LOCAL'
+TEST_TOOL_TARGET_LOCAL = 'TEST_TOOL_TARGET_LOCAL'
+XCODE_TOOLS_RESOURCE = 'XCODE_TOOLS_ROOT_RESOURCE_GLOBAL'
+GO_TOOLS_RESOURCE = 'GO_TOOLS_RESOURCE_GLOBAL'
+LLVM_COV9_RESOURCE = 'LLVM_COV9_RESOURCE_GLOBAL'
+PEP8_PY2_RESOURCE = 'PEP8_PY2_RESOURCE_GLOBAL'
+PEP8_PY3_RESOURCE = 'PEP8_PY3_RESOURCE_GLOBAL'
+FLAKES_PY2_RESOURCE = 'FLAKES_PY2_RESOURCE_GLOBAL'
+FLAKES_PY3_RESOURCE = 'FLAKES_PY3_RESOURCE_GLOBAL'
+FLAKE8_PY2_RESOURCE = 'FLAKE8_PY2_RESOURCE_GLOBAL'
+FLAKE8_PY3_RESOURCE = 'FLAKE8_PY3_RESOURCE_GLOBAL'
+
+
+class Enum(object):
+
+ @classmethod
+ def enumerate(cls):
+ return [v for k, v in cls.__dict__.items() if not k.startswith("_")]
+
+
+class TestRequirements(Enum):
+ Container = 'container'
+ Cpu = 'cpu'
+ DiskUsage = 'disk_usage'
+ Ram = 'ram'
+ RamDisk = 'ram_disk'
+ SbVault = 'sb_vault'
+ Network = 'network'
+ Dns = 'dns'
+ Kvm = 'kvm'
+
+
+class TestRequirementsConstants(Enum):
+ All = 'all'
+ AllCpuValue = 50
+ AllRamDiskValue = 50
+ MinCpu = 1
+ MinRam = 1
+ MinRamDisk = 0
+
+ @classmethod
+ def is_all_cpu(cls, value):
+ return value == cls.All
+
+ @classmethod
+ def get_cpu_value(cls, value):
+ return cls.AllCpuValue if cls.is_all_cpu(value) else value
+
+ @classmethod
+ def is_all_ram_disk(cls, value):
+ return value == cls.All
+
+ @classmethod
+ def get_ram_disk_value(cls, value):
+ return cls.AllRamDiskValue if cls.is_all_ram_disk(value) else value
+
+
+class TestSize(Enum):
+ Small = 'small'
+ Medium = 'medium'
+ Large = 'large'
+
+ DefaultTimeouts = {
+ Small: 60,
+ Medium: 600,
+ Large: 3600,
+ }
+
+ DefaultPriorities = {
+ Small: -1,
+ Medium: -2,
+ Large: -3,
+ }
+
+ DefaultRequirements = {
+ Small: {
+ TestRequirements.Cpu: 1,
+ TestRequirements.Ram: 32,
+ # TestRequirements.Ram: 2,
+ TestRequirements.RamDisk: 0,
+ },
+ Medium: {
+ TestRequirements.Cpu: 1,
+ TestRequirements.Ram: 32,
+ # TestRequirements.Ram: 4,
+ TestRequirements.RamDisk: 0,
+ },
+ Large: {
+ TestRequirements.Cpu: 1,
+ TestRequirements.Ram: 32,
+ # TestRequirements.Ram: 8,
+ TestRequirements.RamDisk: 0,
+ },
+ }
+
+ MaxRequirements = {
+ Small: {
+ TestRequirements.Cpu: 4,
+ TestRequirements.Ram: 32,
+ # TestRequirements.Ram: 4,
+ TestRequirements.RamDisk: 4,
+ },
+ Medium: {
+ TestRequirements.Cpu: 4,
+ # TestRequirements.Cpu: 8,
+ TestRequirements.Ram: 32,
+ # TestRequirements.Ram: 16,
+ TestRequirements.RamDisk: 4,
+ },
+ Large: {
+ TestRequirements.Cpu: 4,
+ TestRequirements.Ram: 32,
+ TestRequirements.RamDisk: 4,
+ },
+ }
+
+ @classmethod
+ def sizes(cls):
+ return cls.DefaultTimeouts.keys()
+
+ @classmethod
+ def get_default_timeout(cls, size):
+ if size in cls.DefaultTimeouts:
+ return cls.DefaultTimeouts[size]
+ raise Exception("Unknown test size '{}'".format(size))
+
+ @classmethod
+ def get_default_priorities(cls, size):
+ if size in cls.DefaultPriorities:
+ return cls.DefaultPriorities[size]
+ raise Exception("Unknown test size '{}'".format(size))
+
+ @classmethod
+ def get_default_requirements(cls, size):
+ if size in cls.DefaultRequirements:
+ return cls.DefaultRequirements[size]
+ raise Exception("Unknown test size '{}'".format(size))
+
+ @classmethod
+ def get_max_requirements(cls, size):
+ if size in cls.MaxRequirements:
+ return cls.MaxRequirements[size]
+ raise Exception("Unknown test size '{}'".format(size))
+
+
+class TestRunExitCode(Enum):
+ Skipped = 2
+ Failed = 3
+ TimeOut = 10
+ InfrastructureError = 12
+
+
+class YaTestTags(Enum):
+ Manual = "ya:manual"
+ Notags = "ya:notags"
+ Norestart = "ya:norestart"
+ Dirty = "ya:dirty"
+ Noretries = "ya:noretries"
+ Fat = "ya:fat"
+ RunWithAsserts = "ya:relwithdebinfo"
+ Privileged = "ya:privileged"
+ ExoticPlatform = "ya:exotic_platform"
+ NotAutocheck = "ya:not_autocheck"
+
+
+class Status(object):
+ GOOD, XFAIL, FAIL, XPASS, MISSING, CRASHED, TIMEOUT = range(1, 8)
+ SKIPPED = -100
+ NOT_LAUNCHED = -200
+ CANON_DIFF = -300
+ DESELECTED = -400
+ INTERNAL = -sys.maxint
+ FLAKY = -50
+ BY_NAME = {'good': GOOD, 'fail': FAIL, 'xfail': XFAIL, 'xpass': XPASS, 'missing': MISSING, 'crashed': CRASHED,
+ 'skipped': SKIPPED, 'flaky': FLAKY, 'not_launched': NOT_LAUNCHED, 'timeout': TIMEOUT, 'diff': CANON_DIFF,
+ 'internal': INTERNAL, 'deselected': DESELECTED}
+ TO_STR = {GOOD: 'good', FAIL: 'fail', XFAIL: 'xfail', XPASS: 'xpass', MISSING: 'missing', CRASHED: 'crashed',
+ SKIPPED: 'skipped', FLAKY: 'flaky', NOT_LAUNCHED: 'not_launched', TIMEOUT: 'timeout', CANON_DIFF: 'diff',
+ INTERNAL: 'internal', DESELECTED: 'deselected'}
+
+
+class _Colors(object):
+
+ _NAMES = [
+ "blue",
+ "cyan",
+ "default",
+ "green",
+ "grey",
+ "magenta",
+ "red",
+ "white",
+ "yellow",
+ ]
+ _PREFIXES = ["", "light", "dark"]
+
+ def __init__(self):
+ self._table = {}
+ for prefix in self._PREFIXES:
+ for value in self._NAMES:
+ name = value
+ if prefix:
+ name = "{}_{}".format(prefix, value)
+ value = "{}-{}".format(prefix, value)
+ self.__add_color(name.upper(), value)
+
+ def __add_color(self, name, value):
+ self._table[name] = value
+ self.__setattr__(name, value)
+
+
+Colors = _Colors()
+
+
+class _Highlight(object):
+
+ _MARKERS = {
+ # special
+ "RESET": "rst",
+
+ "IMPORTANT": "imp",
+ "UNIMPORTANT": "unimp",
+ "BAD": "bad",
+ "WARNING": "warn",
+ "GOOD": "good",
+ "PATH": "path",
+ "ALTERNATIVE1": "alt1",
+ "ALTERNATIVE2": "alt2",
+ "ALTERNATIVE3": "alt3",
+ }
+
+ def __init__(self):
+ # setting attributes because __getattr__ is much slower
+ for attr, value in self._MARKERS.items():
+ self.__setattr__(attr, value)
+
+
+Highlight = _Highlight()
+
+
+class _StatusColorMap(object):
+
+ _MAP = {
+ 'good': Highlight.GOOD,
+ 'fail': Highlight.BAD,
+ 'missing': Highlight.ALTERNATIVE1,
+ 'crashed': Highlight.WARNING,
+ 'skipped': Highlight.UNIMPORTANT,
+ 'not_launched': Highlight.BAD,
+ 'timeout': Highlight.BAD,
+ 'flaky': Highlight.ALTERNATIVE3,
+ 'xfail': Highlight.WARNING,
+ 'xpass': Highlight.WARNING,
+ 'diff': Highlight.BAD,
+ 'internal': Highlight.BAD,
+ 'deselected': Highlight.UNIMPORTANT,
+ }
+
+ def __getitem__(self, item):
+ return self._MAP[item]
+
+
+StatusColorMap = _StatusColorMap()
diff --git a/build/plugins/_unpickler.py b/build/plugins/_unpickler.py
new file mode 100644
index 0000000000..e01e7b3118
--- /dev/null
+++ b/build/plugins/_unpickler.py
@@ -0,0 +1,42 @@
+import sys
+
+sys.dont_write_bytecode = True
+
+import argparse
+import base64
+try:
+ import cPickle as pickle
+except Exception:
+ import pickle
+
+import _common as common
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--data', help='pickled object of TCustomCommand class', required=True)
+ 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()
+
+ encoded_cmd = args.data
+ src_root = args.src_root
+ build_root = args.build_root
+ tools = args.tools
+
+ assert (int(tools[0]) == len(tools[1:])), "tools quantity != tools number!"
+
+ cmd_object = pickle.loads(base64.b64decode(encoded_cmd))
+
+ cmd_object.set_source_root(src_root)
+ cmd_object.set_build_root(build_root)
+
+ if len(tools[1:]) == 0:
+ cmd_object.run(unknown_args, common.get_interpreter_path())
+ else:
+ cmd_object.run(unknown_args, *tools[1:])
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/plugins/_xsyn_includes.py b/build/plugins/_xsyn_includes.py
new file mode 100644
index 0000000000..8d33cea2f0
--- /dev/null
+++ b/build/plugins/_xsyn_includes.py
@@ -0,0 +1,60 @@
+def get_include_callback():
+ """
+ .. function: get_include_callback returns function that processes each DOM element to get xsyn include from it, and it's aware of directory with all the xsyns.
+
+ :param xsyn_dir directory with xsyns.
+ """
+ def get_include(element):
+ """
+ .. function: get_include returns list of includes from this DOM element.
+
+ :param element DOM element.
+ """
+ res = []
+ if element.nodeType == element.ELEMENT_NODE and element.nodeName == "parse:include":
+ attrs = element.attributes
+ for i in xrange(attrs.length):
+ attr = attrs.item(i)
+ if attr.nodeName == "path":
+ include_filename = attr.nodeValue
+ res.append(include_filename)
+ return res
+
+ return get_include
+
+
+def traverse_xsyn(element, on_element):
+ """
+ .. function: traverse_xsyn traverses element and returns concatenated lists of calling on_element of each element.
+
+ :param element element in DOM.
+ :param on_element callback on element that returns list of values.
+ """
+ res = on_element(element)
+ for child in element.childNodes:
+ child_results = traverse_xsyn(child, on_element)
+ res += child_results
+ return res
+
+
+def process_xsyn(filepath, on_element):
+ """
+ .. function: process_xsyn processes xsyn file and return concatenated list of calling on_element on each DOM element.
+
+ :param filepath path to xsyn file
+ :param on_element callback called on each element in xsyn that returns list of values.
+
+ """
+
+ # keep a stack of filepathes if on_element calls process_xsyn recursively
+ with open(filepath) as xsyn_file:
+ from xml.dom.minidom import parse
+ tree = parse(xsyn_file)
+ tree.normalize()
+ res = traverse_xsyn(tree, on_element)
+ return res
+
+
+def get_all_includes(filepath):
+ callback = get_include_callback()
+ return process_xsyn(filepath, callback)
diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py
new file mode 100644
index 0000000000..4da76f1852
--- /dev/null
+++ b/build/plugins/build_mn_files.py
@@ -0,0 +1,29 @@
+from os.path import basename, splitext
+
+
+def on_build_mns_files(unit, *args):
+ files = []
+ name = ''
+ ranking_suffix = ''
+ check = ''
+ index = 0
+ fml_unused_tool = ''
+ while index < len(args):
+ if args[index] == 'NAME':
+ index += 1
+ name = args[index]
+ elif args[index] == 'RANKING_SUFFIX':
+ index += 1
+ ranking_suffix = args[index]
+ elif args[index] == 'CHECK':
+ check = 'CHECK'
+ fml_unused_tool = unit.get('FML_UNUSED_TOOL') or '$FML_UNUSED_TOOL'
+ else:
+ files.append(args[index])
+ index += 1
+
+ for filename in files:
+ file_basename, _ = splitext(basename(filename))
+ asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename)
+ output_name = 'mn.staticMn{0}{1}Ptr.cpp'.format(ranking_suffix, file_basename)
+ unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname])
diff --git a/build/plugins/bundle.py b/build/plugins/bundle.py
new file mode 100644
index 0000000000..0bec8254ee
--- /dev/null
+++ b/build/plugins/bundle.py
@@ -0,0 +1,22 @@
+import os
+
+
+def onbundle(unit, *args):
+ """
+ @usage BUNDLE(<Dir [NAME Name]>...)
+
+ Brings build artefact from module Dir under optional Name to the current module (e.g. UNION)
+ If NAME is not specified, the name of the Dir's build artefact will be preserved
+ It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice.
+ Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one.
+ """
+ i = 0
+ while i < len(args):
+ if i + 2 < len(args) and args[i + 1] == "NAME":
+ target, name = args[i], args[i + 2]
+ i += 3
+ else:
+ target, name = args[i], os.path.basename(args[i])
+ i += 1
+
+ unit.on_bundle_target([target, name])
diff --git a/build/plugins/code_generator.py b/build/plugins/code_generator.py
new file mode 100644
index 0000000000..ca8bb18c15
--- /dev/null
+++ b/build/plugins/code_generator.py
@@ -0,0 +1,45 @@
+import re
+import os
+
+import _import_wrapper as iw
+
+pattern = re.compile(r"#include\s*[<\"](?P<INDUCED>[^>\"]+)[>\"]|(?:@|{@)\s*(?:import|include|from)\s*[\"'](?P<INCLUDE>[^\"']+)[\"']")
+
+
+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())))
+ with open(path, 'rb') as f:
+ includes, induced = CodeGeneratorTemplateParser.parse_includes(f.readlines())
+ self._includes = unit.resolve_include([retargeted] + includes) if includes else []
+ self._induced = unit.resolve_include([retargeted] + induced) if induced else []
+
+ @staticmethod
+ def parse_includes(lines):
+ includes = []
+ induced = []
+
+ for line in lines:
+ for match in pattern.finditer(line):
+ type = match.lastgroup
+ if type == 'INCLUDE':
+ includes.append(match.group(type))
+ elif type == 'INDUCED':
+ induced.append(match.group(type))
+ else:
+ raise Exception("Unexpected match! Perhaps it is a result of an error in pattern.")
+ return (includes, induced)
+
+ def includes(self):
+ return self._includes
+
+ def induced_deps(self):
+ return {
+ 'h+cpp': self._induced
+ }
+
+
+def init():
+ iw.addparser('markettemplate', CodeGeneratorTemplateParser)
+ iw.addparser('macro', CodeGeneratorTemplateParser)
diff --git a/build/plugins/copy_files_to_build_prefix.py b/build/plugins/copy_files_to_build_prefix.py
new file mode 100644
index 0000000000..c8a6e07511
--- /dev/null
+++ b/build/plugins/copy_files_to_build_prefix.py
@@ -0,0 +1,36 @@
+from _common import sort_by_keywords
+
+
+SOURCE_ROOT = '${ARCADIA_ROOT}/'
+BUILD_ROOT = '${ARCADIA_BUILD_ROOT}/'
+CURDIR = '${CURDIR}/'
+BINDIR = '${BINDIR}/'
+
+
+def oncopy_files_to_build_prefix(unit, *args):
+ keywords = {'PREFIX': 1, 'GLOBAL': 0}
+ # NB! keyword 'GLOBAL' is a way to skip this word from the list of files
+
+ flat_args, spec_args = sort_by_keywords(keywords, args)
+ prefix = spec_args['PREFIX'][0] if 'PREFIX' in spec_args else ''
+
+ if len(prefix) > 0:
+ build_prefix = '/'.join([BUILD_ROOT, prefix])
+ else:
+ build_prefix = BUILD_ROOT
+
+ for arg in flat_args:
+ if arg.startswith(build_prefix):
+ # nothing to do
+ pass
+ elif len(prefix) > 0 and arg.startswith(BUILD_ROOT):
+ unit.oncopy_file([arg, '{}/{}'.format(build_prefix, arg[len(BUILD_ROOT):])])
+ elif arg.startswith(SOURCE_ROOT):
+ unit.oncopy_file([arg, '{}/{}'.format(build_prefix, arg[len(SOURCE_ROOT):])])
+ else:
+ offset = 0
+ if arg.startswith(BINDIR):
+ offset = len(BINDIR)
+ elif arg.startswith(CURDIR):
+ offset = len(CURDIR)
+ unit.oncopy_file([arg, '{}/{}/{}'.format(build_prefix, unit.get(['MODDIR']), arg[offset:])])
diff --git a/build/plugins/cp.py b/build/plugins/cp.py
new file mode 100644
index 0000000000..5c663a3bdd
--- /dev/null
+++ b/build/plugins/cp.py
@@ -0,0 +1,30 @@
+import os
+
+from _common import sort_by_keywords
+
+
+def oncopy(unit, *args):
+ keywords = {'RESULT': 1, 'KEEP_DIR_STRUCT': 0, 'DESTINATION': 1, 'FROM': 1}
+
+ flat_args, spec_args = sort_by_keywords(keywords, args)
+
+ dest_dir = spec_args['DESTINATION'][0] if 'DESTINATION' in spec_args else ''
+ from_dir = spec_args['FROM'][0] if 'FROM' in spec_args else ''
+ keep_struct = 'KEEP_DIR_STRUCT' in spec_args
+ save_in_var = 'RESULT' in spec_args
+ targets = []
+
+ for source in flat_args:
+ rel_path = ''
+ path_list = source.split(os.sep)
+ filename = path_list[-1]
+ if keep_struct:
+ if path_list[:-1]:
+ rel_path = os.path.join(*path_list[:-1])
+ source_path = os.path.join(from_dir, rel_path, filename)
+ target_path = os.path.join(dest_dir, rel_path, filename)
+ if save_in_var:
+ targets.append(target_path)
+ unit.oncopy_file([source_path, target_path])
+ if save_in_var:
+ unit.set([spec_args["RESULT"][0], " ".join(targets)])
diff --git a/build/plugins/cpp_style.py b/build/plugins/cpp_style.py
new file mode 100644
index 0000000000..3ab78b7320
--- /dev/null
+++ b/build/plugins/cpp_style.py
@@ -0,0 +1,19 @@
+import os
+
+from _common import sort_by_keywords
+
+
+def on_style(unit, *args):
+ def it():
+ yield 'DONT_PARSE'
+
+ for f in args:
+ f = f[len('${ARCADIA_ROOT}') + 1:]
+
+ if '/generated/' in f:
+ continue
+
+ yield f
+ yield '/cpp_style/files/' + f
+
+ unit.onresource(list(it()))
diff --git a/build/plugins/create_init_py.py b/build/plugins/create_init_py.py
new file mode 100644
index 0000000000..e41a4d22df
--- /dev/null
+++ b/build/plugins/create_init_py.py
@@ -0,0 +1,15 @@
+import os
+
+from _common import sort_by_keywords
+
+
+def oncreate_init_py_structure(unit, *args):
+ if unit.get('DISTBUILD'):
+ return
+ target_dir = unit.get('PY_PROTOS_FOR_DIR')
+ path_list = target_dir.split(os.path.sep)[1:]
+ inits = [os.path.join("${ARCADIA_BUILD_ROOT}", '__init__.py')]
+ for i in range(1, len(path_list) + 1):
+ inits.append(os.path.join("${ARCADIA_BUILD_ROOT}", os.path.join(*path_list[0:i]), '__init__.py'))
+ unit.ontouch(inits)
+
diff --git a/build/plugins/credits.py b/build/plugins/credits.py
new file mode 100644
index 0000000000..0ce1659326
--- /dev/null
+++ b/build/plugins/credits.py
@@ -0,0 +1,22 @@
+from _common import rootrel_arc_src
+
+
+def oncredits_disclaimer(unit, *args):
+ if unit.get('WITH_CREDITS'):
+ unit.message(["warn", "CREDITS WARNING: {}".format(' '.join(args))])
+
+def oncheck_contrib_credits(unit, *args):
+ module_path = rootrel_arc_src(unit.path(), unit)
+ excepts = set()
+ if 'EXCEPT' in args:
+ args = list(args)
+ except_pos = args.index('EXCEPT')
+ excepts = set(args[except_pos + 1:])
+ args = args[:except_pos]
+ for arg in args:
+ if module_path.startswith(arg) and not unit.get('CREDITS_TEXTS_FILE') and not unit.get('NO_CREDITS_TEXTS_FILE'):
+ for ex in excepts:
+ if module_path.startswith(ex):
+ break
+ else:
+ unit.message(["error", "License texts not found. See https://st.yandex-team.ru/DTCC-324"])
diff --git a/build/plugins/docs.py b/build/plugins/docs.py
new file mode 100644
index 0000000000..760fe3af7f
--- /dev/null
+++ b/build/plugins/docs.py
@@ -0,0 +1,44 @@
+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:
+ build_tool = 'yfm'
+ unit.ondocs_builder([build_tool])
+ if build_tool == 'yfm' and unit.enabled('_DOCS_USE_PLANTUML'):
+ unit.on_docs_yfm_use_plantuml([])
+ orig_variables = macro_calls_to_dict(unit, extract_macro_calls(unit, '_DOCS_VARS_VALUE'))
+ variables = {k: unit.get(k) or v for k, v in orig_variables.items()}
+ if variables:
+ if build_tool == 'mkdocs':
+ unit.set(['_DOCS_VARS_FLAG', ' '.join(['--var {}={}'.format(k, v) for k, v in variables.items()])])
+ elif build_tool == 'yfm':
+ unit.set(['_DOCS_VARS_FLAG', '--vars {}'.format(json.dumps(json.dumps(variables, sort_keys=True)))])
+ else:
+ assert False, 'Unexpected build_tool value: [{}]'.format(build_tool)
diff --git a/build/plugins/files.py b/build/plugins/files.py
new file mode 100644
index 0000000000..78a6fe6169
--- /dev/null
+++ b/build/plugins/files.py
@@ -0,0 +1,5 @@
+def onfiles(unit, *args):
+ args = list(args)
+ for arg in args:
+ if not arg.startswith('${ARCADIA_BUILD_ROOT}'):
+ unit.oncopy_file([arg, arg])
diff --git a/build/plugins/gobuild.py b/build/plugins/gobuild.py
new file mode 100644
index 0000000000..8df96ebc55
--- /dev/null
+++ b/build/plugins/gobuild.py
@@ -0,0 +1,309 @@
+import base64
+import itertools
+import md5
+import os
+from _common import rootrel_arc_src, tobuilddir
+import ymake
+
+
+runtime_cgo_path = os.path.join('runtime', 'cgo')
+runtime_msan_path = os.path.join('runtime', 'msan')
+runtime_race_path = os.path.join('runtime', 'race')
+arc_project_prefix = 'a.yandex-team.ru/'
+import_runtime_cgo_false = {
+ 'norace': (runtime_cgo_path, runtime_msan_path, runtime_race_path),
+ 'race': (runtime_cgo_path, runtime_msan_path),
+}
+import_syscall_false = {
+ 'norace': (runtime_cgo_path),
+ 'race': (runtime_cgo_path, runtime_race_path),
+}
+
+
+def get_import_path(unit):
+ # std_lib_prefix = unit.get('GO_STD_LIB_PREFIX')
+ # unit.get() doesn't evalutate the value of variable, so the line above doesn't really work
+ std_lib_prefix = unit.get('GOSTD') + '/'
+ arc_project_prefix = unit.get('GO_ARCADIA_PROJECT_PREFIX')
+ vendor_prefix = unit.get('GO_CONTRIB_PROJECT_PREFIX')
+
+ module_path = rootrel_arc_src(unit.path(), unit)
+ assert len(module_path) > 0
+ import_path = module_path.replace('\\', '/')
+ if import_path.startswith(std_lib_prefix):
+ import_path = import_path[len(std_lib_prefix):]
+ elif import_path.startswith(vendor_prefix):
+ import_path = import_path[len(vendor_prefix):]
+ else:
+ import_path = arc_project_prefix + import_path
+ assert len(import_path) > 0
+ return import_path
+
+
+def get_appended_values(unit, key):
+ value = []
+ raw_value = unit.get(key)
+ if raw_value:
+ value = filter(lambda x: len(x) > 0, raw_value.split(' '))
+ assert len(value) == 0 or value[0] == '$' + key
+ return value[1:] if len(value) > 0 else value
+
+
+def compare_versions(version1, version2):
+ def last_index(version):
+ index = version.find('beta')
+ return len(version) if index < 0 else index
+
+ v1 = tuple(x.zfill(8) for x in version1[:last_index(version1)].split('.'))
+ v2 = tuple(x.zfill(8) for x in version2[:last_index(version2)].split('.'))
+ if v1 == v2:
+ return 0
+ return 1 if v1 < v2 else -1
+
+
+def need_compiling_runtime(import_path, gostd_version):
+ return import_path in ('runtime', 'reflect', 'syscall') or \
+ import_path.startswith('runtime/internal/') or \
+ compare_versions('1.17', gostd_version) >= 0 and import_path == 'internal/bytealg'
+
+
+def go_package_name(unit):
+ name = unit.get('GO_PACKAGE_VALUE')
+ if not name:
+ name = unit.get('GO_TEST_IMPORT_PATH')
+ if name:
+ name = os.path.basename(os.path.normpath(name))
+ elif unit.get('MODULE_TYPE') == 'PROGRAM':
+ name = 'main'
+ else:
+ name = unit.get('REALPRJNAME')
+ return name
+
+
+def need_lint(path):
+ return not path.startswith('$S/vendor/') and not path.startswith('$S/contrib/')
+
+
+def on_go_process_srcs(unit):
+ """
+ _GO_PROCESS_SRCS() macro processes only 'CGO' files. All remaining *.go files
+ and other input files are currently processed by a link command of the
+ GO module (GO_LIBRARY, GO_PROGRAM)
+ """
+
+ srcs_files = get_appended_values(unit, '_GO_SRCS_VALUE')
+
+ asm_files = []
+ c_files = []
+ cxx_files = []
+ ev_files = []
+ fbs_files = []
+ go_files = []
+ in_files = []
+ proto_files = []
+ s_files = []
+ syso_files = []
+
+ classifed_files = {
+ '.c': c_files,
+ '.cc': cxx_files,
+ '.cpp': cxx_files,
+ '.cxx': cxx_files,
+ '.ev': ev_files,
+ '.fbs': fbs_files,
+ '.go': go_files,
+ '.in': in_files,
+ '.proto': proto_files,
+ '.s': asm_files,
+ '.syso': syso_files,
+ '.C': cxx_files,
+ '.S': s_files,
+ }
+
+ # Classify files specifed in _GO_SRCS() macro by extension and process CGO_EXPORT keyword
+ # which can preceed C/C++ files only
+ is_cgo_export = False
+ for f in srcs_files:
+ _, ext = os.path.splitext(f)
+ ext_files = classifed_files.get(ext)
+ if ext_files is not None:
+ if is_cgo_export:
+ is_cgo_export = False
+ if ext in ('.c', '.cc', '.cpp', '.cxx', '.C'):
+ unit.oncopy_file_with_context([f, f, 'OUTPUT_INCLUDES', '${BINDIR}/_cgo_export.h'])
+ f = '${BINDIR}/' + f
+ else:
+ ymake.report_configure_error('Unmatched CGO_EXPORT keyword in SRCS() macro')
+ ext_files.append(f)
+ elif f == 'CGO_EXPORT':
+ is_cgo_export = True
+ else:
+ # FIXME(snermolaev): We can report an unsupported files for _GO_SRCS here
+ pass
+ if is_cgo_export:
+ ymake.report_configure_error('Unmatched CGO_EXPORT keyword in SRCS() macro')
+
+ for f in go_files:
+ if f.endswith('_test.go'):
+ ymake.report_configure_error('file {} must be listed in GO_TEST_SRCS() or GO_XTEST_SRCS() macros'.format(f))
+ go_test_files = get_appended_values(unit, '_GO_TEST_SRCS_VALUE')
+ go_xtest_files = get_appended_values(unit, '_GO_XTEST_SRCS_VALUE')
+ for f in go_test_files + go_xtest_files:
+ if not f.endswith('_test.go'):
+ ymake.report_configure_error('file {} should not be listed in GO_TEST_SRCS() or GO_XTEST_SRCS() macros'.format(f))
+
+ is_test_module = unit.enabled('GO_TEST_MODULE')
+
+ # Add gofmt style checks
+ if unit.enabled('_GO_FMT_ADD_CHECK'):
+ resolved_go_files = []
+ go_source_files = [] if is_test_module and unit.get(['GO_TEST_FOR_DIR']) else go_files
+ for path in itertools.chain(go_source_files, go_test_files, go_xtest_files):
+ if path.endswith('.go'):
+ resolved = unit.resolve_arc_path([path])
+ if resolved != path and need_lint(resolved):
+ resolved_go_files.append(resolved)
+ if resolved_go_files:
+ basedirs = {}
+ for f in resolved_go_files:
+ basedir = os.path.dirname(f)
+ if basedir not in basedirs:
+ basedirs[basedir] = []
+ basedirs[basedir].append(f)
+ for basedir in basedirs:
+ unit.onadd_check(['gofmt'] + basedirs[basedir])
+
+ # Go coverage instrumentation (NOTE! go_files list is modified here)
+ if is_test_module and unit.enabled('GO_TEST_COVER'):
+ cover_info = []
+
+ for f in go_files:
+ if f.endswith('_test.go'):
+ continue
+ cover_var = 'GoCover' + base64.b32encode(f).rstrip('=')
+ cover_file = unit.resolve_arc_path(f)
+ unit.on_go_gen_cover_go([cover_file, cover_var])
+ if cover_file.startswith('$S/'):
+ cover_file = arc_project_prefix + cover_file[3:]
+ cover_info.append('{}:{}'.format(cover_var, cover_file))
+
+ # go_files should be empty now since the initial list shouldn't contain
+ # any non-go or go test file. The value of go_files list will be used later
+ # to update the value of _GO_SRCS_VALUE
+ go_files = []
+ unit.set(['GO_COVER_INFO_VALUE', ' '.join(cover_info)])
+
+ # We have cleaned up the list of files from _GO_SRCS_VALUE var and we have to update
+ # the value since it is used in module command line
+ unit.set(['_GO_SRCS_VALUE', ' '.join(itertools.chain(go_files, asm_files, syso_files))])
+
+ unit_path = unit.path()
+
+ # Add go vet check
+ if unit.enabled('_GO_VET_ADD_CHECK') and need_lint(unit_path):
+ vet_report_file_name = os.path.join(unit_path, '{}{}'.format(unit.filename(), unit.get('GO_VET_REPORT_EXT')))
+ unit.onadd_check(["govet", '$(BUILD_ROOT)/' + tobuilddir(vet_report_file_name)[3:]])
+
+ for f in ev_files:
+ ev_proto_file = '{}.proto'.format(f)
+ unit.oncopy_file_with_context([f, ev_proto_file])
+ proto_files.append(ev_proto_file)
+
+ # Process .proto files
+ for f in proto_files:
+ unit.on_go_proto_cmd(f)
+
+ # Process .fbs files
+ for f in fbs_files:
+ unit.on_go_flatc_cmd([f, go_package_name(unit)])
+
+ # Process .in files
+ for f in in_files:
+ unit.onsrc(f)
+
+ # Generate .symabis for .s files (starting from 1.12 version)
+ if len(asm_files) > 0:
+ symabis_flags = []
+ gostd_version = unit.get('GOSTD_VERSION')
+ if compare_versions('1.16', gostd_version) >= 0:
+ import_path = get_import_path(unit)
+ symabis_flags.extend(['FLAGS', '-p', import_path])
+ if need_compiling_runtime(import_path, gostd_version):
+ symabis_flags.append('-compiling-runtime')
+ unit.on_go_compile_symabis(asm_files + symabis_flags)
+
+ # Process cgo files
+ cgo_files = get_appended_values(unit, '_CGO_SRCS_VALUE')
+
+ cgo_cflags = []
+ if len(c_files) + len(cxx_files) + len(s_files) + len(cgo_files) > 0:
+ if is_test_module:
+ go_test_for_dir = unit.get('GO_TEST_FOR_DIR')
+ if go_test_for_dir and go_test_for_dir.startswith('$S/'):
+ unit.onaddincl(['FOR', 'c', go_test_for_dir[3:]])
+ unit.onaddincl(['FOR', 'c', unit.get('MODDIR')])
+ cgo_cflags = get_appended_values(unit, 'CGO_CFLAGS_VALUE')
+
+ for f in itertools.chain(c_files, cxx_files, s_files):
+ unit.onsrc([f] + cgo_cflags)
+
+ if len(cgo_files) > 0:
+ if not unit.enabled('CGO_ENABLED'):
+ ymake.report_configure_error('trying to build with CGO (CGO_SRCS is non-empty) when CGO is disabled')
+ import_path = get_import_path(unit)
+ if import_path != runtime_cgo_path:
+ go_std_root = unit.get('GOSTD')
+ unit.onpeerdir(os.path.join(go_std_root, runtime_cgo_path))
+ race_mode = 'race' if unit.enabled('RACE') else 'norace'
+ import_runtime_cgo = 'false' if import_path in import_runtime_cgo_false[race_mode] else 'true'
+ import_syscall = 'false' if import_path in import_syscall_false[race_mode] else 'true'
+ args = [import_path] + cgo_files + ['FLAGS', '-import_runtime_cgo=' + import_runtime_cgo, '-import_syscall=' + import_syscall]
+ unit.on_go_compile_cgo1(args)
+ cgo2_cflags = get_appended_values(unit, 'CGO2_CFLAGS_VALUE')
+ for f in cgo_files:
+ if f.endswith('.go'):
+ unit.onsrc([f[:-2] + 'cgo2.c'] + cgo_cflags + cgo2_cflags)
+ else:
+ ymake.report_configure_error('file {} should not be listed in CGO_SRCS() macros'.format(f))
+ args = [go_package_name(unit)] + cgo_files
+ if len(c_files) > 0:
+ args += ['C_FILES'] + c_files
+ if len(s_files) > 0:
+ args += ['S_FILES'] + s_files
+ if len(syso_files) > 0:
+ args += ['OBJ_FILES'] + syso_files
+ unit.on_go_compile_cgo2(args)
+
+
+def on_go_resource(unit, *args):
+ args = list(args)
+ files = args[::2]
+ keys = args[1::2]
+ suffix_md5 = md5.new('@'.join(args)).hexdigest()
+ resource_go = os.path.join("resource.{}.res.go".format(suffix_md5))
+
+ unit.onpeerdir(["library/go/core/resource"])
+
+ if len(files) != len(keys):
+ ymake.report_configure_error("last file {} is missing resource key".format(files[-1]))
+
+ for i, (key, filename) in enumerate(zip(keys, files)):
+ if not key:
+ ymake.report_configure_error("file key must be non empty")
+ return
+
+ if filename == "-" and "=" not in key:
+ ymake.report_configure_error("key \"{}\" must contain = sign".format(key))
+ return
+
+ # quote key, to avoid automatic substitution of filename by absolute
+ # path in RUN_PROGRAM
+ args[2*i+1] = "notafile" + args[2*i+1]
+
+ files = [file for file in files if file != "-"]
+ unit.onrun_program([
+ "library/go/core/resource/cc",
+ "-package", go_package_name(unit),
+ "-o", resource_go] + list(args) + [
+ "IN"] + files + [
+ "OUT", resource_go])
diff --git a/build/plugins/ios_app_settings.py b/build/plugins/ios_app_settings.py
new file mode 100644
index 0000000000..60ec0b4b52
--- /dev/null
+++ b/build/plugins/ios_app_settings.py
@@ -0,0 +1,19 @@
+import _common as common
+import ymake
+import os
+
+def onios_app_settings(unit, *args):
+ tail, kv = common.sort_by_keywords(
+ {'OS_VERSION': 1, 'DEVICES': -1},
+ args
+ )
+ if tail:
+ ymake.report_configure_error('Bad IOS_COMMON_SETTINGS usage - unknown data: ' + str(tail))
+ if kv.get('OS_VERSION', []):
+ unit.onios_app_common_flags(['--minimum-deployment-target', kv.get('OS_VERSION', [])[0]])
+ unit.onios_app_assets_flags(['--filter-for-device-os-version', kv.get('OS_VERSION', [])[0]])
+ devices_flags = []
+ for device in kv.get('DEVICES', []):
+ devices_flags += ['--target-device', device]
+ if devices_flags:
+ unit.onios_app_common_flags(devices_flags)
diff --git a/build/plugins/ios_assets.py b/build/plugins/ios_assets.py
new file mode 100644
index 0000000000..5f0ccb9467
--- /dev/null
+++ b/build/plugins/ios_assets.py
@@ -0,0 +1,30 @@
+import _common as common
+import ymake
+import os
+
+
+def onios_assets(unit, *args):
+ _, kv = common.sort_by_keywords(
+ {'ROOT': 1, 'CONTENTS': -1, 'FLAGS': -1},
+ args
+ )
+ if not kv.get('ROOT', []) and kv.get('CONTENTS', []):
+ ymake.report_configure_error('Please specify ROOT directory for assets')
+ origin_root = kv.get('ROOT')[0]
+ destination_root = os.path.normpath(os.path.join('$BINDIR', os.path.basename(origin_root)))
+ rel_list = []
+ for cont in kv.get('CONTENTS', []):
+ rel = os.path.relpath(cont, origin_root)
+ if rel.startswith('..'):
+ ymake.report_configure_error('{} is not subpath of {}'.format(cont, origin_root))
+ rel_list.append(rel)
+ if not rel_list:
+ return
+ results_list = [os.path.join('$B', unit.path()[3:], os.path.basename(origin_root), i) for i in rel_list]
+ if len(kv.get('CONTENTS', [])) != len(results_list):
+ ymake.report_configure_error('IOS_ASSETTS content length is not equals results')
+ for s, d in zip(kv.get('CONTENTS', []), results_list):
+ unit.oncopy_file([s, d])
+ if kv.get('FLAGS', []):
+ unit.onios_app_assets_flags(kv.get('FLAGS', []))
+ unit.on_ios_assets([destination_root] + results_list)
diff --git a/build/plugins/java.py b/build/plugins/java.py
new file mode 100644
index 0000000000..16fc126734
--- /dev/null
+++ b/build/plugins/java.py
@@ -0,0 +1,374 @@
+import _common as common
+import ymake
+import json
+import os
+import base64
+
+
+DELIM = '================================'
+
+
+def split_args(s): # TODO quotes, escapes
+ return filter(None, s.split())
+
+
+def extract_macro_calls(unit, macro_value_name, macro_calls_delim):
+ if not unit.get(macro_value_name):
+ return []
+
+ return filter(None, map(split_args, unit.get(macro_value_name).replace('$' + macro_value_name, '').split(macro_calls_delim)))
+
+
+def extract_macro_calls2(unit, macro_value_name):
+ if not unit.get(macro_value_name):
+ return []
+
+ calls = []
+ for call_encoded_args in unit.get(macro_value_name).strip().split():
+ call_args = json.loads(base64.b64decode(call_encoded_args), encoding='utf-8')
+ calls.append(call_args)
+
+ return calls
+
+
+def on_run_jbuild_program(unit, *args):
+ args = list(args)
+ """
+ Custom code generation
+ @link: https://wiki.yandex-team.ru/yatool/java/#kodogeneracijarunjavaprogram
+ """
+
+ flat, kv = common.sort_by_keywords({'IN': -1, 'IN_DIR': -1, 'OUT': -1, 'OUT_DIR': -1, 'CWD': 1, 'CLASSPATH': -1, 'CP_USE_COMMAND_FILE': 1, 'ADD_SRCS_TO_CLASSPATH': 0}, args)
+ depends = kv.get('CLASSPATH', []) + kv.get('JAR', [])
+ fake_out = None
+ if depends:
+ # XXX: hack to force ymake to build dependencies
+ fake_out = "fake.out.{}".format(hash(tuple(args)))
+ unit.on_run_java(['TOOL'] + depends + ["OUT", fake_out])
+
+ if not kv.get('CP_USE_COMMAND_FILE'):
+ args += ['CP_USE_COMMAND_FILE', unit.get(['JAVA_PROGRAM_CP_USE_COMMAND_FILE']) or 'yes']
+
+ if fake_out is not None:
+ args += ['FAKE_OUT', fake_out]
+
+ prev = unit.get(['RUN_JAVA_PROGRAM_VALUE']) or ''
+ new_val = (prev + ' ' + base64.b64encode(json.dumps(list(args), encoding='utf-8'))).strip()
+ unit.set(['RUN_JAVA_PROGRAM_VALUE', new_val])
+
+
+def ongenerate_script(unit, *args):
+ """
+ heretic@ promised to make tutorial here
+ Don't forget
+ Feel free to remind
+ """
+ flat, kv = common.sort_by_keywords(
+ {'OUT': -1, 'TEMPLATE': -1, 'CUSTOM_PROPERTY': -1},
+ args
+ )
+ if len(kv.get('TEMPLATE', [])) > len(kv.get('OUT', [])):
+ ymake.report_configure_error('To many arguments for TEMPLATE parameter')
+ prev = unit.get(['GENERATE_SCRIPT_VALUE']) or ''
+ new_val = (prev + ' ' + base64.b64encode(json.dumps(list(args), encoding='utf-8'))).strip()
+ unit.set(['GENERATE_SCRIPT_VALUE', new_val])
+
+
+def onjava_module(unit, *args):
+ args_delim = unit.get('ARGS_DELIM')
+ idea_only = True if 'IDEA_ONLY' in args else False
+
+ if idea_only:
+ if unit.get('YA_IDE_IDEA') != 'yes':
+ return
+ if unit.get('YMAKE_JAVA_MODULES') != 'yes':
+ return
+
+ data = {
+ 'BUNDLE_NAME': unit.name(),
+ 'PATH': unit.path(),
+ 'IDEA_ONLY': 'yes' if idea_only else 'no',
+ 'MODULE_TYPE': unit.get('MODULE_TYPE'),
+ 'MODULE_ARGS': unit.get('MODULE_ARGS'),
+ 'MANAGED_PEERS': '${MANAGED_PEERS}',
+ 'MANAGED_PEERS_CLOSURE': '${MANAGED_PEERS_CLOSURE}',
+ 'NON_NAMAGEABLE_PEERS': '${NON_NAMAGEABLE_PEERS}',
+ 'TEST_CLASSPATH_MANAGED': '${TEST_CLASSPATH_MANAGED}',
+ 'EXCLUDE': extract_macro_calls(unit, 'EXCLUDE_VALUE', args_delim),
+ 'JAVA_SRCS': extract_macro_calls(unit, 'JAVA_SRCS_VALUE', args_delim),
+ 'JAVAC_FLAGS': extract_macro_calls(unit, 'JAVAC_FLAGS_VALUE', args_delim),
+ 'ANNOTATION_PROCESSOR': extract_macro_calls(unit, 'ANNOTATION_PROCESSOR_VALUE', args_delim),
+ 'EXTERNAL_JAR': extract_macro_calls(unit, 'EXTERNAL_JAR_VALUE', args_delim),
+ 'RUN_JAVA_PROGRAM': extract_macro_calls2(unit, 'RUN_JAVA_PROGRAM_VALUE'),
+ 'RUN_JAVA_PROGRAM_MANAGED': '${RUN_JAVA_PROGRAM_MANAGED}',
+ 'MAVEN_GROUP_ID': extract_macro_calls(unit, 'MAVEN_GROUP_ID_VALUE', args_delim),
+ 'JAR_INCLUDE_FILTER': extract_macro_calls(unit, 'JAR_INCLUDE_FILTER_VALUE', args_delim),
+ 'JAR_EXCLUDE_FILTER': extract_macro_calls(unit, 'JAR_EXCLUDE_FILTER_VALUE', args_delim),
+
+ # TODO remove when java test dart is in prod
+ 'UNITTEST_DIR': unit.get('UNITTEST_DIR'),
+ 'SYSTEM_PROPERTIES': extract_macro_calls(unit, 'SYSTEM_PROPERTIES_VALUE', args_delim),
+ 'JVM_ARGS': extract_macro_calls(unit, 'JVM_ARGS_VALUE', args_delim),
+ 'TEST_CWD': extract_macro_calls(unit, 'TEST_CWD_VALUE', args_delim),
+ 'TEST_DATA': extract_macro_calls(unit, '__test_data', args_delim),
+ 'TEST_FORK_MODE': extract_macro_calls(unit, 'TEST_FORK_MODE', args_delim),
+ 'SPLIT_FACTOR': extract_macro_calls(unit, 'TEST_SPLIT_FACTOR', args_delim),
+ 'TIMEOUT': extract_macro_calls(unit, 'TEST_TIMEOUT', args_delim),
+ 'TAG': extract_macro_calls(unit, 'TEST_TAGS_VALUE', args_delim),
+ 'SIZE': extract_macro_calls(unit, 'TEST_SIZE_NAME', args_delim),
+ 'DEPENDS': extract_macro_calls(unit, 'TEST_DEPENDS_VALUE', args_delim),
+ 'IDEA_EXCLUDE': extract_macro_calls(unit, 'IDEA_EXCLUDE_DIRS_VALUE', args_delim),
+ 'IDEA_RESOURCE': extract_macro_calls(unit, 'IDEA_RESOURCE_DIRS_VALUE', args_delim),
+ 'IDEA_MODULE_NAME': extract_macro_calls(unit, 'IDEA_MODULE_NAME_VALUE', args_delim),
+ 'GENERATE_SCRIPT': extract_macro_calls2(unit, 'GENERATE_SCRIPT_VALUE'),
+ 'FAKEID': extract_macro_calls(unit, 'FAKEID', args_delim),
+ 'TEST_DATA': extract_macro_calls(unit, 'TEST_DATA_VALUE', args_delim),
+ 'JAVA_FORBIDDEN_LIBRARIES': extract_macro_calls(unit, 'JAVA_FORBIDDEN_LIBRARIES_VALUE', args_delim),
+ 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT')
+ }
+ if unit.get('ENABLE_PREVIEW_VALUE') == 'yes' and unit.get('JDK_VERSION') in ('15', '16', '17'):
+ data['ENABLE_PREVIEW'] = extract_macro_calls(unit, 'ENABLE_PREVIEW_VALUE', args_delim)
+
+ if unit.get('SAVE_JAVAC_GENERATED_SRCS_DIR') and unit.get('SAVE_JAVAC_GENERATED_SRCS_TAR'):
+ data['SAVE_JAVAC_GENERATED_SRCS_DIR'] = extract_macro_calls(unit, 'SAVE_JAVAC_GENERATED_SRCS_DIR', args_delim)
+ data['SAVE_JAVAC_GENERATED_SRCS_TAR'] = extract_macro_calls(unit, 'SAVE_JAVAC_GENERATED_SRCS_TAR', args_delim)
+
+ if unit.get('JAVA_ADD_DLLS_VALUE') == 'yes':
+ data['ADD_DLLS_FROM_DEPENDS'] = extract_macro_calls(unit, 'JAVA_ADD_DLLS_VALUE', args_delim)
+
+ if unit.get('ERROR_PRONE_VALUE') == 'yes':
+ data['ERROR_PRONE'] = extract_macro_calls(unit, 'ERROR_PRONE_VALUE', args_delim)
+
+ if unit.get('WITH_KOTLIN_VALUE') == 'yes':
+ data['WITH_KOTLIN'] = extract_macro_calls(unit, 'WITH_KOTLIN_VALUE', args_delim)
+ if unit.get('KOTLIN_JVM_TARGET'):
+ data['KOTLIN_JVM_TARGET'] = extract_macro_calls(unit, 'KOTLIN_JVM_TARGET', args_delim)
+ if unit.get('KOTLINC_FLAGS_VALUE'):
+ data['KOTLINC_FLAGS'] = extract_macro_calls(unit, 'KOTLINC_FLAGS_VALUE', args_delim)
+ if unit.get('KOTLINC_OPTS_VALUE'):
+ data['KOTLINC_OPTS'] = extract_macro_calls(unit, 'KOTLINC_OPTS_VALUE', args_delim)
+
+ if unit.get('DIRECT_DEPS_ONLY_VALUE') == 'yes':
+ data['DIRECT_DEPS_ONLY'] = extract_macro_calls(unit, 'DIRECT_DEPS_ONLY_VALUE', args_delim)
+
+ if unit.get('JAVA_EXTERNAL_DEPENDENCIES_VALUE'):
+ valid = []
+ for dep in sum(extract_macro_calls(unit, 'JAVA_EXTERNAL_DEPENDENCIES_VALUE', args_delim), []):
+ if os.path.normpath(dep).startswith('..'):
+ ymake.report_configure_error('{}: {} - relative paths in JAVA_EXTERNAL_DEPENDENCIES is not allowed'.format(unit.path(), dep))
+ elif os.path.isabs(dep):
+ ymake.report_configure_error('{}: {} absolute paths in JAVA_EXTERNAL_DEPENDENCIES is not allowed'.format(unit.path(), dep))
+ else:
+ valid.append(dep)
+ if valid:
+ data['EXTERNAL_DEPENDENCIES'] = [valid]
+
+ if unit.get('MAKE_UBERJAR_VALUE') == 'yes':
+ if unit.get('MODULE_TYPE') != 'JAVA_PROGRAM':
+ ymake.report_configure_error('{}: UBERJAR supported only for JAVA_PROGRAM module type'.format(unit.path()))
+ data['UBERJAR'] = extract_macro_calls(unit, 'MAKE_UBERJAR_VALUE', args_delim)
+ data['UBERJAR_PREFIX'] = extract_macro_calls(unit, 'UBERJAR_PREFIX_VALUE', args_delim)
+ data['UBERJAR_HIDE_EXCLUDE'] = extract_macro_calls(unit, 'UBERJAR_HIDE_EXCLUDE_VALUE', args_delim)
+ data['UBERJAR_PATH_EXCLUDE'] = extract_macro_calls(unit, 'UBERJAR_PATH_EXCLUDE_VALUE', args_delim)
+ data['UBERJAR_MANIFEST_TRANSFORMER_MAIN'] = extract_macro_calls(unit, 'UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE', args_delim)
+ data['UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE'] = extract_macro_calls(unit, 'UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE', args_delim)
+ data['UBERJAR_APPENDING_TRANSFORMER'] = extract_macro_calls(unit, 'UBERJAR_APPENDING_TRANSFORMER_VALUE', args_delim)
+ data['UBERJAR_SERVICES_RESOURCE_TRANSFORMER'] = extract_macro_calls(unit, 'UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE', args_delim)
+
+ if unit.get('WITH_JDK_VALUE') == 'yes':
+ if unit.get('MODULE_TYPE') != 'JAVA_PROGRAM':
+ ymake.report_configure_error('{}: JDK export supported only for JAVA_PROGRAM module type'.format(unit.path()))
+ data['WITH_JDK'] = extract_macro_calls(unit, 'WITH_JDK_VALUE', args_delim)
+
+ if not data['EXTERNAL_JAR']:
+ has_processor = extract_macro_calls(unit, 'GENERATE_VCS_JAVA_INFO_NODEP', args_delim)
+ data['EMBED_VCS'] = [[str(has_processor and has_processor[0] and has_processor[0][0])]]
+ # FORCE_VCS_INFO_UPDATE is responsible for setting special value of VCS_INFO_DISABLE_CACHE__NO_UID__
+ macro_val = extract_macro_calls(unit, 'FORCE_VCS_INFO_UPDATE', args_delim)
+ macro_str = macro_val[0][0] if macro_val and macro_val[0] and macro_val[0][0] else ''
+ if macro_str and macro_str == 'yes':
+ data['VCS_INFO_DISABLE_CACHE__NO_UID__'] = macro_val
+
+ for java_srcs_args in data['JAVA_SRCS']:
+ external = None
+
+ for i in xrange(len(java_srcs_args)):
+ arg = java_srcs_args[i]
+
+ if arg == 'EXTERNAL':
+ if not i + 1 < len(java_srcs_args):
+ continue # TODO configure error
+
+ ex = java_srcs_args[i + 1]
+
+ if ex in ('EXTERNAL', 'SRCDIR', 'PACKAGE_PREFIX', 'EXCLUDE'):
+ continue # TODO configure error
+
+ if external is not None:
+ continue # TODO configure error
+
+ external = ex
+
+ if external:
+ unit.onpeerdir(external)
+
+ for k, v in data.items():
+ if not v:
+ data.pop(k)
+
+ dart = 'JAVA_DART: ' + base64.b64encode(json.dumps(data)) + '\n' + DELIM + '\n'
+
+ unit.set_property(['JAVA_DART_DATA', dart])
+ if not idea_only and unit.get('MODULE_TYPE') in ('JAVA_PROGRAM', 'JAVA_LIBRARY', 'JTEST', 'TESTNG', 'JUNIT5') and not unit.path().startswith('$S/contrib/java'):
+ unit.on_add_classpath_clash_check()
+ if unit.get('LINT_LEVEL_VALUE') != "none":
+ unit.onadd_check(['JAVA_STYLE', unit.get('LINT_LEVEL_VALUE')])
+
+
+def on_add_java_style_checks(unit, *args):
+ if unit.get('LINT_LEVEL_VALUE') != "none":
+ unit.onadd_check(['JAVA_STYLE', unit.get('LINT_LEVEL_VALUE')] + list(args))
+
+
+def on_add_classpath_clash_check(unit, *args):
+ jdeps_val = (unit.get('CHECK_JAVA_DEPS_VALUE') or '').lower()
+ if jdeps_val and jdeps_val not in ('yes', 'no', 'strict'):
+ ymake.report_configure_error('CHECK_JAVA_DEPS: "yes", "no" or "strict" required')
+ if jdeps_val and jdeps_val != 'no':
+ unit.onjava_test_deps(jdeps_val)
+
+
+# Ymake java modules related macroses
+
+
+def onexternal_jar(unit, *args):
+ args = list(args)
+ flat, kv = common.sort_by_keywords({'SOURCES': 1}, args)
+ if not flat:
+ ymake.report_configure_error('EXTERNAL_JAR requires exactly one resource URL of compiled jar library')
+ res = flat[0]
+ resid = res[4:] if res.startswith('sbr:') else res
+ unit.set(['JAR_LIB_RESOURCE', resid])
+ unit.set(['JAR_LIB_RESOURCE_URL', res])
+
+
+def on_check_java_srcdir(unit, *args):
+ args = list(args)
+ for arg in args:
+ if not '$' in arg:
+ arc_srcdir = os.path.join(unit.get('MODDIR'), arg)
+ abs_srcdir = unit.resolve(os.path.join("$S/", arc_srcdir))
+ if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir):
+ ymake.report_configure_error(
+ 'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]$S/{}[[rst]]',
+ missing_dir=arc_srcdir
+ )
+ return
+ srcdir = unit.resolve_arc_path(arg)
+ if srcdir and not srcdir.startswith('$S'):
+ continue
+ abs_srcdir = unit.resolve(srcdir) if srcdir else unit.resolve(arg)
+ if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir):
+ ymake.report_configure_error(
+ 'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]{}[[rst]]',
+ missing_dir=srcdir
+ )
+
+
+def on_fill_jar_copy_resources_cmd(unit, *args):
+ if len(args) == 4:
+ varname, srcdir, base_classes_dir, reslist = tuple(args)
+ package = ''
+ else:
+ varname, srcdir, base_classes_dir, package, reslist = tuple(args)
+ dest_dir = os.path.join(base_classes_dir, *package.split('.')) if package else base_classes_dir
+ var = unit.get(varname)
+ var += ' && $FS_TOOLS copy_files {} {} {}'.format(srcdir if srcdir.startswith('"$') else '${CURDIR}/' + srcdir, dest_dir, reslist)
+ unit.set([varname, var])
+
+def on_fill_jar_gen_srcs(unit, *args):
+ varname, jar_type, srcdir, base_classes_dir, java_list, kt_list, groovy_list, res_list = tuple(args[0:8])
+ resolved_srcdir = unit.resolve_arc_path(srcdir)
+ if not resolved_srcdir.startswith('$') or resolved_srcdir.startswith('$S'):
+ return
+
+ exclude_pos = args.index('EXCLUDE')
+ globs = args[7:exclude_pos]
+ excludes = args[exclude_pos + 1:]
+ var = unit.get(varname)
+ var += ' && ${{cwd:BINDIR}} $YMAKE_PYTHON ${{input:"build/scripts/resolve_java_srcs.py"}} --append -d {} -s {} -k {} -g {} -r {} --include-patterns {}'.format(srcdir, java_list, kt_list, groovy_list, res_list, ' '.join(globs))
+ if jar_type == 'SRC_JAR':
+ var += ' --all-resources'
+ if len(excludes) > 0:
+ var += ' --exclude-patterns {}'.format(' '.join(excludes))
+ if unit.get('WITH_KOTLIN_VALUE') == 'yes':
+ var += ' --resolve-kotlin'
+ unit.set([varname, var])
+
+
+def on_check_run_java_prog_classpath(unit, *args):
+ if len(args) != 1:
+ ymake.report_configure_error('multiple CLASSPATH elements in RUN_JAVA_PROGRAM invocation no more supported. Use JAVA_RUNTIME_PEERDIR on the JAVA_PROGRAM module instead')
+
+
+def extract_words(words, keys):
+ kv = {}
+ k = None
+
+ for w in words:
+ if w in keys:
+ k = w
+ else:
+ if not k in kv:
+ kv[k] = []
+ kv[k].append(w)
+
+ return kv
+
+
+def parse_words(words):
+ kv = extract_words(words, {'OUT', 'TEMPLATE'})
+ ws = []
+ for item in ('OUT', 'TEMPLATE'):
+ for i, word in list(enumerate(kv[item])):
+ if word == 'CUSTOM_PROPERTY':
+ ws += kv[item][i:]
+ kv[item] = kv[item][:i]
+ tepmlates = kv['TEMPLATE']
+ outputs = kv['OUT']
+ if len(outputs) < len(tepmlates):
+ ymake.report_configure_error('To many arguments for TEMPLATE parameter')
+ return
+ if ws and ws[0] != 'CUSTOM_PROPERTY':
+ ymake.report_configure_error('''Can't parse {}'''.format(ws))
+ custom_props = []
+ for item in ws:
+ if item == 'CUSTOM_PROPERTY':
+ custom_props.append([])
+ else:
+ custom_props[-1].append(item)
+ props = []
+ for p in custom_props:
+ if not p:
+ ymake.report_configure_error('Empty CUSTOM_PROPERTY')
+ continue
+ props.append('-B')
+ if len(p) > 1:
+ props.append(base64.b64encode("{}={}".format(p[0], ' '.join(p[1:]))))
+ else:
+ ymake.report_configure_error('CUSTOM_PROPERTY "{}" value is not specified'.format(p[0]))
+ for i, o in enumerate(outputs):
+ yield o, tepmlates[min(i, len(tepmlates) - 1)], props
+
+
+def on_ymake_generate_script(unit, *args):
+ for out, tmpl, props in parse_words(list(args)):
+ unit.on_add_gen_java_script([out, tmpl] + list(props))
+
+def on_jdk_version_macro_check(unit, *args):
+ if len(args) != 1:
+ unit.message(["error", "Invalid syntax. Single argument required."])
+ jdk_version = args[0]
+ availible_versions = ('10', '11', '12', '13', '14', '15', '16', '17',)
+ if jdk_version not in availible_versions:
+ unit.message(["error", "Invalid jdk version: {}. {} are availible".format(jdk_version, availible_versions)])
diff --git a/build/plugins/large_files.py b/build/plugins/large_files.py
new file mode 100644
index 0000000000..33a78d7110
--- /dev/null
+++ b/build/plugins/large_files.py
@@ -0,0 +1,39 @@
+import os
+import ymake
+from _common import strip_roots
+
+PLACEHOLDER_EXT = "external"
+
+
+def onlarge_files(unit, *args):
+ """
+ @usage LARGE_FILES([AUTOUPDATED] Files...)
+
+ Use large file ether from working copy or from remote storage via placeholder <File>.external
+ If <File> is present locally (and not a symlink!) it will be copied to build directory.
+ Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
+ """
+ args = list(args)
+
+ if args and args[0] == 'AUTOUPDATED':
+ args = args[1:]
+
+ for arg in args:
+ if arg == 'AUTOUPDATED':
+ unit.message(["warn", "Please set AUTOUPDATED argument before other file names"])
+ continue
+
+ src = unit.resolve_arc_path(arg)
+ if src.startswith("$S"):
+ msg = "Used local large file {}. Don't forget to run 'ya upload --update-external' and commit {}.{}".format(src, src, PLACEHOLDER_EXT)
+ unit.message(["warn", msg])
+ unit.oncopy_file([arg, arg])
+ else:
+ out_file = strip_roots(os.path.join(unit.path(), arg))
+ external = "{}.{}".format(arg, PLACEHOLDER_EXT)
+ from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg]
+ if os.path.dirname(arg):
+ from_external_cmd.extend(("RENAME", os.path.basename(arg)))
+ unit.on_from_external(from_external_cmd)
+ unit.onadd_check(['check.external', external])
+
diff --git a/build/plugins/lib/__init__.py b/build/plugins/lib/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build/plugins/lib/__init__.py
diff --git a/build/plugins/lib/_metric_resolvers.py b/build/plugins/lib/_metric_resolvers.py
new file mode 100644
index 0000000000..270eb78345
--- /dev/null
+++ b/build/plugins/lib/_metric_resolvers.py
@@ -0,0 +1,11 @@
+import re
+
+VALUE_PATTERN = re.compile(r"^\s*(?P<value>\d+)\s*$")
+
+
+def resolve_value(val):
+ match = VALUE_PATTERN.match(val)
+ if not match:
+ return None
+ val = match.group('value')
+ return int(val)
diff --git a/build/plugins/lib/nots/__init__.py b/build/plugins/lib/nots/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build/plugins/lib/nots/__init__.py
diff --git a/build/plugins/lib/nots/package_manager/__init__.py b/build/plugins/lib/nots/package_manager/__init__.py
new file mode 100644
index 0000000000..52bf62644c
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/__init__.py
@@ -0,0 +1,9 @@
+from .pnpm import PnpmPackageManager
+from .base import constants
+
+
+manager = PnpmPackageManager
+
+__all__ = [
+ "constants",
+]
diff --git a/build/plugins/lib/nots/package_manager/base/__init__.py b/build/plugins/lib/nots/package_manager/base/__init__.py
new file mode 100644
index 0000000000..1b55fe3f56
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/__init__.py
@@ -0,0 +1,11 @@
+from . import constants
+from .lockfile import BaseLockfile, LockfilePackageMeta, LockfilePackageMetaInvalidError
+from .package_json import PackageJson
+from .package_manager import BasePackageManager, PackageManagerError, PackageManagerCommandError
+
+__all__ = [
+ "constants",
+ "BaseLockfile", "LockfilePackageMeta", "LockfilePackageMetaInvalidError",
+ "BasePackageManager", "PackageManagerError", "PackageManagerCommandError",
+ "PackageJson",
+]
diff --git a/build/plugins/lib/nots/package_manager/base/constants.py b/build/plugins/lib/nots/package_manager/base/constants.py
new file mode 100644
index 0000000000..0b9fcb76af
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/constants.py
@@ -0,0 +1,5 @@
+PACKAGE_JSON_FILENAME = "package.json"
+NODE_MODULES_BUNDLE_FILENAME = "node_modules.tar"
+NPM_REGISTRY_URL = "http://npm.yandex-team.ru"
+PNPM_WS_FILENAME = "pnpm-workspace.yaml"
+PNPM_LOCKFILE_FILENAME = "pnpm-lock.yaml"
diff --git a/build/plugins/lib/nots/package_manager/base/lockfile.py b/build/plugins/lib/nots/package_manager/base/lockfile.py
new file mode 100644
index 0000000000..9b9c0be954
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/lockfile.py
@@ -0,0 +1,68 @@
+import os
+
+from abc import ABCMeta, abstractmethod
+from six import add_metaclass
+
+
+class LockfilePackageMeta(object):
+ """
+ Basic struct representing package meta from lockfile.
+ """
+ __slots__ = ("name", "version", "sky_id", "integrity", "integrity_algorithm", "tarball_path")
+
+ @staticmethod
+ def from_str(s):
+ return LockfilePackageMeta(*s.strip().split(" "))
+
+ def __init__(self, name, version, sky_id, integrity, integrity_algorithm):
+ self.name = name
+ self.version = version
+ self.sky_id = sky_id
+ self.integrity = integrity
+ self.integrity_algorithm = integrity_algorithm
+ self.tarball_path = "{}-{}.tgz".format(name, version)
+
+ def to_str(self):
+ return " ".join([self.name, self.version, self.sky_id, self.integrity, self.integrity_algorithm])
+
+
+class LockfilePackageMetaInvalidError(RuntimeError):
+ pass
+
+
+@add_metaclass(ABCMeta)
+class BaseLockfile(object):
+ @classmethod
+ def load(cls, path):
+ """
+ :param path: lockfile path
+ :type path: str
+ :rtype: BaseLockfile
+ """
+ pj = cls(path)
+ pj.read()
+
+ return pj
+
+ def __init__(self, path):
+ if not os.path.isabs(path):
+ raise TypeError("Absolute path required, given: {}".format(path))
+
+ self.path = path
+ self.data = None
+
+ @abstractmethod
+ def read(self):
+ pass
+
+ @abstractmethod
+ def write(self, path=None):
+ pass
+
+ @abstractmethod
+ def get_packages_meta(self):
+ pass
+
+ @abstractmethod
+ def update_tarball_resolutions(self, fn):
+ pass
diff --git a/build/plugins/lib/nots/package_manager/base/package_json.py b/build/plugins/lib/nots/package_manager/base/package_json.py
new file mode 100644
index 0000000000..3d0bf3238e
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/package_json.py
@@ -0,0 +1,113 @@
+import os
+import json
+
+from six import iteritems
+
+from . import constants
+
+
+class PackageJsonWorkspaceError(RuntimeError):
+ pass
+
+
+class PackageJson(object):
+ DEP_KEY = "dependencies"
+ DEV_DEP_KEY = "devDependencies"
+ PEER_DEP_KEY = "peerDependencies"
+ OPT_DEP_KEY = "optionalDependencies"
+ DEP_KEYS = (DEP_KEY, DEV_DEP_KEY, PEER_DEP_KEY, OPT_DEP_KEY)
+
+ WORKSPACE_SCHEMA = "workspace:"
+
+ @classmethod
+ def load(cls, path):
+ """
+ :param path: package.json path
+ :type path: str
+ :rtype: PackageJson
+ """
+ pj = cls(path)
+ pj.read()
+
+ return pj
+
+ def __init__(self, path):
+ if not os.path.isabs(path):
+ raise TypeError("Absolute path required, given: {}".format(path))
+
+ self.path = path
+ self.data = None
+
+ def read(self):
+ with open(self.path) as f:
+ self.data = json.load(f)
+
+ def get_name(self):
+ return self.data.get("name")
+
+ def get_workspace_dep_paths(self):
+ """
+ :return: Workspace dependencies.
+ :rtype: list of (str, str)
+ """
+ dep_paths = []
+ schema = self.WORKSPACE_SCHEMA
+ schema_len = len(schema)
+
+ for deps in map(lambda x: self.data.get(x), self.DEP_KEYS):
+ if not deps:
+ continue
+
+ for name, spec in iteritems(deps):
+ if not spec.startswith(schema):
+ continue
+
+ spec_path = spec[schema_len:]
+ if not (spec_path.startswith(".") or spec_path.startswith("..")):
+ raise PackageJsonWorkspaceError(
+ "Expected relative path specifier for workspace dependency, but got '{}' for {} in {}".format(spec, name, self.path))
+
+ dep_paths.append((name, spec_path))
+
+ return dep_paths
+
+ def get_workspace_deps(self):
+ """
+ :rtype: list of PackageJson
+ """
+ ws_deps = []
+ pj_dir = os.path.dirname(self.path)
+
+ for (name, rel_path) in self.get_workspace_dep_paths():
+ dep_path = os.path.normpath(os.path.join(pj_dir, rel_path))
+ dep_pj = PackageJson.load(os.path.join(dep_path, constants.PACKAGE_JSON_FILENAME))
+
+ if name != dep_pj.get_name():
+ raise PackageJsonWorkspaceError(
+ "Workspace dependency name mismatch, found '{}' instead of '{}' in {}".format(name, dep_pj.get_name(), self.path))
+
+ ws_deps.append(dep_pj)
+
+ return ws_deps
+
+ def get_workspace_map(self):
+ """
+ :return: Absolute paths of workspace dependencies (including transitive) mapped to package.json and depth.
+ :rtype: dict of (PackageJson, int)
+ """
+ ws_deps = {}
+ # list of (pj, depth)
+ pj_queue = [(self, 0)]
+
+ while len(pj_queue):
+ (pj, depth) = pj_queue.pop()
+ pj_dir = os.path.dirname(pj.path)
+ if pj_dir in ws_deps:
+ continue
+
+ ws_deps[pj_dir] = (pj, depth)
+
+ for dep_pj in pj.get_workspace_deps():
+ pj_queue.append((dep_pj, depth + 1))
+
+ return ws_deps
diff --git a/build/plugins/lib/nots/package_manager/base/package_manager.py b/build/plugins/lib/nots/package_manager/base/package_manager.py
new file mode 100644
index 0000000000..0de9d8acc3
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/package_manager.py
@@ -0,0 +1,108 @@
+import os
+import sys
+import subprocess
+import tarfile
+
+from abc import ABCMeta, abstractmethod
+from six import add_metaclass
+
+from . import constants
+
+
+class PackageManagerError(RuntimeError):
+ pass
+
+
+class PackageManagerCommandError(PackageManagerError):
+ def __init__(self, cmd, code, stdout, stderr):
+ self.cmd = cmd
+ self.code = code
+ self.stdout = stdout
+ self.stderr = stderr
+
+ msg = "package manager exited with code {} while running {}:\n{}\n{}".format(code, cmd, stdout, stderr)
+ super(PackageManagerCommandError, self).__init__(msg)
+
+
+@add_metaclass(ABCMeta)
+class BasePackageManager(object):
+ def __init__(self, build_root, build_path, sources_path, nodejs_bin_path, script_path, contribs_path):
+ self.module_path = build_path[len(build_root) + 1:]
+ self.build_path = build_path
+ self.sources_path = sources_path
+ self.build_root = build_root
+ self.sources_root = sources_path[:-len(self.module_path) - 1]
+ self.nodejs_bin_path = nodejs_bin_path
+ self.script_path = script_path
+ self.contribs_path = contribs_path
+
+ @abstractmethod
+ def install(self):
+ pass
+
+ @abstractmethod
+ def get_peer_paths_from_package_json(self):
+ pass
+
+ @abstractmethod
+ def calc_node_modules_inouts(self):
+ pass
+
+ @abstractmethod
+ def extract_packages_meta_from_lockfiles(self, lf_paths):
+ pass
+
+ def create_node_modules_bundle(self, path):
+ """
+ Creates tarball from the node_modules directory contents.
+ :param path: tarball path
+ :type path: str
+ """
+ with tarfile.open(path, "w") as tf:
+ tf.add(self._nm_path(), arcname=".")
+
+ def _exec_command(self, args, include_defaults=True):
+ if not self.nodejs_bin_path:
+ raise PackageManagerError("Unable to execute command: nodejs_bin_path is not configured")
+
+ cmd = [self.nodejs_bin_path, self.script_path] + args + (self._get_default_options() if include_defaults else [])
+ p = subprocess.Popen(
+ cmd,
+ cwd=self.build_path,
+ stdin=None,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ )
+ stdout, stderr = p.communicate()
+
+ if p.returncode != 0:
+ self._dump_debug_log()
+
+ raise PackageManagerCommandError(cmd, p.returncode, stdout.decode("utf-8"), stderr.decode("utf-8"))
+
+ def _nm_path(self, *parts):
+ return os.path.join(self.build_path, "node_modules", *parts)
+
+ def _contrib_tarball_path(self, pkg):
+ return os.path.join(self.contribs_path, pkg.tarball_path)
+
+ def _contrib_tarball_url(self, pkg):
+ return "file:" + self._contrib_tarball_path(pkg)
+
+ def _get_default_options(self):
+ return ["--registry", constants.NPM_REGISTRY_URL]
+
+ def _get_debug_log_path(self):
+ return None
+
+ def _dump_debug_log(self):
+ log_path = self._get_debug_log_path()
+
+ if not log_path:
+ return
+
+ try:
+ with open(log_path) as f:
+ sys.stderr.write("Package manager log {}:\n{}\n".format(log_path, f.read()))
+ except:
+ sys.stderr.write("Failed to dump package manager log {}.\n".format(log_path))
diff --git a/build/plugins/lib/nots/package_manager/base/tests/package_json.py b/build/plugins/lib/nots/package_manager/base/tests/package_json.py
new file mode 100644
index 0000000000..3657e581bc
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/tests/package_json.py
@@ -0,0 +1,114 @@
+import os
+import pytest
+
+from build.plugins.lib.nots.package_manager.base.package_json import PackageJson, PackageJsonWorkspaceError
+
+
+def test_get_workspace_dep_paths_ok():
+ pj = PackageJson("/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@yandex-int/bar": "workspace:../bar",
+ },
+ "devDependencies": {
+ "@yandex-int/baz": "workspace:../baz",
+ },
+ }
+
+ ws_dep_paths = pj.get_workspace_dep_paths()
+
+ assert ws_dep_paths == [
+ ("@yandex-int/bar", "../bar"),
+ ("@yandex-int/baz", "../baz"),
+ ]
+
+
+def test_get_workspace_dep_paths_invalid_path():
+ pj = PackageJson("/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@yandex-int/bar": "workspace:*",
+ },
+ }
+
+ with pytest.raises(PackageJsonWorkspaceError) as e:
+ pj.get_workspace_dep_paths()
+
+ assert str(e.value) == "Expected relative path specifier for workspace dependency, but got 'workspace:*' for @yandex-int/bar in /packages/foo/package.json"
+
+
+def test_get_workspace_deps_ok():
+ pj = PackageJson("/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@yandex-int/bar": "workspace:../bar",
+ },
+ "devDependencies": {
+ "@yandex-int/baz": "workspace:../baz",
+ },
+ }
+
+ def load_mock(cls, path):
+ p = PackageJson(path)
+ p.data = {
+ "name": "@yandex-int/{}".format(os.path.basename(os.path.dirname(path))),
+ }
+ return p
+ PackageJson.load = classmethod(load_mock)
+
+ ws_deps = pj.get_workspace_deps()
+
+ assert len(ws_deps) == 2
+ assert ws_deps[0].path == "/packages/bar/package.json"
+ assert ws_deps[1].path == "/packages/baz/package.json"
+
+
+def test_get_workspace_deps_with_wrong_name():
+ pj = PackageJson("/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@yandex-int/bar": "workspace:../bar",
+ },
+ }
+
+ def load_mock(cls, path):
+ p = PackageJson(path)
+ p.data = {
+ "name": "@shouldbe/{}".format(os.path.basename(os.path.dirname(path))),
+ }
+ return p
+ PackageJson.load = classmethod(load_mock)
+
+ with pytest.raises(PackageJsonWorkspaceError) as e:
+ pj.get_workspace_deps()
+
+ assert str(e.value) == "Workspace dependency name mismatch, found '@yandex-int/bar' instead of '@shouldbe/bar' in /packages/foo/package.json"
+
+
+def test_get_workspace_map_ok():
+ pj = PackageJson("/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@yandex-int/bar": "workspace:../bar",
+ },
+ }
+
+ def load_mock(cls, path):
+ name = os.path.basename(os.path.dirname(path))
+ p = PackageJson(path)
+ p.data = {
+ "name": "@yandex-int/{}".format(name),
+ "dependencies": ({"@yandex-int/qux": "workspace:../qux"} if name == "bar" else {}),
+ }
+ return p
+ PackageJson.load = classmethod(load_mock)
+
+ ws_map = pj.get_workspace_map()
+
+ assert len(ws_map) == 3
+ assert ws_map["/packages/foo"][0].path == "/packages/foo/package.json"
+ assert ws_map["/packages/foo"][1] == 0
+ assert ws_map["/packages/bar"][0].path == "/packages/bar/package.json"
+ assert ws_map["/packages/bar"][1] == 1
+ assert ws_map["/packages/qux"][0].path == "/packages/qux/package.json"
+ assert ws_map["/packages/qux"][1] == 2
diff --git a/build/plugins/lib/nots/package_manager/base/tests/ya.make b/build/plugins/lib/nots/package_manager/base/tests/ya.make
new file mode 100644
index 0000000000..1968fac42e
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/tests/ya.make
@@ -0,0 +1,13 @@
+PY23_TEST()
+
+OWNER(dankolesnikov)
+
+TEST_SRCS(
+ package_json.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager/base
+)
+
+END()
diff --git a/build/plugins/lib/nots/package_manager/base/ya.make b/build/plugins/lib/nots/package_manager/base/ya.make
new file mode 100644
index 0000000000..aa73cfbe25
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/base/ya.make
@@ -0,0 +1,21 @@
+PY23_LIBRARY()
+
+OWNER(dankolesnikov)
+
+PY_SRCS(
+ __init__.py
+ constants.py
+ lockfile.py
+ package_json.py
+ package_manager.py
+)
+
+PEERDIR(
+ contrib/python/six
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/build/plugins/lib/nots/package_manager/pnpm/__init__.py b/build/plugins/lib/nots/package_manager/pnpm/__init__.py
new file mode 100644
index 0000000000..4b8f0d0e92
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/__init__.py
@@ -0,0 +1,9 @@
+from .lockfile import PnpmLockfile
+from .package_manager import PnpmPackageManager
+from .workspace import PnpmWorkspace
+
+__all__ = [
+ "PnpmLockfile",
+ "PnpmPackageManager",
+ "PnpmWorkspace",
+]
diff --git a/build/plugins/lib/nots/package_manager/pnpm/lockfile.py b/build/plugins/lib/nots/package_manager/pnpm/lockfile.py
new file mode 100644
index 0000000000..1c09f96432
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/lockfile.py
@@ -0,0 +1,163 @@
+import base64
+import binascii
+import yaml
+import os
+
+from six.moves.urllib import parse as urlparse
+from six import iteritems
+
+from ..base import PackageJson, BaseLockfile, LockfilePackageMeta, LockfilePackageMetaInvalidError
+
+
+class PnpmLockfile(BaseLockfile):
+ IMPORTER_KEYS = PackageJson.DEP_KEYS + ("specifiers",)
+
+ def read(self):
+ with open(self.path, "r") as f:
+ self.data = yaml.load(f, Loader=yaml.CSafeLoader)
+
+ def write(self, path=None):
+ """
+ :param path: path to store lockfile, defaults to original path
+ :type path: str
+ """
+ if path is None:
+ path = self.path
+
+ with open(path, "w") as f:
+ yaml.dump(self.data, f, Dumper=yaml.CSafeDumper)
+
+ def get_packages_meta(self):
+ """
+ Extracts packages meta from lockfile.
+ :rtype: list of LockfilePackageMeta
+ """
+ packages = self.data.get("packages", {})
+
+ return map(lambda x: _parse_package_meta(*x), iteritems(packages))
+
+ def update_tarball_resolutions(self, fn):
+ """
+ :param fn: maps `LockfilePackageMeta` instance to new `resolution.tarball` value
+ :type fn: lambda
+ """
+ packages = self.data.get("packages", {})
+
+ for key, meta in iteritems(packages):
+ meta["resolution"]["tarball"] = fn(_parse_package_meta(key, meta))
+ packages[key] = meta
+
+ def get_importers(self):
+ """
+ Returns "importers" section from the lockfile or creates similar structure from "dependencies" and "specifiers".
+ :rtype: dict of dict of dict of str
+ """
+ importers = self.data.get("importers")
+ if importers is not None:
+ return importers
+
+ importer = {k: self.data[k] for k in self.IMPORTER_KEYS if k in self.data}
+
+ return ({".": importer} if importer else {})
+
+ def merge(self, lf):
+ """
+ Merges two lockfiles:
+ 1. Converts the lockfile to monorepo-like lockfile with "importers" section instead of "dependencies" and "specifiers".
+ 2. Merges `lf`'s dependencies and specifiers to importers.
+ 3. Merges `lf`'s packages to the lockfile.
+ :param lf: lockfile to merge
+ :type lf: PnpmLockfile
+ """
+ importers = self.get_importers()
+ build_path = os.path.dirname(self.path)
+
+ for [importer, imports] in iteritems(lf.get_importers()):
+ importer_path = os.path.normpath(os.path.join(os.path.dirname(lf.path), importer))
+ importer_rel_path = os.path.relpath(importer_path, build_path)
+ importers[importer_rel_path] = imports
+
+ self.data["importers"] = importers
+
+ for k in self.IMPORTER_KEYS:
+ self.data.pop(k, None)
+
+ packages = self.data.get("packages", {})
+ for k, v in iteritems(lf.data.get("packages", {})):
+ if k not in packages:
+ packages[k] = v
+ self.data["packages"] = packages
+
+
+def _parse_package_meta(key, meta):
+ """
+ :param key: uniq package key from lockfile
+ :type key: string
+ :param meta: package meta dict from lockfile
+ :type meta: dict
+ :rtype: LockfilePackageMetaInvalidError
+ """
+ try:
+ name, version = _parse_package_key(key)
+ sky_id = _parse_sky_id_from_tarball_url(meta["resolution"]["tarball"])
+ integrity_algorithm, integrity = _parse_package_integrity(meta["resolution"]["integrity"])
+ except KeyError as e:
+ raise TypeError("Invalid package meta for key {}, missing {} key".format(key, e))
+ except LockfilePackageMetaInvalidError as e:
+ raise TypeError("Invalid package meta for key {}, parse error: {}".format(key, e))
+
+ return LockfilePackageMeta(name, version, sky_id, integrity, integrity_algorithm)
+
+
+def _parse_package_key(key):
+ """
+ :param key: package key in format "/({scope}/)?{package_name}/{package_version}(_{peer_dependencies})?"
+ :type key: string
+ :return: tuple of scoped package name and version
+ :rtype: (str, str)
+ """
+ try:
+ tokens = key.split("/")[1:]
+ version = tokens.pop().split("_", 1)[0]
+
+ if len(tokens) < 1 or len(tokens) > 2:
+ raise TypeError()
+ except (IndexError, TypeError):
+ raise LockfilePackageMetaInvalidError("Invalid package key")
+
+ return ("/".join(tokens), version)
+
+
+def _parse_sky_id_from_tarball_url(tarball_url):
+ """
+ :param tarball_url: tarball url
+ :type tarball_url: string
+ :return: sky id
+ :rtype: string
+ """
+ if tarball_url.startswith("file:"):
+ return ""
+
+ rbtorrent_param = urlparse.parse_qs(urlparse.urlparse(tarball_url).query).get("rbtorrent")
+
+ if rbtorrent_param is None:
+ raise LockfilePackageMetaInvalidError("Missing rbtorrent param in tarball url {}".format(tarball_url))
+
+ return "rbtorrent:{}".format(rbtorrent_param[0])
+
+
+def _parse_package_integrity(integrity):
+ """
+ :param integrity: package integrity in format "{algo}-{base64_of_hash}"
+ :type integrity: string
+ :return: tuple of algorithm and hash (hex)
+ :rtype: (str, str)
+ """
+ algo, hash_b64 = integrity.split("-", 1)
+
+ try:
+ hash_hex = binascii.hexlify(base64.b64decode(hash_b64))
+ except TypeError as e:
+ raise LockfilePackageMetaInvalidError("Invalid package integrity encoding, integrity: {}, error: {}".format(integrity, e))
+
+ return (algo, hash_hex)
diff --git a/build/plugins/lib/nots/package_manager/pnpm/package_manager.py b/build/plugins/lib/nots/package_manager/pnpm/package_manager.py
new file mode 100644
index 0000000000..1a48675834
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/package_manager.py
@@ -0,0 +1,181 @@
+import os
+import shutil
+import yaml
+
+from six import iteritems
+
+from ..base import PackageJson, BasePackageManager, PackageManagerError
+from .lockfile import PnpmLockfile
+from .workspace import PnpmWorkspace
+from .utils import build_pj_path, build_lockfile_path, build_ws_config_path, build_nm_bundle_path
+
+
+class PnpmPackageManager(BasePackageManager):
+ _STORE_NM_PATH = os.path.join(".pnpm", "store")
+ _VSTORE_NM_PATH = os.path.join(".pnpm", "virtual-store")
+ _STORE_VER = "v3"
+
+ def install(self):
+ """
+ Creates node_modules directory according to the lockfile.
+ """
+ self._prepare_workspace()
+ self._exec_command([
+ "install",
+ "--offline",
+ "--frozen-lockfile",
+ "--store-dir", self._nm_path(self._STORE_NM_PATH),
+ "--virtual-store-dir", self._nm_path(self._VSTORE_NM_PATH),
+ "--no-verify-store-integrity",
+ "--package-import-method", "hardlink",
+ "--ignore-pnpmfile",
+ "--ignore-scripts",
+ "--strict-peer-dependencies",
+ ])
+ self._fix_stores_in_modules_yaml()
+
+ def get_peer_paths_from_package_json(self):
+ """
+ Returns paths of direct workspace dependencies (source root related).
+ :rtype: list of str
+ """
+ pj = PackageJson.load(build_pj_path(self.sources_path))
+
+ return map(lambda x: os.path.normpath(os.path.join(self.module_path, x[1])), pj.get_workspace_dep_paths())
+
+ def calc_node_modules_inouts(self):
+ """
+ Returns input and output paths for command that creates `node_modules` bundle.
+ :return: Pair of input and output paths with correct roots ($S or $B).
+ :rtype: (list of str, list of str)
+ """
+ # Inputs: source package.json and lockfile, built package.jsons, lockfiles and workspace configs of deps, tarballs.
+ ins = []
+ # Source lockfiles are used only to get tarballs info.
+ src_lf_paths = [build_lockfile_path(self.sources_path)]
+ pj = PackageJson.load(build_pj_path(self.sources_path))
+
+ for [dep_src_path, (dep_pj, depth)] in iteritems(pj.get_workspace_map()):
+ if dep_src_path == self.sources_path:
+ continue
+ dep_mod_path = dep_src_path[len(self.sources_root) + 1:]
+ # pnpm requires all package.jsons.
+ ins.append(build_pj_path(dep_mod_path))
+ dep_lf_src_path = build_lockfile_path(dep_src_path)
+ if not os.path.isfile(dep_lf_src_path):
+ continue
+ src_lf_paths.append(dep_lf_src_path)
+ # Merged workspace configs and lockfiles of direct deps.
+ if depth == 1:
+ ins.append(build_ws_config_path(dep_mod_path))
+ ins.append(build_lockfile_path(dep_mod_path))
+
+ for pkg in self.extract_packages_meta_from_lockfiles(src_lf_paths):
+ ins.append(self._contrib_tarball_path(pkg))
+
+ s_root = lambda x: os.path.join("$S", x)
+ b_root = lambda x: os.path.join("$B", x)
+
+ ins = map(b_root, ins) + [
+ s_root(build_pj_path(self.module_path)),
+ s_root(build_lockfile_path(self.module_path)),
+ ]
+
+ # Outputs: patched lockfile, generated workspace config, created node_modules bundle.
+ outs = [b_root(f(self.module_path)) for f in (build_lockfile_path, build_ws_config_path, build_nm_bundle_path)]
+
+ return (ins, outs)
+
+ def extract_packages_meta_from_lockfiles(self, lf_paths):
+ """
+ :type lf_paths: iterable of BaseLockfile
+ :rtype: iterable of LockfilePackageMeta
+ """
+ tarballs = set()
+
+ for lf_path in lf_paths:
+ try:
+ for pkg in PnpmLockfile.load(lf_path).get_packages_meta():
+ if pkg.tarball_path not in tarballs:
+ tarballs.add(pkg.tarball_path)
+ yield pkg
+ except Exception as e:
+ raise PackageManagerError("Unable to process lockfile {}: {}".format(lf_path, e))
+
+ def _prepare_workspace(self):
+ pj = self._build_package_json()
+ ws = PnpmWorkspace(build_ws_config_path(self.build_path))
+ ws.set_from_package_json(pj)
+ dep_paths = ws.get_paths()
+ self._build_merged_workspace_config(ws, dep_paths)
+ self._build_merged_lockfile(dep_paths)
+
+ def _build_package_json(self):
+ """
+ :rtype: PackageJson
+ """
+ in_pj_path = build_pj_path(self.sources_path)
+ out_pj_path = build_pj_path(self.build_path)
+ shutil.copyfile(in_pj_path, out_pj_path)
+
+ return PackageJson.load(out_pj_path)
+
+ def _build_merged_lockfile(self, dep_paths):
+ """
+ :type dep_paths: list of str
+ :rtype: PnpmLockfile
+ """
+ in_lf_path = build_lockfile_path(self.sources_path)
+ out_lf_path = build_lockfile_path(self.build_path)
+
+ lf = PnpmLockfile.load(in_lf_path)
+ # Change to the output path for correct path calcs on merging.
+ lf.path = out_lf_path
+
+ for dep_path in dep_paths:
+ if dep_path is self.build_path:
+ continue
+ lf_path = build_lockfile_path(dep_path)
+ if os.path.isfile(lf_path):
+ lf.merge(PnpmLockfile.load(lf_path))
+
+ lf.update_tarball_resolutions(lambda p: self._contrib_tarball_url(p))
+ lf.write()
+
+ def _build_merged_workspace_config(self, ws, dep_paths):
+ """
+ :type ws: PnpmWorkspaceConfig
+ :type dep_paths: list of str
+ """
+ for dep_path in dep_paths:
+ if dep_path is self.build_path:
+ continue
+ ws_config_path = build_ws_config_path(dep_path)
+ if os.path.isfile(ws_config_path):
+ ws.merge(PnpmWorkspace.load(ws_config_path))
+
+ ws.write()
+
+ def _fix_stores_in_modules_yaml(self):
+ """
+ Ensures that store paths are the same as would be after installing deps in the source dir.
+ This is required to reuse `node_modules` after build.
+ """
+ with open(self._nm_path(".modules.yaml"), "r+") as f:
+ data = yaml.load(f, Loader=yaml.CSafeLoader)
+ # NOTE: pnpm requires absolute store path here.
+ data["storeDir"] = os.path.join(self.sources_path, "node_modules", self._STORE_NM_PATH, self._STORE_VER)
+ data["virtualStoreDir"] = self._VSTORE_NM_PATH
+ f.seek(0)
+ yaml.dump(data, f, Dumper=yaml.CSafeDumper)
+ f.truncate()
+
+ def _get_default_options(self):
+ return super(PnpmPackageManager, self)._get_default_options() + [
+ "--stream",
+ "--reporter", "append-only",
+ "--no-color",
+ ]
+
+ def _get_debug_log_path(self):
+ return self._nm_path(".pnpm-debug.log")
diff --git a/build/plugins/lib/nots/package_manager/pnpm/tests/lockfile.py b/build/plugins/lib/nots/package_manager/pnpm/tests/lockfile.py
new file mode 100644
index 0000000000..06315a4992
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/tests/lockfile.py
@@ -0,0 +1,320 @@
+import pytest
+
+from build.plugins.lib.nots.package_manager.pnpm.lockfile import PnpmLockfile
+
+
+def test_lockfile_get_packages_meta_ok():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/@babel/cli/7.6.2_@babel+core@7.6.2": {
+ "resolution": {
+ "integrity": "sha512-JDZ+T/br9pPfT2lmAMJypJDTTTHM9ePD/ED10TRjRzJVdEVy+JB3iRlhzYmTt5YkNgHvxWGlUVnLtdv6ruiDrQ==",
+ "tarball": "@babel%2fcli/-/cli-7.6.2.tgz?rbtorrent=cb1849da3e4947e56a8f6bde6a1ec42703ddd187",
+ },
+ },
+ },
+ }
+
+ packages = list(lf.get_packages_meta())
+ pkg = packages[0]
+
+ assert len(packages) == 1
+ assert pkg.name == "@babel/cli"
+ assert pkg.version == "7.6.2"
+ assert pkg.sky_id == "rbtorrent:cb1849da3e4947e56a8f6bde6a1ec42703ddd187"
+ assert pkg.integrity == b"24367e4ff6ebf693df4f696600c272a490d34d31ccf5e3c3fc40f5d13463473255744572f89077891961cd8993b796243601efc561a55159cbb5dbfaaee883ad"
+ assert pkg.integrity_algorithm == "sha512"
+
+
+def test_lockfile_get_packages_empty():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {}
+
+ assert len(list(lf.get_packages_meta())) == 0
+
+
+def test_package_meta_invalid_key():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "in/valid": {},
+ },
+ }
+
+ with pytest.raises(TypeError) as e:
+ list(lf.get_packages_meta())
+
+ assert str(e.value) == "Invalid package meta for key in/valid, parse error: Invalid package key"
+
+
+def test_package_meta_missing_resolution():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/valid/1.2.3": {},
+ },
+ }
+
+ with pytest.raises(TypeError) as e:
+ list(lf.get_packages_meta())
+
+ assert str(e.value) == "Invalid package meta for key /valid/1.2.3, missing 'resolution' key"
+
+
+def test_package_meta_missing_tarball():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/valid/1.2.3": {
+ "resolution": {},
+ },
+ },
+ }
+
+ with pytest.raises(TypeError) as e:
+ list(lf.get_packages_meta())
+
+ assert str(e.value) == "Invalid package meta for key /valid/1.2.3, missing 'tarball' key"
+
+
+def test_package_meta_missing_rbtorrent():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/valid/1.2.3": {
+ "resolution": {
+ "tarball": "valid-1.2.3.tgz",
+ },
+ },
+ },
+ }
+
+ with pytest.raises(TypeError) as e:
+ list(lf.get_packages_meta())
+
+ assert str(e.value) == "Invalid package meta for key /valid/1.2.3, parse error: Missing rbtorrent param in tarball url valid-1.2.3.tgz"
+
+
+def test_lockfile_meta_file_tarball():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/@babel/cli/7.6.2": {
+ "resolution": {
+ "integrity": "sha512-JDZ+T/br9pPfT2lmAMJypJDTTTHM9ePD/ED10TRjRzJVdEVy+JB3iRlhzYmTt5YkNgHvxWGlUVnLtdv6ruiDrQ==",
+ "tarball": "file:/some/abs/path.tgz",
+ },
+ },
+ },
+ }
+
+ packages = list(lf.get_packages_meta())
+ pkg = packages[0]
+
+ assert len(packages) == 1
+ assert pkg.name == "@babel/cli"
+ assert pkg.version == "7.6.2"
+ assert pkg.sky_id == ""
+
+
+def test_lockfile_update_tarball_resolutions_ok():
+ lf = PnpmLockfile(path="/pnpm-lock.yaml")
+ lf.data = {
+ "packages": {
+ "/@babel/cli/7.6.2_@babel+core@7.6.2": {
+ "resolution": {
+ "integrity": "sha512-JDZ+T/br9pPfT2lmAMJypJDTTTHM9ePD/ED10TRjRzJVdEVy+JB3iRlhzYmTt5YkNgHvxWGlUVnLtdv6ruiDrQ==",
+ "tarball": "@babel%2fcli/-/cli-7.6.2.tgz?rbtorrent=cb1849da3e4947e56a8f6bde6a1ec42703ddd187",
+ },
+ },
+ },
+ }
+
+ lf.update_tarball_resolutions(lambda p: p.name)
+
+ assert lf.data["packages"]["/@babel/cli/7.6.2_@babel+core@7.6.2"]["resolution"]["tarball"] == "@babel/cli"
+
+
+def test_lockfile_merge():
+ lf1 = PnpmLockfile(path="/foo/pnpm-lock.yaml")
+ lf1.data = {
+ "dependencies": {
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ },
+ "packages": {
+ "/a/1.0.0": {},
+ },
+ }
+
+ lf2 = PnpmLockfile(path="/bar/pnpm-lock.yaml")
+ lf2.data = {
+ "dependencies": {
+ "b": "1.0.0",
+ },
+ "specifiers": {
+ "b": "1.0.0",
+ },
+ "packages": {
+ "/b/1.0.0": {},
+ },
+ }
+
+ lf3 = PnpmLockfile(path="/another/baz/pnpm-lock.yaml")
+ lf3.data = {
+ "importers": {
+ ".": {
+ "dependencies": {
+ "@a/qux": "link:../qux",
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "@a/qux": "workspace:../qux",
+ "a": "1.0.0",
+ },
+ },
+ "../qux": {
+ "dependencies": {
+ "b": "1.0.1",
+ },
+ "specifiers": {
+ "b": "1.0.1",
+ },
+ },
+ },
+ "packages": {
+ "/a/1.0.0": {},
+ "/b/1.0.1": {},
+ },
+ }
+
+ lf4 = PnpmLockfile(path="/another/quux/pnpm-lock.yaml")
+ lf4.data = {
+ "dependencies": {
+ "@a/bar": "link:../../bar",
+ },
+ "specifiers": {
+ "@a/bar": "workspace:../../bar",
+ },
+ }
+
+ lf1.merge(lf2)
+ lf1.merge(lf3)
+ lf1.merge(lf4)
+
+ assert lf1.data == {
+ "importers": {
+ ".": {
+ "dependencies": {
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ },
+ },
+ "../bar": {
+ "dependencies": {
+ "b": "1.0.0",
+ },
+ "specifiers": {
+ "b": "1.0.0",
+ },
+ },
+ "../another/baz": {
+ "dependencies": {
+ "@a/qux": "link:../qux",
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "@a/qux": "workspace:../qux",
+ "a": "1.0.0",
+ },
+ },
+ "../another/qux": {
+ "dependencies": {
+ "b": "1.0.1",
+ },
+ "specifiers": {
+ "b": "1.0.1",
+ },
+ },
+ "../another/quux": {
+ "dependencies": {
+ "@a/bar": "link:../../bar",
+ },
+ "specifiers": {
+ "@a/bar": "workspace:../../bar",
+ },
+ },
+ },
+ "packages": {
+ "/a/1.0.0": {},
+ "/b/1.0.0": {},
+ "/b/1.0.1": {},
+ },
+ }
+
+
+def test_lockfile_merge_dont_overrides_packages():
+ lf1 = PnpmLockfile(path="/foo/pnpm-lock.yaml")
+ lf1.data = {
+ "dependencies": {
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ },
+ "packages": {
+ "/a/1.0.0": {},
+ },
+ }
+
+ lf2 = PnpmLockfile(path="/bar/pnpm-lock.yaml")
+ lf2.data = {
+ "dependencies": {
+ "a": "1.0.0",
+ "b": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ "b": "1.0.0",
+ },
+ "packages": {
+ "/a/1.0.0": {
+ "overriden": True,
+ },
+ "/b/1.0.0": {},
+ },
+ }
+
+ lf1.merge(lf2)
+
+ assert lf1.data == {
+ "importers": {
+ ".": {
+ "dependencies": {
+ "a": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ },
+ },
+ "../bar": {
+ "dependencies": {
+ "a": "1.0.0",
+ "b": "1.0.0",
+ },
+ "specifiers": {
+ "a": "1.0.0",
+ "b": "1.0.0",
+ },
+ },
+ },
+ "packages": {
+ "/a/1.0.0": {},
+ "/b/1.0.0": {},
+ },
+ }
diff --git a/build/plugins/lib/nots/package_manager/pnpm/tests/workspace.py b/build/plugins/lib/nots/package_manager/pnpm/tests/workspace.py
new file mode 100644
index 0000000000..f6a73e0d4c
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/tests/workspace.py
@@ -0,0 +1,58 @@
+from build.plugins.lib.nots.package_manager.base import PackageJson
+from build.plugins.lib.nots.package_manager.pnpm.workspace import PnpmWorkspace
+
+
+def test_workspace_get_paths():
+ ws = PnpmWorkspace(path="/packages/foo/pnpm-workspace.yaml")
+ ws.packages = set([".", "../bar", "../../another/baz"])
+
+ assert sorted(ws.get_paths()) == [
+ "/another/baz",
+ "/packages/bar",
+ "/packages/foo",
+ ]
+
+
+def test_workspace_set_from_package_json():
+ ws = PnpmWorkspace(path="/packages/foo/pnpm-workspace.yaml")
+ pj = PackageJson(path="/packages/foo/package.json")
+ pj.data = {
+ "dependencies": {
+ "@a/bar": "workspace:../bar",
+ },
+ "devDependencies": {
+ "@a/baz": "workspace:../../another/baz",
+ },
+ "peerDependencies": {
+ "@a/qux": "workspace:../../another/qux",
+ },
+ "optionalDependencies": {
+ "@a/quux": "workspace:../../another/quux",
+ }
+ }
+
+ ws.set_from_package_json(pj)
+
+ assert sorted(ws.get_paths()) == [
+ "/another/baz",
+ "/another/quux",
+ "/another/qux",
+ "/packages/bar",
+ "/packages/foo",
+ ]
+
+
+def test_workspace_merge():
+ ws1 = PnpmWorkspace(path="/packages/foo/pnpm-workspace.yaml")
+ ws1.packages = set([".", "../bar", "../../another/baz"])
+ ws2 = PnpmWorkspace(path="/another/baz/pnpm-workspace.yaml")
+ ws2.packages = set([".", "../qux"])
+
+ ws1.merge(ws2)
+
+ assert sorted(ws1.get_paths()) == [
+ "/another/baz",
+ "/another/qux",
+ "/packages/bar",
+ "/packages/foo",
+ ]
diff --git a/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make b/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make
new file mode 100644
index 0000000000..94712f1db9
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make
@@ -0,0 +1,15 @@
+PY23_TEST()
+
+OWNER(dankolesnikov)
+
+TEST_SRCS(
+ lockfile.py
+ workspace.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager/base
+ build/plugins/lib/nots/package_manager/pnpm
+)
+
+END()
diff --git a/build/plugins/lib/nots/package_manager/pnpm/utils.py b/build/plugins/lib/nots/package_manager/pnpm/utils.py
new file mode 100644
index 0000000000..d8e99e3ab8
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/utils.py
@@ -0,0 +1,19 @@
+import os
+
+from ..base.constants import PACKAGE_JSON_FILENAME, PNPM_LOCKFILE_FILENAME, PNPM_WS_FILENAME, NODE_MODULES_BUNDLE_FILENAME
+
+
+def build_pj_path(p):
+ return os.path.join(p, PACKAGE_JSON_FILENAME)
+
+
+def build_lockfile_path(p):
+ return os.path.join(p, PNPM_LOCKFILE_FILENAME)
+
+
+def build_ws_config_path(p):
+ return os.path.join(p, PNPM_WS_FILENAME)
+
+
+def build_nm_bundle_path(p):
+ return os.path.join(p, NODE_MODULES_BUNDLE_FILENAME)
diff --git a/build/plugins/lib/nots/package_manager/pnpm/workspace.py b/build/plugins/lib/nots/package_manager/pnpm/workspace.py
new file mode 100644
index 0000000000..635b77dcb2
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/workspace.py
@@ -0,0 +1,69 @@
+import os
+import yaml
+
+
+class PnpmWorkspace(object):
+ @classmethod
+ def load(cls, path):
+ ws = cls(path)
+ ws.read()
+
+ return ws
+
+ def __init__(self, path):
+ if not os.path.isabs(path):
+ raise TypeError("Absolute path required, given: {}".format(path))
+
+ self.path = path
+ # NOTE: pnpm requires relative workspace paths.
+ self.packages = set()
+
+ def read(self):
+ with open(self.path) as f:
+ self.packages = set(yaml.load(f, Loader=yaml.CSafeLoader).get("packages", []))
+
+ def write(self, path=None):
+ if not path:
+ path = self.path
+
+ with open(path, "w") as f:
+ data = {
+ "packages": list(self.packages),
+ }
+ yaml.dump(data, f, Dumper=yaml.CSafeDumper)
+
+ def get_paths(self):
+ """
+ Returns absolute paths of workspace packages.
+ :rtype: list of str
+ """
+ dir_path = os.path.dirname(self.path)
+
+ return [os.path.normpath(os.path.join(dir_path, pkg_path)) for pkg_path in self.packages]
+
+ def set_from_package_json(self, package_json):
+ """
+ Sets packages to "workspace" deps from given package.json.
+ :param package_json: package.json of workspace
+ :type package_json: PackageJson
+ """
+ if os.path.dirname(package_json.path) != os.path.dirname(self.path):
+ raise TypeError(
+ "package.json should be in workspace directory {}, given: {}".format(os.path.dirname(self.path), package_json.path))
+
+ self.packages = set(path for name, path in package_json.get_workspace_dep_paths())
+ # Add relative path to self.
+ self.packages.add(".")
+
+ def merge(self, ws):
+ """
+ Adds `ws`'s packages to the workspace.
+ :param ws: workspace to merge
+ :type ws: PnpmWorkspace
+ """
+ dir_path = os.path.dirname(self.path)
+ ws_dir_path = os.path.dirname(ws.path)
+
+ for p_rel_path in ws.packages:
+ p_path = os.path.normpath(os.path.join(ws_dir_path, p_rel_path))
+ self.packages.add(os.path.relpath(p_path, dir_path))
diff --git a/build/plugins/lib/nots/package_manager/pnpm/ya.make b/build/plugins/lib/nots/package_manager/pnpm/ya.make
new file mode 100644
index 0000000000..b2f2727c3f
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/pnpm/ya.make
@@ -0,0 +1,23 @@
+PY23_LIBRARY()
+
+OWNER(dankolesnikov)
+
+PY_SRCS(
+ __init__.py
+ lockfile.py
+ package_manager.py
+ workspace.py
+ utils.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager/base
+ contrib/python/PyYAML
+ contrib/python/six
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/build/plugins/lib/nots/package_manager/ya.make b/build/plugins/lib/nots/package_manager/ya.make
new file mode 100644
index 0000000000..79ee0ea175
--- /dev/null
+++ b/build/plugins/lib/nots/package_manager/ya.make
@@ -0,0 +1,14 @@
+PY23_LIBRARY()
+
+OWNER(dankolesnikov)
+
+PY_SRCS(
+ __init__.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager/base
+ build/plugins/lib/nots/package_manager/pnpm
+)
+
+END()
diff --git a/build/plugins/lib/nots/typescript/__init__.py b/build/plugins/lib/nots/typescript/__init__.py
new file mode 100644
index 0000000000..4684004183
--- /dev/null
+++ b/build/plugins/lib/nots/typescript/__init__.py
@@ -0,0 +1,7 @@
+from .tsc_wrapper import TscWrapper, TsConfig, TsValidationError
+
+__all__ = [
+ "TscWrapper",
+ "TsConfig",
+ "TsValidationError",
+]
diff --git a/build/plugins/lib/nots/typescript/tests/tsc_wrapper.py b/build/plugins/lib/nots/typescript/tests/tsc_wrapper.py
new file mode 100644
index 0000000000..b6c2845f79
--- /dev/null
+++ b/build/plugins/lib/nots/typescript/tests/tsc_wrapper.py
@@ -0,0 +1,168 @@
+import pytest
+
+from build.plugins.lib.nots.typescript import TsConfig, TsValidationError
+
+
+def test_ts_config_validate_valid():
+ cfg = TsConfig(path="/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": "./src",
+ "outDir": "./build",
+ },
+ }
+
+ cfg.validate()
+
+
+def test_ts_config_validate_empty():
+ cfg = TsConfig(path="/tsconfig.json")
+
+ with pytest.raises(TsValidationError) as e:
+ cfg.validate()
+
+ assert e.value.errors == [
+ "'rootDir' option is required",
+ "'outDir' option is required",
+ ]
+
+
+def test_ts_config_validate_invalid_common():
+ cfg = TsConfig(path="/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "preserveSymlinks": True,
+ "rootDirs": [],
+ "outFile": "./foo.js",
+ },
+ "references": [],
+ "files": [],
+ "include": [],
+ "exclude": [],
+ }
+
+ with pytest.raises(TsValidationError) as e:
+ cfg.validate()
+
+ assert e.value.errors == [
+ "'rootDir' option is required",
+ "'outDir' option is required",
+ "'outFile' option is not supported",
+ "'preserveSymlinks' option is not supported due to pnpm limitations",
+ "'rootDirs' option is not supported, relative imports should have single root",
+ "'files' option is not supported, use 'include'",
+ "composite builds are not supported, use peerdirs in ya.make instead of 'references' option",
+ ]
+
+
+def test_ts_config_validate_invalid_subdirs():
+ cfg = TsConfig(path="/foo/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": "/bar/src",
+ "outDir": "../bar/build",
+ },
+ }
+
+ with pytest.raises(TsValidationError) as e:
+ cfg.validate()
+
+ assert e.value.errors == [
+ "'rootDir' should be a subdirectory of the module",
+ "'outDir' should be a subdirectory of the module",
+ ]
+
+
+def test_ts_config_transform():
+ cfg = TsConfig(path="/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": "./src",
+ "outDir": "./build",
+ "typeRoots": ["./node_modules/foo", "bar"],
+ },
+ "include": ["src/**/*"],
+ }
+
+ cfg.transform_paths(
+ build_path="bindir",
+ sources_path="srcdir",
+ )
+
+ assert cfg.data == {
+ "compilerOptions": {
+ "outDir": "bindir/build",
+ "rootDir": "srcdir/src",
+ "baseUrl": "bindir/node_modules",
+ "typeRoots": ["srcdir/node_modules/foo", "srcdir/bar", "bindir/node_modules/foo", "bindir/bar"]
+ },
+ "include": ["srcdir/src/**/*"],
+ "exclude": [],
+ }
+
+
+def test_ts_config_transform_when_root_eq_out():
+ cfg = TsConfig(path="/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": ".",
+ "outDir": ".",
+ },
+ }
+
+ cfg.transform_paths(
+ build_path="bindir",
+ sources_path="srcdir",
+ )
+
+ assert cfg.data == {
+ "compilerOptions": {
+ "rootDir": "srcdir",
+ "outDir": "bindir",
+ "baseUrl": "bindir/node_modules",
+ },
+ "include": [],
+ "exclude": [],
+ }
+
+
+def test_ts_config_transform_sets_correct_source_root():
+ cfg = TsConfig(path="/tsconfig.json")
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": "src",
+ "outDir": "build",
+ "sourceMap": True,
+ },
+ }
+
+ cfg.transform_paths(
+ build_path="bindir",
+ sources_path="srcdir",
+ )
+
+ assert cfg.data == {
+ "compilerOptions": {
+ "rootDir": "srcdir/src",
+ "outDir": "bindir/build",
+ "baseUrl": "bindir/node_modules",
+ "sourceMap": True,
+ "sourceRoot": "../src",
+ },
+ "include": [],
+ "exclude": [],
+ }
+
+
+def test_ts_config_compiler_options():
+ cfg = TsConfig(path="/tsconfig.json")
+
+ assert cfg.compiler_option("invalid") is None
+
+ cfg.data = {
+ "compilerOptions": {
+ "rootDir": "src",
+ },
+ }
+
+ assert cfg.compiler_option("rootDir") == "src"
diff --git a/build/plugins/lib/nots/typescript/tests/ya.make b/build/plugins/lib/nots/typescript/tests/ya.make
new file mode 100644
index 0000000000..f6a8e40ea1
--- /dev/null
+++ b/build/plugins/lib/nots/typescript/tests/ya.make
@@ -0,0 +1,13 @@
+PY23_TEST()
+
+OWNER(dankolesnikov)
+
+TEST_SRCS(
+ tsc_wrapper.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/typescript
+)
+
+END()
diff --git a/build/plugins/lib/nots/typescript/tsc_wrapper.py b/build/plugins/lib/nots/typescript/tsc_wrapper.py
new file mode 100644
index 0000000000..9fddf6707f
--- /dev/null
+++ b/build/plugins/lib/nots/typescript/tsc_wrapper.py
@@ -0,0 +1,219 @@
+import os
+import json
+import shutil
+import subprocess
+import tarfile
+
+from ..package_manager import constants
+
+
+class TsError(RuntimeError):
+ pass
+
+
+class TsValidationError(TsError):
+ def __init__(self, path, errors):
+ self.path = path
+ self.errors = errors
+
+ super(TsValidationError, self).__init__("Invalid tsconfig {}:\n{}".format(path, "\n".join(errors)))
+
+
+class TsCompilationError(TsError):
+ def __init__(self, code, stdout, stderr):
+ self.code = code
+ self.stdout = stdout
+ self.stderr = stderr
+
+ super(TsCompilationError, self).__init__("tsc exited with code {}:\n{}\n{}".format(code, stdout, stderr))
+
+
+class TsConfig(object):
+ @classmethod
+ def load(cls, path):
+ """
+ :param path: tsconfig.json path
+ :type path: str
+ :rtype: TsConfig
+ """
+ tsconfig = cls(path)
+ tsconfig.read()
+
+ return tsconfig
+
+ def __init__(self, path):
+ if not os.path.isabs(path):
+ raise TypeError("Absolute path required, given: {}".format(path))
+
+ self.path = path
+ self.data = {}
+
+ def read(self):
+ try:
+ with open(self.path) as f:
+ self.data = json.load(f)
+ except Exception as e:
+ raise TsError("Failed to read tsconfig {}: {}".format(self.path, e))
+
+ def get_or_create_compiler_options(self):
+ """
+ Returns ref to the "compilerOptions" dict.
+ :rtype: dict
+ """
+ opts = self.data.get("compilerOptions")
+ if opts is None:
+ opts = {}
+ self.data["compilerOptions"] = opts
+
+ return opts
+
+ def compiler_option(self, name, default=None):
+ """
+ :param name: option key
+ :type name: str
+ :param default: default value
+ :type default: mixed
+ :rtype: mixed
+ """
+ return self.get_or_create_compiler_options().get(name, default)
+
+ def validate(self):
+ """
+ Checks whether the config is compatible with current toolchain.
+ """
+ opts = self.get_or_create_compiler_options()
+ errors = []
+ root_dir = opts.get("rootDir")
+ out_dir = opts.get("outDir")
+ config_dir = os.path.dirname(self.path)
+ is_mod_subdir = lambda p: not os.path.isabs(p) and os.path.normpath(os.path.join(config_dir, p)).startswith(config_dir)
+
+ if root_dir is None:
+ errors.append("'rootDir' option is required")
+ elif not is_mod_subdir(root_dir):
+ errors.append("'rootDir' should be a subdirectory of the module")
+
+ if out_dir is None:
+ errors.append("'outDir' option is required")
+ elif not is_mod_subdir(out_dir):
+ errors.append("'outDir' should be a subdirectory of the module")
+
+ if opts.get("outFile") is not None:
+ errors.append("'outFile' option is not supported")
+
+ if opts.get("preserveSymlinks"):
+ errors.append("'preserveSymlinks' option is not supported due to pnpm limitations")
+
+ if opts.get("rootDirs") is not None:
+ errors.append("'rootDirs' option is not supported, relative imports should have single root")
+
+ if self.data.get("files") is not None:
+ errors.append("'files' option is not supported, use 'include'")
+
+ if self.data.get("references") is not None:
+ errors.append("composite builds are not supported, use peerdirs in ya.make instead of 'references' option")
+
+ if len(errors):
+ raise TsValidationError(self.path, errors)
+
+ def transform_paths(self, build_path, sources_path):
+ """
+ Updates config with correct abs paths.
+ All source files/dirs will be mapped to `sources_path`, output files/dirs will be mapped to `build_path`.
+ :param build_path: module's build root
+ :type build_path: str
+ :param sources_path: module's source root
+ :type sources_path: str
+ """
+ opts = self.get_or_create_compiler_options()
+
+ sources_path_rel = lambda x: os.path.normpath(os.path.join(sources_path, x))
+ build_path_rel = lambda x: os.path.normpath(os.path.join(build_path, x))
+
+ root_dir = opts["rootDir"]
+ out_dir = opts["outDir"]
+
+ opts["rootDir"] = sources_path_rel(root_dir)
+ opts["outDir"] = build_path_rel(out_dir)
+
+ if opts.get("typeRoots"):
+ opts["typeRoots"] = list(map(sources_path_rel, opts["typeRoots"])) + list(map(build_path_rel, opts["typeRoots"]))
+
+ opts["baseUrl"] = build_path_rel("node_modules")
+
+ self.data["include"] = list(map(sources_path_rel, self.data.get("include", [])))
+ self.data["exclude"] = list(map(sources_path_rel, self.data.get("exclude", [])))
+
+ if opts.get("sourceMap"):
+ opts["sourceRoot"] = os.path.relpath(root_dir, out_dir)
+
+ def write(self, path=None):
+ """
+ :param path: tsconfig path, defaults to original path
+ :type path: str
+ """
+ if path is None:
+ path = self.path
+
+ with open(path, "w") as f:
+ json.dump(self.data, f)
+
+
+class TscWrapper(object):
+ _TSCONFIG_FILENAME = "tsconfig.json"
+
+ def __init__(self, build_root, build_path, sources_path, nodejs_bin_path, script_path, config_path):
+ self.build_root = build_root
+ self.build_path = build_path
+ self.sources_path = sources_path
+ self.nodejs_bin_path = nodejs_bin_path
+ self.script_path = script_path
+ self.config_path = config_path
+
+ def compile(self):
+ self._prepare_dependencies()
+ config = self._build_config()
+ self._exec_tsc(["--build", config.path])
+
+ def _prepare_dependencies(self):
+ self._copy_package_json()
+ self._unpack_node_modules()
+
+ def _copy_package_json(self):
+ # TODO: Validate "main" and "files" - they should include files from the output directory.
+ shutil.copyfile(
+ os.path.join(self.sources_path, constants.PACKAGE_JSON_FILENAME),
+ os.path.join(self.build_path, constants.PACKAGE_JSON_FILENAME),
+ )
+
+ def _unpack_node_modules(self):
+ nm_bundle_path = os.path.join(self.build_path, constants.NODE_MODULES_BUNDLE_FILENAME)
+ if os.path.isfile(nm_bundle_path):
+ with tarfile.open(nm_bundle_path) as tf:
+ tf.extractall(os.path.join(self.build_path, "node_modules"))
+
+ def _build_config(self):
+ config = TsConfig.load(self.config_path)
+ config.validate()
+ config.transform_paths(
+ build_path=self.build_path,
+ sources_path=self.sources_path,
+ )
+
+ config.path = os.path.join(self.build_path, self._TSCONFIG_FILENAME)
+ config.write()
+
+ return config
+
+ def _exec_tsc(self, args):
+ p = subprocess.Popen(
+ [self.nodejs_bin_path, self.script_path] + args,
+ cwd=self.build_path,
+ stdin=None,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ )
+ stdout, stderr = p.communicate()
+
+ if p.returncode != 0:
+ raise TsCompilationError(p.returncode, stdout.decode("utf-8"), stderr.decode("utf-8"))
diff --git a/build/plugins/lib/nots/typescript/ya.make b/build/plugins/lib/nots/typescript/ya.make
new file mode 100644
index 0000000000..e83ce75e7a
--- /dev/null
+++ b/build/plugins/lib/nots/typescript/ya.make
@@ -0,0 +1,18 @@
+PY23_LIBRARY()
+
+OWNER(dankolesnikov)
+
+PY_SRCS(
+ __init__.py
+ tsc_wrapper.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/build/plugins/lib/nots/ya.make b/build/plugins/lib/nots/ya.make
new file mode 100644
index 0000000000..681a1dea1a
--- /dev/null
+++ b/build/plugins/lib/nots/ya.make
@@ -0,0 +1,14 @@
+PY23_LIBRARY()
+
+OWNER(dankolesnikov)
+
+PY_SRCS(
+ __init__.py
+)
+
+PEERDIR(
+ build/plugins/lib/nots/package_manager
+ build/plugins/lib/nots/typescript
+)
+
+END()
diff --git a/build/plugins/lib/ya.make b/build/plugins/lib/ya.make
new file mode 100644
index 0000000000..7e61d12080
--- /dev/null
+++ b/build/plugins/lib/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+PY23_LIBRARY()
+ PY_SRCS(
+ _metric_resolvers.py
+ )
+END()
diff --git a/build/plugins/linker_script.py b/build/plugins/linker_script.py
new file mode 100644
index 0000000000..bee9777a4e
--- /dev/null
+++ b/build/plugins/linker_script.py
@@ -0,0 +1,12 @@
+def onlinker_script(unit, *args):
+ """
+ @usage: LINKER_SCRIPT(Files...)
+
+ Specify files to be used as a linker script
+ """
+ for arg in args:
+ if not arg.endswith(".ld") and not arg.endswith(".ld.in"):
+ unit.message(['error', "Invalid linker script extension: {}".format(arg)])
+ return
+
+ unit.onglobal_srcs(list(args))
diff --git a/build/plugins/lj_archive.py b/build/plugins/lj_archive.py
new file mode 100644
index 0000000000..1d80bb98f3
--- /dev/null
+++ b/build/plugins/lj_archive.py
@@ -0,0 +1,44 @@
+def onlj_archive(unit, *args):
+ """
+ @usage: LJ_ARCHIVE(NAME Name LuaFiles...)
+ Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys
+ """
+ def iter_luas(l):
+ for a in l:
+ if a.endswith('.lua'):
+ yield a
+
+ def iter_objs(l):
+ for a in l:
+ s = a[:-3] + 'raw'
+ unit.on_luajit_objdump(['OUT', s, a])
+ yield s
+
+ luas = list(iter_luas(args))
+ objs = list(iter_objs(luas))
+
+ unit.onarchive_by_keys(['DONTCOMPRESS', 'NAME', 'LuaScripts.inc', 'KEYS', ':'.join(luas)] + objs)
+ unit.onarchive_by_keys(['DONTCOMPRESS', 'NAME', 'LuaSources.inc', 'KEYS', ':'.join(luas)] + luas)
+
+def onlj_21_archive(unit, *args):
+ """
+ @usage: LJ_21_ARCHIVE(NAME Name LuaFiles...) # deprecated
+ Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys
+ """
+ def iter_luas(l):
+ for a in l:
+ if a.endswith('.lua'):
+ yield a
+
+ def iter_objs(l):
+ for a in l:
+ s = a[:-3] + 'raw'
+ unit.on_luajit_21_objdump(['OUT', s, a])
+ yield s
+
+ luas = list(iter_luas(args))
+ objs = list(iter_objs(luas))
+
+ unit.onarchive_by_keys(['DONTCOMPRESS', 'NAME', 'LuaScripts.inc', 'KEYS', ':'.join(luas)] + objs)
+ unit.onarchive_by_keys(['DONTCOMPRESS', 'NAME', 'LuaSources.inc', 'KEYS', ':'.join(luas)] + luas)
+
diff --git a/build/plugins/llvm_bc.py b/build/plugins/llvm_bc.py
new file mode 100644
index 0000000000..2cfe43884c
--- /dev/null
+++ b/build/plugins/llvm_bc.py
@@ -0,0 +1,33 @@
+import sys
+
+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)
+ name = kwds['NAME'][0]
+ symbols = kwds.get('SYMBOLS')
+ obj_suf = unit.get('OBJ_SUF')
+ 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])
+ bcs.append(bc_path)
+ unit.onllvm_link([merged_bc] + bcs)
+ opt_opts = ['-O2', '-globalopt', '-globaldce']
+ if symbols:
+ # XXX: '#' used instead of ',' to overcome ymake tendency to split everything by comma
+ opt_opts += ['-internalize', '-internalize-public-api-list=' + '#'.join(symbols)]
+ unit.onllvm_opt([merged_bc, out_bc] + opt_opts)
+ unit.onresource([out_bc, '/llvm_bc/' + name])
diff --git a/build/plugins/macros_with_error.py b/build/plugins/macros_with_error.py
new file mode 100644
index 0000000000..e82fb56d2c
--- /dev/null
+++ b/build/plugins/macros_with_error.py
@@ -0,0 +1,29 @@
+import sys
+
+import _common
+
+import ymake
+
+
+def onmacros_with_error(unit, *args):
+ print >> sys.stderr, 'This macros will fail'
+ raise Exception('Expected fail in MACROS_WITH_ERROR')
+
+
+def onrestrict_path(unit, *args):
+ if args:
+ if 'MSG' in args:
+ pos = args.index('MSG')
+ paths, msg = args[:pos], args[pos + 1:]
+ msg = ' '.join(msg)
+ else:
+ paths, msg = args, 'forbidden'
+ if not _common.strip_roots(unit.path()).startswith(paths):
+ error_msg = "Path '[[imp]]{}[[rst]]' is restricted - [[bad]]{}[[rst]]. Valid path prefixes are: [[unimp]]{}[[rst]]".format(unit.path(), msg, ', '.join(paths))
+ ymake.report_configure_error(error_msg)
+
+def onassert(unit, *args):
+ val = unit.get(args[0])
+ if val and val.lower() == "no":
+ msg = ' '.join(args[1:])
+ ymake.report_configure_error(msg)
diff --git a/build/plugins/mx_archive.py b/build/plugins/mx_archive.py
new file mode 100644
index 0000000000..56b0d4d16e
--- /dev/null
+++ b/build/plugins/mx_archive.py
@@ -0,0 +1,16 @@
+def onmx_formulas(unit, *args):
+ """
+ @usage: MX_FORMULAS(BinFiles...) # deprecated, matrixnet
+ Create MatrixNet formulas archive
+ """
+ def iter_infos():
+ for a in args:
+ if a.endswith('.bin'):
+ unit.on_mx_bin_to_info([a])
+ yield a[:-3] + 'info'
+ else:
+ yield a
+
+ infos = list(iter_infos())
+ unit.onarchive_asm(['NAME', 'MxFormulas'] + infos)
+ unit.on_mx_gen_table(infos)
diff --git a/build/plugins/nots.py b/build/plugins/nots.py
new file mode 100644
index 0000000000..5018256ddc
--- /dev/null
+++ b/build/plugins/nots.py
@@ -0,0 +1,46 @@
+import os
+
+from _common import to_yesno
+from lib.nots.package_manager import manager
+from lib.nots.typescript import TsConfig
+
+
+def _create_pm(unit):
+ return manager(
+ sources_path=unit.resolve(unit.path()),
+ build_root="$B",
+ build_path=unit.path().replace("$S", "$B", 1),
+ contribs_path=unit.get("NPM_CONTRIBS_PATH"),
+ nodejs_bin_path=None,
+ script_path=None,
+ )
+
+
+def on_from_npm_lockfiles(unit, *args):
+ lf_paths = map(lambda p: unit.resolve(unit.resolve_arc_path(p)), args)
+
+ for pkg in _create_pm(unit).extract_packages_meta_from_lockfiles(lf_paths):
+ unit.onfrom_npm([pkg.name, pkg.version, pkg.sky_id, pkg.integrity, pkg.integrity_algorithm, pkg.tarball_path])
+
+
+def onnode_modules(unit):
+ pm = _create_pm(unit)
+ unit.onpeerdir(pm.get_peer_paths_from_package_json())
+ ins, outs = pm.calc_node_modules_inouts()
+ unit.on_node_modules(["IN"] + sorted(ins) + ["OUT"] + sorted(outs))
+
+
+def on_ts_configure(unit, tsconfig_path):
+ abs_tsconfig_path = unit.resolve(unit.resolve_arc_path(tsconfig_path))
+ if not abs_tsconfig_path:
+ raise Exception("tsconfig not found: {}".format(tsconfig_path))
+
+ tsconfig = TsConfig.load(abs_tsconfig_path)
+ tsconfig.validate()
+
+ unit.set(["TS_CONFIG_ROOT_DIR", tsconfig.compiler_option("rootDir")])
+ unit.set(["TS_CONFIG_OUT_DIR", tsconfig.compiler_option("outDir")])
+ unit.set(["TS_CONFIG_SOURCE_MAP", to_yesno(tsconfig.compiler_option("sourceMap"))])
+ unit.set(["TS_CONFIG_DECLARATION", to_yesno(tsconfig.compiler_option("declaration"))])
+ unit.set(["TS_CONFIG_DECLARATION_MAP", to_yesno(tsconfig.compiler_option("declarationMap"))])
+ unit.set(["TS_CONFIG_PRESERVE_JSX", to_yesno(tsconfig.compiler_option("jsx") == "preserve")])
diff --git a/build/plugins/print_module_type.py b/build/plugins/print_module_type.py
new file mode 100644
index 0000000000..cc54c55675
--- /dev/null
+++ b/build/plugins/print_module_type.py
@@ -0,0 +1,5 @@
+def onprint_module_type(unit, *args):
+ filepath = unit.get('KIWI_OUT_FILE')
+ if len(args) >= 2 and filepath is not None:
+ with open(filepath, "a") as file_handler:
+ print >>file_handler, "{0} {1} {2}".format(args[0], args[1], unit.path())
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
new file mode 100644
index 0000000000..f32a2d39a0
--- /dev/null
+++ b/build/plugins/pybuild.py
@@ -0,0 +1,648 @@
+import os
+import collections
+from hashlib import md5
+
+import ymake
+from _common import stripext, rootrel_arc_src, tobuilddir, listid, resolve_to_ymake_path, generate_chunks, pathid
+
+
+YA_IDE_VENV_VAR = 'YA_IDE_VENV'
+PY_NAMESPACE_PREFIX = 'py/namespace'
+BUILTIN_PROTO = 'builtin_proto'
+
+def is_arc_src(src, unit):
+ return (
+ src.startswith('${ARCADIA_ROOT}/') or
+ src.startswith('${CURDIR}/') or
+ unit.resolve_arc_path(src).startswith('$S/')
+ )
+
+def is_extended_source_search_enabled(path, unit):
+ if not is_arc_src(path, unit):
+ return False
+ if unit.get('NO_EXTENDED_SOURCE_SEARCH') == 'yes':
+ return False
+ return True
+
+def to_build_root(path, unit):
+ if is_arc_src(path, unit):
+ return '${ARCADIA_BUILD_ROOT}/' + rootrel_arc_src(path, unit)
+ return path
+
+def uniq_suffix(path, unit):
+ upath = unit.path()
+ if '/' not in path:
+ return ''
+ return '.{}'.format(pathid(path)[:4])
+
+def pb2_arg(suf, path, mod, unit):
+ return '{path}__int__{suf}={mod}{modsuf}'.format(
+ path=stripext(to_build_root(path, unit)),
+ suf=suf,
+ mod=mod,
+ modsuf=stripext(suf)
+ )
+
+def proto_arg(path, mod, unit):
+ return '{}.proto={}'.format(stripext(to_build_root(path, unit)), mod)
+
+def pb_cc_arg(suf, path, unit):
+ return '{}{suf}'.format(stripext(to_build_root(path, unit)), suf=suf)
+
+def ev_cc_arg(path, unit):
+ return '{}.ev.pb.cc'.format(stripext(to_build_root(path, unit)))
+
+def ev_arg(path, mod, unit):
+ return '{}__int___ev_pb2.py={}_ev_pb2'.format(stripext(to_build_root(path, unit)), mod)
+
+def mangle(name):
+ if '.' not in name:
+ return name
+ return ''.join('{}{}'.format(len(s), s) for s in name.split('.'))
+
+
+def parse_pyx_includes(filename, path, source_root, seen=None):
+ normpath = lambda *x: os.path.normpath(os.path.join(*x))
+
+ abs_path = normpath(source_root, filename)
+ seen = seen or set()
+ if abs_path in seen:
+ return
+ seen.add(abs_path)
+
+ if not os.path.exists(abs_path):
+ # File might be missing, because it might be generated
+ return
+
+ with open(abs_path, 'rb') as f:
+ # Don't parse cimports and etc - irrelevant for cython, it's linker work
+ includes = ymake.parse_cython_includes(f.read())
+
+ abs_dirname = os.path.dirname(abs_path)
+ # All includes are relative to the file which include
+ path_dirname = os.path.dirname(path)
+ file_dirname = os.path.dirname(filename)
+
+ for incfile in includes:
+ abs_path = normpath(abs_dirname, incfile)
+ if os.path.exists(abs_path):
+ incname, incpath = normpath(file_dirname, incfile), normpath(path_dirname, incfile)
+ yield (incname, incpath)
+ # search for includes in the included files
+ for e in parse_pyx_includes(incname, incpath, source_root, seen):
+ yield e
+ else:
+ # There might be arcadia root or cython relative include.
+ # Don't treat such file as missing, because there must be PEERDIR on py_library
+ # which contains it.
+ for path in [
+ source_root,
+ source_root + "/contrib/tools/cython/Cython/Includes",
+ ]:
+ if os.path.exists(normpath(path, incfile)):
+ break
+ else:
+ ymake.report_configure_error("'{}' includes missing file: {} ({})".format(path, incfile, abs_path))
+
+def has_pyx(args):
+ return any(arg.endswith('.pyx') for arg in args)
+
+def get_srcdir(path, unit):
+ return rootrel_arc_src(path, unit)[:-len(path)].rstrip('/')
+
+def add_python_lint_checks(unit, py_ver, files):
+ def get_resolved_files():
+ resolved_files = []
+ for path in files:
+ resolved = unit.resolve_arc_path([path])
+ if resolved.startswith('$S'): # path was resolved as source file.
+ resolved_files.append(resolved)
+ return resolved_files
+
+ if unit.get('LINT_LEVEL_VALUE') == "none":
+
+ no_lint_allowed_paths = (
+ "contrib/",
+ "devtools/",
+ "junk/",
+ # temporary allowed, TODO: remove
+ "taxi/uservices/",
+ "travel/",
+ "market/report/lite/", # MARKETOUT-38662, deadline: 2021-08-12
+ "passport/backend/oauth/", # PASSP-35982
+ )
+
+ upath = unit.path()[3:]
+
+ if not upath.startswith(no_lint_allowed_paths):
+ ymake.report_configure_error("NO_LINT() is allowed only in " + ", ".join(no_lint_allowed_paths))
+
+ if files and unit.get('LINT_LEVEL_VALUE') not in ("none", "none_internal"):
+ resolved_files = get_resolved_files()
+ flake8_cfg = 'build/config/tests/flake8/flake8.conf'
+ unit.onadd_check(["flake8.py{}".format(py_ver), flake8_cfg] + resolved_files)
+
+
+def is_py3(unit):
+ return unit.get("PYTHON3") == "yes"
+
+
+def on_py_program(unit, *args):
+ py_program(unit, is_py3(unit))
+
+
+def py_program(unit, py3):
+ """
+ Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/#modulpyprogramimakrospymain
+ """
+ if py3:
+ peers = ['library/python/runtime_py3/main']
+ if unit.get('PYTHON_SQLITE3') != 'no':
+ peers.append('contrib/tools/python3/src/Modules/_sqlite')
+ else:
+ peers = ['library/python/runtime/main']
+ if unit.get('PYTHON_SQLITE3') != 'no':
+ peers.append('contrib/tools/python/src/Modules/_sqlite')
+ unit.onpeerdir(peers)
+ if unit.get('MODULE_TYPE') == 'PROGRAM': # can not check DLL
+ unit.onadd_check_py_imports()
+
+
+def onpy_srcs(unit, *args):
+ """
+ @usage PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...)
+
+ PY_SRCS() - is rule to build extended versions of Python interpreters and containing all application code in its executable file. It can be used to collect only the executables but not shared libraries, and, in particular, not to collect the modules that are imported using import directive.
+ The main disadvantage is the lack of IDE support; There is also no readline yet.
+ The application can be collect from any of the sources from which the C library, and with the help of PY_SRCS .py , .pyx,.proto and .swg files.
+ At the same time extensions for Python on C language generating from .pyx and .swg, will be registered in Python's as built-in modules, and sources on .py are stored as static data: when the interpreter starts, the initialization code will add a custom loader of these modules to sys.meta_path.
+ By default .pyx files are collected as C++-extensions. To collect them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace), you must specify the Directive CYTHON_C.
+ Building with pyx automatically registers modules, you do not need to call PY_REGISTER for them
+ __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh.
+
+ Example of library declaration with PY_SRCS():
+ PY2_LIBRARY(mymodule)
+ PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
+ END()
+
+ PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module
+ Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
+ """
+ # Each file arg must either be a path, or "${...}/buildpath=modname", where
+ # "${...}/buildpath" part will be used as a file source in a future macro,
+ # and "modname" will be used as a module name.
+
+ upath = unit.path()[3:]
+ py3 = is_py3(unit)
+ py_main_only = unit.get('PROCESS_PY_MAIN_ONLY')
+ with_py = not unit.get('PYBUILD_NO_PY')
+ with_pyc = not unit.get('PYBUILD_NO_PYC')
+ in_proto_library = unit.get('PY_PROTO') or unit.get('PY3_PROTO')
+ venv = unit.get(YA_IDE_VENV_VAR)
+ need_gazetteer_peerdir = False
+ trim = 0
+
+ if not upath.startswith('contrib/tools/python') and not upath.startswith('library/python/runtime') and unit.get('NO_PYTHON_INCLS') != 'yes':
+ unit.onpeerdir(['contrib/libs/python'])
+
+ unit_needs_main = unit.get('MODULE_TYPE') in ('PROGRAM', 'DLL')
+ if unit_needs_main:
+ py_program(unit, py3)
+
+ py_namespace_value = unit.get('PY_NAMESPACE_VALUE')
+ if py_namespace_value == ".":
+ ns = ""
+ else:
+ ns = (unit.get('PY_NAMESPACE_VALUE') or upath.replace('/', '.')) + '.'
+
+ cython_coverage = unit.get('CYTHON_COVERAGE') == 'yes'
+ cythonize_py = False
+ optimize_proto = unit.get('OPTIMIZE_PY_PROTOS_FLAG') == 'yes'
+
+ cython_directives = []
+ if cython_coverage:
+ cython_directives += ['-X', 'linetrace=True']
+
+ pyxs_c = []
+ pyxs_c_h = []
+ pyxs_c_api_h = []
+ pyxs_cpp = []
+ pyxs = pyxs_cpp
+ swigs_c = []
+ swigs_cpp = []
+ swigs = swigs_cpp
+ pys = []
+ protos = []
+ evs = []
+ fbss = []
+ py_namespaces = {}
+
+ dump_dir = unit.get('PYTHON_BUILD_DUMP_DIR')
+ dump_output = None
+ if dump_dir:
+ import thread
+ pid = os.getpid()
+ tid = thread.get_ident()
+ dump_name = '{}-{}.dump'.format(pid, tid)
+ dump_output = open(os.path.join(dump_dir, dump_name), 'a')
+
+ args = iter(args)
+ for arg in args:
+ # Namespace directives.
+ if arg == 'TOP_LEVEL':
+ ns = ''
+ elif arg == 'NAMESPACE':
+ ns = next(args) + '.'
+ # Cython directives.
+ elif arg == 'CYTHON_C':
+ pyxs = pyxs_c
+ elif arg == 'CYTHON_C_H':
+ pyxs = pyxs_c_h
+ elif arg == 'CYTHON_C_API_H':
+ pyxs = pyxs_c_api_h
+ elif arg == 'CYTHON_CPP':
+ pyxs = pyxs_cpp
+ elif arg == 'CYTHON_DIRECTIVE':
+ cython_directives += ['-X', next(args)]
+ elif arg == 'CYTHONIZE_PY':
+ cythonize_py = True
+ # SWIG.
+ elif arg == 'SWIG_C':
+ swigs = swigs_c
+ elif arg == 'SWIG_CPP':
+ swigs = swigs_cpp
+ # Unsupported but legal PROTO_LIBRARY arguments.
+ elif arg == 'GLOBAL' or not in_proto_library and arg.endswith('.gztproto'):
+ pass
+ elif arg == '_MR':
+ # GLOB support: convert arcadia-root-relative paths to module-relative
+ # srcs are assumed to start with ${ARCADIA_ROOT}
+ trim = len(unit.path()) + 14
+ # Sources.
+ else:
+ main_mod = arg == 'MAIN'
+ if main_mod:
+ arg = next(args)
+
+ if '=' in arg:
+ main_py = False
+ path, mod = arg.split('=', 1)
+ else:
+ if trim:
+ arg = arg[trim:]
+ if arg.endswith('.gztproto'):
+ need_gazetteer_peerdir = True
+ path = '{}.proto'.format(arg[:-9])
+ else:
+ path = arg
+ main_py = (path == '__main__.py' or path.endswith('/__main__.py'))
+ if not py3 and unit_needs_main and main_py:
+ mod = '__main__'
+ else:
+ if arg.startswith('../'):
+ ymake.report_configure_error('PY_SRCS item starts with "../": {!r}'.format(arg))
+ if arg.startswith('/'):
+ ymake.report_configure_error('PY_SRCS item starts with "/": {!r}'.format(arg))
+ continue
+ mod_name = stripext(arg).replace('/', '.')
+ if py3 and path.endswith('.py') and is_extended_source_search_enabled(path, unit):
+ # Dig out real path from the file path. Unit.path is not enough because of SRCDIR and ADDINCL
+ root_rel_path = rootrel_arc_src(path, unit)
+ mod_root_path = root_rel_path[:-(len(path) + 1)]
+ py_namespaces.setdefault(mod_root_path, set()).add(ns if ns else '.')
+ mod = ns + mod_name
+
+ if main_mod:
+ py_main(unit, mod + ":main")
+ elif py3 and unit_needs_main and main_py:
+ py_main(unit, mod)
+
+ if py_main_only:
+ continue
+
+ if py3 and mod == '__main__':
+ ymake.report_configure_error('TOP_LEVEL __main__.py is not allowed in PY3_PROGRAM')
+
+ pathmod = (path, mod)
+
+ if dump_output is not None:
+ dump_output.write('{path}\t{module}\n'.format(path=rootrel_arc_src(path, unit), module=mod))
+
+ if path.endswith('.py'):
+ if cythonize_py:
+ pyxs.append(pathmod)
+ else:
+ pys.append(pathmod)
+ elif path.endswith('.pyx'):
+ pyxs.append(pathmod)
+ elif path.endswith('.proto'):
+ protos.append(pathmod)
+ elif path.endswith('.ev'):
+ evs.append(pathmod)
+ elif path.endswith('.swg'):
+ swigs.append(pathmod)
+ # Allow pyi files in PY_SRCS for autocomplete in IDE, but skip it during building
+ elif path.endswith('.pyi'):
+ pass
+ elif path.endswith('.fbs'):
+ fbss.append(pathmod)
+ else:
+ ymake.report_configure_error('in PY_SRCS: unrecognized arg {!r}'.format(path))
+
+ if dump_output is not None:
+ dump_output.close()
+
+ if pyxs:
+ files2res = set()
+ # Include map stores files which were included in the processing pyx file,
+ # to be able to find source code of the included file inside generated file
+ # for currently processing pyx file.
+ include_map = collections.defaultdict(set)
+
+ if cython_coverage:
+ def process_pyx(filename, path, out_suffix, noext):
+ # skip generated files
+ if not is_arc_src(path, unit):
+ return
+ # source file
+ files2res.add((filename, path))
+ # generated
+ if noext:
+ files2res.add((os.path.splitext(filename)[0] + out_suffix, os.path.splitext(path)[0] + out_suffix))
+ else:
+ files2res.add((filename + out_suffix, path + out_suffix))
+ # used includes
+ for entry in parse_pyx_includes(filename, path, unit.resolve('$S')):
+ files2res.add(entry)
+ include_arc_rel = entry[0]
+ include_map[filename].add(include_arc_rel)
+ else:
+ def process_pyx(filename, path, out_suffix, noext):
+ pass
+
+ for pyxs, cython, out_suffix, noext in [
+ (pyxs_c, unit.on_buildwith_cython_c_dep, ".c", False),
+ (pyxs_c_h, unit.on_buildwith_cython_c_h, ".c", True),
+ (pyxs_c_api_h, unit.on_buildwith_cython_c_api_h, ".c", True),
+ (pyxs_cpp, unit.on_buildwith_cython_cpp_dep, ".cpp", False),
+ ]:
+ for path, mod in pyxs:
+ filename = rootrel_arc_src(path, unit)
+ cython_args = [path]
+
+ dep = path
+ if path.endswith('.py'):
+ pxd = '/'.join(mod.split('.')) + '.pxd'
+ if unit.resolve_arc_path(pxd):
+ dep = pxd
+ cython_args.append(dep)
+
+ cython_args += [
+ '--module-name', mod,
+ '--init-suffix', mangle(mod),
+ '--source-root', '${ARCADIA_ROOT}',
+ # set arcadia root relative __file__ for generated modules
+ '-X', 'set_initial_path={}'.format(filename),
+ ] + cython_directives
+
+ cython(cython_args)
+ py_register(unit, mod, py3)
+ process_pyx(filename, path, out_suffix, noext)
+
+ if files2res:
+ # Compile original and generated sources into target for proper cython coverage calculation
+ unit.onresource_files([x for name, path in files2res for x in ('DEST', name, path)])
+
+ if include_map:
+ data = []
+ prefix = 'resfs/cython/include'
+ for line in sorted('{}/{}={}'.format(prefix, filename, ':'.join(sorted(files))) for filename, files in include_map.iteritems()):
+ data += ['-', line]
+ unit.onresource(data)
+
+ for swigs, on_swig_python in [
+ (swigs_c, unit.on_swig_python_c),
+ (swigs_cpp, unit.on_swig_python_cpp),
+ ]:
+ for path, mod in swigs:
+ # Make output prefix basename match swig module name.
+ prefix = path[:path.rfind('/') + 1] + mod.rsplit('.', 1)[-1]
+ swg_py = '{}/{}/{}.py'.format('${ARCADIA_BUILD_ROOT}', upath, prefix)
+ on_swig_python([path, prefix])
+ onpy_register(unit, mod + '_swg')
+ onpy_srcs(unit, swg_py + '=' + mod)
+
+ if pys:
+ pys_seen = set()
+ pys_dups = {m for _, m in pys if (m in pys_seen or pys_seen.add(m))}
+ if pys_dups:
+ ymake.report_configure_error('Duplicate(s) is found in the PY_SRCS macro: {}'.format(pys_dups))
+
+ res = []
+
+ if py3:
+ mod_list_md5 = md5()
+ for path, mod in pys:
+ mod_list_md5.update(mod)
+ if not (venv and is_extended_source_search_enabled(path, unit)):
+ dest = 'py/' + mod.replace('.', '/') + '.py'
+ if with_py:
+ res += ['DEST', dest, path]
+ if with_pyc:
+ root_rel_path = rootrel_arc_src(path, unit)
+ dst = path + uniq_suffix(path, unit)
+ unit.on_py3_compile_bytecode([root_rel_path + '-', path, dst])
+ res += ['DEST', dest + '.yapyc3', dst + '.yapyc3']
+
+ if py_namespaces:
+ # Note: Add md5 to key to prevent key collision if two or more PY_SRCS() used in the same ya.make
+ ns_res = []
+ for path, ns in sorted(py_namespaces.items()):
+ key = '{}/{}/{}'.format(PY_NAMESPACE_PREFIX, mod_list_md5.hexdigest(), path)
+ namespaces = ':'.join(sorted(ns))
+ ns_res += ['-', '{}="{}"'.format(key, namespaces)]
+ unit.onresource(ns_res)
+
+ unit.onresource_files(res)
+ add_python_lint_checks(unit, 3, [path for path, mod in pys] + unit.get(['_PY_EXTRA_LINT_FILES_VALUE']).split())
+ else:
+ for path, mod in pys:
+ root_rel_path = rootrel_arc_src(path, unit)
+ if with_py:
+ key = '/py_modules/' + mod
+ res += [
+ path, key,
+ '-', 'resfs/src/{}={}'.format(key, root_rel_path),
+ ]
+ if with_pyc:
+ src = unit.resolve_arc_path(path) or path
+ dst = path + uniq_suffix(path, unit)
+ unit.on_py_compile_bytecode([root_rel_path + '-', src, dst])
+ res += [dst + '.yapyc', '/py_code/' + mod]
+
+ unit.onresource(res)
+ add_python_lint_checks(unit, 2, [path for path, mod in pys] + unit.get(['_PY_EXTRA_LINT_FILES_VALUE']).split())
+
+ use_vanilla_protoc = unit.get('USE_VANILLA_PROTOC') == 'yes'
+ if use_vanilla_protoc:
+ cpp_runtime_path = 'contrib/libs/protobuf_std'
+ py_runtime_path = 'contrib/python/protobuf_std'
+ builtin_proto_path = cpp_runtime_path + '/' + BUILTIN_PROTO
+ else:
+ cpp_runtime_path = 'contrib/libs/protobuf'
+ py_runtime_path = 'contrib/python/protobuf'
+ builtin_proto_path = cpp_runtime_path + '/' + BUILTIN_PROTO
+
+ if protos:
+ if not upath.startswith(py_runtime_path) and not upath.startswith(builtin_proto_path):
+ unit.onpeerdir(py_runtime_path)
+
+ unit.onpeerdir(unit.get("PY_PROTO_DEPS").split())
+
+ proto_paths = [path for path, mod in protos]
+ unit.on_generate_py_protos_internal(proto_paths)
+ unit.onpy_srcs([
+ pb2_arg(py_suf, path, mod, unit)
+ for path, mod in protos
+ for py_suf in unit.get("PY_PROTO_SUFFIXES").split()
+ ])
+
+ if optimize_proto and need_gazetteer_peerdir:
+ unit.onpeerdir(['kernel/gazetteer/proto'])
+
+ if evs:
+ unit.onpeerdir([cpp_runtime_path])
+ unit.on_generate_py_evs_internal([path for path, mod in evs])
+ unit.onpy_srcs([ev_arg(path, mod, unit) for path, mod in evs])
+
+ if fbss:
+ unit.onpeerdir(unit.get('_PY_FBS_DEPS').split())
+ pysrc_base_name = listid(fbss)
+ unit.onfbs_to_pysrc([pysrc_base_name] + [path for path, _ in fbss])
+ unit.onsrcs(['GLOBAL', '{}.fbs.pysrc'.format(pysrc_base_name)])
+
+
+def _check_test_srcs(*args):
+ used = set(args) & {"NAMESPACE", "TOP_LEVEL", "__main__.py"}
+ if used:
+ param = list(used)[0]
+ ymake.report_configure_error('in TEST_SRCS: you cannot use {} here - it would broke testing machinery'.format(param))
+
+
+def ontest_srcs(unit, *args):
+ _check_test_srcs(*args)
+ if unit.get('PY3TEST_BIN' if is_py3(unit) else 'PYTEST_BIN') != 'no':
+ unit.onpy_srcs(["NAMESPACE", "__tests__"] + list(args))
+
+
+def onpy_doctests(unit, *args):
+ """
+ @usage PY_DOCTEST(Packages...)
+
+ Add to the test doctests for specified Python packages
+ The packages should be part of a test (listed as sources of the test or its PEERDIRs).
+ """
+ if unit.get('PY3TEST_BIN' if is_py3(unit) else 'PYTEST_BIN') != 'no':
+ unit.onresource(['-', 'PY_DOCTEST_PACKAGES="{}"'.format(' '.join(args))])
+
+
+def py_register(unit, func, py3):
+ if py3:
+ unit.on_py3_register([func])
+ else:
+ unit.on_py_register([func])
+
+
+def onpy_register(unit, *args):
+ """
+ @usage: PY_REGISTER([package.]module_name)
+
+ Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter.
+ All modules from the sources listed in PY_SRCS() are registered automatically.
+ To register the modules from the sources in the SRCS(), you need to use PY_REGISTER().
+
+ PY_REGISTER(module_name) initializes module globally via call to initmodule_name()
+ PY_REGISTER(package.module_name) initializes module in the specified package
+ It renames its init function with CFLAGS(-Dinitmodule_name=init7package11module_name)
+ or CFLAGS(-DPyInit_module_name=PyInit_7package11module_name)
+
+ Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister
+ """
+
+ py3 = is_py3(unit)
+
+ for name in args:
+ assert '=' not in name, name
+ py_register(unit, name, py3)
+ if '.' in name:
+ shortname = name.rsplit('.', 1)[1]
+ if py3:
+ unit.oncflags(['-DPyInit_{}=PyInit_{}'.format(shortname, mangle(name))])
+ else:
+ unit.oncflags(['-Dinit{}=init{}'.format(shortname, mangle(name))])
+
+
+def py_main(unit, arg):
+ if unit.get('IGNORE_PY_MAIN'):
+ return
+ unit_needs_main = unit.get('MODULE_TYPE') in ('PROGRAM', 'DLL')
+ if unit_needs_main:
+ py_program(unit, is_py3(unit))
+ unit.onresource(['-', 'PY_MAIN={}'.format(arg)])
+
+
+def onpy_main(unit, arg):
+ """
+ @usage: PY_MAIN(package.module[:func])
+
+ Specifies the module or function from which to start executing a python program
+
+ Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain
+ """
+
+ arg = arg.replace('/', '.')
+
+ if ':' not in arg:
+ arg += ':main'
+
+ py_main(unit, arg)
+
+
+def onpy_constructor(unit, arg):
+ """
+ @usage: PY_CONSTRUCTOR(package.module[:func])
+
+ Specifies the module or function which will be started before python's main()
+ init() is expected in the target module if no function is specified
+ Can be considered as __attribute__((constructor)) for python
+ """
+ if ':' not in arg:
+ arg = arg + '=init'
+ else:
+ arg[arg.index(':')] = '='
+ unit.onresource(['-', 'py/constructors/{}'.format(arg)])
+
+def onpy_enums_serialization(unit, *args):
+ ns = ''
+ args = iter(args)
+ for arg in args:
+ # Namespace directives.
+ if arg == 'NAMESPACE':
+ ns = next(args)
+ else:
+ unit.on_py_enum_serialization_to_json(arg)
+ unit.on_py_enum_serialization_to_py(arg)
+ filename = arg.rsplit('.', 1)[0] + '.py'
+ if len(ns) != 0:
+ onpy_srcs(unit, 'NAMESPACE', ns, filename)
+ else:
+ onpy_srcs(unit, filename)
+
+def oncpp_enums_serialization(unit, *args):
+ args = iter(args)
+ for arg in args:
+ # Namespace directives.
+ if arg == 'NAMESPACE':
+ next(args)
+ else:
+ unit.ongenerate_enum_serialization_with_header(arg)
diff --git a/build/plugins/res.py b/build/plugins/res.py
new file mode 100644
index 0000000000..a937caba81
--- /dev/null
+++ b/build/plugins/res.py
@@ -0,0 +1,106 @@
+from _common import iterpair, listid, pathid, rootrel_arc_src, tobuilddir, filter_out_by_keyword
+
+
+def split(lst, limit):
+ # paths are specified with replaceable prefix
+ # real length is unknown at the moment, that why we use root_lenght
+ # as a rough estimation
+ root_lenght = 200
+ filepath = None
+ lenght = 0
+ bucket = []
+
+ for item in lst:
+ if filepath:
+ lenght += root_lenght + len(filepath) + len(item)
+ if lenght > limit and bucket:
+ yield bucket
+ bucket = []
+ lenght = 0
+
+ bucket.append(filepath)
+ bucket.append(item)
+ filepath = None
+ else:
+ filepath = item
+
+ if bucket:
+ yield bucket
+
+
+def remove_prefix(text, prefix):
+ if text.startswith(prefix):
+ return text[len(prefix):]
+ return text
+
+
+def onfat_resource(unit, *args):
+ unit.onpeerdir(['library/cpp/resource'])
+
+ # Since the maximum length of lpCommandLine string for CreateProcess is 8kb (windows) characters,
+ # we make several calls of rescompiler
+ # https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms682425.aspx
+ for part_args in split(args, 8000):
+ output = listid(part_args) + '.cpp'
+ inputs = [x for x, y in iterpair(part_args) if x != '-']
+ if inputs:
+ inputs = ['IN'] + inputs
+
+ unit.onrun_program(['tools/rescompiler', output] + part_args + inputs + ['OUT_NOAUTO', output])
+ unit.onsrcs(['GLOBAL', output])
+
+
+def onresource_files(unit, *args):
+ """
+ @usage: RESOURCE_FILES([DONT_PARSE] [PREFIX {prefix}] [STRIP prefix_to_strip] {path})
+
+ This macro expands into
+ RESOURCE([DONT_PARSE] {path} resfs/file/{prefix}{path}
+ - resfs/src/resfs/file/{prefix}{remove_prefix(path, prefix_to_strip)}={rootrel_arc_src(path)}
+ )
+
+ resfs/src/{key} stores a source root (or build root) relative path of the
+ source of the value of the {key} resource.
+
+ resfs/file/{key} stores any value whose source was a file on a filesystem.
+ resfs/src/resfs/file/{key} must store its path.
+
+ DONT_PARSE disables parsing for source code files (determined by extension)
+ Please don't abuse: use separate DONT_PARSE macro call only for files subject to parsing
+
+ This form is for use from other plugins:
+ RESOURCE_FILES([DEST {dest}] {path}) expands into RESOURCE({path} resfs/file/{dest})
+
+ @see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/
+ """
+ prefix = ''
+ prefix_to_strip = None
+ dest = None
+ res = []
+ first = 0
+
+ if args and not unit.enabled('_GO_MODULE'):
+ # GO_RESOURCE currently doesn't support DONT_PARSE
+ res.append('DONT_PARSE')
+
+ if args and args[0] == 'DONT_PARSE':
+ first = 1
+
+ args = iter(args[first:])
+ for arg in args:
+ if arg == 'PREFIX':
+ prefix, dest = next(args), None
+ elif arg == 'DEST':
+ dest, prefix = next(args), None
+ elif arg == 'STRIP':
+ prefix_to_strip = next(args)
+ else:
+ path = arg
+ key = 'resfs/file/' + (dest or (prefix + (path if not prefix_to_strip else remove_prefix(path, prefix_to_strip))))
+ src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit))
+ res += ['-', src, path, key]
+
+ if unit.enabled('_GO_MODULE'):
+ unit.on_go_resource(res)
+ else:
+ unit.onresource(res)
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
new file mode 100644
index 0000000000..3ecb0f9a83
--- /dev/null
+++ b/build/plugins/rodata.py
@@ -0,0 +1,168 @@
+import argparse
+import os
+
+import _common as common
+import _import_wrapper as iw
+
+
+class ROData(iw.CustomCommand):
+ def __init__(self, path, unit):
+ self._path = path
+ self._flags = []
+
+ prefix = unit.get('ASM_PREFIX')
+
+ if prefix:
+ self._flags += ['--prefix=' + prefix]
+
+ self._pre_include = []
+
+ flags = unit.get('YASM_FLAGS')
+ if flags:
+ self.parse_flags(path, unit, collections.deque(flags.split(' ')))
+
+ if unit.enabled('DARWIN') or unit.enabled('IOS'):
+ self._platform = ['DARWIN', 'UNIX']
+ self._fmt = 'macho'
+ elif unit.enabled('WIN64') or unit.enabled('CYGWIN'):
+ self._platform = ['WIN64']
+ self._fmt = 'win'
+ elif unit.enabled('WIN32'):
+ self._platform = ['WIN32']
+ self._fmt = 'win'
+ else:
+ self._platform = ['UNIX']
+ self._fmt = 'elf'
+
+ if 'elf' in self._fmt:
+ self._flags += ['-g', 'dwarf2']
+
+ self._fmt += unit.get('HARDWARE_ARCH')
+ self._type = unit.get('HARDWARE_TYPE')
+
+ if unit.enabled('DARWIN') or unit.enabled('IOS') or (unit.enabled('WINDOWS') and unit.enabled('ARCH_TYPE_32')):
+ self._prefix = '_'
+ else:
+ self._prefix = ''
+
+ def parse_flags(self, path, unit, flags):
+ while flags:
+ flag = flags.popleft()
+ if flag.startswith('-I'):
+ raise Exception('Use ADDINCL macro')
+
+ if flag.startswith('-P'):
+ preinclude = flag[2:] or flags.popleft()
+ self._pre_include += unit.resolve_include([(get_retargeted(path, unit)), preinclude])
+ self._flags += ['-P', preinclude]
+ continue
+
+ self._flags.append(flag)
+
+ def descr(self):
+ return 'AS', self._path, 'light-green'
+
+ def flags(self):
+ return self._flags + self._platform + [self._fmt, self._type]
+
+ def tools(self):
+ return ['contrib/tools/yasm']
+
+ def input(self):
+ return common.make_tuples(self._pre_include + [self._path])
+
+ def output(self):
+ return common.make_tuples([common.tobuilddir(common.stripext(self._path)) + '.o'])
+
+ def requested_vars(self):
+ return [('includes', '_ASM__INCLUDE')]
+
+ 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
+
+ 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(self._prefix + file_name + ':\nincbin "' + in_file + '"\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'):
+ f.write('size ' + self._prefix + file_name + ' ' + str(file_size) + '\n')
+ f.write('size ' + self._prefix + file_name + 'Size 4\n')
+
+ return self.do_run(binary, tmp_file)
+
+ def do_run(self, binary, path):
+ def plt():
+ for x in self._platform:
+ yield '-D'
+ yield x
+
+ def incls():
+ for x in self._incl_dirs:
+ yield '-I'
+ 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)
+
+
+class RODataCXX(iw.CustomCommand):
+ def __init__(self, path, unit):
+ self._path = path
+ self._base = os.path.basename(common.stripext(self._path))
+
+ def descr(self):
+ return 'RD', self._path, 'light-green'
+
+ def input(self):
+ return common.make_tuples([self._path])
+
+ def main_out(self):
+ return common.tobuilddir(common.stripext(self._path)) + '.cpp'
+
+ def output(self):
+ return common.make_tuples([self.main_out()])
+
+ 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')
+ f.write(' extern const unsigned char ' + self._base + '[] = {\n')
+
+ cnt = 0
+
+ with open(self.resolve_path(self._path), 'r') as input:
+ for ch in input.read():
+ f.write('0x%02x, ' % ord(ch))
+
+ cnt += 1
+
+ if cnt % 50 == 1:
+ f.write('\n')
+
+ f.write(' };\n')
+ f.write(' extern const unsigned int ' + self._base + 'Size = sizeof(' + self._base + ');\n')
+ f.write('}\n')
+
+
+def ro_data(path, unit):
+ if unit.enabled('ARCH_AARCH64') or unit.enabled('ARCH_ARM') or unit.enabled('ARCH_PPC64LE'):
+ return RODataCXX(path, unit)
+
+ return ROData(path, unit)
+
+
+def init():
+ iw.addrule('rodata', ro_data)
diff --git a/build/plugins/sandbox_registry.py b/build/plugins/sandbox_registry.py
new file mode 100644
index 0000000000..dc1be399b3
--- /dev/null
+++ b/build/plugins/sandbox_registry.py
@@ -0,0 +1,21 @@
+import os
+
+import ymake
+
+
+def onregister_sandbox_import(unit, *args):
+ args = iter(args)
+ for path in args:
+ path = os.path.normpath(path)
+ source = unit.resolve_arc_path(path)
+ abs_source = unit.resolve(source)
+ if not os.path.exists(abs_source):
+ ymake.report_configure_error('REGISTER_SANDBOX_IMPORT: File or directory {} does not exists'.format(path))
+ splited_path = path.split(os.sep)
+ l, r = 0, len(splited_path)
+ if splited_path[-1] == "__init__.py":
+ r -= 1
+ if not splited_path[0]:
+ l += 1
+ path = ".".join(splited_path[l:r])
+ unit.onresource(["-", "{}.{}={}".format("SANDBOX_TASK_REGISTRY", path, path)])
diff --git a/build/plugins/scarab_cant_clash.py b/build/plugins/scarab_cant_clash.py
new file mode 100644
index 0000000000..77dc303183
--- /dev/null
+++ b/build/plugins/scarab_cant_clash.py
@@ -0,0 +1,66 @@
+import _common as common
+
+
+def onacceleo(unit, *args):
+ if unit.get("YMAKE_JAVA_MODULES") == "yes":
+ return
+ flat, kv = common.sort_by_keywords(
+ {'XSD': -1, 'MTL': -1, 'MTL_ROOT': 1, 'LANG': -1, 'OUT': -1, 'OUT_NOAUTO': -1, 'OUTPUT_INCLUDES': -1, 'DEBUG': 0},
+ args
+ )
+
+ try:
+ mtlroot = kv['MTL_ROOT'][0]
+ except Exception:
+ mtlroot = unit.path().replace('$S/', '')
+
+ classpath = ['$SCARAB', ] # XXX special word for ya make to replace following paths with real classpath
+ classpath.append('tools/acceleo')
+
+ depends = []
+ if not unit.get('IDE_MSVS_CALL'):
+ for jar in classpath[1:]:
+ depends.append(jar)
+
+ classpath = ':'.join(classpath)
+
+ # Generate java cmd
+ cmd = [
+ '-classpath',
+ classpath,
+ '-Dfile.encoding=UTF-8',
+ 'ru.yandex.se.logsng.tool.Cli',
+ ]
+
+ for xsd in kv.get('XSD', []):
+ cmd += ['--xsd', xsd]
+
+ for mtl in kv.get('MTL', []):
+ cmd += ['--mtl', mtl]
+
+ for lang in kv.get('LANG', []):
+ cmd += ['--lang', lang]
+
+ cmd += ['--output-dir', unit.path().replace('$S/', '${ARCADIA_BUILD_ROOT}/')]
+ cmd += ['--build-root', '${ARCADIA_BUILD_ROOT}']
+ cmd += ['--source-root', '${ARCADIA_ROOT}']
+ cmd += ['--mtl-root', mtlroot]
+
+ # Generate RUN_JAVA args
+ run_java = cmd
+
+ if 'DEBUG' not in kv:
+ run_java += ['HIDE_OUTPUT']
+
+ inputs = kv.get('XSD', []) + kv.get('MTL', []) + kv.get('LANG', [])
+ if inputs:
+ run_java += ['IN'] + inputs
+
+ for k in 'OUT', 'OUT_NOAUTO', 'OUTPUT_INCLUDES':
+ if kv.get(k):
+ run_java += [k] + kv[k]
+
+ if depends:
+ run_java += ['TOOL'] + depends
+
+ unit.on_run_java(run_java)
diff --git a/build/plugins/split_codegen.py b/build/plugins/split_codegen.py
new file mode 100644
index 0000000000..f1e60bc142
--- /dev/null
+++ b/build/plugins/split_codegen.py
@@ -0,0 +1,43 @@
+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
+
+
+def onsplit_codegen(unit, *args):
+ '''
+ @usage: SPLIT_CODEGEN(tool prefix opts... [OUT_NUM num] [OUTPUT_INCLUDES output_includes...])
+
+ Generator of a certain number of parts of the .cpp file + one header .h file from .in
+
+ Supports keywords:
+ 1. OUT_NUM <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)>
+ 2. OUTPUT_INCLUDES <path to files that will be included in generalnyj of macro files>
+ '''
+ 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])
+
+ tool = flat_args[0]
+ prefix = flat_args[1]
+
+ cmd = [tool, prefix, 'OUT']
+ 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)]
+
+ 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
+
+ unit.on_split_codegen_base(cmd)
diff --git a/build/plugins/ssqls.py b/build/plugins/ssqls.py
new file mode 100644
index 0000000000..618cbc11bc
--- /dev/null
+++ b/build/plugins/ssqls.py
@@ -0,0 +1,40 @@
+from os.path import splitext
+
+import _import_wrapper as iw
+from _common import resolve_includes
+
+
+class SSQLSParser(object):
+ def __init__(self, path, unit):
+ s = unit.resolve_arc_path(path)
+ assert s.startswith('$S/') and s.endswith('.ssqls'), s
+ h = '$B/' + s[3:-6] + '.h'
+
+ import xml.etree.cElementTree as ET
+ try:
+ doc = ET.parse(path)
+ except ET.ParseError as e:
+ unit.message(['error', 'malformed XML {}: {}'.format(path, e)])
+ doc = ET.Element('DbObject')
+ xmls, headers = self.parse_doc(doc)
+ self._includes = resolve_includes(unit, s, xmls)
+ self._induced = {'cpp': [h], 'h': resolve_includes(unit, h, headers)}
+
+ @staticmethod
+ def parse_doc(doc):
+ paths = lambda nodes: filter(None, (e.get('path') for e in nodes))
+ includes = doc.findall('include')
+ ancestors = paths(doc.findall('ancestors/ancestor'))
+ headers = [e.text.strip('<>""') for e in includes]
+ headers += [splitext(s)[0] + '.h' for s in ancestors]
+ return paths(includes) + ancestors, headers
+
+ def includes(self):
+ return self._includes
+
+ def induced_deps(self):
+ return self._induced
+
+
+def init():
+ iw.addparser('ssqls', SSQLSParser)
diff --git a/build/plugins/suppressions.py b/build/plugins/suppressions.py
new file mode 100644
index 0000000000..6f4a1b4f03
--- /dev/null
+++ b/build/plugins/suppressions.py
@@ -0,0 +1,19 @@
+def onsuppressions(unit, *args):
+ """
+ SUPPRESSIONS() - allows to specify files with suppression notation which will be used by
+ address, leak or thread sanitizer runtime by default.
+ Use asan.supp filename for address sanitizer, lsan.supp for leak sanitizer
+ and tsan.supp for thread sanitizer suppressions respectively.
+ See https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-memory-leaks
+ for details.
+ """
+ import os
+
+ valid = ("asan.supp", "tsan.supp", "lsan.supp")
+
+ if unit.get("SANITIZER_TYPE") in ("leak", "address", "thread"):
+ for x in args:
+ if os.path.basename(x) not in valid:
+ unit.message(['error', "Invalid suppression filename: {} (any of the following is expected: {})".format(x, valid)])
+ return
+ unit.onsrcs(["GLOBAL"] + list(args))
diff --git a/build/plugins/swig.py b/build/plugins/swig.py
new file mode 100644
index 0000000000..32a37204a6
--- /dev/null
+++ b/build/plugins/swig.py
@@ -0,0 +1,164 @@
+import os
+import posixpath
+import re
+
+import _import_wrapper as iw
+import _common as common
+
+
+def init():
+ iw.addrule('swg', Swig)
+
+
+class Swig(iw.CustomCommand):
+ def __init__(self, path, unit):
+ self._tool = unit.get('SWIG_TOOL')
+ self._library_dir = unit.get('SWIG_LIBRARY') or 'contrib/tools/swig/Lib'
+ self._local_swig = unit.get('USE_LOCAL_SWIG') == "yes"
+
+ self._path = path
+ self._flags = ['-cpperraswarn']
+
+ self._bindir = common.tobuilddir(unit.path())
+ self._input_name = common.stripext(os.path.basename(self._path))
+
+ relpath = os.path.relpath(os.path.dirname(self._path), unit.path())
+
+ self._swig_lang = unit.get('SWIG_LANG')
+
+ if self._swig_lang != 'jni_java':
+ self._main_out = os.path.join(
+ self._bindir,
+ '' if relpath == '.' else relpath.replace('..', '__'),
+ self._input_name + '_wrap.swg.c')
+
+ if not path.endswith('.c.swg'):
+ self._flags += ['-c++']
+ self._main_out += 'pp'
+
+ # lang_specific_incl_dir = 'perl5' if self._swig_lang == 'perl' else self._swig_lang
+ lang_specific_incl_dir = self._swig_lang
+ if self._swig_lang == 'perl':
+ lang_specific_incl_dir = 'perl5'
+ elif self._swig_lang in ['jni_cpp', 'jni_java']:
+ lang_specific_incl_dir = 'java'
+ incl_dirs = [
+ "FOR", "swig",
+ posixpath.join(self._library_dir, lang_specific_incl_dir),
+ "FOR", "swig",
+ self._library_dir
+ ]
+ self._incl_dirs = ['$S', '$B'] + [posixpath.join('$S', d) for d in incl_dirs]
+
+ modname = unit.get('REALPRJNAME')
+ self._flags.extend(['-module', modname])
+
+ if not self._local_swig:
+ unit.onaddincl(incl_dirs)
+
+ if self._swig_lang == 'python':
+ self._out_name = modname + '.py'
+ self._flags.extend(['-interface', unit.get('MODULE_PREFIX') + modname])
+
+ if self._swig_lang == 'perl':
+ self._out_name = modname + '.pm'
+ self._flags.append('-shadow')
+ unit.onpeerdir(['build/platform/perl'])
+
+ if self._swig_lang in ['jni_cpp', 'java']:
+ self._out_header = os.path.splitext(self._main_out)[0] + '.h'
+ if (not unit.get('USE_SYSTEM_JDK')) and (unit.get('OS_ANDROID') != "yes"):
+ unit.onpeerdir(['contrib/libs/jdk'])
+
+ self._package = 'ru.yandex.' + os.path.dirname(self._path).replace('$S/', '').replace('$B/', '').replace('/', '.').replace('-', '_')
+ if self._swig_lang in ['jni_java', 'java']:
+ self._out_name = os.path.splitext(os.path.basename(self._path))[0] + '.jsrc'
+ elif self._swig_lang != 'jni_cpp':
+ self._flags.append('-' + self._swig_lang)
+
+ def descr(self):
+ return 'SW', self._path, 'yellow'
+
+ def flags(self):
+ return self._flags
+
+ def tools(self):
+ return ['contrib/tools/swig'] if not self._tool else []
+
+ def input(self):
+ return [
+ (self._path, [])
+ ]
+
+ def output(self):
+ if self._swig_lang == 'jni_java':
+ return [(common.join_intl_paths(self._bindir, self._out_name), [])]
+ elif self._swig_lang == 'jni_cpp':
+ return [(self._main_out, []), (self._out_header, [])]
+
+ return [
+ (self._main_out, []),
+ (common.join_intl_paths(self._bindir, self._out_name), (['noauto', 'add_to_outs'] if self._swig_lang != 'java' else [])),
+ ] + ([(self._out_header, [])] if self._swig_lang == 'java' else [])
+
+ def output_includes(self):
+ return [(self._out_header, [])] if self._swig_lang in ['java', 'jni_cpp'] else []
+
+ 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)
+
+ def _incl_flags(self):
+ return ['-I' + self.resolve_path(x) for x in self._incl_dirs]
+
+ def do_run(self, binary, path):
+ self.call([binary] + self._flags + [
+ '-o', self.resolve_path(common.get(self.output, 0)),
+ '-outdir', self.resolve_path(self._bindir)
+ ] + self._incl_flags() + [self.resolve_path(path)])
+
+ def do_run_java(self, binary, path):
+ import tarfile
+
+ outdir = self.resolve_path(self._bindir)
+ if self._swig_lang != 'jni_cpp':
+ java_srcs_dir = os.path.join(outdir, self._package.replace('.', '/'))
+ if not os.path.exists(java_srcs_dir):
+ os.makedirs(java_srcs_dir)
+
+ flags = self._incl_flags()
+ src = self.resolve_path(path)
+ with open(src, 'r') as f:
+ if not re.search(r'(?m)^%module\b', f.read()):
+ flags += ['-module', os.path.splitext(os.path.basename(src))[0]]
+
+ if self._swig_lang == 'jni_cpp':
+ self.call([binary, '-c++', '-o', self._main_out, '-java', '-package', self._package] + flags + [src])
+ elif self._swig_lang == 'jni_java':
+ self.call([binary, '-c++', '-o', os.path.join(outdir, 'unused.cpp'), '-outdir', java_srcs_dir, '-java', '-package', self._package] + flags + [src])
+ elif self._swig_lang == 'java':
+ self.call([
+ binary, '-c++', '-o', self._main_out, '-outdir', java_srcs_dir,
+ '-java', '-package', self._package,
+ ] + flags + [src])
+
+ if self._swig_lang in ['jni_java', 'java']:
+ with tarfile.open(os.path.join(outdir, self._out_name), 'a') as tf:
+ tf.add(java_srcs_dir, arcname=self._package.replace('.', '/'))
+
+ if self._swig_lang in ['jni_cpp', 'java']:
+ header = os.path.splitext(self.resolve_path(self._main_out))[0] + '.h'
+ if not os.path.exists(header):
+ open(header, 'w').close()
+
+
+def on_swig_lang_filtered_srcs(unit, *args):
+ swig_lang = unit.get('SWIG_LANG')
+ allowed_exts = set()
+ if swig_lang == 'jni_cpp':
+ allowed_exts = set(['.cpp', '.swg'])
+ if swig_lang == 'jni_java':
+ allowed_exts = set(['.java', '.swg'])
+ args = [arg for arg in iter(args) if allowed_exts and os.path.splitext(arg)[1] in allowed_exts]
+ unit.onsrcs(args)
diff --git a/build/plugins/tests/test_code_generator.py b/build/plugins/tests/test_code_generator.py
new file mode 100644
index 0000000000..a675d9068c
--- /dev/null
+++ b/build/plugins/tests/test_code_generator.py
@@ -0,0 +1,16 @@
+from build.plugins import code_generator
+
+
+def test_include_parser():
+ template_file = """
+ @ from 'util/namespace.macro' import namespace, change_namespace, close_namespaces
+ @ import 'market/tools/code_generator/templates/serialization/json.macro' as json
+ @ import 'market/tools/code_generator/templates/serialization/request_parameters.macro' as rp
+ #include <sss/abcdefg.h>
+ #include<fff/asd>
+ #include "hhh/quququ.h"
+ """
+
+ includes, induced = code_generator.CodeGeneratorTemplateParser.parse_includes(template_file.split('\n'))
+ assert includes == ['util/namespace.macro', 'market/tools/code_generator/templates/serialization/json.macro', 'market/tools/code_generator/templates/serialization/request_parameters.macro']
+ assert induced == ['sss/abcdefg.h', 'fff/asd', 'hhh/quququ.h']
diff --git a/build/plugins/tests/test_common.py b/build/plugins/tests/test_common.py
new file mode 100644
index 0000000000..e1780354f8
--- /dev/null
+++ b/build/plugins/tests/test_common.py
@@ -0,0 +1,49 @@
+import pytest
+
+import build.plugins._common as pc
+
+
+def test_sort_by_keywords():
+ keywords = {'KEY1': 2, 'KEY2': 0, 'KEY3': 1}
+ args = 'aaaa bbbb KEY2 KEY1 kkk10 kkk11 ccc ddd KEY3 kkk3 eee'.split()
+ flat, spec = pc.sort_by_keywords(keywords, args)
+ assert flat == ['aaaa', 'bbbb', 'ccc', 'ddd', 'eee']
+ assert spec == {'KEY1': ['kkk10', 'kkk11'], 'KEY2': True, 'KEY3': ['kkk3']}
+
+ keywords = {'KEY1': 0, 'KEY2': 4}
+ args = 'aaaa KEY2 eee'.split()
+ flat, spec = pc.sort_by_keywords(keywords, args)
+ assert flat == ['aaaa']
+ assert spec == {'KEY2': ['eee']}
+
+ keywords = {'KEY1': 2, 'KEY2': 2}
+ args = 'KEY1 k10 KEY2 k20 KEY1 k11 KEY2 k21 KEY1 k13'.split()
+ flat, spec = pc.sort_by_keywords(keywords, args)
+ assert flat == []
+ assert spec == {'KEY1': ['k10', 'k11', 'k13'], 'KEY2': ['k20', 'k21']}
+
+
+def test_filter_out_by_keyword():
+ assert pc.filter_out_by_keyword([], 'A') == []
+ assert pc.filter_out_by_keyword(['x'], 'A') == ['x']
+ assert pc.filter_out_by_keyword(['x', 'A'], 'A') == ['x']
+ assert pc.filter_out_by_keyword(['x', 'A', 'B'], 'A') == ['x']
+ assert pc.filter_out_by_keyword(['x', 'A', 'B', 'y'], 'A') == ['x', 'y']
+ assert pc.filter_out_by_keyword(['x', 'A', 'A', 'y'], 'A') == ['x', 'y']
+ assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A'], 'A') == ['x']
+ assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y'], 'A') == ['x', 'y']
+ assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A'], 'A') == ['x', 'y']
+ assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A', 'F', 'z'], 'A') == ['x', 'y', 'z']
+
+
+test_data = [
+ [[1, 2, 3], 1, [[1], [2], [3]]],
+ [[1, 2, 3], 2, [[1, 2], [3]]],
+ [[1, 2, 3, 4], 2, [[1, 2], [3, 4]]],
+ [[1], 5, [[1]]],
+]
+
+
+@pytest.mark.parametrize('lst, chunk_size, expected', test_data, ids=[str(num + 1) for num in range(len(test_data))])
+def test_generate_chunks(lst, chunk_size, expected):
+ assert list(pc.generate_chunks(lst, chunk_size)) == expected
diff --git a/build/plugins/tests/test_requirements.py b/build/plugins/tests/test_requirements.py
new file mode 100644
index 0000000000..24d57ac901
--- /dev/null
+++ b/build/plugins/tests/test_requirements.py
@@ -0,0 +1,52 @@
+import pytest
+
+import build.plugins._requirements as requirements
+import build.plugins._test_const as consts
+
+
+class TestRequirements(object):
+ @pytest.mark.parametrize('test_size', consts.TestSize.sizes())
+ def test_cpu(self, test_size):
+ max_cpu = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu)
+ min_cpu = consts.TestRequirementsConstants.MinCpu
+ assert requirements.check_cpu(-1, test_size)
+ assert requirements.check_cpu(min_cpu - 1, test_size)
+ assert requirements.check_cpu("unknown", test_size)
+ assert not requirements.check_cpu(1, test_size)
+ assert not requirements.check_cpu(3, test_size)
+ assert requirements.check_cpu(1000, test_size)
+ if max_cpu != consts.TestRequirementsConstants.All:
+ assert requirements.check_cpu(max_cpu + 1, test_size)
+ assert requirements.check_cpu(max_cpu + 4, test_size)
+ assert requirements.check_cpu(consts.TestRequirementsConstants.All, test_size)
+ else:
+ assert not requirements.check_cpu(consts.TestRequirementsConstants.All, test_size)
+
+ @pytest.mark.parametrize('test_size', consts.TestSize.sizes())
+ def test_ram(self, test_size):
+ max_ram = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram)
+ min_ram = consts.TestRequirementsConstants.MinRam
+ assert requirements.check_ram(-1, test_size)
+ assert requirements.check_ram(min_ram - 1, test_size)
+ assert requirements.check_ram(max_ram + 1, test_size)
+ assert not requirements.check_ram(1, test_size)
+ assert not requirements.check_ram(4, test_size)
+ assert not requirements.check_ram(5, test_size)
+ assert not requirements.check_ram(32, consts.TestSize.Large)
+ assert requirements.check_ram(48, consts.TestSize.Large)
+
+ assert not requirements.check_ram(1, test_size, is_kvm=True)
+ assert not requirements.check_ram(4, test_size, is_kvm=True)
+ assert not requirements.check_ram(16, test_size, is_kvm=True)
+ assert requirements.check_ram(32, test_size, is_kvm=True)
+
+ @pytest.mark.parametrize('test_size', consts.TestSize.sizes())
+ def test_ram_disk(self, test_size):
+ max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk)
+ min_ram_disk = consts.TestRequirementsConstants.MinRamDisk
+ assert requirements.check_ram_disk(-1, test_size)
+ assert requirements.check_ram_disk(min_ram_disk - 1, test_size)
+ assert requirements.check_ram_disk(max_ram_disk + 1, test_size)
+ assert requirements.check_ram_disk(8, test_size)
+ assert not requirements.check_ram_disk(1, test_size)
+ assert not requirements.check_ram_disk(4, test_size)
diff --git a/build/plugins/tests/test_ssqls.py b/build/plugins/tests/test_ssqls.py
new file mode 100644
index 0000000000..2a1d032109
--- /dev/null
+++ b/build/plugins/tests/test_ssqls.py
@@ -0,0 +1,23 @@
+import xml.etree.cElementTree as ET
+
+from build.plugins import ssqls
+
+
+example = '''\
+<?xml version="1.0" encoding="utf-8"?>
+<DbObject>
+ <include path="A.ssqls">&lt;a.h&gt;</include>
+ <include>"b.h"</include>
+
+ <ancestors>
+ <ancestor path="C.ssqls"/>
+ </ancestors>
+</DbObject>
+'''
+
+
+def test_include_parser():
+ doc = ET.fromstring(example)
+ xmls, headers = ssqls.SSQLSParser.parse_doc(doc)
+ assert headers == ['a.h', 'b.h', 'C.h']
+ assert xmls == ['A.ssqls', 'C.ssqls']
diff --git a/build/plugins/tests/ya.make b/build/plugins/tests/ya.make
new file mode 100644
index 0000000000..87228b98df
--- /dev/null
+++ b/build/plugins/tests/ya.make
@@ -0,0 +1,16 @@
+PY2TEST()
+
+OWNER(g:yatool)
+
+PEERDIR(
+ build/plugins
+)
+
+TEST_SRCS(
+ test_code_generator.py
+ test_common.py
+ test_requirements.py
+ test_ssqls.py
+)
+
+END()
diff --git a/build/plugins/xsyn.py b/build/plugins/xsyn.py
new file mode 100644
index 0000000000..ab7c1639db
--- /dev/null
+++ b/build/plugins/xsyn.py
@@ -0,0 +1,34 @@
+import _import_wrapper as iw
+import _common as common
+
+
+class Xsyn(iw.CustomCommand):
+
+ def __init__(self, path, unit):
+ self._path = path
+
+ def descr(self):
+ return 'XN', self._path, 'yellow'
+
+ def tools(self):
+ return []
+
+ def input(self):
+ return common.make_tuples([
+ '$S/library/cpp/xml/parslib/xsyn2ragel.py',
+ self._path,
+ '$S/library/cpp/xml/parslib/xmlpars.xh'
+ ])
+
+ def output(self):
+ return common.make_tuples([
+ common.tobuilddir(self._path + '.h.rl5')
+ ])
+
+ 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))
+
+
+def init():
+ iw.addrule('xsyn', Xsyn)
diff --git a/build/plugins/ya.make b/build/plugins/ya.make
new file mode 100644
index 0000000000..4ad5f5988e
--- /dev/null
+++ b/build/plugins/ya.make
@@ -0,0 +1,23 @@
+OWNER(g:ymake)
+
+PY2_LIBRARY()
+
+PY_SRCS(
+ code_generator.py
+ ssqls.py
+ swig.py
+
+ _common.py
+ _custom_command.py
+ _import_wrapper.py
+ _requirements.py
+ _test_const.py
+)
+
+PEERDIR(build/plugins/lib)
+
+END()
+
+RECURSE(
+ tests
+)
diff --git a/build/plugins/yql_python_udf.py b/build/plugins/yql_python_udf.py
new file mode 100644
index 0000000000..c4f949d8a9
--- /dev/null
+++ b/build/plugins/yql_python_udf.py
@@ -0,0 +1,55 @@
+from _common import sort_by_keywords
+
+
+def get_or_default(kv, name, default):
+ if name in kv:
+ return kv[name][0]
+ return default
+
+
+def onregister_yql_python_udf(unit, *args):
+ flat, kv = sort_by_keywords({'NAME': 1, 'RESOURCE_NAME': 1, 'ADD_LIBRA_MODULES': 1}, args)
+ assert len(flat) == 0
+ name = get_or_default(kv, 'NAME', 'CustomPython')
+ resource_name = get_or_default(kv, 'RESOURCE_NAME', name)
+ add_libra_modules = get_or_default(kv, 'ADD_LIBRA_MODULES', 'no') == 'yes'
+
+ use_arcadia_python = unit.get('USE_ARCADIA_PYTHON') == 'yes'
+ py3 = unit.get('PYTHON3') == 'yes'
+
+ unit.onyql_abi_version(['2', '9', '0'])
+ unit.onpeerdir(['yql/udfs/common/python/python_udf'])
+ unit.onpeerdir(['ydb/library/yql/public/udf'])
+
+ if add_libra_modules:
+ unit.onpeerdir(['quality/user_sessions/libra_arc/noyql'])
+ unit.onpeerdir(['yql/udfs/quality/libra/module'])
+
+ if use_arcadia_python:
+ flavor = 'Arcadia'
+ unit.onpeerdir([
+ 'library/python/runtime',
+ 'yql/udfs/common/python/main'
+ ] if not py3 else [
+ 'library/python/runtime_py3',
+ 'yql/udfs/common/python/main_py3'
+ ])
+ else:
+ flavor = 'System'
+
+ output_includes = [
+ 'yql/udfs/common/python/python_udf/python_udf.h',
+ 'ydb/library/yql/public/udf/udf_registrator.h',
+ ]
+ if add_libra_modules:
+ output_includes.append('yql/udfs/quality/libra/module/module.h')
+
+ path = name + '.yql_python_udf.cpp'
+ libra_flag = '1' if add_libra_modules else '0'
+ unit.onpython([
+ 'build/scripts/gen_yql_python_udf.py',
+ flavor, name, resource_name, path, libra_flag,
+ 'OUT', path,
+ 'OUTPUT_INCLUDES',
+ ] + output_includes
+ )
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
new file mode 100644
index 0000000000..8970837f0f
--- /dev/null
+++ b/build/plugins/ytest.py
@@ -0,0 +1,1113 @@
+import os
+import re
+import sys
+import json
+import copy
+import base64
+import shlex
+import _common
+import lib._metric_resolvers as mr
+import _test_const as consts
+import _requirements as reqs
+import StringIO
+import subprocess
+import collections
+
+import ymake
+
+
+MDS_URI_PREFIX = 'https://storage.yandex-team.ru/get-devtools/'
+MDS_SHEME = 'mds'
+CANON_DATA_DIR_NAME = 'canondata'
+CANON_OUTPUT_STORAGE = 'canondata_storage'
+CANON_RESULT_FILE_NAME = 'result.json'
+CANON_MDS_RESOURCE_REGEX = re.compile(re.escape(MDS_URI_PREFIX) + r'(.*?)($|#)')
+CANON_SB_VAULT_REGEX = re.compile(r"\w+=(value|file):[-\w]+:\w+")
+CANON_SBR_RESOURCE_REGEX = re.compile(r'(sbr:/?/?(\d+))')
+
+VALID_NETWORK_REQUIREMENTS = ("full", "restricted")
+VALID_DNS_REQUIREMENTS = ("default", "local", "dns64")
+BLOCK_SEPARATOR = '============================================================='
+SPLIT_FACTOR_MAX_VALUE = 1000
+SPLIT_FACTOR_TEST_FILES_MAX_VALUE = 4250
+PARTITION_MODS = ('SEQUENTIAL', 'MODULO')
+DEFAULT_TIDY_CONFIG = "build/config/tests/clang_tidy/config.yaml"
+DEFAULT_TIDY_CONFIG_MAP_PATH = "build/yandex_specific/config/clang_tidy/tidy_default_map.json"
+PROJECT_TIDY_CONFIG_MAP_PATH = "build/yandex_specific/config/clang_tidy/tidy_project_map.json"
+
+
+tidy_config_map = None
+
+def ontest_data(unit, *args):
+ ymake.report_configure_error("TEST_DATA is removed in favour of DATA")
+
+
+def save_in_file(filepath, data):
+ if filepath:
+ with open(filepath, 'a') as file_handler:
+ if os.stat(filepath).st_size == 0:
+ print >>file_handler, BLOCK_SEPARATOR
+ print >> file_handler, data
+
+
+def prepare_recipes(data):
+ data = data.replace('"USE_RECIPE_DELIM"', "\n")
+ data = data.replace("$TEST_RECIPES_VALUE", "")
+ return base64.b64encode(data or "")
+
+
+def prepare_env(data):
+ data = data.replace("$TEST_ENV_VALUE", "")
+ return serialize_list(shlex.split(data))
+
+
+def is_yt_spec_contain_pool_info(filename): # XXX switch to yson in ymake + perf test for configure
+ pool_re = re.compile(r"""['"]*pool['"]*\s*?=""")
+ cypress_root_re = re.compile(r"""['"]*cypress_root['"]*\s*=""")
+ with open(filename, 'r') as afile:
+ yt_spec = afile.read()
+ return pool_re.search(yt_spec) and cypress_root_re.search(yt_spec)
+
+
+def validate_sb_vault(name, value):
+ if not CANON_SB_VAULT_REGEX.match(value):
+ return "sb_vault value '{}' should follow pattern <ENV_NAME>=:<value|file>:<owner>:<vault key>".format(value)
+
+
+def validate_numerical_requirement(name, value):
+ if mr.resolve_value(value) is None:
+ return "Cannot convert [[imp]]{}[[rst]] to the proper [[imp]]{}[[rst]] requirement value".format(value, name)
+
+
+def validate_choice_requirement(name, val, valid):
+ if val not in valid:
+ return "Unknown [[imp]]{}[[rst]] requirement: [[imp]]{}[[rst]], choose from [[imp]]{}[[rst]]".format(name, val, ", ".join(valid))
+
+
+def validate_force_sandbox_requirement(name, value, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run, check_func):
+ if is_force_sandbox or not in_autocheck or is_fuzzing or is_ytexec_run:
+ if value == 'all':
+ return
+ return validate_numerical_requirement(name, value)
+ error_msg = validate_numerical_requirement(name, value)
+ if error_msg:
+ return error_msg
+ return check_func(mr.resolve_value(value), test_size, is_kvm)
+
+
+# TODO: Remove is_kvm param when there will be guarantees on RAM
+def validate_requirement(req_name, value, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run):
+ req_checks = {
+ 'container': validate_numerical_requirement,
+ 'cpu': lambda n, v: validate_force_sandbox_requirement(n, v, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run, reqs.check_cpu),
+ 'disk_usage': validate_numerical_requirement,
+ 'dns': lambda n, v: validate_choice_requirement(n, v, VALID_DNS_REQUIREMENTS),
+ 'kvm': None,
+ 'network': lambda n, v: validate_choice_requirement(n, v, VALID_NETWORK_REQUIREMENTS),
+ 'ram': lambda n, v: validate_force_sandbox_requirement(n, v, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run, reqs.check_ram),
+ 'ram_disk': lambda n, v: validate_force_sandbox_requirement(n, v, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run, reqs.check_ram_disk),
+ 'sb': None,
+ 'sb_vault': validate_sb_vault,
+ }
+
+ if req_name not in req_checks:
+ return "Unknown requirement: [[imp]]{}[[rst]], choose from [[imp]]{}[[rst]]".format(req_name, ", ".join(sorted(req_checks)))
+
+ if req_name in ('container', 'disk') and not is_force_sandbox:
+ return "Only [[imp]]LARGE[[rst]] tests without [[imp]]ya:force_distbuild[[rst]] tag can have [[imp]]{}[[rst]] requirement".format(req_name)
+
+ check_func = req_checks[req_name]
+ if check_func:
+ return check_func(req_name, value)
+
+
+def validate_test(unit, kw):
+ def get_list(key):
+ return deserialize_list(kw.get(key, ""))
+
+ valid_kw = copy.deepcopy(kw)
+ errors = []
+ warnings = []
+
+ if valid_kw.get('SCRIPT-REL-PATH') == 'boost.test':
+ project_path = valid_kw.get('BUILD-FOLDER-PATH', "")
+ if not project_path.startswith(("contrib", "mail", "maps", "tools/idl", "metrika", "devtools", "mds", "yandex_io", "smart_devices")):
+ errors.append("BOOSTTEST is not allowed here")
+ elif valid_kw.get('SCRIPT-REL-PATH') == 'gtest':
+ project_path = valid_kw.get('BUILD-FOLDER-PATH', "")
+ if not project_path.startswith(("contrib", "devtools", "mail", "mds", "taxi")):
+ errors.append("GTEST_UGLY is not allowed here, use GTEST instead")
+
+ size_timeout = collections.OrderedDict(sorted(consts.TestSize.DefaultTimeouts.items(), key=lambda t: t[1]))
+
+ size = valid_kw.get('SIZE', consts.TestSize.Small).lower()
+ # TODO: use set instead list
+ tags = get_list("TAG")
+ requirements_orig = get_list("REQUIREMENTS")
+ in_autocheck = "ya:not_autocheck" not in tags and 'ya:manual' not in tags
+ is_fat = 'ya:fat' in tags
+ is_force_sandbox = 'ya:force_distbuild' not in tags and is_fat
+ is_ytexec_run = 'ya:yt' in tags
+ is_fuzzing = valid_kw.get("FUZZING", False)
+ is_kvm = 'kvm' in requirements_orig
+ requirements = {}
+ list_requirements = ('sb_vault')
+ for req in requirements_orig:
+ if req in ('kvm', ):
+ requirements[req] = str(True)
+ continue
+
+ if ":" in req:
+ req_name, req_value = req.split(":", 1)
+ if req_name in list_requirements:
+ requirements[req_name] = ",".join(filter(None, [requirements.get(req_name), req_value]))
+ else:
+ if req_name in requirements:
+ if req_value in ["0"]:
+ warnings.append("Requirement [[imp]]{}[[rst]] is dropped [[imp]]{}[[rst]] -> [[imp]]{}[[rst]]".format(req_name, requirements[req_name], req_value))
+ del requirements[req_name]
+ elif requirements[req_name] != req_value:
+ warnings.append("Requirement [[imp]]{}[[rst]] is redefined [[imp]]{}[[rst]] -> [[imp]]{}[[rst]]".format(req_name, requirements[req_name], req_value))
+ requirements[req_name] = req_value
+ else:
+ requirements[req_name] = req_value
+ else:
+ errors.append("Invalid requirement syntax [[imp]]{}[[rst]]: expect <requirement>:<value>".format(req))
+
+ if not errors:
+ for req_name, req_value in requirements.items():
+ error_msg = validate_requirement(req_name, req_value, size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run)
+ if error_msg:
+ errors += [error_msg]
+
+ invalid_requirements_for_distbuild = [requirement for requirement in requirements.keys() if requirement not in ('ram', 'ram_disk', 'cpu', 'network')]
+ sb_tags = [tag for tag in tags if tag.startswith('sb:')]
+
+ if is_fat:
+ if size != consts.TestSize.Large:
+ errors.append("Only LARGE test may have ya:fat tag")
+
+ if in_autocheck and not is_force_sandbox:
+ if invalid_requirements_for_distbuild:
+ errors.append("'{}' REQUIREMENTS options can be used only for FAT tests without ya:force_distbuild tag. Remove TAG(ya:force_distbuild) or an option.".format(invalid_requirements_for_distbuild))
+ if sb_tags:
+ errors.append("You can set sandbox tags '{}' only for FAT tests without ya:force_distbuild. Remove TAG(ya:force_sandbox) or sandbox tags.".format(sb_tags))
+ if 'ya:sandbox_coverage' in tags:
+ errors.append("You can set 'ya:sandbox_coverage' tag only for FAT tests without ya:force_distbuild.")
+ else:
+ if is_force_sandbox:
+ errors.append('ya:force_sandbox can be used with LARGE tests only')
+ if 'ya:nofuse' in tags:
+ errors.append('ya:nofuse can be used with LARGE tests only')
+ if 'ya:privileged' in tags:
+ errors.append("ya:privileged can be used with LARGE tests only")
+ if in_autocheck and size == consts.TestSize.Large:
+ errors.append("LARGE test must have ya:fat tag")
+
+ if 'ya:privileged' in tags and 'container' not in requirements:
+ errors.append("Only tests with 'container' requirement can have 'ya:privileged' tag")
+
+ if size not in size_timeout:
+ errors.append("Unknown test size: [[imp]]{}[[rst]], choose from [[imp]]{}[[rst]]".format(size.upper(), ", ".join([sz.upper() for sz in size_timeout.keys()])))
+ else:
+ try:
+ timeout = int(valid_kw.get('TEST-TIMEOUT', size_timeout[size]) or size_timeout[size])
+ script_rel_path = valid_kw.get('SCRIPT-REL-PATH')
+ if timeout < 0:
+ raise Exception("Timeout must be > 0")
+ if size_timeout[size] < timeout and in_autocheck and script_rel_path != 'java.style':
+ suggested_size = None
+ for s, t in size_timeout.items():
+ if timeout <= t:
+ suggested_size = s
+ break
+
+ if suggested_size:
+ suggested_size = ", suggested size: [[imp]]{}[[rst]]".format(suggested_size.upper())
+ else:
+ suggested_size = ""
+ errors.append("Max allowed timeout for test size [[imp]]{}[[rst]] is [[imp]]{} sec[[rst]]{}".format(size.upper(), size_timeout[size], suggested_size))
+ except Exception as e:
+ errors.append("Error when parsing test timeout: [[bad]]{}[[rst]]".format(e))
+
+ requiremtens_list = []
+ for req_name, req_value in requirements.iteritems():
+ requiremtens_list.append(req_name + ":" + req_value)
+ valid_kw['REQUIREMENTS'] = serialize_list(requiremtens_list)
+
+ if valid_kw.get("FUZZ-OPTS"):
+ for option in get_list("FUZZ-OPTS"):
+ if not option.startswith("-"):
+ errors.append("Unrecognized fuzzer option '[[imp]]{}[[rst]]'. All fuzzer options should start with '-'".format(option))
+ break
+ eqpos = option.find("=")
+ if eqpos == -1 or len(option) == eqpos + 1:
+ errors.append("Unrecognized fuzzer option '[[imp]]{}[[rst]]'. All fuzzer options should obtain value specified after '='".format(option))
+ break
+ if option[eqpos - 1] == " " or option[eqpos + 1] == " ":
+ errors.append("Spaces are not allowed: '[[imp]]{}[[rst]]'".format(option))
+ break
+ if option[:eqpos] in ("-runs", "-dict", "-jobs", "-workers", "-artifact_prefix", "-print_final_stats"):
+ errors.append("You can't use '[[imp]]{}[[rst]]' - it will be automatically calculated or configured during run".format(option))
+ break
+
+ if valid_kw.get("YT-SPEC"):
+ if not is_ytexec_run:
+ errors.append("You can use YT_SPEC macro only tests marked with ya:yt tag")
+ else:
+ for filename in get_list("YT-SPEC"):
+ filename = unit.resolve('$S/' + filename)
+ if not os.path.exists(filename):
+ errors.append("File '{}' specified in the YT_SPEC macro doesn't exist".format(filename))
+ continue
+ if is_yt_spec_contain_pool_info(filename) and "ya:external" not in tags:
+ tags.append("ya:external")
+ tags.append("ya:yt_research_pool")
+
+ if valid_kw.get("USE_ARCADIA_PYTHON") == "yes" and valid_kw.get("SCRIPT-REL-PATH") == "py.test":
+ errors.append("PYTEST_SCRIPT is deprecated")
+
+ partition = valid_kw.get('TEST_PARTITION', 'SEQUENTIAL')
+ if partition not in PARTITION_MODS:
+ raise ValueError('partition mode should be one of {}, detected: {}'.format(PARTITION_MODS, partition))
+
+ if valid_kw.get('SPLIT-FACTOR'):
+ if valid_kw.get('FORK-MODE') == 'none':
+ errors.append('SPLIT_FACTOR must be use with FORK_TESTS() or FORK_SUBTESTS() macro')
+
+ value = 1
+ try:
+ value = int(valid_kw.get('SPLIT-FACTOR'))
+ if value <= 0:
+ raise ValueError("must be > 0")
+ if value > SPLIT_FACTOR_MAX_VALUE:
+ raise ValueError("the maximum allowed value is {}".format(SPLIT_FACTOR_MAX_VALUE))
+ except ValueError as e:
+ errors.append('Incorrect SPLIT_FACTOR value: {}'.format(e))
+
+ if valid_kw.get('FORK-TEST-FILES') and size != consts.TestSize.Large:
+ nfiles = count_entries(valid_kw.get('TEST-FILES'))
+ if nfiles * value > SPLIT_FACTOR_TEST_FILES_MAX_VALUE:
+ errors.append('Too much chunks generated:{} (limit: {}). Remove FORK_TEST_FILES() macro or reduce SPLIT_FACTOR({}).'.format(
+ nfiles * value, SPLIT_FACTOR_TEST_FILES_MAX_VALUE, value))
+
+ unit_path = get_norm_unit_path(unit)
+ if not is_fat and "ya:noretries" in tags and not is_ytexec_run \
+ and not unit_path.startswith("devtools/") \
+ and not unit_path.startswith("infra/kernel/") \
+ and not unit_path.startswith("yt/python/yt") \
+ and not unit_path.startswith("infra/yp_dns_api/tests") \
+ and not unit_path.startswith("yp/tests"):
+ errors.append("Only LARGE tests can have 'ya:noretries' tag")
+
+ if errors:
+ return None, warnings, errors
+
+ return valid_kw, warnings, errors
+
+
+def get_norm_unit_path(unit, extra=None):
+ path = _common.strip_roots(unit.path())
+ if extra:
+ return '{}/{}'.format(path, extra)
+ return path
+
+
+def dump_test(unit, kw):
+ valid_kw, warnings, errors = validate_test(unit, kw)
+ for w in warnings:
+ unit.message(['warn', w])
+ for e in errors:
+ ymake.report_configure_error(e)
+ if valid_kw is None:
+ return None
+ string_handler = StringIO.StringIO()
+ for k, v in valid_kw.iteritems():
+ print >>string_handler, k + ': ' + v
+ print >>string_handler, BLOCK_SEPARATOR
+ data = string_handler.getvalue()
+ string_handler.close()
+ return data
+
+
+def serialize_list(lst):
+ lst = filter(None, lst)
+ return '\"' + ';'.join(lst) + '\"' if lst else ''
+
+
+def deserialize_list(val):
+ return filter(None, val.replace('"', "").split(";"))
+
+
+def count_entries(x):
+ # see (de)serialize_list
+ assert x is None or isinstance(x, str), type(x)
+ if not x:
+ return 0
+ return x.count(";") + 1
+
+
+def get_values_list(unit, key):
+ res = map(str.strip, (unit.get(key) or '').replace('$' + key, '').strip().split())
+ return [r for r in res if r and r not in ['""', "''"]]
+
+
+def get_norm_paths(unit, key):
+ # return paths without trailing (back)slash
+ return [x.rstrip('\\/') for x in get_values_list(unit, key)]
+
+
+def get_unit_list_variable(unit, name):
+ items = unit.get(name)
+ if items:
+ items = items.split(' ')
+ assert items[0] == "${}".format(name), (items, name)
+ return items[1:]
+ return []
+
+
+def implies(a, b):
+ return bool((not a) or b)
+
+
+def match_coverage_extractor_requirements(unit):
+ # we shouldn't add test if
+ return all([
+ # tests are not requested
+ unit.get("TESTS_REQUESTED") == "yes",
+ # build doesn't imply clang coverage, which supports segment extraction from the binaries
+ unit.get("CLANG_COVERAGE") == "yes",
+ # contrib wasn't requested
+ implies(get_norm_unit_path(unit).startswith("contrib/"), unit.get("ENABLE_CONTRIB_COVERAGE") == "yes"),
+ ])
+
+
+def get_tidy_config_map(unit):
+ global tidy_config_map
+ if tidy_config_map is None:
+ config_map_path = unit.resolve(os.path.join("$S", PROJECT_TIDY_CONFIG_MAP_PATH))
+ with open(config_map_path, 'r') as afile:
+ tidy_config_map = json.load(afile)
+ return tidy_config_map
+
+
+def get_default_tidy_config(unit):
+ unit_path = get_norm_unit_path(unit)
+ default_config_map_path = unit.resolve(os.path.join("$S", DEFAULT_TIDY_CONFIG_MAP_PATH))
+ with open(default_config_map_path, 'r') as afile:
+ tidy_default_config_map = json.load(afile)
+ for project_prefix, config_path in tidy_default_config_map.items():
+ if unit_path.startswith(project_prefix):
+ return config_path
+ return DEFAULT_TIDY_CONFIG
+
+
+def get_project_tidy_config(unit):
+ tidy_map = get_tidy_config_map(unit)
+ unit_path = get_norm_unit_path(unit)
+
+ for project_prefix, config_path in tidy_map.items():
+ if unit_path.startswith(project_prefix):
+ return config_path
+ else:
+ return get_default_tidy_config(unit)
+
+
+def onadd_ytest(unit, *args):
+ keywords = {"DEPENDS": -1, "DATA": -1, "TIMEOUT": 1, "FORK_MODE": 1, "SPLIT_FACTOR": 1,
+ "FORK_SUBTESTS": 0, "FORK_TESTS": 0}
+ flat_args, spec_args = _common.sort_by_keywords(keywords, args)
+
+ test_data = sorted(_common.filter_out_by_keyword(spec_args.get('DATA', []) + get_norm_paths(unit, 'TEST_DATA_VALUE'), 'AUTOUPDATED'))
+
+ if flat_args[1] == "fuzz.test":
+ unit.ondata("arcadia/fuzzing/{}/corpus.json".format(get_norm_unit_path(unit)))
+ elif flat_args[1] == "go.test":
+ data, _ = get_canonical_test_resources(unit)
+ test_data += data
+ elif flat_args[1] == "coverage.extractor" and not match_coverage_extractor_requirements(unit):
+ # XXX
+ # Current ymake implementation doesn't allow to call macro inside the 'when' body
+ # that's why we add ADD_YTEST(coverage.extractor) to every PROGRAM entry and check requirements later
+ return
+ elif flat_args[1] == "clang_tidy" and unit.get("TIDY") != "yes":
+ # Graph is not prepared
+ return
+ elif flat_args[1] == "no.test":
+ return
+ test_size = ''.join(spec_args.get('SIZE', [])) or unit.get('TEST_SIZE_NAME') or ''
+ test_tags = serialize_list(_get_test_tags(unit, spec_args))
+ test_timeout = ''.join(spec_args.get('TIMEOUT', [])) or unit.get('TEST_TIMEOUT') or ''
+ test_requirements = spec_args.get('REQUIREMENTS', []) + get_values_list(unit, 'TEST_REQUIREMENTS_VALUE')
+
+ if flat_args[1] != "clang_tidy" and unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ if flat_args[1] in ("unittest.py", "gunittest", "g_benchmark"):
+ flat_args[1] = "clang_tidy"
+ test_size = 'SMALL'
+ test_tags = ''
+ test_timeout = "60"
+ test_requirements = []
+ unit.set(["TEST_YT_SPEC_VALUE", ""])
+ else:
+ return
+
+ if flat_args[1] == "clang_tidy" and unit.get("TIDY") == "yes":
+ if unit.get("TIDY_CONFIG"):
+ default_config_path = unit.get("TIDY_CONFIG")
+ project_config_path = unit.get("TIDY_CONFIG")
+ else:
+ default_config_path = get_default_tidy_config(unit)
+ project_config_path = get_project_tidy_config(unit)
+
+ unit.set(["DEFAULT_TIDY_CONFIG", default_config_path])
+ unit.set(["PROJECT_TIDY_CONFIG", project_config_path])
+
+ fork_mode = []
+ if 'FORK_SUBTESTS' in spec_args:
+ fork_mode.append('subtests')
+ if 'FORK_TESTS' in spec_args:
+ fork_mode.append('tests')
+ fork_mode = fork_mode or spec_args.get('FORK_MODE', []) or unit.get('TEST_FORK_MODE').split()
+ fork_mode = ' '.join(fork_mode) if fork_mode else ''
+
+ unit_path = get_norm_unit_path(unit)
+
+ test_record = {
+ 'TEST-NAME': flat_args[0],
+ 'SCRIPT-REL-PATH': flat_args[1],
+ 'TESTED-PROJECT-NAME': unit.name(),
+ 'TESTED-PROJECT-FILENAME': unit.filename(),
+ 'SOURCE-FOLDER-PATH': unit_path,
+ # TODO get rid of BUILD-FOLDER-PATH
+ 'BUILD-FOLDER-PATH': unit_path,
+ 'BINARY-PATH': "{}/{}".format(unit_path, unit.filename()),
+ 'GLOBAL-LIBRARY-PATH': unit.global_filename(),
+ 'CUSTOM-DEPENDENCIES': ' '.join(spec_args.get('DEPENDS', []) + get_values_list(unit, 'TEST_DEPENDS_VALUE')),
+ 'TEST-RECIPES': prepare_recipes(unit.get("TEST_RECIPES_VALUE")),
+ 'TEST-ENV': prepare_env(unit.get("TEST_ENV_VALUE")),
+ # 'TEST-PRESERVE-ENV': 'da',
+ 'TEST-DATA': serialize_list(test_data),
+ 'TEST-TIMEOUT': test_timeout,
+ 'FORK-MODE': fork_mode,
+ 'SPLIT-FACTOR': ''.join(spec_args.get('SPLIT_FACTOR', [])) or unit.get('TEST_SPLIT_FACTOR') or '',
+ 'SIZE': test_size,
+ 'TAG': test_tags,
+ 'REQUIREMENTS': serialize_list(test_requirements),
+ 'TEST-CWD': unit.get('TEST_CWD_VALUE') or '',
+ 'FUZZ-DICTS': serialize_list(spec_args.get('FUZZ_DICTS', []) + get_unit_list_variable(unit, 'FUZZ_DICTS_VALUE')),
+ 'FUZZ-OPTS': serialize_list(spec_args.get('FUZZ_OPTS', []) + get_unit_list_variable(unit, 'FUZZ_OPTS_VALUE')),
+ 'YT-SPEC': serialize_list(spec_args.get('YT_SPEC', []) + get_unit_list_variable(unit, 'TEST_YT_SPEC_VALUE')),
+ 'BLOB': unit.get('TEST_BLOB_DATA') or '',
+ 'SKIP_TEST': unit.get('SKIP_TEST_VALUE') or '',
+ 'TEST_IOS_DEVICE_TYPE': unit.get('TEST_IOS_DEVICE_TYPE_VALUE') or '',
+ 'TEST_IOS_RUNTIME_TYPE': unit.get('TEST_IOS_RUNTIME_TYPE_VALUE') or '',
+ 'ANDROID_APK_TEST_ACTIVITY': unit.get('ANDROID_APK_TEST_ACTIVITY_VALUE') or '',
+ 'TEST_PARTITION': unit.get("TEST_PARTITION") or 'SEQUENTIAL',
+ 'GO_BENCH_TIMEOUT': unit.get('GO_BENCH_TIMEOUT') or '',
+ }
+
+ if flat_args[1] == "go.bench":
+ if "ya:run_go_benchmark" not in test_record["TAG"]:
+ return
+ else:
+ test_record["TEST-NAME"] += "_bench"
+
+ if flat_args[1] == 'fuzz.test' and unit.get('FUZZING') == 'yes':
+ test_record['FUZZING'] = '1'
+ # use all cores if fuzzing requested
+ test_record['REQUIREMENTS'] = serialize_list(filter(None, deserialize_list(test_record['REQUIREMENTS']) + ["cpu:all", "ram:all"]))
+
+ data = dump_test(unit, test_record)
+ if data:
+ unit.set_property(["DART_DATA", data])
+ save_in_file(unit.get('TEST_DART_OUT_FILE'), data)
+
+
+def java_srcdirs_to_data(unit, var):
+ extra_data = []
+ for srcdir in (unit.get(var) or '').replace('$' + var, '').split():
+ if srcdir == '.':
+ srcdir = unit.get('MODDIR')
+ if srcdir.startswith('${ARCADIA_ROOT}/') or srcdir.startswith('$ARCADIA_ROOT/'):
+ srcdir = srcdir.replace('${ARCADIA_ROOT}/', '$S/')
+ srcdir = srcdir.replace('$ARCADIA_ROOT/', '$S/')
+ if srcdir.startswith('${CURDIR}/') or srcdir.startswith('$CURDIR/'):
+ srcdir = srcdir.replace('${CURDIR}/', os.path.join('$S', unit.get('MODDIR')))
+ srcdir = srcdir.replace('$CURDIR/', os.path.join('$S', unit.get('MODDIR')))
+ srcdir = unit.resolve_arc_path(srcdir)
+ if not srcdir.startswith('$'):
+ srcdir = os.path.join('$S', unit.get('MODDIR'), srcdir)
+ if srcdir.startswith('$S'):
+ extra_data.append(srcdir.replace('$S', 'arcadia'))
+ return serialize_list(extra_data)
+
+
+def onadd_check(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+ flat_args, spec_args = _common.sort_by_keywords({"DEPENDS": -1, "TIMEOUT": 1, "DATA": -1, "TAG": -1, "REQUIREMENTS": -1, "FORK_MODE": 1,
+ "SPLIT_FACTOR": 1, "FORK_SUBTESTS": 0, "FORK_TESTS": 0, "SIZE": 1}, args)
+ check_type = flat_args[0]
+ test_dir = get_norm_unit_path(unit)
+
+ test_timeout = ''
+ fork_mode = ''
+ extra_test_data = ''
+ extra_test_dart_data = {}
+ ymake_java_test = unit.get('YMAKE_JAVA_TEST') == 'yes'
+
+ if check_type in ["flake8.py2", "flake8.py3"]:
+ script_rel_path = check_type
+ fork_mode = unit.get('TEST_FORK_MODE') or ''
+ elif check_type == "JAVA_STYLE":
+ if ymake_java_test and not unit.get('ALL_SRCDIRS') or '':
+ return
+ if len(flat_args) < 2:
+ raise Exception("Not enough arguments for JAVA_STYLE check")
+ check_level = flat_args[1]
+ allowed_levels = {
+ 'base': '/yandex_checks.xml',
+ 'strict': '/yandex_checks_strict.xml',
+ 'extended': '/yandex_checks_extended.xml',
+ 'library': '/yandex_checks_library.xml',
+ }
+ if check_level not in allowed_levels:
+ raise Exception('{} is not allowed in LINT(), use one of {}'.format(check_level, allowed_levels.keys()))
+ flat_args[1] = allowed_levels[check_level]
+ if check_level == 'none':
+ return
+ script_rel_path = "java.style"
+ test_timeout = '120'
+ fork_mode = unit.get('TEST_FORK_MODE') or ''
+ if ymake_java_test:
+ extra_test_data = java_srcdirs_to_data(unit, 'ALL_SRCDIRS')
+ extra_test_dart_data['JDK_RESOURCE'] = 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT')
+ elif check_type == "gofmt":
+ script_rel_path = check_type
+ go_files = flat_args[1:]
+ if go_files:
+ test_dir = os.path.dirname(go_files[0]).lstrip("$S/")
+ else:
+ script_rel_path = check_type
+
+ use_arcadia_python = unit.get('USE_ARCADIA_PYTHON')
+ uid_ext = ''
+ if check_type in ("check.data", "check.resource"):
+ if unit.get("VALIDATE_DATA") == "no":
+ return
+ if check_type == "check.data":
+ uid_ext = unit.get("SBR_UID_EXT").split(" ", 1)[-1] # strip variable name
+ data_re = re.compile(r"sbr:/?/?(\d+)=?.*")
+ data = flat_args[1:]
+ resources = []
+ for f in data:
+ matched = re.match(data_re, f)
+ if matched:
+ resources.append(matched.group(1))
+ if resources:
+ test_files = serialize_list(resources)
+ else:
+ return
+ else:
+ test_files = serialize_list(flat_args[1:])
+
+ test_record = {
+ 'TEST-NAME': check_type.lower(),
+ 'TEST-TIMEOUT': test_timeout,
+ 'SCRIPT-REL-PATH': script_rel_path,
+ 'TESTED-PROJECT-NAME': os.path.basename(test_dir),
+ 'SOURCE-FOLDER-PATH': test_dir,
+ 'CUSTOM-DEPENDENCIES': " ".join(spec_args.get('DEPENDS', [])),
+ 'TEST-DATA': extra_test_data,
+ "SBR-UID-EXT": uid_ext,
+ 'SPLIT-FACTOR': '',
+ 'TEST_PARTITION': 'SEQUENTIAL',
+ 'FORK-MODE': fork_mode,
+ 'FORK-TEST-FILES': '',
+ 'SIZE': 'SMALL',
+ 'TAG': '',
+ 'REQUIREMENTS': '',
+ 'USE_ARCADIA_PYTHON': use_arcadia_python or '',
+ 'OLD_PYTEST': 'no',
+ 'PYTHON-PATHS': '',
+ # TODO remove FILES, see DEVTOOLS-7052
+ 'FILES': test_files,
+ 'TEST-FILES': test_files,
+ 'NO_JBUILD': 'yes' if ymake_java_test else 'no',
+ }
+ test_record.update(extra_test_dart_data)
+
+ data = dump_test(unit, test_record)
+ if data:
+ unit.set_property(["DART_DATA", data])
+ save_in_file(unit.get('TEST_DART_OUT_FILE'), data)
+
+
+def on_register_no_check_imports(unit):
+ s = unit.get('NO_CHECK_IMPORTS_FOR_VALUE')
+ if s not in ('', 'None'):
+ unit.onresource(['-', 'py/no_check_imports/{}="{}"'.format(_common.pathid(s), s)])
+
+
+def onadd_check_py_imports(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+ if unit.get('NO_CHECK_IMPORTS_FOR_VALUE').strip() == "":
+ return
+ unit.onpeerdir(['library/python/testing/import_test'])
+ check_type = "py.imports"
+ test_dir = get_norm_unit_path(unit)
+
+ use_arcadia_python = unit.get('USE_ARCADIA_PYTHON')
+ test_files = serialize_list([get_norm_unit_path(unit, unit.filename())])
+ test_record = {
+ 'TEST-NAME': "pyimports",
+ 'TEST-TIMEOUT': '',
+ 'SCRIPT-REL-PATH': check_type,
+ 'TESTED-PROJECT-NAME': os.path.basename(test_dir),
+ 'SOURCE-FOLDER-PATH': test_dir,
+ 'CUSTOM-DEPENDENCIES': '',
+ 'TEST-DATA': '',
+ 'TEST-ENV': prepare_env(unit.get("TEST_ENV_VALUE")),
+ 'SPLIT-FACTOR': '',
+ 'TEST_PARTITION': 'SEQUENTIAL',
+ 'FORK-MODE': '',
+ 'FORK-TEST-FILES': '',
+ 'SIZE': 'SMALL',
+ 'TAG': '',
+ 'USE_ARCADIA_PYTHON': use_arcadia_python or '',
+ 'OLD_PYTEST': 'no',
+ 'PYTHON-PATHS': '',
+ # TODO remove FILES, see DEVTOOLS-7052
+ 'FILES': test_files,
+ 'TEST-FILES': test_files,
+ }
+ if unit.get('NO_CHECK_IMPORTS_FOR_VALUE') != "None":
+ test_record["NO-CHECK"] = serialize_list(get_values_list(unit, 'NO_CHECK_IMPORTS_FOR_VALUE') or ["*"])
+ else:
+ test_record["NO-CHECK"] = ''
+ data = dump_test(unit, test_record)
+ if data:
+ unit.set_property(["DART_DATA", data])
+ save_in_file(unit.get('TEST_DART_OUT_FILE'), data)
+
+
+def onadd_pytest_script(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+ unit.set(["PYTEST_BIN", "no"])
+ custom_deps = get_values_list(unit, 'TEST_DEPENDS_VALUE')
+ timeout = filter(None, [unit.get(["TEST_TIMEOUT"])])
+
+ if timeout:
+ timeout = timeout[0]
+ else:
+ timeout = '0'
+ test_type = args[0]
+ fork_mode = unit.get('TEST_FORK_MODE').split() or ''
+ split_factor = unit.get('TEST_SPLIT_FACTOR') or ''
+ test_size = unit.get('TEST_SIZE_NAME') or ''
+
+ test_files = get_values_list(unit, 'TEST_SRCS_VALUE')
+ tags = _get_test_tags(unit)
+ 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
+ python_paths = get_values_list(unit, 'TEST_PYTHON_PATH_VALUE')
+ binary_path = None
+ test_cwd = unit.get('TEST_CWD_VALUE') or ''
+ _dump_test(unit, test_type, test_files, timeout, get_norm_unit_path(unit), custom_deps, test_data, python_paths, split_factor, fork_mode, test_size, tags, requirements, binary_path, test_cwd=test_cwd, data_files=data_files)
+
+
+def onadd_pytest_bin(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+ flat, kws = _common.sort_by_keywords({'RUNNER_BIN': 1}, args)
+ if flat:
+ ymake.report_configure_error(
+ 'Unknown arguments found while processing add_pytest_bin macro: {!r}'
+ .format(flat)
+ )
+
+ runner_bin = kws.get('RUNNER_BIN', [None])[0]
+ test_type = 'py3test.bin' if (unit.get("PYTHON3") == 'yes') else "pytest.bin"
+
+ add_test_to_dart(unit, test_type, runner_bin=runner_bin)
+
+
+def add_test_to_dart(unit, test_type, binary_path=None, runner_bin=None):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+ custom_deps = get_values_list(unit, 'TEST_DEPENDS_VALUE')
+ timeout = filter(None, [unit.get(["TEST_TIMEOUT"])])
+ if timeout:
+ timeout = timeout[0]
+ else:
+ timeout = '0'
+ fork_mode = unit.get('TEST_FORK_MODE').split() or ''
+ split_factor = unit.get('TEST_SPLIT_FACTOR') or ''
+ test_size = unit.get('TEST_SIZE_NAME') or ''
+ test_cwd = unit.get('TEST_CWD_VALUE') or ''
+
+ unit_path = unit.path()
+ test_files = get_values_list(unit, 'TEST_SRCS_VALUE')
+ tags = _get_test_tags(unit)
+ 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
+ python_paths = get_values_list(unit, 'TEST_PYTHON_PATH_VALUE')
+ yt_spec = get_values_list(unit, 'TEST_YT_SPEC_VALUE')
+ if not binary_path:
+ binary_path = os.path.join(unit_path, unit.filename())
+ _dump_test(unit, test_type, test_files, timeout, get_norm_unit_path(unit), custom_deps, test_data, python_paths, split_factor, fork_mode, test_size, tags, requirements, binary_path, test_cwd=test_cwd, runner_bin=runner_bin, yt_spec=yt_spec, data_files=data_files)
+
+
+def extract_java_system_properties(unit, args):
+ if len(args) % 2:
+ return [], 'Wrong use of SYSTEM_PROPERTIES in {}: odd number of arguments'.format(unit.path())
+
+ props = []
+ for x, y in zip(args[::2], args[1::2]):
+ if x == 'FILE':
+ if y.startswith('${BINDIR}') or y.startswith('${ARCADIA_BUILD_ROOT}') or y.startswith('/'):
+ return [], 'Wrong use of SYSTEM_PROPERTIES in {}: absolute/build file path {}'.format(unit.path(), y)
+
+ y = _common.rootrel_arc_src(y, unit)
+ if not os.path.exists(unit.resolve('$S/' + y)):
+ return [], 'Wrong use of SYSTEM_PROPERTIES in {}: can\'t resolve {}'.format(unit.path(), y)
+
+ y = '${ARCADIA_ROOT}/' + y
+ props.append({'type': 'file', 'path': y})
+ else:
+ props.append({'type': 'inline', 'key': x, 'value': y})
+
+ return props, None
+
+
+def onjava_test(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+
+ assert unit.get('MODULE_TYPE') is not None
+
+ if unit.get('MODULE_TYPE') == 'JTEST_FOR':
+ if not unit.get('UNITTEST_DIR'):
+ ymake.report_configure_error('skip JTEST_FOR in {}: no args provided'.format(unit.path()))
+ return
+
+ java_cp_arg_type = unit.get('JAVA_CLASSPATH_CMD_TYPE_VALUE') or 'MANIFEST'
+ if java_cp_arg_type not in ('MANIFEST', 'COMMAND_FILE', 'LIST'):
+ ymake.report_configure_error('{}: TEST_JAVA_CLASSPATH_CMD_TYPE({}) are invalid. Choose argument from MANIFEST, COMMAND_FILE or LIST)'.format(unit.path(), java_cp_arg_type))
+ return
+
+ unit_path = unit.path()
+ path = _common.strip_roots(unit_path)
+
+ test_data = get_norm_paths(unit, 'TEST_DATA_VALUE')
+ test_data.append('arcadia/build/scripts/run_junit.py')
+ test_data.append('arcadia/build/scripts/unpacking_jtest_runner.py')
+
+ data, data_files = get_canonical_test_resources(unit)
+ test_data += data
+
+ props, error_mgs = extract_java_system_properties(unit, get_values_list(unit, 'SYSTEM_PROPERTIES_VALUE'))
+ if error_mgs:
+ ymake.report_configure_error(error_mgs)
+ return
+ for prop in props:
+ if prop['type'] == 'file':
+ test_data.append(prop['path'].replace('${ARCADIA_ROOT}', 'arcadia'))
+
+ props = base64.b64encode(json.dumps(props, encoding='utf-8'))
+
+ test_cwd = unit.get('TEST_CWD_VALUE') or '' # TODO: validate test_cwd value
+
+ if unit.get('MODULE_TYPE') == 'JUNIT5':
+ script_rel_path = 'junit5.test'
+ else:
+ script_rel_path = 'junit.test'
+
+ ymake_java_test = unit.get('YMAKE_JAVA_TEST') == 'yes'
+ test_record = {
+ 'SOURCE-FOLDER-PATH': path,
+ 'TEST-NAME': '-'.join([os.path.basename(os.path.dirname(path)), os.path.basename(path)]),
+ 'SCRIPT-REL-PATH': script_rel_path,
+ 'TEST-TIMEOUT': unit.get('TEST_TIMEOUT') or '',
+ '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'))),
+ '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')),
+ 'TAG': serialize_list(_get_test_tags(unit)),
+ 'SIZE': unit.get('TEST_SIZE_NAME') or '',
+ 'REQUIREMENTS': serialize_list(get_values_list(unit, 'TEST_REQUIREMENTS_VALUE')),
+ 'TEST-RECIPES': prepare_recipes(unit.get("TEST_RECIPES_VALUE")),
+
+ # JTEST/JTEST_FOR only
+ 'MODULE_TYPE': unit.get('MODULE_TYPE'),
+ 'UNITTEST_DIR': unit.get('UNITTEST_DIR') or '',
+ 'JVM_ARGS': serialize_list(get_values_list(unit, 'JVM_ARGS_VALUE')),
+ 'SYSTEM_PROPERTIES': props,
+ 'TEST-CWD': test_cwd,
+ 'SKIP_TEST': unit.get('SKIP_TEST_VALUE') or '',
+ 'JAVA_CLASSPATH_CMD_TYPE': java_cp_arg_type,
+ 'NO_JBUILD': 'yes' if ymake_java_test else 'no',
+ 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT'),
+ 'JDK_FOR_TESTS': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT') + '_FOR_TESTS',
+ }
+ test_classpath_origins = unit.get('TEST_CLASSPATH_VALUE')
+ if test_classpath_origins:
+ test_record['TEST_CLASSPATH_ORIGINS'] = test_classpath_origins
+ test_record['TEST_CLASSPATH'] = '${TEST_CLASSPATH_MANAGED}'
+ elif ymake_java_test:
+ test_record['TEST_CLASSPATH'] = '${DART_CLASSPATH}'
+ test_record['TEST_CLASSPATH_DEPS'] = '${DART_CLASSPATH_DEPS}'
+ if unit.get('UNITTEST_DIR'):
+ test_record['TEST_JAR'] = '${UNITTEST_MOD}'
+ else:
+ test_record['TEST_JAR'] = '{}/{}.jar'.format(unit.get('MODDIR'), unit.get('REALPRJNAME'))
+
+ data = dump_test(unit, test_record)
+ if data:
+ unit.set_property(['DART_DATA', data])
+
+
+def onjava_test_deps(unit, *args):
+ if unit.get("TIDY") == "yes":
+ # graph changed for clang_tidy tests
+ return
+
+ assert unit.get('MODULE_TYPE') is not None
+ assert len(args) == 1
+ mode = args[0]
+
+ path = get_norm_unit_path(unit)
+ ymake_java_test = unit.get('YMAKE_JAVA_TEST') == 'yes'
+
+ test_record = {
+ 'SOURCE-FOLDER-PATH': path,
+ 'TEST-NAME': '-'.join([os.path.basename(os.path.dirname(path)), os.path.basename(path), 'dependencies']).strip('-'),
+ 'SCRIPT-REL-PATH': 'java.dependency.test',
+ 'TEST-TIMEOUT': '',
+ 'TESTED-PROJECT-NAME': path,
+ 'TEST-DATA': '',
+ 'TEST_PARTITION': 'SEQUENTIAL',
+ 'FORK-MODE': '',
+ 'SPLIT-FACTOR': '',
+ 'CUSTOM-DEPENDENCIES': ' '.join(get_values_list(unit, 'TEST_DEPENDS_VALUE')),
+ 'TAG': '',
+ 'SIZE': 'SMALL',
+ 'IGNORE_CLASSPATH_CLASH': ' '.join(get_values_list(unit, 'JAVA_IGNORE_CLASSPATH_CLASH_VALUE')),
+ 'NO_JBUILD': 'yes' if ymake_java_test else 'no',
+
+ # JTEST/JTEST_FOR only
+ 'MODULE_TYPE': unit.get('MODULE_TYPE'),
+ 'UNITTEST_DIR': '',
+ 'SYSTEM_PROPERTIES': '',
+ 'TEST-CWD': '',
+ }
+ if mode == 'strict':
+ test_record['STRICT_CLASSPATH_CLASH'] = 'yes'
+
+ if ymake_java_test:
+ test_record['CLASSPATH'] = '$B/{}/{}.jar ${{DART_CLASSPATH}}'.format(unit.get('MODDIR'), unit.get('REALPRJNAME'))
+
+ data = dump_test(unit, test_record)
+ unit.set_property(['DART_DATA', data])
+
+
+def _get_test_tags(unit, spec_args=None):
+ if spec_args is None:
+ spec_args = {}
+ tags = spec_args.get('TAG', []) + get_values_list(unit, 'TEST_TAGS_VALUE')
+ # DEVTOOLS-7571
+ if unit.get('SKIP_TEST_VALUE') and 'ya:fat' in tags and "ya:not_autocheck" not in tags:
+ tags.append("ya:not_autocheck")
+
+ return tags
+
+
+def _dump_test(
+ unit,
+ test_type,
+ test_files,
+ timeout,
+ test_dir,
+ custom_deps,
+ test_data,
+ python_paths,
+ split_factor,
+ fork_mode,
+ test_size,
+ tags,
+ requirements,
+ binary_path='',
+ old_pytest=False,
+ test_cwd=None,
+ runner_bin=None,
+ yt_spec=None,
+ data_files=None
+):
+
+ if test_type == "PY_TEST":
+ script_rel_path = "py.test"
+ else:
+ script_rel_path = test_type
+
+ unit_path = unit.path()
+ fork_test_files = unit.get('FORK_TEST_FILES_MODE')
+ fork_mode = ' '.join(fork_mode) if fork_mode else ''
+ use_arcadia_python = unit.get('USE_ARCADIA_PYTHON')
+ if test_cwd:
+ test_cwd = test_cwd.replace("$TEST_CWD_VALUE", "").replace('"MACRO_CALLS_DELIM"', "").strip()
+ test_name = os.path.basename(binary_path)
+ test_record = {
+ 'TEST-NAME': os.path.splitext(test_name)[0],
+ 'TEST-TIMEOUT': timeout,
+ 'SCRIPT-REL-PATH': script_rel_path,
+ 'TESTED-PROJECT-NAME': test_name,
+ 'SOURCE-FOLDER-PATH': test_dir,
+ 'CUSTOM-DEPENDENCIES': " ".join(custom_deps),
+ '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-RECIPES': prepare_recipes(unit.get("TEST_RECIPES_VALUE")),
+ 'SPLIT-FACTOR': split_factor,
+ 'TEST_PARTITION': unit.get('TEST_PARTITION') or 'SEQUENTIAL',
+ 'FORK-MODE': fork_mode,
+ 'FORK-TEST-FILES': fork_test_files,
+ 'TEST-FILES': serialize_list(test_files),
+ 'SIZE': test_size,
+ 'TAG': serialize_list(tags),
+ 'REQUIREMENTS': serialize_list(requirements),
+ 'USE_ARCADIA_PYTHON': use_arcadia_python or '',
+ 'OLD_PYTEST': 'yes' if old_pytest else 'no',
+ 'PYTHON-PATHS': serialize_list(python_paths),
+ 'TEST-CWD': test_cwd or '',
+ 'SKIP_TEST': unit.get('SKIP_TEST_VALUE') or '',
+ 'BUILD-FOLDER-PATH': _common.strip_roots(unit_path),
+ 'BLOB': unit.get('TEST_BLOB_DATA') or '',
+ 'CANONIZE_SUB_PATH': unit.get('CANONIZE_SUB_PATH') or '',
+ }
+ if binary_path:
+ test_record['BINARY-PATH'] = _common.strip_roots(binary_path)
+ if runner_bin:
+ test_record['TEST-RUNNER-BIN'] = runner_bin
+ if yt_spec:
+ test_record['YT-SPEC'] = serialize_list(yt_spec)
+ data = dump_test(unit, test_record)
+ if data:
+ unit.set_property(["DART_DATA", data])
+ save_in_file(unit.get('TEST_DART_OUT_FILE'), data)
+
+
+def onsetup_pytest_bin(unit, *args):
+ use_arcadia_python = unit.get('USE_ARCADIA_PYTHON') == "yes"
+ if use_arcadia_python:
+ unit.onresource(['-', 'PY_MAIN={}'.format("library.python.pytest.main:main")]) # XXX
+ unit.onadd_pytest_bin(list(args))
+ else:
+ unit.onno_platform()
+ unit.onadd_pytest_script(["PY_TEST"])
+
+
+def onrun(unit, *args):
+ exectest_cmd = unit.get(["EXECTEST_COMMAND_VALUE"]) or ''
+ exectest_cmd += "\n" + subprocess.list2cmdline(args)
+ unit.set(["EXECTEST_COMMAND_VALUE", exectest_cmd])
+
+
+def onsetup_exectest(unit, *args):
+ command = unit.get(["EXECTEST_COMMAND_VALUE"])
+ if command is None:
+ ymake.report_configure_error("EXECTEST must have at least one RUN macro")
+ return
+ command = command.replace("$EXECTEST_COMMAND_VALUE", "")
+ if "PYTHON_BIN" in command:
+ unit.ondepends('contrib/tools/python')
+ unit.set(["TEST_BLOB_DATA", base64.b64encode(command)])
+ add_test_to_dart(unit, "exectest", binary_path=os.path.join(unit.path(), unit.filename()).replace(".pkg", ""))
+
+
+def onsetup_run_python(unit):
+ if unit.get("USE_ARCADIA_PYTHON") == "yes":
+ unit.ondepends('contrib/tools/python')
+
+
+def get_canonical_test_resources(unit):
+ unit_path = unit.path()
+ canon_data_dir = os.path.join(unit.resolve(unit_path), CANON_DATA_DIR_NAME, unit.get('CANONIZE_SUB_PATH') or '')
+
+ try:
+ _, dirs, files = next(os.walk(canon_data_dir))
+ except StopIteration:
+ # path doesn't exist
+ return [], []
+
+ if CANON_RESULT_FILE_NAME in files:
+ return _get_canonical_data_resources_v2(os.path.join(canon_data_dir, CANON_RESULT_FILE_NAME), unit_path)
+ return [], []
+
+
+def _load_canonical_file(filename, unit_path):
+ try:
+ with open(filename) as results_file:
+ return json.load(results_file)
+ except Exception as e:
+ print>>sys.stderr, "malformed canonical data in {}: {} ({})".format(unit_path, e, filename)
+ return {}
+
+
+def _get_resource_from_uri(uri):
+ m = CANON_MDS_RESOURCE_REGEX.match(uri)
+ if m:
+ res_id = m.group(1)
+ return "{}:{}".format(MDS_SHEME, res_id)
+
+ m = CANON_SBR_RESOURCE_REGEX.match(uri)
+ if m:
+ # There might be conflict between resources, because all resources in sandbox have 'resource.tar.gz' name
+ # That's why we use notation with '=' to specify specific path for resource
+ uri = m.group(1)
+ res_id = m.group(2)
+ return "{}={}".format(uri, '/'.join([CANON_OUTPUT_STORAGE, res_id]))
+
+
+def _get_external_resources_from_canon_data(data):
+ # Method should work with both canonization versions:
+ # result.json: {'uri':X 'checksum':Y}
+ # result.json: {'testname': {'uri':X 'checksum':Y}}
+ # result.json: {'testname': [{'uri':X 'checksum':Y}]}
+ # Also there is a bug - if user returns {'uri': 1} from test - machinery will fail
+ # That's why we check 'uri' and 'checksum' fields presence
+ # (it's still a bug - user can return {'uri':X, 'checksum': Y}, we need to unify canonization format)
+ res = set()
+
+ if isinstance(data, dict):
+ if 'uri' in data and 'checksum' in data:
+ resource = _get_resource_from_uri(data['uri'])
+ if resource:
+ res.add(resource)
+ else:
+ for k, v in data.iteritems():
+ res.update(_get_external_resources_from_canon_data(v))
+ elif isinstance(data, list):
+ for e in data:
+ res.update(_get_external_resources_from_canon_data(e))
+
+ return res
+
+
+def _get_canonical_data_resources_v2(filename, unit_path):
+ 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
new file mode 100644
index 0000000000..0a34263c35
--- /dev/null
+++ b/build/plugins/ytest2.py
@@ -0,0 +1,54 @@
+import os
+import _common
+
+
+def dir_stmts(unit, dir):
+ unit.onpeerdir(dir)
+ unit.onsrcdir(os.sep.join([dir, 'tests']))
+
+
+def pytest_base(unit, args):
+ related_prj_dir = args[0]
+ related_prj_name = args[1]
+ dir_stmts(unit, related_prj_dir)
+ ytest_base(unit, related_prj_dir, related_prj_name, args[2:])
+ unit.set(['ADDITIONAL_PATH', '--test-related-path ${ARCADIA_ROOT}/test'])
+
+
+def ytest_base(unit, related_prj_dir, related_prj_name, args):
+ keywords = {"DEPENDS": -1, "DATA": -1}
+ flat_args, spec_args = _common.sort_by_keywords(keywords, args)
+ unit.set(['TEST-NAME', os.path.basename(flat_args[0])])
+ unit.set(['SCRIPT-REL-PATH', flat_args[1]])
+ unit.set(['SOURCE-FOLDER-PATH', related_prj_dir])
+ unit.set(['BUILD-FOLDER-PATH', os.path.join('$B', related_prj_dir)])
+ unit.set(['TESTED-BINARY-PATH', flat_args[0]])
+
+ 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 = '\"' + ';'.join(data_lst) + '\"' if data_lst else ''
+ unit.set(['TEST-DATA', data])
+
+ related_dirs_list = ['{ARCADIA_ROOT}/devtools/${YA_ROOT}', '${ARCADIA_ROOT}/devtools/${YA_ROOT}', '$RELATED_TARGET_SRCDIR']
+ related_dirs_value = []
+ for rel in related_dirs_list:
+ related_dirs_value.extend(['--test-related-path', rel])
+ unit.set(['RELATED_DIRS', ' '.join(related_dirs_value)])
+ unit.set(['TEST_KV', '${{kv;hide:"test_related_dirs {}"}}'.format(' '.join(related_dirs_list))])
+
+
+def on_unittest(unit, *args):
+ related_prj_name = args[0]
+ related_prj_dir = args[1][3:]
+ unit.set(['TEST_TYPE', '${kv;hide:"test-type unittest"}'])
+ ytest_base(unit, related_prj_dir, related_prj_name, args)
+
+
+def on_ytest(unit, *args):
+ pytest_base(unit, args)
+
+
+def on_py_test(unit, *args):
+ pytest_base(unit, args)
diff --git a/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make
new file mode 100644
index 0000000000..6c588a1b09
--- /dev/null
+++ b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt uca9dump tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.prebuilt b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.prebuilt
new file mode 100644
index 0000000000..907121ce31
--- /dev/null
+++ b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(UCA9DUMP sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${UCA9DUMP_RESOURCE_GLOBAL}/uca9dump${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.resource b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.resource
new file mode 100644
index 0000000000..d72d47b803
--- /dev/null
+++ b/build/prebuilt/contrib/libs/libmysql_r/strings/uca9dump/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623743666)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623751939)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623746337)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make
new file mode 100644
index 0000000000..7f1e2d135f
--- /dev/null
+++ b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt mypy-protobuf tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.prebuilt b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.prebuilt
new file mode 100644
index 0000000000..607ec865b4
--- /dev/null
+++ b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM(protoc-gen-mypy)
+
+ DECLARE_EXTERNAL_RESOURCE(MYPY_PROTOBUF sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${MYPY_PROTOBUF_RESOURCE_GLOBAL}/protoc-gen-mypy${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.resource b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.resource
new file mode 100644
index 0000000000..8edf2e5d4a
--- /dev/null
+++ b/build/prebuilt/contrib/python/mypy-protobuf/bin/protoc-gen-mypy/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2433625017)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2433625425)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2433624379)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc/ya.make b/build/prebuilt/contrib/tools/flatc/ya.make
new file mode 100644
index 0000000000..b8bf0fa869
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt flatc tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc/ya.make.induced_deps b/build/prebuilt/contrib/tools/flatc/ya.make.induced_deps
new file mode 100644
index 0000000000..9dbdb62e07
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc/ya.make.induced_deps
@@ -0,0 +1,4 @@
+INDUCED_DEPS(h
+ ${ARCADIA_ROOT}/contrib/libs/flatbuffers/include/flatbuffers/flatbuffers.h
+ ${ARCADIA_ROOT}/contrib/libs/flatbuffers/include/flatbuffers/flatbuffers_iter.h
+)
diff --git a/build/prebuilt/contrib/tools/flatc/ya.make.prebuilt b/build/prebuilt/contrib/tools/flatc/ya.make.prebuilt
new file mode 100644
index 0000000000..029dbb9a3e
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(FLATC sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${FLATC_RESOURCE_GLOBAL}/flatc${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc/ya.make.resource b/build/prebuilt/contrib/tools/flatc/ya.make.resource
new file mode 100644
index 0000000000..9be11f95f2
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266417119)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266417608)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266416624)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc64/ya.make b/build/prebuilt/contrib/tools/flatc64/ya.make
new file mode 100644
index 0000000000..2cac72a3f1
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc64/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt flatc64 tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc64/ya.make.induced_deps b/build/prebuilt/contrib/tools/flatc64/ya.make.induced_deps
new file mode 100644
index 0000000000..444da5bfaa
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc64/ya.make.induced_deps
@@ -0,0 +1,3 @@
+INDUCED_DEPS(h
+ ${ARCADIA_ROOT}/contrib/libs/flatbuffers64/include/flatbuffers/flatbuffers.h
+)
diff --git a/build/prebuilt/contrib/tools/flatc64/ya.make.prebuilt b/build/prebuilt/contrib/tools/flatc64/ya.make.prebuilt
new file mode 100644
index 0000000000..fbd09edcd1
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc64/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(FLATC64 sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${FLATC64_RESOURCE_GLOBAL}/flatc64${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/flatc64/ya.make.resource b/build/prebuilt/contrib/tools/flatc64/ya.make.resource
new file mode 100644
index 0000000000..49e1fe8cf5
--- /dev/null
+++ b/build/prebuilt/contrib/tools/flatc64/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266401575)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266402127)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2266400964)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make
new file mode 100644
index 0000000000..a829e49648
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF(NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt cpp_styleguide tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.induced_deps b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.induced_deps
new file mode 100644
index 0000000000..af24c0aa4d
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.induced_deps
@@ -0,0 +1,6 @@
+INDUCED_DEPS(cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/messagext.h
+)
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/json_util.h
+)
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.prebuilt
new file mode 100644
index 0000000000..e853626aea
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(CPP_STYLEGUIDE sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${CPP_STYLEGUIDE_RESOURCE_GLOBAL}/cpp_styleguide${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.resource
new file mode 100644
index 0000000000..48d9ac46cb
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2340617812)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2340619844)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2340616765)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make
new file mode 100644
index 0000000000..1e9e0eaa87
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt grpc_cpp tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.induced_deps b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.induced_deps
new file mode 100644
index 0000000000..c08ef9b905
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.induced_deps
@@ -0,0 +1,29 @@
+INDUCED_DEPS(cpp
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/async_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/async_unary_call.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/channel_interface.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/client_unary_call.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/method_handler_impl.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/rpc_service_method.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/service_type.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/sync_stream.h
+)
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/async_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/async_unary_call.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/method_handler_impl.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/proto_utils.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/rpc_method.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/service_type.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/status.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/stub_options.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpc++/impl/codegen/sync_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/async_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/async_generic_service.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h
+ ${ARCADIA_ROOT}/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h
+)
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.prebuilt
new file mode 100644
index 0000000000..3b18d1c192
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(GRPC_CPP sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${GRPC_CPP_RESOURCE_GLOBAL}/grpc_cpp${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource
new file mode 100644
index 0000000000..abdf7a9a1a
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584304489)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584305537)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584303873)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make
new file mode 100644
index 0000000000..7f2c29c699
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt grpc_java tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.prebuilt
new file mode 100644
index 0000000000..4636c8594c
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(GRPC_JAVA sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${GRPC_JAVA_RESOURCE_GLOBAL}/grpc_java${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource
new file mode 100644
index 0000000000..ae75538a60
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584508133)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584508870)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584507401)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make
new file mode 100644
index 0000000000..1ff11262eb
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt grpc_python tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.prebuilt
new file mode 100644
index 0000000000..81fccbc086
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(GRPC_PYTHON sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${GRPC_PYTHON_RESOURCE_GLOBAL}/grpc_python${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource
new file mode 100644
index 0000000000..c8b0b04166
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584497118)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584497759)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2584496517)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/ya.make b/build/prebuilt/contrib/tools/protoc/ya.make
new file mode 100644
index 0000000000..65d08147a7
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt protoc tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/ya.make.induced_deps b/build/prebuilt/contrib/tools/protoc/ya.make.induced_deps
new file mode 100644
index 0000000000..fe5a21c374
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/ya.make.induced_deps
@@ -0,0 +1,29 @@
+INDUCED_DEPS(cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/descriptor.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/reflection_ops.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/once.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/wire_format.h
+)
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/arena.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/arenastring.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/extension_set.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_enum_reflection.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map_entry.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/message.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/port_def.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/port_undef.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h
+)
diff --git a/build/prebuilt/contrib/tools/protoc/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc/ya.make.prebuilt
new file mode 100644
index 0000000000..f3500a0e13
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(PROTOC sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${PROTOC_RESOURCE_GLOBAL}/protoc${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/ya.make.resource b/build/prebuilt/contrib/tools/protoc/ya.make.resource
new file mode 100644
index 0000000000..dea93b0d30
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2318808466)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2318809046)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2318807898)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc_std/ya.make b/build/prebuilt/contrib/tools/protoc_std/ya.make
new file mode 100644
index 0000000000..5118243498
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc_std/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt protoc_std tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc_std/ya.make.induced_deps b/build/prebuilt/contrib/tools/protoc_std/ya.make.induced_deps
new file mode 100644
index 0000000000..6b33b300bb
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc_std/ya.make.induced_deps
@@ -0,0 +1,24 @@
+INDUCED_DEPS(cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/extension_set.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/io/coded_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/io/zero_copy_stream_impl_lite.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/port_def.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/port_undef.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/reflection_ops.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/wire_format.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/wire_format_lite.h
+)
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/arena.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/arenastring.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/extension_set.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/generated_enum_util.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/generated_message_table_driven.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/generated_message_util.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/io/coded_stream.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/message_lite.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/metadata_lite.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/port_def.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/port_undef.inc
+ ${ARCADIA_ROOT}/contrib/libs/protobuf_std/src/google/protobuf/repeated_field.h
+)
diff --git a/build/prebuilt/contrib/tools/protoc_std/ya.make.prebuilt b/build/prebuilt/contrib/tools/protoc_std/ya.make.prebuilt
new file mode 100644
index 0000000000..b0706a1100
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc_std/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM(protoc)
+
+ DECLARE_EXTERNAL_RESOURCE(PROTOC_STD sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${PROTOC_STD_RESOURCE_GLOBAL}/protoc${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc_std/ya.make.resource b/build/prebuilt/contrib/tools/protoc_std/ya.make.resource
new file mode 100644
index 0000000000..738c7da7ec
--- /dev/null
+++ b/build/prebuilt/contrib/tools/protoc_std/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1714771857)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1714772118)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1714771351)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python/bootstrap/ya.make b/build/prebuilt/contrib/tools/python/bootstrap/ya.make
new file mode 100644
index 0000000000..e2b736b1ca
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python/bootstrap/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt python bootstrap tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python/bootstrap/ya.make.prebuilt b/build/prebuilt/contrib/tools/python/bootstrap/ya.make.prebuilt
new file mode 100644
index 0000000000..b913fc767a
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python/bootstrap/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(PYTHON_BOOTSTRAP sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${PYTHON_BOOTSTRAP_RESOURCE_GLOBAL}/bootstrap${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python/bootstrap/ya.make.resource b/build/prebuilt/contrib/tools/python/bootstrap/ya.make.resource
new file mode 100644
index 0000000000..0d93faef4c
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python/bootstrap/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623751539)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623751959)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623751763)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python3/pycc/ya.make b/build/prebuilt/contrib/tools/python3/pycc/ya.make
new file mode 100644
index 0000000000..02359db517
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python3/pycc/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt python3 pycc tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python3/pycc/ya.make.prebuilt b/build/prebuilt/contrib/tools/python3/pycc/ya.make.prebuilt
new file mode 100644
index 0000000000..94be584928
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python3/pycc/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(PYTHON3_PYCC sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${PYTHON3_PYCC_RESOURCE_GLOBAL}/pycc${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/python3/pycc/ya.make.resource b/build/prebuilt/contrib/tools/python3/pycc/ya.make.resource
new file mode 100644
index 0000000000..86fb31e84f
--- /dev/null
+++ b/build/prebuilt/contrib/tools/python3/pycc/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1980692765)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1980693356)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1980693002)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/ragel6/ya.make b/build/prebuilt/contrib/tools/ragel6/ya.make
new file mode 100644
index 0000000000..09718e2927
--- /dev/null
+++ b/build/prebuilt/contrib/tools/ragel6/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt ragel6 tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/ragel6/ya.make.prebuilt b/build/prebuilt/contrib/tools/ragel6/ya.make.prebuilt
new file mode 100644
index 0000000000..51ee82f82e
--- /dev/null
+++ b/build/prebuilt/contrib/tools/ragel6/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(RAGEL6 sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${RAGEL6_RESOURCE_GLOBAL}/ragel6${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/ragel6/ya.make.resource b/build/prebuilt/contrib/tools/ragel6/ya.make.resource
new file mode 100644
index 0000000000..e37012f682
--- /dev/null
+++ b/build/prebuilt/contrib/tools/ragel6/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1959624378)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1969915297)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1959624268)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/yasm/ya.make b/build/prebuilt/contrib/tools/yasm/ya.make
new file mode 100644
index 0000000000..244e9a343b
--- /dev/null
+++ b/build/prebuilt/contrib/tools/yasm/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt yasm tool)
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/yasm/ya.make.prebuilt b/build/prebuilt/contrib/tools/yasm/ya.make.prebuilt
new file mode 100644
index 0000000000..7bb58bd669
--- /dev/null
+++ b/build/prebuilt/contrib/tools/yasm/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(YASM sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${YASM_RESOURCE_GLOBAL}/yasm${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/contrib/tools/yasm/ya.make.resource b/build/prebuilt/contrib/tools/yasm/ya.make.resource
new file mode 100644
index 0000000000..0a4e958b20
--- /dev/null
+++ b/build/prebuilt/contrib/tools/yasm/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601295306)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601295551)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601295437)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/enum_parser/enum_parser/ya.make b/build/prebuilt/tools/enum_parser/enum_parser/ya.make
new file mode 100644
index 0000000000..2962c10036
--- /dev/null
+++ b/build/prebuilt/tools/enum_parser/enum_parser/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt enum_parser tool)
+ENDIF()
diff --git a/build/prebuilt/tools/enum_parser/enum_parser/ya.make.induced_deps b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.induced_deps
new file mode 100644
index 0000000000..d91f30d835
--- /dev/null
+++ b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.induced_deps
@@ -0,0 +1,16 @@
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/util/generic/typetraits.h
+ ${ARCADIA_ROOT}/util/generic/singleton.h
+ ${ARCADIA_ROOT}/util/generic/string.h
+ ${ARCADIA_ROOT}/util/generic/vector.h
+ ${ARCADIA_ROOT}/util/generic/map.h
+ ${ARCADIA_ROOT}/util/string/cast.h
+ ${ARCADIA_ROOT}/util/stream/output.h
+ ${ARCADIA_ROOT}/tools/enum_parser/enum_serialization_runtime/enum_runtime.h
+ ${ARCADIA_ROOT}/tools/enum_parser/enum_parser/stdlib_deps.h
+)
+
+INDUCED_DEPS(h
+ ${ARCADIA_ROOT}/util/generic/serialized_enum.h
+)
+
diff --git a/build/prebuilt/tools/enum_parser/enum_parser/ya.make.prebuilt b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.prebuilt
new file mode 100644
index 0000000000..1a027f4421
--- /dev/null
+++ b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(ENUM_PARSER sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${ENUM_PARSER_RESOURCE_GLOBAL}/enum_parser${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource
new file mode 100644
index 0000000000..f4ba3bbfae
--- /dev/null
+++ b/build/prebuilt/tools/enum_parser/enum_parser/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2265845868)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2265846387)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2265845307)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/event2cpp/ya.make b/build/prebuilt/tools/event2cpp/ya.make
new file mode 100644
index 0000000000..8c54c21a12
--- /dev/null
+++ b/build/prebuilt/tools/event2cpp/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt event2cpp tool)
+ENDIF()
diff --git a/build/prebuilt/tools/event2cpp/ya.make.induced_deps b/build/prebuilt/tools/event2cpp/ya.make.induced_deps
new file mode 100644
index 0000000000..b7359d240c
--- /dev/null
+++ b/build/prebuilt/tools/event2cpp/ya.make.induced_deps
@@ -0,0 +1,8 @@
+INDUCED_DEPS(h+cpp
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/printer.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h
+ ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.h
+ ${ARCADIA_ROOT}/library/cpp/eventlog/events_extension.h
+ ${ARCADIA_ROOT}/util/generic/cast.h
+ ${ARCADIA_ROOT}/util/stream/output.h
+)
diff --git a/build/prebuilt/tools/event2cpp/ya.make.prebuilt b/build/prebuilt/tools/event2cpp/ya.make.prebuilt
new file mode 100644
index 0000000000..038cad6f79
--- /dev/null
+++ b/build/prebuilt/tools/event2cpp/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(EVENT2CPP sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${EVENT2CPP_RESOURCE_GLOBAL}/event2cpp${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/event2cpp/ya.make.resource b/build/prebuilt/tools/event2cpp/ya.make.resource
new file mode 100644
index 0000000000..d5fac1e52c
--- /dev/null
+++ b/build/prebuilt/tools/event2cpp/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2313657675)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2313658137)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2313657255)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/fix_elf/ya.make b/build/prebuilt/tools/fix_elf/ya.make
new file mode 100644
index 0000000000..2fefcce7df
--- /dev/null
+++ b/build/prebuilt/tools/fix_elf/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt fix_elf tool)
+ENDIF()
diff --git a/build/prebuilt/tools/fix_elf/ya.make.prebuilt b/build/prebuilt/tools/fix_elf/ya.make.prebuilt
new file mode 100644
index 0000000000..c12328f97e
--- /dev/null
+++ b/build/prebuilt/tools/fix_elf/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(FIX_ELF sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${FIX_ELF_RESOURCE_GLOBAL}/fix_elf${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/fix_elf/ya.make.resource b/build/prebuilt/tools/fix_elf/ya.make.resource
new file mode 100644
index 0000000000..f5b1f3828d
--- /dev/null
+++ b/build/prebuilt/tools/fix_elf/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623376503)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623378373)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1623377172)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/rescompiler/ya.make b/build/prebuilt/tools/rescompiler/ya.make
new file mode 100644
index 0000000000..c30ff970c8
--- /dev/null
+++ b/build/prebuilt/tools/rescompiler/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt rescompiler tool)
+ENDIF()
diff --git a/build/prebuilt/tools/rescompiler/ya.make.induced_deps b/build/prebuilt/tools/rescompiler/ya.make.induced_deps
new file mode 100644
index 0000000000..a1957cd783
--- /dev/null
+++ b/build/prebuilt/tools/rescompiler/ya.make.induced_deps
@@ -0,0 +1 @@
+INDUCED_DEPS(cpp ${ARCADIA_ROOT}/library/cpp/resource/registry.h ${ARCADIA_ROOT}/library/cpp/resource/resource.h)
diff --git a/build/prebuilt/tools/rescompiler/ya.make.prebuilt b/build/prebuilt/tools/rescompiler/ya.make.prebuilt
new file mode 100644
index 0000000000..23fa86ce01
--- /dev/null
+++ b/build/prebuilt/tools/rescompiler/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(RESCOMPILER sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${RESCOMPILER_RESOURCE_GLOBAL}/rescompiler${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/rescompiler/ya.make.resource b/build/prebuilt/tools/rescompiler/ya.make.resource
new file mode 100644
index 0000000000..64fa9cd5e6
--- /dev/null
+++ b/build/prebuilt/tools/rescompiler/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601443458)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601443719)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601443586)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/rescompressor/ya.make b/build/prebuilt/tools/rescompressor/ya.make
new file mode 100644
index 0000000000..0751407e12
--- /dev/null
+++ b/build/prebuilt/tools/rescompressor/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt rescompressor tool)
+ENDIF()
diff --git a/build/prebuilt/tools/rescompressor/ya.make.prebuilt b/build/prebuilt/tools/rescompressor/ya.make.prebuilt
new file mode 100644
index 0000000000..0b522fdc0d
--- /dev/null
+++ b/build/prebuilt/tools/rescompressor/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(RESCOMPRESSOR sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${RESCOMPRESSOR_RESOURCE_GLOBAL}/rescompressor${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/rescompressor/ya.make.resource b/build/prebuilt/tools/rescompressor/ya.make.resource
new file mode 100644
index 0000000000..e6922444dd
--- /dev/null
+++ b/build/prebuilt/tools/rescompressor/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601276031)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601276198)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601276119)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/tools/rorescompiler/ya.make b/build/prebuilt/tools/rorescompiler/ya.make
new file mode 100644
index 0000000000..2b1798c435
--- /dev/null
+++ b/build/prebuilt/tools/rorescompiler/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt rorescompiler tool)
+ENDIF()
diff --git a/build/prebuilt/tools/rorescompiler/ya.make.induced_deps b/build/prebuilt/tools/rorescompiler/ya.make.induced_deps
new file mode 100644
index 0000000000..af569a0520
--- /dev/null
+++ b/build/prebuilt/tools/rorescompiler/ya.make.induced_deps
@@ -0,0 +1 @@
+INDUCED_DEPS(cpp ${ARCADIA_ROOT}/library/cpp/resource/registry.h)
diff --git a/build/prebuilt/tools/rorescompiler/ya.make.prebuilt b/build/prebuilt/tools/rorescompiler/ya.make.prebuilt
new file mode 100644
index 0000000000..208d7a0338
--- /dev/null
+++ b/build/prebuilt/tools/rorescompiler/ya.make.prebuilt
@@ -0,0 +1,15 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(RORESCOMPILER sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${RORESCOMPILER_RESOURCE_GLOBAL}/rorescompiler${MODULE_SUFFIX})
+
+ INCLUDE(ya.make.induced_deps)
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/tools/rorescompiler/ya.make.resource b/build/prebuilt/tools/rorescompiler/ya.make.resource
new file mode 100644
index 0000000000..a3d4d8c4e9
--- /dev/null
+++ b/build/prebuilt/tools/rorescompiler/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601277222)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601277445)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 1601277334)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make
new file mode 100644
index 0000000000..71685173c2
--- /dev/null
+++ b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+INCLUDE(ya.make.prebuilt)
+
+IF (NOT PREBUILT)
+ MESSAGE(FATAL_ERROR Unsupported host platform for prebuilt protoc-gen-go tool)
+ENDIF()
diff --git a/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.prebuilt b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.prebuilt
new file mode 100644
index 0000000000..49eea1305e
--- /dev/null
+++ b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.prebuilt
@@ -0,0 +1,13 @@
+INCLUDE(ya.make.resource)
+
+IF (SANDBOX_RESOURCE_ID != "")
+ ENABLE(PREBUILT)
+
+ PREBUILT_PROGRAM()
+
+ DECLARE_EXTERNAL_RESOURCE(PROTOC_GEN_GO sbr:${SANDBOX_RESOURCE_ID})
+
+ PRIMARY_OUTPUT(${PROTOC_GEN_GO_RESOURCE_GLOBAL}/protoc-gen-go${MODULE_SUFFIX})
+
+ END()
+ENDIF()
diff --git a/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.resource b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.resource
new file mode 100644
index 0000000000..05fcd0cbd5
--- /dev/null
+++ b/build/prebuilt/vendor/github.com/golang/protobuf/protoc-gen-go/ya.make.resource
@@ -0,0 +1,9 @@
+IF (OS_DARWIN AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2297961019)
+ELSEIF (OS_LINUX AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2297961241)
+ELSEIF (OS_WINDOWS AND ARCH_X86_64)
+ SET(SANDBOX_RESOURCE_ID 2297960716)
+ELSE()
+ SET(SANDBOX_RESOURCE_ID)
+ENDIF()
diff --git a/build/prebuilt/ya.make b/build/prebuilt/ya.make
new file mode 100644
index 0000000000..5246e5ec04
--- /dev/null
+++ b/build/prebuilt/ya.make
@@ -0,0 +1,25 @@
+OWNER(g:ymake)
+
+RECURSE(
+ contrib/libs/libmysql_r/strings/uca9dump
+ contrib/python/mypy-protobuf/bin/protoc-gen-mypy
+ contrib/tools/flatc64
+ contrib/tools/flatc
+ contrib/tools/protoc/plugins/cpp_styleguide
+ contrib/tools/protoc/plugins/grpc_cpp
+ contrib/tools/protoc/plugins/grpc_java
+ contrib/tools/protoc/plugins/grpc_python
+ contrib/tools/protoc_std
+ contrib/tools/protoc
+ contrib/tools/python3/pycc
+ contrib/tools/python/bootstrap
+ contrib/tools/ragel6
+ contrib/tools/yasm
+ tools/enum_parser/enum_parser
+ tools/event2cpp
+ tools/fix_elf
+ tools/rescompiler
+ tools/rescompressor
+ tools/rorescompiler
+ vendor/github.com/golang/protobuf/protoc-gen-go
+)
diff --git a/build/rules/alice.policy b/build/rules/alice.policy
new file mode 100644
index 0000000000..7bda44bd73
--- /dev/null
+++ b/build/rules/alice.policy
@@ -0,0 +1,48 @@
+ALLOW alice/megamind -> alice/megamind/library
+ALLOW junk -> alice/megamind/library
+ALLOW alice/apphost/graph_generator -> alice/megamind/library/config/protos
+
+# DO NOT ADD NEW ALLOW RULES
+ALLOW alice/bass -> alice/megamind/library/search/protos
+ALLOW alice/bass -> alice/megamind/library/util
+ALLOW alice/bass/forms/video/protocol_scenario_helpers -> alice/megamind/library/experiments
+ALLOW alice/bass/scenarios/zero_testing -> alice/megamind/library/experiments
+ALLOW alice/hollywood/convert_proto -> alice/megamind/library/search/protos
+ALLOW alice/hollywood/library/frame -> alice/megamind/library/util
+ALLOW alice/hollywood/library/frame_filler/lib -> alice/megamind/library/frame_builder
+ALLOW alice/hollywood/library/frame_filler/lib -> alice/megamind/library/scenarios/defs
+ALLOW alice/hollywood/library/frame_filler/lib -> alice/megamind/library/scenarios/interface
+ALLOW alice/hollywood/library/frame_filler/lib -> alice/megamind/library/scenarios/protocol
+ALLOW alice/hollywood/library/frame_filler/lib/ut -> alice/megamind/library/testing
+ALLOW alice/hollywood/library/scenarios/food -> alice/megamind/library/util
+ALLOW alice/hollywood/library/scenarios/general_conversation/candidates -> alice/megamind/library/experiments
+ALLOW alice/hollywood/library/scenarios/goodwin/handlers -> alice/megamind/library/frame_builder
+ALLOW alice/hollywood/library/scenarios/goodwin/handlers -> alice/megamind/library/search/protos
+ALLOW alice/hollywood/library/scenarios/goodwin/handlers -> alice/megamind/library/testing
+ALLOW alice/hollywood/library/scenarios/music -> alice/megamind/library/util
+ALLOW alice/hollywood/library/scenarios/music/music_backend_api -> alice/megamind/library/util
+ALLOW alice/hollywood/library/scenarios/notifications -> alice/megamind/library/util
+ALLOW alice/hollywood/library/scenarios/search/scenarios -> alice/megamind/library/experiments
+ALLOW alice/hollywood/library/scenarios/suggesters/games/ut -> alice/megamind/library/frame_builder
+ALLOW alice/hollywood/library/scenarios/suggesters/movie_akinator -> alice/megamind/library/util
+ALLOW alice/hollywood/library/scenarios/suggesters/movie_akinator/ammo_generator -> alice/megamind/library/session/protos
+ALLOW alice/hollywood/library/scenarios/suggesters/movies/ut -> alice/megamind/library/util
+ALLOW alice/library/nlg -> alice/megamind/library/util
+ALLOW alice/library/video_common/ut -> alice/megamind/library/testing
+ALLOW alice/library/websearch -> alice/megamind/library/search/protos
+ALLOW alice/tools/sessions_tool -> alice/megamind/library/session
+ALLOW alice/tools/print_megamind_session -> alice/megamind/library/session
+ALLOW alice/wonderlogs/daily/lib -> alice/megamind/library/context
+ALLOW alice/wonderlogs/daily/lib -> alice/megamind/library/handlers/utils
+ALLOW dict/mt/alice/scenarios/lib -> alice/megamind/library/frame_builder
+ALLOW dict/mt/alice/scenarios/lib -> alice/megamind/library/util
+ALLOW dj/services/alisa_skills/recommender -> alice/megamind/library/walker
+ALLOW sandbox/projects/megamind/release_megamind_formulas -> alice/megamind/library/classifiers/formulas/protos
+ALLOW sandbox/projects/megamind/release_megamind_formulas -> alice/megamind/library/config/protos
+ALLOW search/begemot/rules/alice_iot -> alice/megamind/library/scenarios/iot
+ALLOW search/begemot/rules/alice_web_music -> alice/megamind/library/search/protos
+ALLOW search/begemot/rules/init/build_request/proto -> alice/megamind/library/search/protos
+ALLOW web/src_setup/lib/setup/common/request -> alice/megamind/library/search/protos
+
+DENY .* -> alice/megamind/library
+DENY .* -> alice/tools/print_megamind_session
diff --git a/build/rules/autocheck.blacklist b/build/rules/autocheck.blacklist
new file mode 100644
index 0000000000..8711560ed3
--- /dev/null
+++ b/build/rules/autocheck.blacklist
@@ -0,0 +1,28 @@
+# Atocheck blacklist
+# The list of directories excluded from autocheck (with all subdirs)
+browser/frontend
+data-ui/abc
+data-ui/arcanum
+data-ui/idm
+data-ui/sandbox
+data-ui/unity
+direct/frontend/services
+direct/frontend/packages
+drive/pyback
+fintech/frontend
+frontend
+games/frontend
+junk
+kinopoisk/frontend
+kinopoisk/analytics
+maps/front
+mobile
+music/frontend
+serp/hermione
+zen/frontend
+taxi/lavka/frontend
+velocity/error-booster/error-booster-queue
+velocity/error-booster/market
+metrika/frontend
+metrika/analytics
+hrtech/frontend
diff --git a/build/rules/catboost.policy b/build/rules/catboost.policy
new file mode 100644
index 0000000000..b86c93f325
--- /dev/null
+++ b/build/rules/catboost.policy
@@ -0,0 +1,5 @@
+ALLOW catboost -> catboost
+
+DENY .* -> catboost/private
+
+DENY .* -> catboost/yandex_specific/private
diff --git a/build/rules/contrib_deprecated.policy b/build/rules/contrib_deprecated.policy
new file mode 100644
index 0000000000..5f6f93ac4f
--- /dev/null
+++ b/build/rules/contrib_deprecated.policy
@@ -0,0 +1,53 @@
+# == Rules for contrib/deprecated section ==
+#
+# NOTE: rules should be ordered from specific to generic (first matching rule is used)
+# See rule syntax docs: https://wiki.yandex-team.ru/devrules/overall/peerdirprohibition/
+
+ALLOW library/cpp/tf/mkldnn -> contrib/deprecated/onednn
+
+ALLOW mds/libs/blackhole -> contrib/deprecated/libcds
+ALLOW mds -> contrib/deprecated/folly
+ALLOW mds -> contrib/deprecated/wangle
+
+# Use newer version from contrib/libs/mongo-cxx-driver instead
+ALLOW mds/mastermind/ -> contrib/deprecated/mongo-cxx-driver
+
+# libpqtypes is not being developed since 2016 and is known to have bugs.
+# Consider using libpqxx / maps/libs/sql_chemistry instread.
+ALLOW mds/libs/postgres -> contrib/deprecated/libpqtypes
+ALLOW mds/libs/s3 -> contrib/deprecated/libpqtypes
+
+# Use library/cpp/json (a rapidjson proxy) instead
+ALLOW alice/cuttlefish/library/client_proto_converter -> contrib/deprecated/jsoncpp
+ALLOW mail/ -> contrib/deprecated/jsoncpp
+ALLOW quasar/backend/ -> contrib/deprecated/jsoncpp
+ALLOW smart_devices/ -> contrib/deprecated/jsoncpp
+ALLOW speechkit/ -> contrib/deprecated/jsoncpp
+ALLOW yandex_io/ -> contrib/deprecated/jsoncpp
+
+# mimepp is not being developed since 2012 and requires paid license
+ALLOW mail/so/ -> contrib/deprecated/mimepp
+ALLOW mail/so/spamstop/ -> contrib/deprecated/udns
+
+# TODO(thegeorg@): remove this specifying better policies
+ALLOW .* -> contrib/deprecated/python
+
+ALLOW metrika/core/programs/mobile-redirect -> contrib/deprecated/libctpp
+
+# argon2 is not maintained since 20190702 and can not be build for ARMv8.
+# consider using library/cpp/digest/argonish instead
+#
+# Remove this exception after KIKIMR-13008
+ALLOW kikimr/library/login -> contrib/deprecated/argon2
+
+# Though galloc is unmaintained version of tcmalloc,
+# it can not be universally replaced with the latter.
+ALLOW library/cpp/malloc/galloc -> contrib/deprecated/galloc
+
+# Default policies:
+#
+# Do not restrict contrib
+# All peerdirs to contrib/deprecated from outside are prohibited
+#
+ALLOW contrib -> contrib/deprecated
+DENY .* -> contrib/deprecated
diff --git a/build/rules/contrib_deps.policy b/build/rules/contrib_deps.policy
new file mode 100644
index 0000000000..9af4b85cc2
--- /dev/null
+++ b/build/rules/contrib_deps.policy
@@ -0,0 +1,76 @@
+ALLOW contrib/clickhouse -> library/cpp/consistent_hashing
+ALLOW contrib -> contrib
+ALLOW contrib -> build
+ALLOW contrib -> library/python/resource
+ALLOW contrib -> library/cpp/testing/unittest_main
+ALLOW contrib -> library/cpp/testing/unittest
+ALLOW contrib -> library/cpp/getopt
+ALLOW contrib -> library/cpp/resource
+ALLOW contrib -> library/cpp/charset
+ALLOW contrib -> library/cpp/svnversion
+ALLOW contrib -> certs
+ALLOW contrib/libs/.*/ut -> library
+ALLOW contrib/java/.*/ut -> devtools/jtest
+ALLOW contrib/java/.*/ut -> devtools/junit-runner
+ALLOW contrib/java/.*/ut -> devtools/junit5-runner
+ALLOW contrib/python -> library/python/resource
+ALLOW contrib/tools/cython/Cython -> library/python/resource
+ALLOW contrib/libs/python -> library/python/symbols/module
+ALLOW contrib/libs/python -> library/python/symbols/uuid
+ALLOW contrib/libs/python -> library/python/symbols/python
+ALLOW contrib/libs/python -> library/python/symbols/libc
+ALLOW contrib/libs/python -> library/python/runtime
+ALLOW contrib/libs/python -> library/python/runtime_py3
+ALLOW contrib/tools/python3/pycc -> library/python/runtime_py3
+ALLOW contrib/python/.*/(_?)test(s?) -> library/python/testing/yatest_common
+ALLOW contrib/python/.*/(_?)test(s?) -> library/python/import_test
+ALLOW contrib/python/click -> library/python/symbols/python
+ALLOW contrib/java/ru/yandex/market -> (market)|(maps/doc/proto/yandex/maps/proto)
+ALLOW contrib/libs/tf -> library/python/testing/gtest
+ALLOW contrib/libs/tf/tests/test_vars_to_const/cpp_check_inference -> maps/libs/common
+ALLOW contrib/libs/tf/tests/test_vars_to_const/cpp_check_inference -> yandex/maps/common
+ALLOW contrib/restricted/libtorrent -> maps/libs/fastbone
+ALLOW contrib/python/transfer_manager_client -> transfer_manager/client
+ALLOW contrib/(deprecated/)?python/django -> library/python/django
+ALLOW contrib/(deprecated/)?python/django -> library/python/gunicorn
+ALLOW contrib/python/python-magic -> library/python/symbols/libmagic
+ALLOW contrib/python/typecode -> library/python/symbols/libmagic
+ALLOW contrib/tools/jdk/test -> devtools/ya/yalibrary/tools
+ALLOW contrib/libs/clang12/tools/extra/clang-tidy/tool -> library/cpp/clang_tidy
+ALLOW contrib/libs/inja -> library/cpp/scheme
+ALLOW contrib/libs/geos/capi/ctypes -> library/python/ctypes
+ALLOW contrib/libs/leveldb -> library/cpp/deprecated/mapped_file
+ALLOW contrib/libs/leveldb -> library/cpp/logger
+ALLOW contrib/libs/leveldb -> library/cpp/digest/crc32c
+ALLOW contrib/libs/lua -> library/cpp/archive
+ALLOW contrib/libs/phonedetect/src -> library/cpp/digest/md5
+ALLOW contrib/python/certifi -> library/python/certifi
+ALLOW contrib/python/horovod/horovod/common/syms -> library/python/symbols/registry
+ALLOW contrib/python/opensfm -> library/cpp/vl_feat
+ALLOW contrib/python/Wand/ImageMagick -> library/python/symbols/registry
+ALLOW contrib/nginx/modules/nginx-rtmp-module -> library/cpp/json
+ALLOW contrib/python/gino -> library/python/pyscopg2
+ALLOW contrib/python/psycopg2/tests -> mail/devpack
+ALLOW contrib/python/asn1crypto -> library/python/symbols/crypto
+ALLOW contrib/python/win_unicode_console -> library/python/symbols/win_unicode_console
+ALLOW contrib/python/pycryptodome -> library/python/symbols/registry
+
+ALLOW contrib/tests/python -> library/python/fs
+
+ALLOW contrib/tests/subversion -> vcs/svn/run
+ALLOW contrib/tests/subversion -> vcs/svn/test
+
+ALLOW contrib/tests/subvertpy -> devtools/ya/exts
+ALLOW contrib/tests/subvertpy -> devtools/ya/yalibrary/svn/testing
+ALLOW contrib/tests/subvertpy -> library/python/windows
+ALLOW contrib/tests/subvertpy -> vcs/svn/wc/client
+
+ALLOW contrib/tools/unbound -> infra/libs
+ALLOW contrib/tools/unbound -> library/cpp/proto_config
+
+ALLOW contrib/python/marshmallow-mongoengine/py[23]/tests -> library/python/pytest-mongodb
+
+# contrib tests is written by us, hence everything is allowed
+ALLOW contrib/tests -> .*
+
+DENY contrib -> .*
diff --git a/build/rules/contrib_python.policy b/build/rules/contrib_python.policy
new file mode 100644
index 0000000000..60fd149753
--- /dev/null
+++ b/build/rules/contrib_python.policy
@@ -0,0 +1,701 @@
+# django-1.11 deprecation
+ALLOW contrib/python/.*/tests? -> contrib/python/django/django-1.11
+ALLOW contrib/deprecated/python/.*/tests? -> contrib/python/django/django-1.11
+ALLOW ads/yacontext/apps/procontext -> contrib/python/django/django-1.11
+ALLOW devtools/dummy_arcadia/django_settings -> contrib/python/django/django-1.11
+ALLOW devtools/signer/signer -> contrib/python/django/django-1.11
+ALLOW douber/backend -> contrib/python/django/django-1.11
+ALLOW intranet/audit/src -> contrib/python/django/django-1.11
+ALLOW intranet/crt/tests -> contrib/python/django/django-1.11
+ALLOW intranet/crt -> contrib/python/django/django-1.11
+ALLOW intranet/dogma/dogma -> contrib/python/django/django-1.11
+ALLOW intranet/magiclinks/src -> contrib/python/django/django-1.11
+ALLOW intranet/paste/src -> contrib/python/django/django-1.11
+ALLOW intranet/pypi/src -> contrib/python/django/django-1.11
+ALLOW intranet/qooker/src -> contrib/python/django/django-1.11
+ALLOW intranet/search/core -> contrib/python/django/django-1.11
+ALLOW intranet/search/settings -> contrib/python/django/django-1.11
+ALLOW intranet/sync_tools/tests -> contrib/python/django/django-1.11
+ALLOW intranet/wiki -> contrib/python/django/django-1.11
+ALLOW intranet/plan/src -> contrib/python/django/django-1.11
+ALLOW intranet/plan -> contrib/python/django/django-1.11
+ALLOW library/python/django_alive -> contrib/python/django/django-1.11
+ALLOW library/python/django_celery_monitoring -> contrib/python/django/django-1.11
+ALLOW library/python/django_mds -> contrib/python/django/django-1.11
+ALLOW library/python/django_russian -> contrib/python/django/django-1.11
+ALLOW library/python/metrics_framework -> contrib/python/django/django-1.11
+ALLOW library/python/python-django-yauth/tests -> contrib/python/django/django-1.11
+ALLOW library/python/tools_mongodb_cache -> contrib/python/django/django-1.11
+ALLOW mssngr/botplatform/src/bots/common/fanout -> contrib/python/django/django-1.11
+ALLOW mssngr/botplatform/src/bots/common -> contrib/python/django/django-1.11
+ALLOW mssngr/botplatform/tests -> contrib/python/django/django-1.11
+ALLOW passport/backend/contrib/django_contrib_comments -> contrib/python/django/django-1.11
+ALLOW plus/gift/pdfgen -> contrib/python/django/django-1.11
+ALLOW plus/utils/tests -> contrib/python/django/django-1.11
+ALLOW quality/antifraud/viewers/antifraud_viewer/lib -> contrib/python/django/django-1.11
+ALLOW quality/functionality/chats/common/bots -> contrib/python/django/django-1.11
+ALLOW quality/functionality/chats/feedback/src/feedback -> contrib/python/django/django-1.11
+ALLOW quality/functionality/chats/ycm/src/ycm -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/libs/storage -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/libs/wutils -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/rich_snippets/migrations -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/storage/migrations -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/storage -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/turbo/migrations -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/turbo -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/ya_user/migrations -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/apps/ya_user -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server/core -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/server -> contrib/python/django/django-1.11
+ALLOW quality/functionality/parsepl/testing/server -> contrib/python/django/django-1.11
+ALLOW rt-research/multik/pylib/operations_queue -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/mm_backend/bin -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/mm_backend/tests -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/mm_backend -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/tv_proxy/bin -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/tv_proxy/proxy -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/tv_proxy/tests -> contrib/python/django/django-1.11
+ALLOW smarttv/alice/tv_proxy -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka/bin -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka/functional_tests -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka/proxy -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka/tests -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka/utils -> contrib/python/django/django-1.11
+ALLOW smarttv/droideka -> contrib/python/django/django-1.11
+ALLOW travel/avia/.* -> contrib/python/django/django-1.11
+ALLOW travel/rasp/admin -> contrib/python/django/django-1.11
+ALLOW travel/rasp/library/python/common -> contrib/python/django/django-1.11
+ALLOW travel/rasp/library/python/sitemap -> contrib/python/django/django-1.11
+ALLOW travel/library/python/entrypoint -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/advisor -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/common/tests -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/demo -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/launcher -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/lockscreen -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/project -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/setup_wizard -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/tests/recipe.inc -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/weather -> contrib/python/django/django-1.11
+ALLOW yaphone/advisor/widget -> contrib/python/django/django-1.11
+ALLOW yaphone/dialer/dialer/tests -> contrib/python/django/django-1.11
+ALLOW yaphone/dialer/dialer -> contrib/python/django/django-1.11
+ALLOW yaphone/dialer/project/bin -> contrib/python/django/django-1.11
+ALLOW yaphone/dialer/project -> contrib/python/django/django-1.11
+ALLOW yaphone/utils/geo -> contrib/python/django/django-1.11
+DENY .* -> contrib/python/django/django-1.11
+
+ALLOW maps -> maps/contrib
+DENY .* -> maps/contrib
+
+ALLOW contrib/deprecated/python/ruamel.ordereddict/tests -> contrib/deprecated/python/ruamel.ordereddict
+ALLOW contrib/python/ruamel.yaml -> contrib/deprecated/python/ruamel.ordereddict
+DENY .* -> contrib/deprecated/python/ruamel.ordereddict
+
+ALLOW vcs/hg/server -> contrib/deprecated/python/hgsubversion
+DENY .* -> contrib/deprecated/python/hgsubversion
+
+ALLOW sandbox/projects/CompareYmakeDump -> contrib/deprecated/python/diff2html
+ALLOW sandbox/projects/antirobot/DiffResources -> contrib/deprecated/python/diff2html
+ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/diff2html
+DENY .* -> contrib/deprecated/python/diff2html
+
+# Sophos SDK and engine are distributed under proprietary license hence
+# usage restriction
+ALLOW yweb/antimalware/ -> contrib/libs/sophos
+DENY .* -> contrib/libs/sophos
+
+# contrib/python/backports should not be used in new projects because we want
+# to start new projects on Py3
+ALLOW contrib/python/backports.tempfile -> contrib/python/backports.weakref
+DENY .* -> contrib/python/backports.weakref
+
+ALLOW contrib/python/thrift/tests -> contrib/python/thrift
+ALLOW contrib/python/jaeger-client -> contrib/python/thrift
+ALLOW search/mon/wabbajack/libs/generated/iss3 -> contrib/python/thrift
+ALLOW search/mon/wabbajack/libs/modlib/api_wrappers/casher -> contrib/python/thrift
+DENY .* -> contrib/python/thrift
+
+ALLOW antiadblock/libs/tornado_redis -> contrib/python/toredis
+ALLOW yabs/amazon/cache_proxy -> contrib/python/toredis
+ALLOW yql/udfs/common/python/python_arc -> contrib/python/toredis
+DENY .* -> contrib/python/toredis
+
+# contrib/python/MySQL-python dosen't support Python 3, use mysqlclient-python
+# or pymysql instead of this.
+ALLOW adfox/amacs/tests/functional/libs/builders -> contrib/python/MySQL-python
+ALLOW adfox/amacs/tests/functional/libs/config -> contrib/python/MySQL-python
+ALLOW adfox/amacs/tests/functional/libs/db -> contrib/python/MySQL-python
+ALLOW adfox/amacs/tests/functional/libs/marshaller -> contrib/python/MySQL-python
+ALLOW adfox/amacs/tests/functional/libs/models -> contrib/python/MySQL-python
+ALLOW adfox/amacs/tests/functional/utils -> contrib/python/MySQL-python
+ALLOW adfox/rtd/reports -> contrib/python/MySQL-python
+ALLOW adfox/samogon/servants/monitoring/uniques_monitoring -> contrib/python/MySQL-python
+ALLOW ads/bsyeti/bb_viewer/viewer -> contrib/python/MySQL-python
+ALLOW ads/libs/py_core -> contrib/python/MySQL-python
+ALLOW ads/ml_monitoring/alerts/lib -> contrib/python/MySQL-python
+ALLOW ads/ml_monitoring/lib/mysql -> contrib/python/MySQL-python
+ALLOW april/badb -> contrib/python/MySQL-python
+ALLOW contrib/python/MySQL-python/test -> contrib/python/MySQL-python
+ALLOW contrib/python/MySQL-python -> contrib/python/MySQL-python
+ALLOW dict/ontodb/tools/fields_diff/lib -> contrib/python/MySQL-python
+ALLOW maps/streetview/backoffice/lib -> contrib/python/MySQL-python
+ALLOW market/sre/tools/cs_mysql_monitoring/mysql_monitoring -> contrib/python/MySQL-python
+ALLOW metrika/core/monitoring/mobile-logs-api-export-generator-check -> contrib/python/MySQL-python
+ALLOW passport/backend/social -> contrib/python/MySQL-python
+ALLOW passport/infra/daemons/yasmsapi/db -> contrib/python/MySQL-python
+ALLOW testenv/core -> contrib/python/MySQL-python
+ALLOW testenv/recipes/ut -> contrib/python/MySQL-python
+# avia task to migrate from MySQL-python https://st.yandex-team.ru/RASPTICKETS-18201
+ALLOW travel/avia/.* -> contrib/python/MySQL-python
+ALLOW travel/library/recipe_utils -> contrib/python/MySQL-python
+ALLOW travel/rasp/admin -> contrib/python/MySQL-python
+ALLOW travel/rasp/library/common -> contrib/python/MySQL-python
+ALLOW travel/rasp/library/python/common -> contrib/python/MySQL-python
+ALLOW travel/rasp/library/common_recipe -> contrib/python/MySQL-python
+ALLOW travel/rasp/mysql_dumper/lib -> contrib/python/MySQL-python
+ALLOW trust/emulator/servant -> contrib/python/MySQL-python
+ALLOW yabs/qa/yabs_b2b_tank/qabs/b2b -> contrib/python/MySQL-python
+ALLOW yabs/server/test/tools/lua_test_generator -> contrib/python/MySQL-python
+ALLOW yabs/server/tools/debug_cookie_mysql -> contrib/python/MySQL-python
+ALLOW yweb/antimalware/visual_html_parser/yandex-search-antivirus-common -> contrib/python/MySQL-python
+ALLOW yweb/news/news_back/api/scripts/migrate_scripts_common -> contrib/python/MySQL-python
+ALLOW yweb/news/support/viewer -> contrib/python/MySQL-python
+DENY .* -> contrib/python/MySQL-python
+
+ALLOW contrib/deprecated/python/mipp/tests -> contrib/deprecated/python/mipp
+ALLOW contrib/deprecated/python/mpop -> contrib/deprecated/python/mipp
+ALLOW contrib/deprecated/python/mpop/mpop/tests -> contrib/deprecated/python/mpop
+ALLOW weather/workers/common/clean_satellite/utils -> contrib/deprecated/python/mpop
+ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/mipp
+DENY .* -> contrib/deprecated/python/mipp
+DENY .* -> contrib/deprecated/python/mpop
+
+DENY .* -> contrib/python/pdbpp
+
+ALLOW contrib/python/pdbpp -> contrib/python/fancycompleter
+DENY .* -> contrib/python/fancycompleter
+
+ALLOW infra/procman -> contrib/python/skynet_pyro4
+ALLOW skynet -> contrib/python/skynet_pyro4
+DENY .* -> contrib/python/skynet_pyro4
+
+ALLOW contrib/deprecated/python/cyordereddict -> contrib/deprecated/python/cyordereddict
+ALLOW contrib/deprecated/python/cyordereddict/cyordereddict/tests -> contrib/deprecated/python/cyordereddict
+ALLOW infra/awacs/vendor/awacs -> contrib/deprecated/python/cyordereddict
+ALLOW juggler/juggler_client/jclient -> contrib/deprecated/python/cyordereddict
+ALLOW juggler/juggler_client -> contrib/deprecated/python/cyordereddict
+ALLOW juggler/libjuggler -> contrib/deprecated/python/cyordereddict
+ALLOW juggler/netmon/agent/agent -> contrib/deprecated/python/cyordereddict
+ALLOW mail/python/huge_py2 -> contrib/deprecated/python/cyordereddict
+ALLOW sprav/protos/model -> contrib/deprecated/python/cyordereddict
+ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/cyordereddict
+DENY .* -> contrib/deprecated/python/cyordereddict
+
+ALLOW contrib/deprecated/python/xmpppy -> contrib/deprecated/python/xmpppy
+ALLOW ads/libs/py_notifier -> contrib/deprecated/python/xmpppy
+ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/xmpppy
+DENY .* -> contrib/deprecated/python/xmpppy
+
+ALLOW contrib/python/fancycompleter -> contrib/python/pyrepl
+DENY .* -> contrib/python/pyrepl
+
+# because match with contrib/python/pycrypto
+ALLOW .* -> contrib/python/pycryptodome
+# pycrypto deprecated
+ALLOW intranet/domenator/src -> contrib/python/pycrypto
+ALLOW intranet/yandex_directory/src -> contrib/python/pycrypto
+ALLOW addappter/backend -> contrib/python/pycrypto
+ALLOW adfox -> contrib/python/pycrypto
+ALLOW alice/vins/api -> contrib/python/pycrypto
+ALLOW antiadblock/cryprox/cryprox -> contrib/python/pycrypto
+ALLOW balancer/test/functional/aab_cookie_verify -> contrib/python/pycrypto
+ALLOW billing/balance_utils -> contrib/python/pycrypto
+ALLOW billing/balance_utils/tests -> contrib/python/pycrypto
+ALLOW billing/snout/yb_snout_api -> contrib/python/pycrypto
+ALLOW crypta -> contrib/python/pycrypto
+ALLOW devtools/experimental/addappter/addappter -> contrib/python/pycrypto
+ALLOW direct/infra/direct-utils/direct-apps-juggler/share/direct-apps-juggler/sandbox/common -> contrib/python/pycrypto
+ALLOW infra/cqudp -> contrib/python/pycrypto
+ALLOW infra/portoshell -> contrib/python/pycrypto
+ALLOW mds/pymds -> contrib/python/pycrypto
+ALLOW mds/s3/s3_mds_proxy -> contrib/python/pycrypto
+ALLOW metrika/core -> contrib/python/pycrypto
+ALLOW mlp/mail -> contrib/python/pycrypto
+ALLOW mssngr/router/tools/export_legacy_messages -> contrib/python/pycrypto
+ALLOW passport/infra/daemons/blackbox/ut/totp_manual/tests -> contrib/python/pycrypto
+ALLOW quality/functionality/turbo/merger/ut/medium -> contrib/python/pycrypto
+ALLOW samogon -> contrib/python/pycrypto
+ALLOW sandbox/common -> contrib/python/pycrypto
+ALLOW sandbox/virtualenv -> contrib/python/pycrypto
+ALLOW sandbox/yasandbox -> contrib/python/pycrypto
+ALLOW skynet/library -> contrib/python/pycrypto
+ALLOW travel/hotels/tools/searcher_client -> contrib/python/pycrypto
+ALLOW travel/buses/connectors -> contrib/python/pycrypto
+ALLOW trust/emulator -> contrib/python/pycrypto
+ALLOW trust/processing_holder -> contrib/python/pycrypto
+ALLOW trust/tests/tests_trust_bindings -> contrib/python/pycrypto
+ALLOW yabs/server/tools/banner_user_choice -> contrib/python/pycrypto
+ALLOW yabs/server/test -> contrib/python/pycrypto
+ALLOW ydo/database/active_record -> contrib/python/pycrypto
+ALLOW yweb/antispam/cid -> contrib/python/pycrypto
+ALLOW mail/payments/payments -> contrib/python/pycrypto
+DENY .* -> contrib/python/pycrypto
+
+ALLOW contrib/python/Geohash/tests -> contrib/python/Geohash
+ALLOW yql/udfs/common/python/python_arc -> contrib/python/Geohash
+DENY .* -> contrib/python/Geohash
+
+ALLOW metrika/java/api -> contrib/java/patched/com/android/tools/r8
+ALLOW metrika/java/api -> contrib/java/patched/com/ryantenney/metrics/metrics-spring
+ALLOW direct -> contrib/java/patched/io/leangen/graphql/spqr
+ALLOW contrib/java/patched/com/android/tools/r8 -> contrib/java/patched/com/android/tools/r8
+ALLOW contrib/java/patched/com/ryantenney/metrics/metrics-spring -> contrib/java/patched/com/ryantenney/metrics/metrics-spring
+ALLOW contrib/java/patched/io/leangen/graphql/spqr -> contrib/java/patched/io/leangen/graphql/spqr
+DENY .* -> contrib/java/patched
+
+# because library will not work without external dependencies - IBM MQ
+# See https://st.yandex-team.ru/CONTRIB-1854 and pymqi README for details
+ALLOW travel/avia -> contrib/python/pymqi
+DENY .* -> contrib/python/pymqi
+
+# https://st.yandex-team.ru/CONTRIB-1839
+ALLOW datalens/backend/app/dls -> contrib/python/quart
+DENY .* -> contrib/python/quart
+
+# https://st.yandex-team.ru/CONTRIB-2012
+ALLOW maps/geomarketing -> contrib/python/facebook-business
+ALLOW sandbox/projects/maps/geomarketing -> contrib/python/facebook-business
+ALLOW jupytercloud/arcadia_kernel/default -> contrib/python/facebook-business
+ALLOW jupytercloud/arcadia_kernel/default_yql -> contrib/python/facebook-business
+ALLOW geoproduct/amocrm/fb_leads -> contrib/python/facebook-business
+ALLOW statbox/statkey -> contrib/python/facebook-business
+ALLOW quality/ab_testing/cofe/bin/lib/files/py3/cofe_kernel_yql -> contrib/python/facebook-business
+DENY .* -> contrib/python/facebook-business
+
+# https://st.yandex-team.ru/CONTRIB-1954
+ALLOW contrib/python/glom -> contrib/python/face$
+DENY .* -> contrib/python/face$
+
+# https://st.yandex-team.ru/CONTRIB-1918
+ALLOW contrib/python/webstruct -> contrib/python/webstruct
+ALLOW yweb/antimalware/direct/fraud_html_detector -> contrib/python/webstruct
+DENY .* -> contrib/python/webstruct
+
+ALLOW contrib/tools/unbound -> contrib/tools/unbound
+DENY .* -> contrib/tools/unbound
+
+# https://st.yandex-team.ru/CONTRIB-2042
+ALLOW addappter/backend/addappter_backoffice -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW addappter/backend/addappter/monitoring/juggler -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW addappter/backend/addappter -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW addappter/backend/migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW addappter/libs/fixtures/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/libs/builders -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/libs/config -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/libs/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/libs/marshaller -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/libs/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/amacs/tests/functional/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/infra/amacs_config/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/infra/amacs_config/migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/pdb3/discovery -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW adfox/rtd/reports -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/emily/viewer/backend/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW logos/viewy/yagraph/Backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/ml_monitoring/api/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/quality/phf/phf_direct_loader/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/watchman/timeline/api/bin/timeline_db_manager -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/watchman/timeline/api/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ads/watchman/timeline/api/migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antiadblock/configs_api/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antiadblock/postgres_local/tests_recipe -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antiadblock/postgres_local -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/forms -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/library -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/management/commands -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/management -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/middlewares -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/models/block -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/models/history -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb/cbb/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/forms -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/library -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/management/commands -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/management -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/middlewares -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/models/block -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/models/history -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW antirobot/cbb_django/cbb/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/agency_rewards/agency_rewards -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/balance/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/balance_utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/balance -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/dcsaap/backend/celery_app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/dcs/dcs -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/dcs/tools/devserver -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/dwh/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/nirvana_reports/tools/simple_email_report/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/snout/yb_snout_api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/snout/yb_snout_proxy -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW billing/yb_reports_monitorings/yb_reports_monitorings -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW browser/infra/services/swarm_cache/backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW cloud/support/dutybot -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW cloud/support/mdb-support-bot -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/databases -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/fastapi-utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/gino -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/graphene-sqlalchemy/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/luigi -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/sentry-sdk/sentry_sdk/integrations/sqlalchemy -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/sqlalchemy/sqlalchemy-1.2/sqlalchemy/testing -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW contrib/python/sqltap -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW crypta/adhoc/smarts/backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW crypta/graph/toloka/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW crypta/graph/v1/python -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW crypta/web/dating/back -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW devtools/experimental/agency_rewards/agency_rewards -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW dict/misspell/fixlist_manager -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW dict/mt/eval/eval_viewer/lib/dao/pg -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW dict/mt/make/modules/corpus/alchemy -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW dict/ontodb/tools/ontodbfixes/migration/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW drive/analytics/pybase/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW education/media_platform/services/api/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW education/yaschool/services/sections/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW extsearch/images/robot/rtrobot/panel -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW extsearch/video/robot/youtube_grabber/ugc/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW geoproduct/geocrm_search/data_import -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW geoproduct/geocrm_search/engine -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW geoproduct/geocrm_search/import_app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW geoproduct/geocrm_search/orm -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW haas/oebs_sync/apply_item_changes_daemon -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW haas/oebs_sync/daemon_lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW haas/oebs_sync/get_item_changes_daemon -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW health/articles/articles_pipeline/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW health/yamd/health_backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW health/yamd/health_import -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW health/yamd/libs/data_layer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW health/yamd/pills_postgresql_db/data_layer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW infra/cores/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/watcher/alembic -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/watcher/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/domenator/migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/trip/alembic -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/trip/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/vconf/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/wiki/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/wiki/src.template -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW intranet/yandex_directory/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW keyboard/analytics/toloka/daemon/backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/callmeback/callmeback/stages/api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/callmeback/callmeback/stages/db_stats -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/callmeback/callmeback/stages/worker -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/contrib/asyncpgsa -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/contrib/python/aiopg/aiopg/sa -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/python/huge_py3 -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/python/theatre/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/qmgr/to_review/components/io/storage/save/py_prototype -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/qmgr/to_review/components/io/storage/schema/py_prototype/tests/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/qmgr/to_review/components/io/storage/schema/py_prototype -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/qmgr/to_review/components/io/storage/schema/tools/qdb -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mail/so/daemons/knn_bot -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/adv_store/v2 -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/adv_store -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/billing_proxy -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/common/pg_engine/pytest -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/common/pgswim/pytest -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/farmacy/store/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/geosmb/booking_yang -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/geosmb/doorman/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/geosmb/promoter/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/geosmb/scenarist -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/manul -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/points/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/stat_controller/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/statistics/dashboard/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps_adv/warden/server -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/mvrp_solver/backend/async_backend/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/tools/find_max_number_of_concurrent_tasks -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/tools/segment_distances_computation -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/sql/scripts/copy_eta_url_to_tracking_token -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/sql/scripts/copy_order_sharing -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/sql/scripts/copy_predefined_sequence -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/sql/scripts/link_sms_to_tracking_tokens -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/sql/scripts/tracking_token_copy_created_at_to_time -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/tools/courier_positions -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend/tools/db_tool -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/b2bgeo/ya_courier/backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/factory/fastcgi/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/factory/pylibs/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/photos/backoffice/tasks/pylibs/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/photos/pylibs/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/renderer/stylerepo/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/streetview/backoffice/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/streetview/ugc/pylibs/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/mapspro/libs/python/pymod -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/stat/arm_dump_to_yt -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/stat/dump_feedback_to_yt -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/stat/dump_to_yt/social -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/stat/fbapi_feedback -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW maps/wikimap/stat/nmaps_news_subscribers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/front/hansel -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/idx/marketindexer/marketindexer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/mobile/beru/performance-diagnostic/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/pylibrary/database -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/pylibrary/mindexerlib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/seo/tools/postgres_local -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/services/cema/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/services/colba/dispatcher -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/services/colba/master -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/services/colba/minion -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/services/mcm/mcm -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW market/sre/tools/logkeeper/logkeeper -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW mds/mastermind/minion/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/admin/brb/server/lib/controllers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/admin/brb/server/lib/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/admin/brb/server/lib/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/admin/maas/lib/core/common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/admin/python/cms/agent/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW metrika/core/programs/mobile_yt_to_yc_export -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/admin/lib/controllers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/admin/lib/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/controllers/admin -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/controllers/user -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/controllers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/announce -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/billing -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/cashbox/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/cashbox -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/company/client/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/company/client -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/company/partner -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/company -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/contract/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/contract -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/fiscal_drive/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/fiscal_drive -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/grant -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/reg_info/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/reg_info -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/retail_point -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/user/dao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/user -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib/runtime_pulling -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/manage/backend_data/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/manage/backend_data -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/manage/contract_updater -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/manage/demo_data -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/manage/regular_tasks -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_functional/libconftest -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/libconftest -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_admin -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_billing -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_cashbox -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_company -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_contract/test_contract_cycle -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_contract -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_fiscal_drive_model -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_fiscal_drive -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_grant -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_reg_info -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_runtime_pulling/test_performance -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_runtime_pulling/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_runtime_pulling -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_integration/test_postgres/test_utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/api/tests/test_unit/test_contract_updater -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/common/postgres_recipe -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/common/sqlalchemy -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/manage -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/sender/channels -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/sender/event_types -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/sender/notifications -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/sender/notification_types -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/server/blueprints/monitoring -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/tests/test_unit/libconftest -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/tests/test_unit/test_sender/test_channels -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/tests/test_unit/test_sender/test_event_types -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW ofd/notifier/tests/test_unit/test_sender/test_notification_types -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/db/faker -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/dbmanager -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/db/read_api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/serializers/domain -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/serializers/domain/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core/serializers/eav/query -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/core -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/library/errors -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/social/api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/social/common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/social/proxy2 -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/social/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/qa/test_user_service/tus_api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests/commands -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests/common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests_highload/access -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests_highload/secrets -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests/views/secrets -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api/tests/views -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/backend/vault/api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW passport/infra/daemons/yasmsapi/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/ab_testing/scripts/ems -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/ab_testing/tools/postgres_local/tests_recipe -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/ab_testing/tools/postgres_local -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/antifraud/xurma/tools/xurma_viewer/backend/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/functionality/turbo/forms/app/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/functionality/turbo/forms/job/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/functionality/turbo/json_api/app/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/functionality/turbo/json_api/job/lib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/db/orm -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/manufacturing/jangles/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/manufacturing/jangles/blueprints -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/manufacturing/jangles/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/manufacturing/jangles -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quasar/quasmodrom/quasmodrom -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW release_machine/release_machine/alembic -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW release_machine/release_machine/src/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW rt-research/monitoring/atoms/config -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/geo/tools/ranking -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/horadric/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/martylib -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/iconostasis_validator/libs -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rtc/plotva/lib/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rtc/plotva/lib/http -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rviewer/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rviewer/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rviewer/modules -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/rviewer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/uchenki/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW search/mon/wabbajack/libs/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW sprav/scripts/assay/sampling -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW testenv/core/common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW testenv/core -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/flight_extras -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/price_index -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/admin/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/alembic/migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/alembic -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/data_importer/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/data_importer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/diff_builder/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/diff_builder -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/lib/python/db_locks -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/lib/python/db_models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/tasks/monitoring/db/bin -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/tasks/monitoring/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/shared_flights/tasks/monitoring -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/subscriptions/app/alembic/bin -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/subscriptions/app/api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/subscriptions/app/model -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/subscriptions/app/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/avia/yeah -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/admin/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/db/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/morda_backend/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/morda_backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/scripts/automatcher -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/scripts/endpoints_stats -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/scripts/sales_monitor -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/bus/settings -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/wizards/proxy_api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW travel/rasp/wizards/train_wizard_api -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW trust/directory -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW trust/directory.jinja -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW trust/emulator -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW trust/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW trust/utils.jinja -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW vcs/misc/db/check_pgaas -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW vcs/misc/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/admin/migrations/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/db/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/jupyter_kernel -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/libs/utils/db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/meteo/flow/scheduler -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/settings -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/common/clean_satellite -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/common/formula_fallback -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/common/send_cao_emails -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/exports/yt/grid/facts -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/exports/yt/s3 -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/base -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/cao -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/dwd -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/ecmwf -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/gfs_uv -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/imports/satellites -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW weather/workers/wrf/utils -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yabs/indoor/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/localization_admin/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/common -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/core -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/health -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/prebuilt -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/store -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/subscription -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yaphone/newpdater/src/updates -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yql/library/python/yql/sqlalchemy/examples -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yql/udfs/common/python/python3.incl -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yql/udfs/common/python/python_arc.incl -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/antimalware/visual_html_parser/yandex-search-vdb-report/src -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/news/common/python/clickhouse -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/news/support/viewer -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/news/themes_viewer/app -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/rca/server/storage -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/webdaemons/expcookier/tests -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers/admin/admin -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers/answers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers/database_migrations -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_acceptance -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_antispam_check -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_banner -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_grading_collector -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_turbo -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_unloading_serp -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_update_passport -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/answers_update_turbo -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/daily_promoblock_push -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/make_ammos -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/populate_db -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_banner -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_corrector -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_deleter -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_factors_uploader -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_frequency_uploader -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_rank_updater -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_tag_updater -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/questions_uploader -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/the_question_migrator -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/the_question_unloading_serp -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/triggers_evoker -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/upload_tag_teasers -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yweb/yasap/answers_nirvana/weekly_org_push -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW zootopia/analytics/drive/binary/drive -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW zootopia/analytics/drive/source/drive/backend -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW zootopia/analytics/drive/source/drive/core -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW zootopia/analytics/drive/source/drive/models -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW zootopia/hub/geosupply/geosupply -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW jupytercloud/arcadia_kernel/default -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW jupytercloud/arcadia_kernel/default_yql -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/ab_testing/cofe/bin/lib/files/py2/cofe_kernel_yql -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW quality/ab_testing/cofe/bin/lib/files/py3/cofe_kernel_yql -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yql/udfs/common/python/python3 -> contrib/python/sqlalchemy/sqlalchemy-1.2
+ALLOW yql/udfs/common/python/python_arc -> contrib/python/sqlalchemy/sqlalchemy-1.2
+DENY .* -> contrib/python/sqlalchemy/sqlalchemy-1.2
+
+# As agreed in https://st.yandex-team.ru/CONTRIB-2183
+# (use contrib/python/marshmallow_dataclass instead)
+ALLOW education/ -> contrib/python/dataclasses-json
+DENY .* -> contrib/python/dataclasses-json
+
+# https://st.yandex-team.ru/CONTRIB-2222
+ALLOW browser/infra/.* -> contrib/python/hurry.filesize
+DENY .* -> contrib/python/hurry.filesize
+
+# https://st.yandex-team.ru/CONTRIB-2338
+ALLOW noc/.* -> contrib/python/asyncssh
+DENY .* -> contrib/python/asyncssh
diff --git a/build/rules/contrib_restricted.policy b/build/rules/contrib_restricted.policy
new file mode 100644
index 0000000000..a83ead1904
--- /dev/null
+++ b/build/rules/contrib_restricted.policy
@@ -0,0 +1,193 @@
+# == Rules for contrib/restricted section ==
+#
+# NOTE: rules should be ordered from specific to generic (first matching rule is used)
+# See rule syntax docs: https://wiki.yandex-team.ru/devrules/overall/peerdirprohibition/
+
+# scale_ipp filter for ffmpeg use Intel IPP hence it is nonfree
+ALLOW strm/cv/ffmpeg_adcv/toshik_filters -> contrib/restricted/ffmpeg-3-scale-ipp
+
+# CityHash-1.0.2 is a specific version hardwired into ClickHouse public interface
+ALLOW clickhouse -> contrib/restricted/cityhash-1.0.2
+ALLOW library/cpp/clickhouse -> contrib/restricted/cityhash-1.0.2
+ALLOW saas/library/hash_to_block_mode -> contrib/restricted/cityhash-1.0.2
+
+# dragonbox is a specific library for float formatting
+ALLOW clickhouse -> contrib/restricted/dragonbox
+
+# same rules for restricted set of sources in YQL
+ALLOW ydb/library/yql/udfs/common/clickhouse/client -> contrib/restricted/cityhash-1.0.2
+ALLOW ydb/library/yql/udfs/common/clickhouse/client -> contrib/restricted/boost
+ALLOW ydb/library/yql/udfs/common/clickhouse/client -> contrib/restricted/dragonbox
+ALLOW ydb/library/yql/udfs/common/clickhouse/client -> contrib/restricted/fast_float
+
+# fast_float is a faster alternative to double-conversion for float parsing.
+# ClickHouse uses the best libraries for performance, that's why it changes them with insane speed.
+# Arcadia is not ready for this, that's why we added this library in restricted.
+ALLOW clickhouse -> contrib/restricted/fast_float
+
+# ClickHouse uses hash-table from abseil-cpp for better performance in CacheDictionaries and SSDCacheDictionaries,
+# because it the best best open source hash table framework (swiss hash tables, hash functions)
+ALLOW clickhouse -> contrib/restricted/abseil-cpp
+
+# TurboBase64 is a fast vectorized library for encoding/decoding base64.
+ALLOW clickhouse -> contrib/restricted/turbo_base64
+
+# For HBase client: CONTRIB-1790
+ALLOW passport/infra -> contrib/restricted/thrift
+
+# keyutils is LGPL: CONTRIB-2236
+ALLOW passport/infra -> contrib/restricted/keyutils
+
+# For Apache Arrow: CONTRIB-1662
+ALLOW mds -> contrib/restricted/uriparser
+
+# https://st.yandex-team.ru/CONTRIB-2020
+ALLOW weather -> contrib/restricted/range-v3
+
+# ALSA library is LGPL
+ALLOW yandex_io -> contrib/restricted/alsa-lib
+ALLOW smart_devices -> contrib/restricted/alsa-lib
+
+# Avahi is LGPL
+ALLOW yandex_io -> contrib/restricted/avahi
+
+# GLib is LGPL
+ALLOW maps/libs/img -> contrib/restricted/glib
+ALLOW maps/renderer/libs/svgrenderer -> contrib/restricted/glib
+ALLOW market/cataloger -> contrib/restricted/glib
+ALLOW market/idx/feeds/feedparser -> contrib/restricted/glib
+ALLOW metrika/core/libs/statdaemons -> contrib/restricted/glib
+ALLOW metrika/core/libs/strconvert -> contrib/restricted/glib
+ALLOW yandex_io -> contrib/restricted/glib
+
+# GStreamer is LGPL
+ALLOW yandex_io -> contrib/restricted/gstreamer
+ALLOW yandex_io -> contrib/restricted/gst-plugins-base
+ALLOW yandex_io -> contrib/restricted/gst-plugins-good
+ALLOW yandex_io -> contrib/restricted/gst-plugins-bad
+ALLOW yandex_io -> contrib/restricted/patched/gst-libav
+
+# mpg123 is LGPL
+ALLOW extsearch/audio/kernel/recoglib -> contrib/restricted/mpg123
+
+# OpenAL Soft is LGPL
+ALLOW yandex_io -> contrib/restricted/openal-soft
+ALLOW speechkit -> contrib/restricted/openal-soft
+
+# rubberband is a GPL audio stretching library
+ALLOW dict/mt/video -> contrib/restricted/rubberband
+
+# Allowed subset of abseil is exported via library/
+ALLOW library/cpp/containers/absl_flat_hash -> contrib/restricted/abseil-cpp/absl/container
+ALLOW library/cpp/containers/absl_tstring_flat_hash -> contrib/restricted/abseil-cpp-tstring/y_absl/container
+
+# spdlog is just yet another best logging engine
+# The best logging engine, however, is to be designed in CPPCOM-20
+ALLOW quasar/backend/src/base -> contrib/restricted/spdlog
+ALLOW crypta/lib/native/log -> contrib/restricted/spdlog
+ALLOW yandex_io -> contrib/restricted/spdlog
+ALLOW smart_devices/tools/launcher2 -> contrib/restricted/spdlog
+ALLOW smart_devices/tools/updater -> contrib/restricted/spdlog
+
+# cmph is a limited-use library
+ALLOW ads/yacontext -> contrib/restricted/cmph
+
+# http-parser is a low-level parser for http bytestream.
+# Consider using high-level alternatives.
+ALLOW mds -> contrib/restricted/http-parser
+ALLOW taxi/uservices -> contrib/restricted/http-parser
+ALLOW yt/yt/core/http -> contrib/restricted/http-parser
+ALLOW yweb/robot/fetcher/fetcher/user/http -> contrib/restricted/http-parser
+
+# Prefer using skynet for data distribution
+ALLOW maps/infra/ecstatic -> contrib/restricted/libtorrent
+
+# Consider using util / library/cpp/digest versions instead of a raw murmurhash functions.
+#
+# strm/common/go/pkg/murmur3 is a CGO binding to murmurhash, thus dependency is allowed
+ALLOW strm/common/go/pkg/murmur3 -> contrib/restricted/murmurhash
+ALLOW clickhouse -> contrib/restricted/murmurhash
+
+# exiv2 is GPL-licensed. Only small subset of our libraries can use it.
+ALLOW extsearch/images/chunks/exiftags -> contrib/restricted/exiv2
+ALLOW maps/wikimap/mapspro/services/mrc/libs/common -> contrib/restricted/exiv2
+ALLOW yweb/disk/ocraas -> contrib/restricted/exiv2
+
+# Only allow boost in yandex projects listed below
+ALLOW adfox -> contrib/restricted/boost
+ALLOW ads -> contrib/restricted/boost
+ALLOW advq -> contrib/restricted/boost
+ALLOW alice/nlu -> contrib/restricted/boost
+ALLOW alice/vins_contrib/crfsuitex -> contrib/restricted/boost
+ALLOW clickhouse -> contrib/restricted/boost
+ALLOW devtools -> contrib/restricted/boost
+ALLOW extsearch/geo/poi_service/tools/storage_reader -> contrib/restricted/boost
+ALLOW infra/contrib/pdns -> contrib/restricted/boost
+ALLOW juggler/pongerd -> contrib/restricted/boost
+ALLOW lbs/locator -> contrib/restricted/boost
+ALLOW library/cpp/testing/boost_test$ -> contrib/restricted/boost/libs/test
+ALLOW library/cpp/testing/boost_test_main$ -> contrib/restricted/boost/libs/test
+ALLOW library/cpp/testing/gtest_boost_extensions -> contrib/restricted/boost
+ALLOW logbroker/pipe-parser -> contrib/restricted/boost
+ALLOW mail -> contrib/restricted/boost
+ALLOW maps -> contrib/restricted/boost
+ALLOW market/idx/feeds/feedparser -> contrib/restricted/boost
+ALLOW market/idx/stats/src -> contrib/restricted/boost
+ALLOW mds -> contrib/restricted/boost
+ALLOW metrika -> contrib/restricted/boost
+ALLOW netsys/tiles-vcdiff/gen-tiles -> contrib/restricted/boost
+ALLOW orgvisits/dwellplaces -> contrib/restricted/boost
+ALLOW orgvisits/heuristics -> contrib/restricted/boost
+ALLOW orgvisits/library/soc -> contrib/restricted/boost
+ALLOW quasar/backend -> contrib/restricted/boost
+ALLOW regulargeo/research -> contrib/restricted/boost
+ALLOW rem/python/geobase30 -> contrib/restricted/boost
+ALLOW drive/contrib/cpp/telemetry -> contrib/restricted/boost
+ALLOW smart_devices -> contrib/restricted/boost
+ALLOW statbox/libstatbox -> contrib/restricted/boost
+ALLOW taxi/uservices -> contrib/restricted/boost
+ALLOW tools/idl -> contrib/restricted/boost
+ALLOW voicetech/tools -> contrib/restricted/boost
+ALLOW weather/archive/grid_api/lib -> contrib/restricted/boost
+ALLOW yabs/telephony -> contrib/restricted/boost
+ALLOW yandex_io -> contrib/restricted/boost
+ALLOW yweb/robot/js -> contrib/restricted/boost
+ALLOW market/access/server/env -> contrib/restricted/boost
+ALLOW sdg/library/cpp/ros_msg_parser -> contrib/restricted/boost
+ALLOW search/meta/scatter/ant -> contrib/restricted/boost
+ALLOW search/meta/scatter/ut -> contrib/restricted/boost
+
+# use GTEST target in ya.make instead of PEERDIRing contrib/restricted/googletest
+# and include <library/cpp/testing/gtest.h> instead of <gtest/gtest.h> (<gmock/gmock.h>)
+ALLOW contrib -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gmock_in_unittest -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gtest -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gtest_boost_extensions -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gtest_extensions -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gtest_main -> contrib/restricted/googletest
+ALLOW library/cpp/testing/gtest_protobuf -> contrib/restricted/googletest
+ALLOW library/python/testing/gtest/test/gtest -> contrib/restricted/googletest
+# TODO remove this lines after they will switch to library/cpp/testing/gtest
+ALLOW mail -> contrib/restricted/googletest
+ALLOW maps/mobile/libs -> contrib/restricted/googletest
+ALLOW maps/mobile/bundle -> contrib/restricted/googletest
+ALLOW mds -> contrib/restricted/googletest
+# A mere proxy to allow using gmock in libraries without being bound to specific test framework
+# See IGNIETFERRO-1827 for details.
+ALLOW library/cpp/testing/gmock -> contrib/restricted/googletest/googlemock
+
+# allow usage of MIT part
+ALLOW .* -> contrib/restricted/librseq/headeronly
+
+# we use nfs-ganesha for Network File Store gateway
+ALLOW cloud/filestore/gateway/nfs -> contrib/restricted/nfs_ganesha
+
+ALLOW yandex_io -> contrib/restricted/patched/hostap_client
+
+# Default policies:
+#
+# Do not restrict contrib
+# All peerdirs to contrib/restricted from outside are prohibited
+#
+ALLOW contrib -> contrib/restricted
+DENY .* -> contrib/restricted
diff --git a/build/rules/flake8/README.md b/build/rules/flake8/README.md
new file mode 100644
index 0000000000..1910c57d95
--- /dev/null
+++ b/build/rules/flake8/README.md
@@ -0,0 +1,26 @@
+#Flake8 migrations
+
+##migrations.yaml
+Format:
+```
+migrations:
+ plugin-1:
+ ignore:
+ - B102
+ - S103
+ - F401
+ prefixes:
+ - devtools/ya
+ - ads
+ - quality
+ ignore-F123:
+ ignore:
+ - F123
+ prefixes:
+ - devtools/ya
+ - devtools/d
+```
+If arcadia-relative filepath startswith prefix from prefixes, then:
+
+1. ignore values will be added to flake8.conf ignore section
+
diff --git a/build/rules/flake8/migrations.yaml b/build/rules/flake8/migrations.yaml
new file mode 100644
index 0000000000..8fefe17e2f
--- /dev/null
+++ b/build/rules/flake8/migrations.yaml
@@ -0,0 +1,3677 @@
+migrations:
+ W605:
+ ignore:
+ - W605
+ prefixes:
+ - addappter/backend/testing
+ - addappter/backend/testing/fixtures/configuration/ios
+ - adfox/amacs/tests/functional/tests_amacs/bugs/medium
+ - adfox/amacs/tests/functional/tests_amacs/dynamic_monetization/v2
+ - adfox/amacs/tests/functional/tests_amacs/targeting/targeting_logic_tree_puids
+ - adfox/amacs/tests/functional/utils
+ - adfox/amacs/tests/functional/utils/db
+ - adfox/amacs/tests/functional/utils/tools
+ - ads/bsyeti/servants/bot
+ - ads/libs/py_autobudget
+ - ads/libs/py_bid_correction
+ - ads/libs/py_cliutils
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/py-modules/mapreducelib
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/py-modules/yabs
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/py-modules/yabs/tabtools
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/py-modules/yabs/tabutils
+ - ads/libs/py_ml_factors/factor
+ - ads/libs/py_ml_factors/matrixnet
+ - ads/libs/py_test_mapreduce
+ - ads/ml_engine/learn/result/flow_generate_extended_fstr
+ - ads/ml_engine/learn/result/local_extended_fstr
+ - ads/ml_engine/learn/result/local_extended_fstr/lib
+ - ads/ml_engine/lib
+ - ads/ml_monitoring/alerts/ut
+ - ads/nirvana/automl/lib/batch_processor
+ - ads/nirvana/difacto/online_loss_processor
+ - ads/nirvana/graph_retrier/lib
+ - ads/nirvana/online_learning/move_dmlc_dumps/lib
+ - ads/nirvana/online_learning/pipeline_launcher/task_utils/lib
+ - ads/nirvana/sequential_learning
+ - ads/nirvana/tools/apc_check
+ - ads/quality/apc/gmg/generate_workflow
+ - ads/quality/apc/gmg/make_lm_pool
+ - ads/quality/apc/gmg/make_lm_pool/lib
+ - ads/quality/apc/prgmgv3/workflow_constructor/lib
+ - ads/quality/bid_correction/lib
+ - ads/quality/dssm/lib
+ - ads/quality/dssm/prgmg/make_pool
+ - ads/quality/dssm/search/201708/make_pool
+ - ads/quality/dssm/synonyms/search/tools/join_fields
+ - ads/quality/max_positions
+ - ads/quality/search_lm_conv/lib
+ - ads/quality/tools/adj_calc
+ - ads/sandbox_scripts/bmcategory_queryage_coeffs/lib
+ - ads/sandbox_scripts/build_tag_rules_table
+ - ads/sandbox_scripts/clean_mapreduce/ut
+ - ads/sandbox_scripts/join_yabar
+ - ads/tools/mranalyze
+ - ads/tools/yt_operations_analyzer
+ - ads/watchman/contrib/apispec-patched
+ - ads/watchman/contrib/apispec-patched/apispec
+ - ads/watchman/experiments/lib
+ - advq/offline_phits/monitoring
+ - alice/boltalka/generative/tfnn/preprocess
+ - alice/boltalka/generative/training/data/nn/filtered_twitter
+ - alice/boltalka/generative/training/data/nn/util
+ - alice/boltalka/generative/training/data/nn/util/dict
+ - alice/boltalka/tools/dssm_preprocessing/preprocessing/lib
+ - alice/nlu/py_libs/tokenizer/ut/py2
+ - alice/nlu/py_libs/tokenizer/ut/py3
+ - alice/nlu/tools/paraphrase_finder
+ - alice/paskills/nirvana_inflector
+ - alice/paskills/recipe_utils/lib
+ - alice/tests/difftest/request_miner
+ - antirobot/tools/daily_routine/lib
+ - april/web/bas/bm
+ - april/web/bas/bm/utils
+ - april/web/bas/collector
+ - aurora/aurora/core
+ - aurora/aurora/core/services
+ - aurora/aurora/core/toloka
+ - aurora/xpath/api/utils
+ - aurora/xpath/applier
+ - balancer/test/functional/admin/admin
+ - balancer/test/functional/regexp_host
+ - balancer/test/util
+ - balancer/test/util/dnsfake
+ - billing/apikeys/apikeys
+ - billing/apikeys/apikeys/butils_port
+ - billing/apikeys/apikeys/butils_port/application
+ - billing/dcs/dcs
+ - billing/dcs/dcs/temporary/butils
+ - billing/dcs/dcs/temporary/butils/application
+ - cloud/bootstrap/db/src/admin
+ - cloud/iam/codegen/python/codegen
+ - cloud/netinfra/rknfilter/yc_rkn_s3tools
+ - commerce/adv_backend
+ - commerce/adv_backend/backend/management/commands/migrator
+ - commerce/adv_backend/backend/validators
+ - contrib/nginx/tests/tap
+ - cv/imageproc/ocr/tools/nirvana/blocks_dataset/extract_pdf_boxes
+ - cv/imageproc/ocr/tools/nirvana/blocks_dataset/g_blocks
+ - cv/imageproc/ocr/tools/nirvana/blocks_dataset/rotate_pdf
+ - cv/imageproc/ocr/tools/nirvana/confidence_factors/format_utils
+ - cv/imageproc/ocr/tools/nirvana/recaptcha/generate_captcha_images
+ - cv/imageproc/ocr/tools/statistic/auto_tests/ocr_test_lib
+ - cv/imageproc/ocr/tools/statistic/ocr_intent_statistic
+ - cv/imageproc/ocr/tools/statistic/rectify_evaluation/document_edges_statistic
+ - cv/imageproc/ocr/tools/statistic/rectify_evaluation/ocr_statistic
+ - cv/imageproc/ocr/tools/statistic/rectify_evaluation/yt_runner
+ - cv/imageproc/ocr/tools/toloka_labeling/add_main_areas_to_labelling
+ - cv/imageproc/ocr/tools/toloka_labeling/add_ocr_line_recognition
+ - cv/imageproc/ocr/tools/toloka_labeling/convert
+ - cv/imageproc/ocr/tools/toloka_labeling/convert_toloka_labeling_to_asessors_labeling
+ - cv/imageproc/ocr/tools/toloka_labeling/get_labeling
+ - cv/imageproc/ocr/tools/toloka_labeling/labeling
+ - cv/imageproc/ocr/tools/toloka_labeling/labeling_assessors
+ - cv/imageproc/ocr/tools/toloka_labeling/labeling_captcha
+ - cv/imageproc/ocr/tools/toloka_labeling/paint_good
+ - cv/imageproc/ocr/tools/toloka_labeling/studier/generate_blocks_images
+ - cv/imageproc/ocr/tools/toloka_labeling/studier/get_queries_info
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/convert_box_labeling
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/extact_ocr_with_gt_blocks
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/get_bleu_statistic
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/get_etalon_ocr_result
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/get_translate_orig_from_ocr_labelling
+ - cv/imageproc/ocr/tools/toloka_labeling/translate_e2e_metric/match_blocks
+ - cv/imgclassifiers/framework/gpu_utilization
+ - cv/imgclassifiers/framework/nirvana/runners/train/statistics_parser
+ - datacloud/score_api/validators
+ - devtools/adept
+ - devtools/distbuild/deploy/servants
+ - devtools/dummy_arcadia/test/test_cache_invalidation
+ - devtools/import_contrib/projects/phonenumber
+ - devtools/qafw/qyp
+ - devtools/qafw/rtc_deploy/lib
+ - devtools/qafw/selenium/lib
+ - devtools/signer/signer/utils
+ - devtools/unitybot
+ - devtools/unitybot/responsibility
+ - devtools/ya/test
+ - devtools/ya/test/tests/lib
+ - dict/moria/nirvana/context/begemot_thesaurus_rule
+ - dict/moria/nirvana/lib/util
+ - dict/mt/alice/scenarios/prepare_data
+ - dict/mt/analytics/metrics/quality/mt/stupids/lib
+ - dict/mt/analytics/sentence_breaking/toloka_binary/lib
+ - dict/mt/eval/eval_viewer/lib/spec/mt
+ - dict/mt/eval/lib/metrics/bleu
+ - dict/mt/g2p/rule_based
+ - dict/mt/make/libs/common
+ - dict/mt/make/libs/eval
+ - dict/mt/make/libs/tfnn
+ - dict/mt/make/libs/translate_mtd
+ - dict/mt/make/modules/corpus_generation/common
+ - dict/mt/make/tools/lm_diff
+ - dict/mt/make/tools/make_cap_model/score_caps
+ - dict/mt/make/tools/opus_merge
+ - dict/mt/make/tools/tfnn/convert_mtd_to_tfnn
+ - dict/mt/make/tools/yt_transform/tests
+ - dict/mt/mtdict/make/definitions/modules/extracts/remove_etym
+ - dict/mt/scripts/testsets/crowdsource/globalvoices/find_parallel_pages/extract_page_info
+ - dict/mt/tools/log_converter/rem_tool
+ - dict/mt/tools/tmx_to_plain_text
+ - dict/ontodb/cardsparser/lib
+ - dict/ontodb/daily/merge_cache
+ - dict/ontodb/daily/validator
+ - dict/ontodb/images/lib
+ - dict/ontodb/isa/subtitle/add_subtitles
+ - dict/ontodb/lists/toloka/parsing
+ - dict/ontodb/onto_lib/card_to_url
+ - dict/ontodb/onto_lib/card_utils
+ - dict/ontodb/onto_lib/sources/discogs
+ - dict/ontodb/onto_lib/sources/fantlab
+ - dict/ontodb/onto_lib/sources/freebase
+ - dict/ontodb/onto_lib/sources/freebase/mediators
+ - dict/ontodb/onto_lib/sources/google_play
+ - dict/ontodb/onto_lib/sources/itunes
+ - dict/ontodb/onto_lib/sources/kinopoisk
+ - dict/ontodb/onto_lib/sources/labirint
+ - dict/ontodb/onto_lib/sources/musicbrainz
+ - dict/ontodb/onto_lib/sources/transfermarkt
+ - dict/ontodb/onto_lib/sources/www
+ - dict/ontodb/ontodb_log/ctr
+ - dict/ontodb/report/common
+ - dict/ontodb/report/film_stuff
+ - dict/ontodb/schema
+ - dict/ontodb/tools/entity_lists/build_watson_sources/config
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/filmkomedia
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/filmzor
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/imdb
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/kinolinehd
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/kinotime
+ - dict/ontodb/tools/entity_lists/build_watson_sources/src/kinovolt
+ - dict/ontodb/tools/entity_lists/is_series_film_query
+ - dict/ontodb/tools/entity_lists/mine_titles
+ - dict/ontodb/tools/entity_lists/parser/config
+ - dict/ontodb/tools/entity_lists/parser/src/adme
+ - dict/ontodb/tools/entity_lists/parser/src/afisha
+ - dict/ontodb/tools/entity_lists/parser/src/allbestmovies
+ - dict/ontodb/tools/entity_lists/parser/src/cinemacc
+ - dict/ontodb/tools/entity_lists/parser/src/cinetoday
+ - dict/ontodb/tools/entity_lists/parser/src/cobrafilm
+ - dict/ontodb/tools/entity_lists/parser/src/detifilm
+ - dict/ontodb/tools/entity_lists/parser/src/dostfilms
+ - dict/ontodb/tools/entity_lists/parser/src/fasttorrentsu
+ - dict/ontodb/tools/entity_lists/parser/src/filmanias
+ - dict/ontodb/tools/entity_lists/parser/src/filmhd1080
+ - dict/ontodb/tools/entity_lists/parser/src/filmkomedia
+ - dict/ontodb/tools/entity_lists/parser/src/filmov1000
+ - dict/ontodb/tools/entity_lists/parser/src/filmpro
+ - dict/ontodb/tools/entity_lists/parser/src/filmuzhasov
+ - dict/ontodb/tools/entity_lists/parser/src/filmzor
+ - dict/ontodb/tools/entity_lists/parser/src/hdkinoclub
+ - dict/ontodb/tools/entity_lists/parser/src/iceagemult
+ - dict/ontodb/tools/entity_lists/parser/src/imdb
+ - dict/ontodb/tools/entity_lists/parser/src/ivi
+ - dict/ontodb/tools/entity_lists/parser/src/kinohabr
+ - dict/ontodb/tools/entity_lists/parser/src/kinohorror
+ - dict/ontodb/tools/entity_lists/parser/src/kinolinehd
+ - dict/ontodb/tools/entity_lists/parser/src/kinomliff
+ - dict/ontodb/tools/entity_lists/parser/src/kinoonlinetop
+ - dict/ontodb/tools/entity_lists/parser/src/kinopod
+ - dict/ontodb/tools/entity_lists/parser/src/kinopoisk
+ - dict/ontodb/tools/entity_lists/parser/src/kinorip
+ - dict/ontodb/tools/entity_lists/parser/src/kinosky
+ - dict/ontodb/tools/entity_lists/parser/src/kinotime
+ - dict/ontodb/tools/entity_lists/parser/src/kinotop
+ - dict/ontodb/tools/entity_lists/parser/src/kinovolt
+ - dict/ontodb/tools/entity_lists/parser/src/luchshiespiski
+ - dict/ontodb/tools/entity_lists/parser/src/megogo
+ - dict/ontodb/tools/entity_lists/parser/src/multikstv
+ - dict/ontodb/tools/entity_lists/parser/src/multyasha
+ - dict/ontodb/tools/entity_lists/parser/src/newfilmpro
+ - dict/ontodb/tools/entity_lists/parser/src/okino
+ - dict/ontodb/tools/entity_lists/parser/src/okomediya
+ - dict/ontodb/tools/entity_lists/parser/src/onlinekinohd
+ - dict/ontodb/tools/entity_lists/parser/src/parkhorror
+ - dict/ontodb/tools/entity_lists/parser/src/prostotop
+ - dict/ontodb/tools/entity_lists/parser/src/rosmovies
+ - dict/ontodb/tools/entity_lists/parser/src/rserial
+ - dict/ontodb/tools/entity_lists/parser/src/shikimori
+ - dict/ontodb/tools/entity_lists/parser/src/strahzona
+ - dict/ontodb/tools/entity_lists/parser/src/tabfilm
+ - dict/ontodb/tools/entity_lists/parser/src/thecinemaclub
+ - dict/ontodb/tools/entity_lists/parser/src/tlum
+ - dict/ontodb/tools/entity_lists/parser/src/topspiski
+ - dict/ontodb/tools/entity_lists/parser/src/vmirefilmov
+ - dict/ontodb/tools/entity_lists/parser/src/vokrugtv
+ - dict/ontodb/tools/entity_lists/parser/src/westernfilm
+ - dict/ontodb/tools/entity_lists/relev
+ - dict/ontodb/tools/entity_lists/sticky
+ - dict/ontodb/tools/fields_diff/lib
+ - dict/ontodb/tools/ontodb_viewer
+ - dict/ontodb/tools/ontodbfixes/import_fixes/lib
+ - dict/ontodb/tools/ontodbfixes/viewer
+ - dict/ontodb/tools/url_answer/lib
+ - dict/ontodb/user_logs/serp_clicks/lib
+ - dict/ontodb/user_logs/wiki_spy_clicks
+ - dict/ontodb/utils
+ - dict/ontodb/utils/add_clicks
+ - dict/ontodb/utils/build_helpers
+ - dict/ontodb/utils/import_json_timelines/lib
+ - dict/ontodb/utils/map_card_data
+ - dict/ontodb/utils/monitoring
+ - dict/ontodb/utils/music
+ - dict/ontodb/utils/norm_ontoids_in_gzt
+ - dict/ontodb/utils/norm_urls
+ - dict/ontodb/utils/string_utils
+ - dict/ontodb/utils/support_words
+ - dict/ontodb/utils/update_links
+ - dict/ontodb/wikicommon
+ - dict/ontodb/wikicommon/get_defin
+ - dict/ontodb/wikicommon/infobox
+ - dict/ontodb/wikicommon/link_to_ontoid
+ - dict/ontodb/wikicommon/on_add_short_defin
+ - dict/ontodb/wikicommon/on_build_card
+ - dict/ontodb/wikicommon/resource_files/wiki_fields
+ - dict/ontodb/wikicommon/text_mine_film_participants
+ - dict/ontodb/wikicommon/text_mine_interesting_facts
+ - dict/ontodb/wikicommon/text_mine_projects
+ - dict/ontodb/wikicommon/text_mine_sport_team_participants
+ - dict/ontodb/wikicommon/wiki
+ - dict/ontodb/wikicommon/wiki_syntax
+ - dict/tools/find_synonym
+ - disk/admin/monitors/common
+ - disk/admin/robot_switcher
+ - dj/tools/viewer/custom/entity
+ - education/lib/nirvana/operations/yt_nodes_deep_diff
+ - education/schoolbook/analytics/adhoc/ANALITICSEDU-515
+ - education/schoolbook/analytics/adhoc/ANALITICSEDU-687
+ - entity/ontodb/tasks/backup_yt_tables/lib
+ - entity/ontodb/tasks/clean_old_data
+ - entity/ontodb/tasks/import_museums/lib
+ - entity/ontodb/tasks/import_yam/lib
+ - entity/ontodb/tasks/send_table_checker_sensors/lib
+ - entity/ontodb/tasks/watson_converter/lib
+ - entity/ontodb/util/wiki
+ - entity/quality/helix
+ - entity/quality/metrics/film_lists/combine_attributes_for_stupids_marking
+ - entity/quality/metrics/not_film_lists/combine_attributes_for_stupids_marking
+ - entity/quality/metrics/passport
+ - entity/ugc/db/python/offline_processing
+ - entity/ugc/quality/reviews_ranking/ml/lib/trueskill
+ - entity/ugc/tests/lib
+ - entity/ugc/tools/bell/replay_requests
+ - entity/ugc/tools/comments/prepare_business_replies_for_cmnt
+ - entity/ugc/tools/tank/user_poll_ammo
+ - entity/ugc/tools/viewer_server/lib
+ - entity/ugc/tools/viewer_server/lib/core
+ - extsearch/audio/yamrec/query_browser
+ - extsearch/collections/tools/mmeta2metrics_serp
+ - extsearch/collections/tools/nirvana/collections_indexer
+ - extsearch/collections/tools/upper2metrics_serp
+ - extsearch/geo/conveyors/annotations/filtrate_banned_v2
+ - extsearch/geo/conveyors/annotations/metro_extractor/get_metro_to_ll
+ - extsearch/geo/conveyors/experimental/annotations/fast_annotations/collection_keywords_extractor
+ - extsearch/geo/tools/similar_orgs/read_user_session
+ - extsearch/geo/tools/special_features/mining_result_merger
+ - extsearch/images/library/ytscraper
+ - extsearch/images/money/scripts/robot
+ - extsearch/images/money/scripts/robot/util
+ - extsearch/images/money/tools/commercial_serps_downloader
+ - extsearch/images/robot/index/testlib/index_process_description
+ - extsearch/images/robot/library/pycm
+ - extsearch/images/robot/scripts/cm/semidup2
+ - extsearch/images/robot/tools/index_snapshot_cleaner
+ - extsearch/images/robot/tools/indexrotate
+ - extsearch/images/robot/tools/robot_losses/python/rotor_download_images
+ - extsearch/video/python/yql
+ - extsearch/video/quality/series/base/builder/common
+ - extsearch/video/quality/series/base/builder/wrappers
+ - extsearch/video/robot/cm/deletes/cmpy/playerdata
+ - extsearch/video/robot/cm/library
+ - extsearch/video/robot/hostsdb/tool/config/add_rules
+ - extsearch/video/robot/rt_transcoder/metarobot/tests
+ - extsearch/video/robot/rt_transcoder/transcoder/tests
+ - haas/cmis/hwr_allocation
+ - haas/cmis/hwr_allocation/allocation_methods
+ - health/articles/articles_pipeline
+ - health/articles/articles_pipeline/actions
+ - health/articles/articles_pipeline/lib
+ - health/articles/articles_pipeline/lib/util
+ - health/common_libs/utils
+ - health/yamd/health_import
+ - health/yamd/health_import/data_tests
+ - health/yamd/libs/cross_links
+ - health/yamd/libs/utils
+ - health/yamd/libs/utils/parsers
+ - infra/awacs/vendor/awacs/pire/ut
+ - infra/callisto/controllers/viewer/lib2
+ - infra/cqudp/src
+ - infra/cqudp/src/eggs
+ - infra/deploy/tools/yd_migrate/lib
+ - infra/gencfg-gui
+ - infra/heartbeat/src
+ - infra/heartbeat/src/daemon
+ - infra/kernel/tools/coroner
+ - infra/netconfig/utils/pinger/lib
+ - infra/porto/api_py
+ - infra/portoshell
+ - infra/portoshell/src
+ - infra/qyp/vmctl/src
+ - infra/reconf_juggler/tools/jdiff/tests
+ - infra/rtc/janitor
+ - infra/scripts/eventlog_uploader/script
+ - infra/yp_drcp/lib
+ - infra/yp_dru/bin
+ - irt/bmgen/market_data
+ - irt/bmgen/synonyms
+ - keyboard/analytics/toloka/nirvana/blocks
+ - keyboard/analytics/toloka/nirvana/swipe
+ - keyboard/analytics/toloka/nirvana/typing
+ - keyboard/dict/nirvana/blocks
+ - library/python/testing/filter
+ - library/python/testing/gtest
+ - locdoc/doc_tools/yoda/friends/okapi
+ - locdoc/doc_tools/yoda/friends/okapi/operations
+ - logbroker/tools/manual/alter_sqs_tables
+ - logbroker/tools/manual/create_logbroker_account/lib
+ - logbroker/tools/manual/load_test/load
+ - mail/contrib/ccs-caldavtester
+ - mail/contrib/ccs-caldavtester/src
+ - mail/contrib/ccs-caldavtester/verifiers
+ - mail/contrib/tatsu/test
+ - mail/contrib/tatsu/test/grammar
+ - mail/python/theatre/app
+ - mail/tools/ews_call/ews_call
+ - mail/tools/safely_delete_stids/lib
+ - mail/yasm/lib
+ - mail/yasm/lib/calendar/alerts
+ - mail/yasm/lib/calendar/panels
+ - mapreduce/yt/tools/du-yt
+ - maps/analyzer/pylibs/watchman_api/lib
+ - maps/automotive/proxy/config_generator
+ - maps/automotive/remote_access/autotests/tests/data_types
+ - maps/b2bgeo/mvrp_solver/backend/tests_lib
+ - maps/carparks/regression/renderer/generate_ammo
+ - maps/carparks/tools/route_lost_viewer/bin
+ - maps/infra/monitoring/sla_calculator/core/services
+ - maps/jams/renderer2/common/ecstatic/lib
+ - maps/mobile/server/tools/cache_deprecator
+ - maps/mobile/tools/android-manifest
+ - maps/pylibs/dataset_collector
+ - maps/pylibs/monitoring/lib
+ - maps/pylibs/monitoring/tests
+ - maps/renderer/tilesgen/tools/lib
+ - maps/renderer/tools/download_release
+ - maps/routing/router/regression/gen-stopwatch-ammo
+ - maps/routing/router/scripts/gen-ammo
+ - maps/routing/versus/lib
+ - maps/tools/matcher_quality/routes_to_geoms
+ - maps/tools/package_releaser/lib
+ - maps/tools/tanker-build/translate_messages
+ - maps/wikimap/mapspro/libs/python/pymod
+ - maps/wikimap/mapspro/libs/python/pymod/yandex/maps/wiki
+ - maps/wikimap/stat/libs/common/tests/lib
+ - maps/wikimap/stat/libs/common/tests/lib/dates_ut
+ - market/contrib/python/yaconf_v0.1.2
+ - market/contrib/python/yaconf_v0.1.2/yaconf
+ - market/idx/streams/yatf
+ - market/library/cms_promo/py_utils
+ - market/mstat/ch-cache/lib
+ - market/mstat/ch-cache/lib/database
+ - market/reductor/configure/lib
+ - market/reductor/www
+ - market/sre/library/python/maaslib
+ - market/sre/services/balancer_api/lib
+ - market/tools/report_stats/lib
+ - market/yamarec/log-parsers/bin
+ - market/yamarec/log-parsers/yamarec_log_parsers
+ - market/yamarec/metarouter/tests
+ - market/yamarec/metarouter/yamarec_metarouter
+ - market/yamarec/performance/utils
+ - mds/s3/s3_mds_proxy
+ - mds/s3/s3_mds_proxy/s3mds/helpers/config
+ - mds/s3/s3_mds_proxy/s3mds/idm/roles
+ - mds/s3/s3_mds_proxy/s3mds/xml
+ - media/media_support/media_support
+ - media/media_support/media_support/chats
+ - metrika/admin/maas/lib/core/common
+ - metrika/pylib/iptruler
+ - metrika/pylib/utils
+ - ml/nirvana/nope
+ - ml/tensorflow/ytensorflow
+ - ml/tensorflow/ytensorflow/ytensorflow/inference
+ - ml/tensorflow/ytensorflow/ytensorflow/quantization
+ - ml/tensorflow/ytensorflow/ytensorflow/train/hooks
+ - modadvert/libs/connectors
+ - modadvert/libs/lyncher/factor_providers/evil_misprints/it
+ - modadvert/libs/lyncher/factor_providers/misprints
+ - modadvert/libs/lyncher/ut/rules
+ - modadvert/libs/utils/common
+ - modadvert/libs/utils/common/ut
+ - modadvert/programs/abuse/bs_abuse_log_processor
+ - modadvert/programs/direct_proxy/libs/handlers
+ - modadvert/programs/saas_indexer/libs
+ - modadvert/programs/transfer_manager/libs
+ - modadvert/programs/update_flags_offline/tables_manager/libs
+ - mssngr/router/tools/state_cache_updater_v2
+ - opensource/sync/bin/arc2git
+ - opensource/sync/bin/git2git
+ - orgvisits/library/python/test_tools/yql/lib
+ - orgvisits/library/python/text_tools
+ - orgvisits/library/python/yt_jobs/tests
+ - orgvisits/metrics/ugc_feedback/ctr
+ - passport/backend/adm_api/views/meltingpot
+ - passport/backend/core
+ - passport/backend/core/builders/frodo
+ - passport/backend/core/builders/yasms
+ - passport/backend/core/conf
+ - passport/backend/core/cookies/utils
+ - passport/backend/core/cookies/utils/werkzeug_ports
+ - passport/backend/core/db
+ - passport/backend/core/grants/tests
+ - passport/backend/core/historydb/tests
+ - passport/backend/core/suggest
+ - passport/backend/core/types
+ - portal/tools/morda-release/server
+ - quality/ab_testing/abt_resources_lib/loaders/tests/long_metrics
+ - quality/ab_testing/cofe/bin/cofe_ctl
+ - quality/ab_testing/cofe/projects/disk
+ - quality/ab_testing/cofe/projects/disk/utils
+ - quality/ab_testing/cofe/projects/geo/geoadv
+ - quality/ab_testing/scripts/kati
+ - quality/ab_testing/scripts/kati/lib
+ - quality/antifraud/scripts/prod/traffic_chains
+ - quality/functionality/chats/feedback/src/feedback/core
+ - quality/functionality/chats/feedback/src/feedback/core/settings
+ - quality/functionality/chats/floyd/src/floyd/core
+ - quality/functionality/chats/floyd/src/floyd/core/settings
+ - quality/functionality/entity_search/factqueries/instructions/prepare_facts
+ - quality/functionality/entity_search/factqueries/tools/extract_fact/scripts/get_encyc_queries
+ - quality/functionality/facts/common/goldensets/actuality/gen_population_tasks
+ - quality/functionality/facts/recheck/calc_actuality_factors
+ - quality/functionality/parsepl/libs/parsers/tests
+ - quality/functionality/parsepl/nirvana/build_market_parsers/src
+ - quality/functionality/parsepl/toloka/configs_for_parsers
+ - quality/functionality/parsepl/toloka/configs_for_parsers/ut
+ - quality/functionality/rtx/scripts/social-serp/nano_squeeze
+ - quality/functionality/scripts/nirvana/jobs/casper/helpers/ytreader
+ - quality/functionality/snippets/social_bna
+ - quality/functionality/snippets/top_hosts/plugins/calculator888
+ - quality/functionality/turbo/analytics/ecommerce/lib/page_classifier
+ - quality/functionality/turbo/auto_cleanup/lib
+ - quality/functionality/turbo/rss/parser_job/tests/small
+ - quality/functionality/turbo/tools/infinity/tools/wmc
+ - quality/functionality/turbo/tools/rediff
+ - quality/functionality/turbo/tools/tdm
+ - quality/functionality/turbo/yandex_pogoda
+ - quality/functionality/unstructured/yt_concatenator/tests
+ - quality/nirvana_tools/conveyor_operations/asgen/config
+ - quality/nirvana_tools/conveyor_operations/eval_feature/eval_feature_viewer
+ - quality/nirvana_tools/conveyor_operations/meta_formula_bfmf_bundle/append_formula_factors
+ - quality/nirvana_tools/conveyor_operations/meta_formula_bfmf_bundle/get_cache_from_appended_features
+ - quality/query_expansions/proc/covfefe/makefile_update
+ - quality/query_expansions/tools/tests/test_dummy_process
+ - quality/relev_tools/dsat/find_words_with_absent_forms
+ - quality/relev_tools/lboost_ops/nirvana/operations/main/tests
+ - quality/trailer/suggest/services/maps/conveyors/doc_features/chronostat
+ - quality/trailer/suggest/services/maps/conveyors/pool/make_pointwise_pool
+ - quality/trailer/suggest/services/maps/tools/retrieval_test
+ - quality/trailer/suggest_dict/suggest_framework/tools
+ - quality/user_sessions/market/custom_statistics
+ - quality/user_sessions/market/custom_statistics/cust/abtypes/refuses
+ - quality/userdata/scripts
+ - quality/userdata/scripts/state_validation
+ - quality/webfresh/learn/half_hour/build_union_prs
+ - quality/webfresh/libraries/prs
+ - quality/webfresh/libraries/prs/tests
+ - quality/webfresh/metrics/aggregate_serps
+ - quality/webfresh/metrics/bad_urls_stats
+ - quality/webfresh/metrics/build_formulas_config
+ - quality/yaqlib/yaqlint
+ - regulargeo/tools
+ - rnd_toolbox/deckard
+ - rnd_toolbox/deckard/storage
+ - rnd_toolbox/hwlib
+ - robot/favicon/python
+ - robot/jupiter/library/python/sample
+ - robot/jupiter/scripts
+ - robot/jupiter/viewers/galileo
+ - robot/kwyt/scripts/sampling_data
+ - robot/lemur/scripts/common
+ - robot/metrics/forums_sbr/bin/get_forum_urls
+ - robot/metrics/forums_sbr/bin/get_urls_sample
+ - robot/metrics/forums_sbr/bin/parse_zora_result
+ - robot/metrics/fresh_sbr/mk_fresh_serp
+ - robot/metrics/rotor_missed_words_metric/bin/gemini_canonize
+ - robot/metrics/speed_sbr/remove_fresh_hosts
+ - robot/quality/robotrank/mk_learn_pool/lib
+ - robot/salmon_agent/counters
+ - robot/salmon_agent/utils
+ - rt-research/broadmatching/mr/IRT-1517
+ - rt-research/broadmatching/scripts/dyn-smart-banners/update_dyn_trashfilter
+ - rt-research/broadmatching/scripts/pylib
+ - rt-research/broadmatching/scripts/pylib/bm
+ - rt-research/broadmatching/scripts/yt/catalogia_mapper
+ - rt-research/broadmatching/scripts/yt/cdict_generator
+ - rt-research/broadmatching/scripts/yt/dyn-sources/generate_dse_banners
+ - rt-research/broadmatching/scripts/yt/dyn-sources/generate_dse_banners/generate_filtered_links
+ - rt-research/broadmatching/scripts/yt/dyn-sources/yt_prepare_dyn_sources
+ - rt-research/multik/deploy/deploy
+ - saas/tools/devops/lib
+ - saas/tools/devops/lib23/tests/py2
+ - saas/tools/devops/lib23/tests/py23
+ - samogon/libs/sandbox
+ - sandbox/common/projects_handler
+ - sandbox/projects/BuildBegemotLightTestConfig
+ - sandbox/projects/BuildNewsPackage
+ - sandbox/projects/BuildSportProxyData
+ - sandbox/projects/BuildYobject
+ - sandbox/projects/CheckFreshDocuments
+ - sandbox/projects/CompareNewsdResponses
+ - sandbox/projects/CompareYmakeDump
+ - sandbox/projects/ConvertVideo
+ - sandbox/projects/DeployVideoMmetaShard
+ - sandbox/projects/GetAdvquickDatabase
+ - sandbox/projects/GetFusionMiddlesearchResponses
+ - sandbox/projects/GetPokazometerDatabase
+ - sandbox/projects/IexBuildPackages
+ - sandbox/projects/IexImportPatterns
+ - sandbox/projects/LandingConstructor
+ - sandbox/projects/LandingConstructor/Stat/Jobs
+ - sandbox/projects/MediaLib
+ - sandbox/projects/MediaLib/shardmap
+ - sandbox/projects/MixQueriesExperimentsRegions
+ - sandbox/projects/PersonalPoiGenerator
+ - sandbox/projects/PersonalPoiGenerator/PoisDumper
+ - sandbox/projects/ReleaseBalancerConfigGenerator
+ - sandbox/projects/ReleaseConfigGeneratorService
+ - sandbox/projects/ReleaseMediaShardmaps
+ - sandbox/projects/ReportDataRuntime
+ - sandbox/projects/ReportDataRuntimeItem
+ - sandbox/projects/ReportDataRuntimeRT
+ - sandbox/projects/ReportDataRuntimeTags
+ - sandbox/projects/ReportRuleTestFull
+ - sandbox/projects/RunNewsLoadtest
+ - sandbox/projects/SOC/YtProxyAnalyzeCommandParams
+ - sandbox/projects/SOC/YtRawMasterLogAnalysis
+ - sandbox/projects/SpawnTestConfigGenerator
+ - sandbox/projects/TaxiSecurity
+ - sandbox/projects/TaxiSecurity/BadLogsAnalyzer
+ - sandbox/projects/TaxiSecurity/YodaxAnalyzer
+ - sandbox/projects/TestFrontMetricsLogs
+ - sandbox/projects/TestFrontMetricsLogs/modules
+ - sandbox/projects/TestReportPerformance
+ - sandbox/projects/TickenatorBatchProcessing
+ - sandbox/projects/TickenatorBatchProcessing/YasmScreenshoter
+ - sandbox/projects/Travel/tasks/tools
+ - sandbox/projects/Ufo
+ - sandbox/projects/Ufo/CI
+ - sandbox/projects/UpdateConfigGeneratorDb
+ - sandbox/projects/UpdateMapsWizardPpoData
+ - sandbox/projects/UpdateTestenvNewsdResources
+ - sandbox/projects/UrlsByShowCounters/executable/lib
+ - sandbox/projects/VpsAmmo
+ - sandbox/projects/YabsDebuilder
+ - sandbox/projects/YabsDebuilderDev
+ - sandbox/projects/YabsServerStatPerformance
+ - sandbox/projects/YabsServerToolRtbshadowStat
+ - sandbox/projects/adfox/adfox_ui/testpalm/testrunCreate
+ - sandbox/projects/alice_evo
+ - sandbox/projects/alice_evo/AliceEvoIntegrationTestsWrapper
+ - sandbox/projects/antirobot
+ - sandbox/projects/antirobot/AsnNames
+ - sandbox/projects/antirobot/LoadTesting
+ - sandbox/projects/autobudget/autobudget_lib
+ - sandbox/projects/avia/avia_statistics/update_alternative_routes_prices
+ - sandbox/projects/avia/avia_statistics/update_flights
+ - sandbox/projects/avia/avia_statistics/update_median_prices
+ - sandbox/projects/avia/avia_statistics/update_popular_months
+ - sandbox/projects/avia/avia_statistics/update_return_ticket_prices
+ - sandbox/projects/avia/avia_statistics/update_route_crosslinks
+ - sandbox/projects/avia/flight_status_registrar/FlightStatsRegistrar
+ - sandbox/projects/avia/flight_status_registrar/OagFlightsRegistrar
+ - sandbox/projects/avia/flight_status_registrar/VariFlightRegistrar
+ - sandbox/projects/avia/log_unknown_fare_codes
+ - sandbox/projects/avia/travel_avia_dump_resource/task
+ - sandbox/projects/bsyeti
+ - sandbox/projects/canvas
+ - sandbox/projects/canvas/video_constructor_utils
+ - sandbox/projects/cloud/yfm
+ - sandbox/projects/common/compare_upper_results
+ - sandbox/projects/common/fusion
+ - sandbox/projects/common/gencfg
+ - sandbox/projects/common/market_report
+ - sandbox/projects/common/mobilesearch
+ - sandbox/projects/common/mobilesearch/startrek_client
+ - sandbox/projects/common/yabs
+ - sandbox/projects/gencfg
+ - sandbox/projects/gencfg/BuildConfigGenerator2
+ - sandbox/projects/gencfg/GencfgMonitoringCharts
+ - sandbox/projects/gencfg/ReleaseConfigGenerator2
+ - sandbox/projects/gencfg/workflow
+ - sandbox/projects/health/acceptance_begemot_graph
+ - sandbox/projects/laas
+ - sandbox/projects/laas/CollectTestGeobases
+ - sandbox/projects/logs/HashedSessionsDiff
+ - sandbox/projects/logs/TestRalibPerfomance
+ - sandbox/projects/market/infra/helpers
+ - sandbox/projects/market/infra/helpers/changes_helper
+ - sandbox/projects/masstransit/MapsMasstransitImportVehicleTasks
+ - sandbox/projects/media
+ - sandbox/projects/media/admins/mysqlcopydb
+ - sandbox/projects/media/kp-front-nginx/config-validation
+ - sandbox/projects/media_crm/tasks
+ - sandbox/projects/media_crm/tasks/media_crm_deploy
+ - sandbox/projects/metrika/mobile/sdk/helpers
+ - sandbox/projects/mssngr/rtc
+ - sandbox/projects/mssngr/runtime/MssngrRouterLoadTest
+ - sandbox/projects/music
+ - sandbox/projects/music/MusicExportYdbToYt
+ - sandbox/projects/music/ReleaseMusic
+ - sandbox/projects/music/deployment/helpers
+ - sandbox/projects/news
+ - sandbox/projects/news/CompareNewsAnnotatorResponses
+ - sandbox/projects/news/UpdateRTHubAdvWidgetResources
+ - sandbox/projects/ofd/backend/ofd_backend_package_build
+ - sandbox/projects/ofd/backend/ofd_backend_run_tests
+ - sandbox/projects/ofd/notifier/ofd_notifier_package_build
+ - sandbox/projects/ofd/runtime/ofd_runtime_package_build
+ - sandbox/projects/ofd/runtime/ofd_runtime_run_tests
+ - sandbox/projects/ofd/tasks/ofd_tasks_package_build
+ - sandbox/projects/porto/BuildPortoLayer
+ - sandbox/projects/porto/BuildPortoLayerTmp
+ - sandbox/projects/qafw
+ - sandbox/projects/qafw/ansible
+ - sandbox/projects/reconf
+ - sandbox/projects/sandbox_ci/sandbox_ci_compare_load_test
+ - sandbox/projects/sandbox_ci/task
+ - sandbox/projects/tests
+ - sandbox/projects/turbo
+ - sandbox/projects/turbo/CompareTurboResponses
+ - sandbox/projects/turbo/SampleForTurbo
+ - sandbox/projects/vh
+ - sandbox/projects/vh/faas/FaasConvertVideoVodTest
+ - sandbox/projects/vh/frontend/count_diff
+ - sandbox/projects/vh/frontend/generate_requests_from_yt_logs
+ - sandbox/projects/vins
+ - sandbox/projects/vins/AliceBegemotMegamindPerfTest
+ - sandbox/projects/vins/BuildVinsCustomEntity
+ - sandbox/projects/vins/MegamindPerfTest
+ - sandbox/projects/vins/VinsPerfTest
+ - sandbox/projects/websearch/CheckPrechargeAfterMemoryMap
+ - sandbox/projects/yane/ParseYanswerFactLogs
+ - sandbox/sdk2
+ - sandbox/sdk2/vcs
+ - sandbox/serviceapi
+ - sandbox/serviceapi/handlers
+ - sandbox/yasandbox/database/clickhouse
+ - skynet/kernel
+ - skynet/kernel/util/sys/user
+ - skynet/library
+ - skynet/library/tasks
+ - smart_devices/crash_analytics/tools/minidump_analyzer
+ - smart_devices/tools/launcher2/tests/restarts
+ - smm/lib/models/sklearn
+ - sprav/mining/botanik_miner
+ - statbox/qb2
+ - statbox/qb2/qb2_extensions/api/v1/extractors
+ - statbox/qb2/qb2_extensions/api/v1/extractors/pool
+ - statbox/statkey/jam/jobs/cubes/desktop_installs/v2
+ - strm/generate/lib/generate
+ - sup/stat/find_pushes
+ - talents/nlu/scripts/train/geoname
+ - testenv/jobs/rtyserver
+ - tools/mkdocs_builder/lib
+ - tools/mkdocs_builder/mkdocs_yandex
+ - tools/mkdocs_builder/mkdocs_yandex/mkdocs_yandex
+ - tools/mkdocs_builder/mkdocs_yandex/mkdocs_yandex/ext/markdown
+ - tools/releaser/src
+ - tools/ygetparam
+ - travel/avia/library/python/common
+ - travel/avia/library/python/common/tests
+ - travel/avia/library/python/common/tests/lib
+ - travel/avia/library/python/common/utils
+ - travel/avia/library/python/geosearch
+ - travel/avia/library/python/geosearch/views
+ - travel/avia/library/python/route_search
+ - travel/avia/library/python/route_search/by_number
+ - travel/rasp/bus/admin/utils
+ - travel/rasp/bus/admin/utils/points
+ - travel/rasp/library/python/common/tests
+ - travel/rasp/library/python/common/tests/data_api/billing
+ - travel/rasp/library/python/common/tests/data_api/dzv
+ - travel/rasp/library/python/geosearch
+ - travel/rasp/library/python/geosearch/views
+ - travel/rasp/library/python/route_search
+ - travel/rasp/library/python/route_search/by_number
+ - travel/rasp/train_api
+ - travel/rasp/train_api/scripts
+ - travel/rasp/train_api/tests
+ - travel/rasp/train_api/tests/tariffs/train/views
+ - travel/rasp/train_api/tests/tariffs/train/wizard
+ - travel/rasp/train_api/tests/train_purchase
+ - travel/rasp/train_api/tests/train_purchase/tasks
+ - travel/rasp/train_api/train_partners/base/train_details
+ - vcs/svn/hooks/check_arc_commit
+ - vh/telegram/sqs2media
+ - vh/telegram/sqs2media/handlers
+ - voicetech/asr/tools/asr_analyzer/lib
+ - voicetech/common/voicetable/bin/filter_text
+ - voicetech/common/voicetable/checks/bin/general_voicetable_check
+ - voicetech/infra/gdpr_proxy/service
+ - voicetech/tts/vh/utils
+ - weather/workers/warnings/general
+ - yabs/analytics/anomaly_analyzer/src
+ - yabs/chat_bot/bot
+ - yabs/event-utils
+ - yabs/outdoor/libs/confirmed_booking
+ - yabs/python-libs/common
+ - yabs/qa/b2b_utils/bsserver_b2b/engine/bs_utils
+ - yabs/qa/b2b_utils/bsserver_b2b/engine/mongo_utils
+ - yabs/qa/b2b_utils/bsserver_b2b/engine/run
+ - yabs/qa/b2b_utils/bsserver_b2b/engine/validate_scripts
+ - yabs/qa/yabs_b2b_tank/qabs/b2b
+ - yabs/sbyt/testing/core
+ - yabs/server/cs/pylibs/partner_interface_monitor
+ - yabs/server/cs/pylibs/settings
+ - yabs/server/infra/bstrbufbuf/plugin
+ - yabs/server/infra/trivial_cron
+ - yabs/server/libs/py_markdown_strings
+ - yabs/server/test/ft/BSDEV-73064
+ - yabs/server/test/ft/BSSERVER-11503
+ - yabs/server/test/ft/BSSERVER-14195
+ - yabs/server/test/ft/BSSERVER-2122
+ - yabs/server/test/ft/BSSERVER-2158
+ - yabs/server/test/ft/BSSERVER-2454
+ - yabs/server/test/ft/BSSERVER-2976
+ - yabs/server/test/ft/BSSERVER-3895
+ - yabs/server/test/ft/BSSERVER-9233
+ - yabs/server/test/ft/NANPU-817
+ - yabs/server/test/ft/checks
+ - yabs/server/test/pylibs/qxl
+ - yabs/server/test/pylibs/simulator
+ - yabs/server/test/qabs_bsserver_pytest
+ - yabs/server/test/tools/oneshot_tester/lib
+ - yabs/stat/dropstat2/api/lib
+ - yabs/stat/infra/clickhouse/repair_master_report
+ - yabs/utils/autosupbs/pylibs/tasks_generator
+ - yabs/utils/autosupbs/tests/tasks_generator
+ - yabs/utils/yabs-mysql-binlog-audit/lib
+ - yabs/vh/cms-pgaas/cms_common
+ - yabs/vh/cms-pgaas/cms_common/biz
+ - yabs/vh/cms-pgaas/content_importer/evsproduction/pattern_based
+ - yabs/vh/cms-pgaas/content_ksiva_api/lib
+ - yabs/vh/cms-pgaas/feed_miner
+ - yabs/vh/cms-pgaas/feed_miner/downloader_middlewares
+ - yabs/vh/frontend/test/vh_pytest
+ - yabs/web-bins/export-stat/pcode_experiments/dill
+ - yabs/web-bins/export-stat/pcode_experiments/issue
+ - yaphone/advisor/project
+ - yaphone/localization_admin/src
+ - yaphone/localization_admin/src/models
+ - yaphone/localization_admin/src/models/details
+ - yaphone/localization_admin/src/models/support_info
+ - yp/scheduler_simulator/simtool
+ - yql/tools/docs/custom_mkdocs
+ - yql/tools/docs/wiki2markdown
+ - yql/tools/mrjob/test
+ - yql/tools/qplayer
+ - yweb/antimalware/mitb/mitb_monitor/lib
+ - yweb/antiporno/analyze_yt_ops
+ - yweb/antiporno/cp_conv/prepare_suggestive_cp_img_basket
+ - yweb/antiporno/cp_conv/text_classif/bin
+ - yweb/antiporno/nav/lib
+ - yweb/antiporno/pyutil/url
+ - yweb/antiporno/queries_manual_markup/lib
+ - yweb/antiporno/query_analyzer/porn_query_config_parser
+ - yweb/antiporno/site_reachability/lib/reachability_common
+ - yweb/antiporno/top_queries_cleanup/yql/test
+ - yweb/antispam/clean_web/tools/run_cm_targets
+ - yweb/antispam/mascot/scripts/tcinet
+ - yweb/antispam/seo_masks/py/static_impl/ut
+ - yweb/antispam/tools/yql
+ - yweb/antispam/webspam/collections/vw_model_applier/bin
+ - yweb/antispam/webspam/export/tries/tools/upper_tries
+ - yweb/antispam/ytgr/viewer
+ - yweb/blender/newsletter/unused_formulas
+ - yweb/blender/scripts/blender_viewer/conveyor_experiments/utils
+ - yweb/blender/scripts/nirvana/jobs/calc_workflow_num_with_filters
+ - yweb/blender/scripts/nirvana/jobs/join_features
+ - yweb/blender/scripts/nirvana/jobs/train_sbs_model/utils
+ - yweb/blogs/parsers/test
+ - yweb/freshness/scripts/sport_pushes
+ - yweb/freshness/scripts/sport_wizard
+ - yweb/freshness/scripts/svn
+ - yweb/freshness/scripts/trends/trendbot_tg/tg_handler
+ - yweb/freshness/scripts/trends/trendbot_tg/tg_handler/foreground
+ - yweb/news/hosts_differ
+ - yweb/news/runtime_scripts/event_to_infra
+ - yweb/news/tests
+ - yweb/news/tests/export
+ - yweb/news/tests/utils
+ - yweb/robot/limbo
+ - yweb/robot/limbo/imports
+ - yweb/robot/metrics/pmusca/lib
+ - yweb/sitelinks/astrolabe/build_bna/candidates/filter_by_region
+ - yweb/sitelinks/scripts/sitelinks
+ - yweb/structhtml/richsnippets/scripts/build_foto_recipes/prepare_to_deploy
+ - yweb/verticals/scripts/sport_chats
+ - yweb/verticals/scripts/sport_zen_updater/add_parsed_zen_urls
+ - yweb/video/vparsrobot/v2/tests
+ - yweb/video/vparsrobot/v2/tests-large
+ - yweb/webdaemons/clickdaemon/tools/create_ammo_from_tcpdump
+ - yweb/yasap/answers_nirvana/make_ammos
+ - yweb/yasap/answers_quality/plagiarism/prepare_scraper_queries
+ - yweb/yasap/pdb/backend/offline_views/history_calculator
+ - yweb/yasap/pdb/food/normalizer
+ - yweb/yasap/pdb/nirvana/gathered_boards_delta
+ - yweb/younglings/tasks/YOUNGLINGS-516
+ - zootopia/analytics/drive/source/drive/operations/support/registrations/reg_quality
+ - zootopia/hub/vds
+ - zootopia/hub/vds/onetime/orgthief/orgthief/parsers
+ - zootopia/hub/vds/scripts
+ - zootopia/hub/vds/services/velobike
+ F841:
+ ignore:
+ - F841
+ prefixes:
+ - addappter/web/api
+ - addappter/web/api/views
+ - addappter/web/api/views/api
+ - addappter/web/api/views/frontend
+ - addappter/web/common
+ - addappter/web/common/events
+ - addappter/web/libs
+ - addappter/web/libs/marshmallow
+ - addappter/web/libs/walrus
+ - addappter/web/testing/fixtures
+ - adfox/infra/amacs_config/lib
+ - ads/autobudget/metrics/equivalency_monitoring
+ - ads/autobudget/metrics/example_monitoring
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/py-modules/yabs/tabtools
+ - ads/ml_engine/learn/result/local_extended_fstr/lib
+ - ads/pytorch/lib/online_learning/production/processors/tsar_processor/lib
+ - ads/quality/adv_machine/tsar/cm_robot/cmpy/page
+ - ads/quality/apc_check_py
+ - ads/quality/embedding/tsar_tensor/ft_pool/lib
+ - ads/quality/ltp/libs/build_pool
+ - ads/sandbox_scripts/ggmonitor
+ - alice/analytics/wer/g2p
+ - alice/hollywood/tests/perf_test
+ - alice/megamind/tests/library
+ - alice/paskills/granet_server/tests
+ - alice/uniproxy/bin/send-digest
+ - alice/uniproxy/bin/uniproxy
+ - alice/uniproxy/bin/uniproxy-delivery
+ - alice/uniproxy/bin/uniproxy-subway
+ - alice/uniproxy/bin/uniproxy-unistat
+ - alice/uniproxy/bin/yabio-storage
+ - alice/uniproxy/library/testing
+ - alice/uniproxy/library/testing/mocks
+ - alice/uniproxy/tools/balancer_top
+ - apphost/conf/tests/blackbox
+ - april/badb
+ - april/badb/badb/db/mysql
+ - april/web/bas/ca
+ - april/web/bas/ca/forms
+ - april/web/bas/collector
+ - aurora/scripts/parsers/zoon_ru
+ - balancer/test/functional/regexp_host
+ - balancer/test/functional/regexp_path
+ - billing/apikeys/apikeys
+ - billing/apikeys/apikeys/mapper
+ - billing/bcl/bcl
+ - billing/refs/refs
+ - cloud/marketplace/queue/yc_marketplace_queue
+ - cloud/netinfra/rknfilter/yc_rkn_common
+ - cloud/netinfra/rknfilter/yc_rkn_config_node
+ - cmnt/tools/regression/request_classes
+ - cv/imageproc/ocr/tools/database_extraction/nirvana/imgaug/src/augmenters
+ - cv/short2long/training/yt_calc_factors
+ - datacloud/log_reader/lib
+ - devtools/local_cache/ac/tests/perfac
+ - dict/bert/make/lib
+ - dict/bert/make/lib/models
+ - dict/bert/make/lib/tasks
+ - dict/mt/analytics/sentence_breaking/translate_human_eval_comparison
+ - dict/mt/g2p/asr/graph
+ - dict/ontodb/onto_lib/sources/wikidata
+ - dict/ontodb/proto/direct/ut
+ - dict/ontodb/utils/export_src_codes
+ - direct/infra/direct_zkcli
+ - direct/infra/dt-dump-b2yt-data
+ - district/logbroker_consumers/lib
+ - district/logbroker_consumers/lib/yt
+ - dj/tools/rthub_profiles/acceptance/acceptance_tool
+ - dj/tools/viewer/custom/entity
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib/CashbackReportLib
+ - education/lib/common
+ - education/schoolbook/analytics/adhoc/ANALITICSEDU-687
+ - entity/ontodb/tasks/vloggers
+ - entity/recommender/nirvana/operations/abt_experiments_launcher
+ - entity/ugc/nirvana/ugcdb/support_hidden_import/lib/ut
+ - entity/ugc/tools/update_photos
+ - extsearch/audio/generative/py/uploader
+ - extsearch/images/tools/nirvana/download_serps
+ - extsearch/video/robot/cm/library/ut
+ - extsearch/video/robot/cm/transcoder/cmpy/vh_index_dups_matcher
+ - extsearch/video/robot/crawling/player_testing/services/live_proxy
+ - extsearch/video/robot/previews/hitman/lost_preview_status
+ - extsearch/video/robot/tools/library/python
+ - extsearch/video/transcoder/per_title/handler
+ - extsearch/video/transcoder/per_title/vmaf
+ - geosuggest/conveyors/learn_pool/lst_weights/lib
+ - haas/cmis/hwr_preorders
+ - haas/graphite_sync/get_report
+ - infra/deploy_queue_controller/lib
+ - infra/dist/dmover/bin/dmover
+ - infra/dist/dmover/lib
+ - infra/dist/dmover/lib/internal
+ - infra/dist/dmover/tests
+ - infra/host-cpu-metrics
+ - infra/host-cpu-metrics/host_metrics
+ - infra/porto/api_py
+ - infra/qyp/vmproxy/tests
+ - infra/shawshank/tests
+ - infra/skybit
+ - infra/skybit/src
+ - infra/yp_dns/tools/handle_duplicate_records/lib
+ - infra/yp_quota_distributor/lib
+ - keyboard/dict/nirvana/config_generator/blocks
+ - keyboard/dict/synthetic_ngrams/synthetic_ngrams_builder
+ - lbs/metrics/lbs_binbase_diff
+ - library/python/bstr
+ - logbroker/tools/manual/collect_capacity/base_2020
+ - logbroker/tools/manual/collect_capacity/collect_pre
+ - logbroker/tools/manual/collect_capacity/set_capacity_pre
+ - logbroker/tools/manual/collect_capacity/topic_list
+ - logbroker/tools/manual/create_logbroker_account/lib
+ - logbroker/tools/startrek/st
+ - mail/python/fake_mulcagate
+ - mail/python/theatre/app
+ - mail/python/theatre/app/log_helpers
+ - mail/tools/sql_execute_per_shard/lib
+ - maps/analytics/legacy/nile/statadhoc-8703-site-api-report
+ - maps/automotive/carwashes/tests/src
+ - maps/automotive/qa/metrics/common/ut
+ - maps/automotive/tools/statistics_auto/pylib/track_match_finder
+ - maps/infra/apiteka/config_uploader/tests
+ - maps/infra/sedem/cli/tests/release
+ - maps/infra/sedem/cli/tests/release/utils
+ - maps/tools/matcher_quality/routes_to_geoms
+ - maps_adv/common/shared_mock/tests
+ - market/mobile_validator/mt/env
+ - market/mstat/ch-cache/tests
+ - market/sre/services/cema-proxy/lib
+ - market/sre/services/cema/lib
+ - market/sre/services/cema/lib/classes
+ - market/yamarec/yamarec/yamarec1
+ - market/yamarec/yamarec/yamarec1/tasks
+ - metrika/admin/brb/server/lib
+ - metrika/admin/maas/bin/backend
+ - metrika/admin/maas/bin/monitoring/maas_instances_memory
+ - metrika/admin/maas/lib/core/common
+ - metrika/admin/maas/lib/core/daemon
+ - metrika/admin/maas/lib/core/service
+ - metrika/admin/python/duty/bot/lib
+ - metrika/admin/python/scripts/jrun
+ - metrika/tasklets/conductor/impl
+ - milab/lib/i2tclient/python
+ - ml/tensorflow/tfnn/tests
+ - mlp/mail/aspam/experiments/MLP_231
+ - mlp/mail/aspam/nirvana_operations/conveyor/build_prod_graph/inbound
+ - mlp/mail/aspam/nirvana_operations/conveyor/calc_dsats
+ - modadvert/libs/connectors/loggers
+ - modadvert/libs/http
+ - modadvert/libs/laas/workers/domain_threats
+ - modadvert/libs/laas/workers/features_from_href
+ - modadvert/libs/utils/dictutils/ut
+ - modadvert/programs/cv_app/libs
+ - modadvert/tools/accept_campaigns
+ - mssngr/botfarm/src/bot
+ - music/analytics/jam-sox/music_lib/financial_reports/tests/unit
+ - music/tools/download-info
+ - passport/backend/library/distprim
+ - passport/backend/library/distprim/threading
+ - passport/backend/meltingpot/utils
+ - plus/gift/gift
+ - plus/gift/gift/admin
+ - quality/ab_testing/cofe/projects/zalogin
+ - quality/functionality/chats/common/utils
+ - quality/functionality/chats/feedback/src/feedback/api
+ - quality/functionality/chats/feedback/src/feedback/api/v1
+ - quality/functionality/rtx/server/plugin
+ - quality/functionality/snippets/rkn_filter
+ - quality/functionality/turbo/analytics/quality/cms_report
+ - quality/functionality/turbo/analytics/quality/samplers/cms_sampler
+ - quality/functionality/turbo/autoparser/flags_postprocess/tests/medium
+ - quality/functionality/turbo/tools/pq_delete_docs
+ - quality/functionality/turbo/tools/tdm
+ - quality/logs/mousetrack_lib/python/tests
+ - quality/relev_tools/choice_screen/create_stove
+ - quality/trailer/suggest/toloka_processor/report_yt
+ - quality/webfresh/metrics/serpsets/raw_serpset_patcher/tests
+ - rnd_toolbox/deckard
+ - rnd_toolbox/nyamm
+ - robot/library/yuppie
+ - robot/library/yuppie/modules
+ - robot/metrics/speed_sbr/nirvana
+ - robot/quality/nirvana/refererrank/premetric_map
+ - robot/quality/samovar_conveyour/tools/get_samples
+ - robot/quality/sendlink_conveyour/tools/max_rank_acceptance
+ - robot/research/eval_nirvana_graph
+ - rt-research/broadmatching/scripts/yt/dyn-sources/yt_prepare_dyn_sources
+ - rt-research/multik/tools/jupyter
+ - rtmapreduce/tests/recipes/rtmr_processing_recipe
+ - saas/tools/devops/check_backup
+ - saas/tools/devops/lib23
+ - saas/tools/refresh/import_rtyserver
+ - sandbox/common/upload
+ - sandbox/projects/alice_evo
+ - sandbox/projects/avia/mysql_sync_testing_with_prod
+ - sandbox/projects/balancer/load/BalancerLoadCompare
+ - sandbox/projects/bitbucket/GBGAdaptor
+ - sandbox/projects/devops
+ - sandbox/projects/devops/HardwareGencfgGroups
+ - sandbox/projects/dj/DjCompileConfig
+ - sandbox/projects/geoadv
+ - sandbox/projects/geoadv/ReleasePrices
+ - sandbox/projects/geosearch/snippets
+ - sandbox/projects/geosearch/snippets/AddrsSnippetsTask
+ - sandbox/projects/hollywood
+ - sandbox/projects/hollywood/fast_data/BuildAndDeployHollywoodFastData
+ - sandbox/projects/logbroker/tasks/BuildSeveralResources
+ - sandbox/projects/masstransit/MapsMasstransitImportVehicleTasks
+ - sandbox/projects/music/deployment/MusicRestoreMdb/YandexCloudDatabase
+ - sandbox/projects/music/deployment/helpers
+ - sandbox/projects/news
+ - sandbox/projects/news/RunNewsComplexLoadtests
+ - sandbox/projects/news/runtime_tests
+ - sandbox/projects/news/runtime_tests/CompareNewsApphostServiceResponses
+ - sandbox/projects/saas/backups/DetachServiceIndex2
+ - sandbox/projects/sport_wizard/DeploySportProxyData
+ - sandbox/projects/video
+ - sandbox/projects/video/priemka/VideoRobotPriemkaSimple
+ - sandbox/projects/vqe/measure_performance
+ - sandbox/projects/yt
+ - sandbox/projects/yt/ci_tasks/packages/YtBuildCronPackage
+ - sandbox/projects/yt/layers_tasks/YtBuildSpravLayerTask
+ - search/metrics/monitoring/core
+ - search/mon/rviewer/db
+ - search/mon/rviewer/modules
+ - search/mon/trainer/libs
+ - search/mon/uchenki/app
+ - search/mon/uchenki/app/controllers/api
+ - search/mon/wabbajack/bin/icscr
+ - search/mon/wabbajack/libs/client
+ - search/mon/wabbajack/libs/client/parsers
+ - search/scraper/parser_platform/parsers
+ - search/scraper_over_yt/scripts
+ - skynet/kernel
+ - skynet/kernel/util/tests
+ - smart_devices/tools/launcher2/tests/restarts
+ - statbox/statkey/jam/jobs
+ - statbox/statkey/jam/jobs/cubes/superapp/autofill/v2
+ - statbox/statkey/jam/jobs/cubes/superapp/bi_turboappweb_turbo_counter/v2
+ - statbox/statkey/jam/jobs/cubes/superapp/cohorts_daily/v2
+ - strm/generate/lib/generate
+ - taxi/graph/packages/taxigraphd
+ - testenv/core/web_server
+ - travel/avia/shared_flights/tasks/schedules_dumper
+ - travel/hotels/suggest/builder
+ - travel/hotels/suggest/metrics_builder
+ - travel/rasp/content/rzdParser
+ - travel/rasp/train_api
+ - travel/rasp/train_api/middleware
+ - vcs/manage_contrib
+ - vh/lib/sqs_watcher
+ - vh/recommender/tools/delayed_view_stats
+ - voicetech/asr/markup/select
+ - voicetech/asr/tools/run_normalizer/prepare_data_for_mt_normalizer
+ - voicetech/infra/uniproxy/tests/session
+ - voicetech/infra/voice_ext_mon/bin
+ - voicetech/spotter/selection_for_annotation/bin
+ - voicetech/spotter/train/lib
+ - weather/workers/warnings/push
+ - yabs/analytics/anomaly_analyzer/src
+ - yabs/analytics/new_traffic_generation/src
+ - yabs/analytics/traffic_generation/z_2_barnavig_click_counter
+ - yabs/analytics/traffic_generation/z_4_spylog_visits_counter
+ - yabs/analytics/traffic_generation/z_5_appmetr_counter
+ - yabs/analytics/traffic_generation/z_6_metrika_visits_counter
+ - yabs/analytics/traffic_generation/z_7_chevent_scc_counter
+ - yabs/analytics/traffic_generation/z_9_3_metr_yabro_coeff
+ - yabs/analytics/traffic_generation/z_9_4_all_visits
+ - yabs/analytics/yt_cleaner
+ - yabs/autobudget/pylibs/tasks
+ - yabs/awaps_pvl/pvl/logic
+ - yabs/outdoor/py_schedule/logic
+ - yabs/qa/oneshots/astkachev/BSSERVER-14230/noload_rsya_only
+ - yabs/qa/oneshots/astkachev/BSSERVER-14230/noload_search_only
+ - yabs/qa/oneshots/sergtaim/BSSERVER-14259/AddKeywordWithNewIdToYT-test
+ - yabs/server/cs/pylibs/dash_board
+ - yabs/server/cs/pylibs/full_graph_plot
+ - yabs/server/cs/pylibs/gantt_chart/lib
+ - yabs/server/cs/pylibs/settings
+ - yabs/server/test/ft/BSSERVER-13708
+ - yabs/vh/cms-pgaas/sport_api_importer/sport_api_importer_lib
+ - yabs/vh/frontend/test/ft/HOME-43539
+ - yweb/antispam/cid/analytics/pushes/crypta_lal/args
+ - yweb/antispam/cid/analytics/pushes/push_sender/args
+ - yweb/antispam/cid/analytics/pushes/push_sender/cli
+ - yweb/antispam/cid/support/auto_answer/args
+ - yweb/blender/scripts/blender_viewer/conveyor_experiments/utils
+ - yweb/freshness/scripts/sport_pushes
+ - yweb/news/dupsd/tests
+ - yweb/news/zen/video_export
+ - yweb/sitelinks/astrolabe/migration/bna_to_mysql
+ - yweb/webscripts/video/duplicates/nirvana_scripts/knn/filter_knn_source
+ - yweb/yasap/pdb/tools/backup/create_backup
+ - yweb/yasap/znatoki/znatoki_ctl/lib
+ - yweb/yasap/znatoki/znatoki_ctl/lib/commands
+ - zootopia/analytics/ml/features/geo_features/idle_duration_features
+ - zootopia/analytics/ml/join_features/lib
+ - zootopia/analytics/ml/util/logs_context_manager/lib
+ F403:
+ ignore:
+ - F403
+ prefixes:
+ - adfox/infra/registrator
+ - adfox/infra/registrator/lib
+ - ads/libs/py_dssm_lib/dssm_applier
+ - ads/libs/py_ml_factors/matrixnet
+ - ads/libs/py_vw_lib
+ - ads/nirvana/xfactor-yt
+ - ads/tools/mx_feature_remapper
+ - ads/watchman/contrib/flask-restplus-patched
+ - ads/watchman/contrib/flask-restplus-patched/flask_restplus_patched
+ - alice/analytics/utils/marty/run_nirvana_instance
+ - cloud/ai/speechkit/stt/tests/data_pipeline/join
+ - cv/short2long/nirvana/lib
+ - devtools/signer/signer
+ - dict/ontodb/cmpy/lib
+ - dict/ontodb/isa/libshorttext/converter/stemmer
+ - dict/ontodb/report/common
+ - dict/ontodb/utils/export_src_codes
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib/CashbackReportLib
+ - extsearch/geo/recommender/runtime/config/generation
+ - mail/freezing_tests/active_users_aggregation
+ - maps/analyzer/tools/online_jams/pylib
+ - market/seo/offer_base
+ - mediapers/feature_machine/nirvana/script_runner
+ - mlp/mail/aspam/nirvana_operations/conveyor/build_prod_graph/inbound
+ - mlp/mail/aspam/nirvana_operations/conveyor/build_prod_graph/outbound
+ - mlp/mail/aspam/nirvana_operations/conveyor/calc_dsats
+ - passport/backend/api/tests/views/bundle/change_avatar
+ - quality/ab_testing/cofe/projects/alice/sesame/v1_1
+ - quality/neural_net/bert/bert/utils/distributed
+ - quality/neural_net/bert/bert/utils/fs
+ - sandbox/projects/tycoon/TycoonAdverts
+ - search/base_search/tools/explain_l1
+ - search/mon/rviewer/app
+ - search/mon/rviewer/db
+ - search/mon/rviewer/modules
+ - search/mon/rviewer/modules/clients
+ - search/mon/rviewer/modules/orchestrator
+ - travel/avia/avia_api
+ - travel/avia/avia_api/avia/settings
+ - travel/avia/avia_api/avia/v1/schemas
+ - travel/avia/avia_api/tests
+ - voicetech/asr/cloud_engine/cli/nirvana/aggregate_kenlm_outputs
+ - voicetech/asr/cloud_engine/cli/nirvana/aggregate_subword_lm_outputs
+ - voicetech/asr/cloud_engine/cli/nirvana/build_lm
+ - voicetech/asr/cloud_engine/cli/nirvana/make_kenlm_lingware
+ - voicetech/asr/cloud_engine/cli/nirvana/make_subword_lm_lingware
+ - voicetech/asr/cloud_engine/cli/nirvana/merge_lingwares
+ - voicetech/asr/cloud_engine/cli/nirvana/select_best_kenlm
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_freq_table
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_mixture_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_lambda
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary
+ - voicetech/asr/tools/language_model/tests/test_linear_merge
+ - yabs/outdoor/viewer/back/logic
+ F401:
+ ignore:
+ - F401
+ prefixes:
+ - ads/autobudget/ml_pipeline
+ - ads/factor_check/workflow/lib
+ - ads/libs/py_autobudget
+ - ads/libs/py_dssm_lib/dssm_applier
+ - ads/libs/py_ml_factors/matrixnet
+ - ads/libs/py_vw_lib
+ - ads/nirvana/automl/pipelines/offline_pytorch/full_example
+ - ads/nirvana/gensim_w2v
+ - ads/nirvana/mappers/w2v_recommender
+ - ads/quality/adv_machine/cm_robot/cmpy/fresh_stats
+ - ads/quality/adv_machine/cm_robot/cmpy/search_query_recom_attempt
+ - ads/quality/embedding/join_banners
+ - ads/quality/embedding/tsar_tensor/BSFACTOR-44/gram_eval
+ - ads/quality/embedding/tsar_tensor/BSFACTOR-44/preprocess
+ - ads/quality/ltp/action_tasks/visit_goals
+ - ads/quality/phf/direct_api
+ - ads/quality/simulate_auction_py/lib/inject_modules
+ - ads/sandbox_scripts/zc_corrector
+ - ads/tools/mx_feature_remapper/lib
+ - ads/watchman/contrib/flask-marshmallow-patched
+ - ads/watchman/contrib/flask-restplus-patched
+ - alice/analytics/wer
+ - alice/boltalka/generative/tfnn/infer
+ - alice/boltalka/generative/training/data/nn/filtered_twitter
+ - alice/nlu/py_libs/tokenizer
+ - alice/uniproxy/bin/send-digest
+ - alice/uniproxy/tools/perf_results_parser
+ - antirobot/tools/prepare_requests_cbb
+ - browser/infra/services/ci/backend/flakiness/migrations
+ - cv/imageproc/ocr/tools/nirvana/captcha_renderer
+ - cv/short2long/nirvana/lib
+ - cv/short2long/training/yt_load_highlights
+ - dict/mt/analytics/make/tools/toloka/simple_toloka
+ - dict/mt/make/modules/prepare_corpus
+ - dict/mt/make/pipeline/nmt
+ - dict/mt/make/pipeline/phrase_lm/tests
+ - dict/mt/make/tools/yt_transform/tests
+ - dict/mt/normalizer/tts/bugfix
+ - dict/ontodb/config
+ - dict/ontodb/proto/benchmark
+ - dict/ontodb/proto/direct/ut
+ - dict/ontodb/proto/tools
+ - direct/infra/dt-dump-b2yt-data
+ - drive/analytics/binary/thiefs
+ - education/lib/contrib/glove_python
+ - education/schoolbook/services/recommender/app
+ - education/schoolbook/services/recommender/it
+ - entity/ontodb/tasks/vloggers
+ - entity/ontodb/util/yt_helpers
+ - entity/recommender/nirvana/operations/yam/yam_positions
+ - entity/recommender/tools/recommender_beta
+ - entity/ugc/robot/tools/installed_apps_sites_activity_loader/lib
+ - ether/top/check_docs
+ - ether/top/specevent/meta
+ - extsearch/geo/recommender/tools/build_static_user_profile/lib
+ - extsearch/geo/recommender/tools/quality_metric/convert_tradoff_4_plot
+ - extsearch/geo/recommender/tools/quality_metric/tradeoff/generate_features
+ - extsearch/geo/recommender/tools/quality_metric/tradeoff/prepare_searches
+ - extsearch/geo/recommender/tools/quality_metric/utils
+ - extsearch/geo/recommender/tools/ugc_rtmr_processing/tests
+ - extsearch/images/robot/scripts/cm/semidup2
+ - extsearch/images/tools/morda_popular_queries/bin
+ - extsearch/images/tools/new_runtime/create_model
+ - extsearch/video/robot/cm/crawl/cmpy/authors
+ - extsearch/video/robot/cm/transcoder/cmpy/vh_index_dups_matcher
+ - extsearch/video/robot/cm/vicont/cmpy/content
+ - extsearch/video/robot/cm/vicont/cmpy/renew
+ - extsearch/video/robot/crawling/player_testing/core
+ - extsearch/video/robot/crawling/player_testing/services/live_capture
+ - extsearch/video/robot/crawling/player_testing/services/live_proxy
+ - extsearch/video/robot/previews/hitman/lost_preview_status
+ - extsearch/ymusic/tools/crawl_test_data
+ - extsearch/ymusic/tools/generate_test_data
+ - infra/kernel/test/recipe/cgleak_check/example
+ - infra/yasm/zoom/python/tests
+ - infra/yp_quota_distributor/lib
+ - intranet/table_flow/tests
+ - lbs/research_tools/find_keys_causing_losses
+ - library/python/async_clients
+ - logbroker/tools/deploy_consistency_test
+ - mail/github/calendar-attach-processor
+ - maps/automotive/carwashes/tests/fake-env
+ - maps/automotive/carwashes/tests/src
+ - maps/automotive/proxy/config_generator
+ - maps/automotive/remote_tasks/autotests/tests
+ - maps/automotive/remote_tasks/manager/regression/ammo_generator
+ - maps/b2bgeo/tools/load_testing/lib
+ - maps/doc/proto/yandex/maps/proto/factory/tests
+ - maps/infopoint/statistics/lib
+ - maps/infra/apiteka/client/tests
+ - maps/infra/ecstatic/tool/ecstatic_api
+ - maps/pylibs/test_helpers
+ - maps/qa/passed_by_assessors/markup_script
+ - maps/wikimap/stat/kpi/valuable_edits/users_home_regions/lib
+ - maps_adv/common/shared_mock
+ - market/dynamic_pricing/tools/kvi_evaluation
+ - market/dynamic_pricing/tools/offline_modeling
+ - market/mobile_validator/mt
+ - market/seo/tools/postgres_local/recipe
+ - market/sre/tools/kraken/src/kraken_monrun
+ - market/yamarec/yamarec/yamarec1
+ - mds/nscfg/server
+ - metrika/admin/python/cms/agent/lib
+ - metrika/core/monitoring/clickhouse-table-structure-check
+ - metrika/core/programs/mobile_yt_to_yc_export
+ - metrika/pylib/log/tests
+ - metrika/tasklets/build/impl
+ - metrika/tasklets/deploy/impl
+ - ml/tensorflow/tfnn/tests/tools
+ - ml/tensorflow/ytensorflow
+ - modadvert/libs/antispam/threat_mapping/ut
+ - modadvert/libs/jsonrpc2/client
+ - modadvert/libs/nirvana/program
+ - modadvert/nirvana/m1_update_media_objects/it
+ - modadvert/programs/multik/libs
+ - modadvert/programs/supermoderation_admin/libs/services
+ - opensource/sync/bin/docs_sync/tasklet
+ - opensource/sync/bin/sync_ch/tasklet
+ - orgvisits/orgs/preprocessing/lib
+ - orgvisits/user/features/run/tests
+ - plus/oneyear/oneyear_by
+ - quality/ab_testing/cofe/projects/alice
+ - quality/ab_testing/cofe/projects/router
+ - quality/ab_testing/cofe/projects/zalogin
+ - quality/ab_testing/cofe/python/metrics
+ - quality/functionality/chats/common/bunker_client
+ - quality/functionality/chats/common/requests_wrappers
+ - quality/functionality/chats/feedback/src/feedback/api
+ - quality/functionality/chats/floyd/src/floyd/core
+ - quality/functionality/entity_search/factqueries/tools/beta/start
+ - quality/functionality/rtx/trends/apropos_viewer
+ - quality/functionality/scripts/psuh/HomeWorkMetricsLib/External/autolog_names/autolog_names
+ - quality/functionality/scripts/psuh/HomeWorkMetricsLib/HomeWorkMetricsLib
+ - quality/functionality/turbo/analytics/quality/samplers/cms_sampler
+ - quality/functionality/turbo/ml_ads/prepare_daily_logs
+ - quality/functionality/turbo/tools/rthub_dev/prepare_autoparser
+ - quality/functionality/turbo/yml_process/lib
+ - quality/neural_net/bert/bert
+ - quality/nirvana_tools/conveyor_operations/concatenate_tables
+ - quality/nirvana_tools/conveyor_operations/merge_gemini_lookups
+ - quasar/infra/tasklets/update_devices_in_db/impl
+ - regulargeo/geolayer/olap
+ - robot/bert/tools/predict_diff
+ - robot/quality/crawl_quality_metrics/push_to_solomon_every_day_crawl
+ - robot/quality/crawl_quality_metrics/push_to_solomon_library
+ - robot/quality/nirvana/refererrank/calc_scores_map
+ - robot/quality/nirvana/refererrank/create_dataset
+ - robot/quality/nirvana/refererrank/drop_large_keys
+ - robot/quality/nirvana/refererrank/join_addtime
+ - robot/quality/nirvana/refererrank/join_userdata_to_referers
+ - robot/quality/nirvana/refererrank/merge_all_crawl_attempts
+ - robot/quality/nirvana/refererrank/merge_all_factors_tables
+ - robot/quality/nirvana/refererrank/merge_all_referers_export
+ - robot/quality/nirvana/refererrank/premetric_map
+ - robot/quality/nirvana/refererrank/prepare_for_crawl_attempt_reduce
+ - robot/quality/nirvana/refererrank/prepare_for_factors_reduce
+ - robot/quality/nirvana/refererrank/prepare_for_userdata_reduce
+ - robot/quality/nirvana/refererrank/push_referer_rank_to_solomon
+ - robot/quality/nirvana/refererrank/rename_url_key
+ - robot/quality/nirvana/refererrank/unique_referers
+ - robot/quality/nirvana/refererrank/unique_urls
+ - robot/quality/robotrank/nirvana/compare_formulas
+ - robot/selectionrank/sr_conduct_rules_experiment/graphs
+ - rtmapreduce/config/user_tasks
+ - saas/tools/refresh/import_rtyserver
+ - sandbox/projects/EntitySearch/EntitySearchTrunkTest
+ - sandbox/projects/GetGeoMetasearchResponses
+ - sandbox/projects/LandingConstructor
+ - sandbox/projects/adfox/adfox_ui/resource_types
+ - sandbox/projects/adv_machine/make_turboapp_dicts
+ - sandbox/projects/avia/import_marker
+ - sandbox/projects/avia/trigger_revise
+ - sandbox/projects/cloud/billing/build_analytics_cube/source
+ - sandbox/projects/cmnt/PumpkinSettings
+ - sandbox/projects/dj/AutoDeploy
+ - sandbox/projects/gencfg/GencfgChartsUploadGroupsInfoToYt
+ - sandbox/projects/mail/Load/FuritaAmmoGen
+ - sandbox/projects/mail/Load/FuritaShooting
+ - sandbox/projects/mail/Load/LizaShooting
+ - sandbox/projects/mail/Load/MobileApiShooting
+ - sandbox/projects/mail/Load/QuinnShooting
+ - sandbox/projects/mail/Load/WebApiShooting
+ - sandbox/projects/mail/RotateMailNotifyRules
+ - sandbox/projects/marty
+ - sandbox/projects/mssngr/runtime/MssngrRouterLoadTest
+ - sandbox/projects/news
+ - sandbox/projects/quality/tasks
+ - sandbox/projects/resource_types
+ - sandbox/projects/school/Load/MeduzaShooting
+ - sandbox/projects/sdc
+ - sandbox/projects/smarttv
+ - sandbox/projects/taxi/BuildDispatcherPackage
+ - sandbox/projects/wmc
+ - sandbox/projects/yphone/AdvisorDeployToQloud
+ - sandbox/projects/yphone/JafarBuildNirvanaLayer
+ - sandbox/projects/yphone/launcher
+ - search/alice/snippets/lib/util/parse_arc
+ - search/geo/tools/collections/make_expert_collections
+ - search/geo/tools/geocube/lib
+ - search/mon/rviewer/app
+ - search/mon/rviewer/db
+ - search/mon/rviewer/modules/clients
+ - search/mon/rviewer/modules/config
+ - search/mon/rviewer/modules/nanny
+ - search/mon/rviewer/modules/orchestrator
+ - search/mon/rviewer/modules/yt
+ - search/mon/uchenki/app
+ - search/mon/wabbajack/libs/db
+ - search/resonance/tester/core
+ - search/scraper_over_yt/scripts/zombie_monitors
+ - sprav/altay/tools/auto_close/ml_predictor
+ - sprav/mining/bs/tools/extract_social_data
+ - sprav/tycoon/nirvana/mail/sync_subscriptions/lib
+ - statbox/qb2
+ - statbox/statkey/jam/actions
+ - statbox/statkey/jam/jobs/key_reports/desktop_retention
+ - statbox/statkey/jam/jobs/tech_report/event_money_stat
+ - statbox/statkey/jam/libs
+ - tools/mkdocs_builder/lib
+ - tools/releaser/src
+ - travel/avia/avia_api
+ - travel/avia/library/python/iata_correction
+ - travel/avia/shared_flights/data_importer
+ - travel/library/python/sender
+ - vcs/svn/migrations
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_freq_table
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_mixture_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_lambda
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary
+ - voicetech/asr/markup/lib
+ - voicetech/asr/pipeline/train
+ - voicetech/asr/tools/question/make_train_from_vt
+ - voicetech/asr/tools/regular_metrics_run/upload_metrics_to_yt
+ - voicetech/bio/pipeline/classification/run_children_toloka_markup_regular
+ - voicetech/bio/pipeline/vh
+ - voicetech/bio/scripts/score/robin_metrics/classification/tests
+ - voicetech/bio/scripts/yt/make_transaction
+ - voicetech/common/voicetable/agency_data_parser/lib
+ - voicetech/spotter/difftools/score_output
+ - voicetech/spotter/online_metrics/lib
+ - voicetech/spotter/run/difftool
+ - voicetech/spotter/score/prepare_for_online_validation/bin
+ - weather/workers/warnings/general
+ - weather/workers/warnings/nowcasting
+ - yabs/analytics/anomaly_analyzer/src
+ - yabs/awaps_pvl/pvl/logic
+ - yabs/indoor/mocks_generator/lib
+ - yabs/outdoor/event_2018/python/lib
+ - yabs/outdoor/libs/facepp_api
+ - yabs/outdoor/mobile_internet_proxy/logic
+ - yabs/outdoor/py_schedule/logic
+ - yabs/outdoor/scripts/raskraska
+ - yabs/outdoor/viewer/back/logic
+ - yabs/qa/oneshots/idoldin/BSSERVER-12201
+ - yabs/qa/oneshots/liapustin/BSSERVER-14049
+ - yabs/qa/oneshots/sergtaim/BSSERVER-14259/AddKeywordToYT-Via-Simple-IudYtOneshot
+ - yabs/qa/oneshots/serval/BSSERVER-14292/first_json_option_new
+ - yabs/sbyt/ytstatcollector/advmachine/tests
+ - yabs/server/cs/pylibs/advmachine_export
+ - yabs/server/cs/test/cs_import/yt_banner_with_history
+ - yabs/server/infra/yt_tables_freshness/solo
+ - yabs/server/libs/py_db_cluster
+ - yabs/server/test/ft/BSSERVER-13708
+ - yabs/server/test/ft/BSSERVER-13878
+ - yabs/server/test/ft/BSSERVER-14107
+ - yabs/server/test/ft/BSSERVER-14110
+ - yabs/server/test/ft/BSSERVER-14309
+ - yabs/server/test/ft/BSSERVER-2495
+ - yabs/server/test/qabs_bsserver_pytest
+ - yabs/utils/log_stats/test
+ - yabs/vh/cms-pgaas/cms_common
+ - yabs/vh/cms-pgaas/sport_api_importer/sport_api_importer_lib/lib/sport_client
+ - yabs/vh/cms-pgaas/statistics_api
+ - yabs/vh/cms-pgaas/ugc_api
+ - yabs/vh/cms-pgaas/utils/external_services/sender
+ - yabs/vh/frontend/json_templating/streams_generator/pylib
+ - yaphone/advisor/launcher
+ - ydo/database/lib
+ - ydo/payments/balance_notifications_processor/lib
+ - ydo/server/apphost_source/lib/endpoints
+ - ydo/tools/direct/make_ya_clients_export
+ - yp/eviction_alerter/bin
+ - yp/scheduler_simulator/analysis/library
+ - yql/library/test_framework
+ - yweb/antimalware/mitb/mitb_monitor/lib
+ - yweb/antiporno/cp_conv/text_classif/bin
+ - yweb/antispam/clean_web/router
+ - yweb/antispam/mascot/monitorings/check_table_age
+ - yweb/robot/limbo
+ - yweb/robot/metrics/pmusca/graph/bin/extract_urls_from_serp
+ - yweb/sitelinks/scripts/sitelinks
+ - yweb/webscripts/video/duplicates/nirvana_scripts/knn/filter_knn_source
+ - yweb/yasap/answers/answers
+ - yweb/yasap/pdb/tools/add_card_owners
+ - zootopia/analytics/drive/source/drive/operations/support/registrations/reg_quality
+ - zootopia/analytics/ml/features/geo_features/faster_surge_features
+ F405:
+ ignore:
+ - F405
+ prefixes:
+ - adfox/infra/registrator
+ - adfox/infra/registrator/lib
+ - ads/libs/py_ml_factors/matrixnet
+ - ads/nirvana/xfactor-yt
+ - ads/tools/mx_feature_remapper
+ - alice/analytics/utils/marty/run_nirvana_instance
+ - cloud/ai/speechkit/stt/tests/data_pipeline/join
+ - devtools/signer/signer
+ - dict/lm/sources/lib/launcher
+ - dict/ontodb/isa/libshorttext/converter/stemmer
+ - dict/ontodb/report/common
+ - dict/ontodb/utils/export_src_codes
+ - dj/nirvana/nirvana_make
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib
+ - edadeal/analytics/scripts/CashbackReport/CashbackReportLib/CashbackReportLib
+ - extsearch/geo/recommender/runtime/config/generation
+ - library/python/cyson
+ - library/python/cyson/cyson
+ - mail/freezing_tests/active_users_aggregation
+ - maps/analyzer/tools/online_jams/pylib
+ - market/seo/offer_base
+ - mediapers/feature_machine/nirvana/script_runner
+ - mlp/mail/aspam/nirvana_operations/conveyor/build_prod_graph/inbound
+ - mlp/mail/aspam/nirvana_operations/conveyor/build_prod_graph/outbound
+ - mlp/mail/aspam/nirvana_operations/conveyor/calc_dsats
+ - modadvert/programs/cv_app/tools/create_yt_env/it
+ - modadvert/programs/grep_img_rejects/it
+ - modadvert/programs/multik/it
+ - passport/backend/api/tests/views/bundle/change_avatar
+ - quality/ab_testing/cofe/projects/alice/sesame/v1_1
+ - quality/functionality/chats/feedback/src/feedback/core
+ - quality/functionality/chats/feedback/src/feedback/core/celery_tasks
+ - quality/neural_net/bert/bert/utils/distributed
+ - quality/user_sessions/py_amon/cbir
+ - quality/user_sessions/py_amon/images
+ - repo/yeoman/data/lib
+ - repo/yeoman/stats/lib
+ - sandbox/projects/tycoon/TycoonAdverts
+ - search/base_search/tools/explain_l1
+ - search/mon/rviewer/app
+ - search/mon/rviewer/modules
+ - search/mon/rviewer/modules/clients
+ - search/rpslimiter/storage/src/model
+ - skynet/kernel
+ - skynet/kernel/util/sys/user
+ - travel/avia/avia_api
+ - travel/avia/avia_api/avia/settings
+ - travel/avia/avia_api/tests
+ - vcs/svn/flat
+ - vcs/svn/hooks/test
+ - voicetech/asr/cloud_engine/cli/nirvana/aggregate_kenlm_outputs
+ - voicetech/asr/cloud_engine/cli/nirvana/aggregate_subword_lm_outputs
+ - voicetech/asr/cloud_engine/cli/nirvana/build_lm
+ - voicetech/asr/cloud_engine/cli/nirvana/make_kenlm_lingware
+ - voicetech/asr/cloud_engine/cli/nirvana/make_subword_lm_lingware
+ - voicetech/asr/cloud_engine/cli/nirvana/merge_lingwares
+ - voicetech/asr/cloud_engine/cli/nirvana/select_best_kenlm
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_freq_table
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_mixture_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_lambda
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary
+ - voicetech/asr/tools/language_model/tests/test_linear_merge
+ - yweb/tellurium/tools/store_history_to_yt
+ - yweb/tellurium/ui
+ no_lint:
+ ignore:
+ - '*'
+ prefixes:
+ - addappter/backend/addappter/tests
+ - addappter/backend/addappter_cli/tests
+ - addappter/backend/addappter_less/tests
+ - addappter/backend/addappter_partners_api/tests
+ - addappter/backend/addappter_statistics
+ - addappter/backend/scripts
+ - addappter/backend/web_api/tests
+ - addappter/libs/fixtures/tests
+ - addappter/web/libs/tests
+ - adfox/contrib/clickhouse
+ - adfox/contrib/flask_jsonrpc
+ - adfox/infra/amacs_config/migrations
+ - adfox/rtd/backend
+ - adfox/rtd/bin
+ - adfox/rtd/clickhouse_layer
+ - adfox/rtd/core
+ - adfox/rtd/reports
+ - ads/bsyeti/libs/py_bt_profile
+ - ads/bsyeti/scripts/sample_catalogia_queries
+ - ads/libs/py_categories
+ - ads/libs/py_conf
+ - ads/libs/py_core
+ - ads/libs/py_ecom_recommendations
+ - ads/libs/py_ml_clusterization
+ - ads/libs/py_ml_common
+ - ads/libs/py_ml_engine
+ - ads/libs/py_ml_metrics
+ - ads/libs/py_nirvana_api
+ - ads/libs/py_yaml_loader
+ - ads/libs/yql_flow
+ - ads/nirvana/automl/pipelines/offline_pytorch
+ - ads/nirvana/mr_operations/mr_do_aggregate
+ - ads/nirvana/online_learning/learn_logs_utils/offline_preprocessed_logs
+ - ads/nirvana/online_learning/offline_graph_launcher
+ - ads/nirvana/online_learning/preprocess/lib
+ - ads/nirvana/online_learning/spiral_offline_apply
+ - ads/nirvana/upgrade_operation
+ - ads/targeting/bsmr-scripts/py-modules
+ - ads/targeting/python-objstore/py-modules
+ - ads/quality/adv_machine/scripts/quorum_optimizer/beam_search
+ - ads/quality/adv_machine/scripts/quorum_optimizer/lib
+ - ads/quality/adv_machine/scripts/select_type_utils
+ - ads/quality/apc/bm
+ - ads/quality/bid_correction/v2/lib
+ - ads/quality/dssm/belmo/201812
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20170614
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20170812
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20180101
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20180116
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20180301
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20181015
+ - ads/quality/dssm/rsya/spynet/nirvana/train/20190610
+ - ads/quality/dssm/search/201708/train
+ - ads/quality/dssm/search/serp201802/train
+ - ads/quality/dssm/synonyms/search/lib
+ - ads/quality/dssm/synonyms/search/monitor
+ - ads/quality/dssm/synonyms/search/update
+ - ads/quality/dssm/ytlib
+ - ads/quality/ltp/ozymandia/baseline
+ - ads/quality/phf/alembic
+ - ads/quality/phf/flask-restplus
+ - ads/quality/phf/pika
+ - ads/watchman/timeline/api/lib
+ - ads/yacontext/lib/testpy/tests/testmod
+ - ads/yacontext/packages/mrkit
+ - ads/yacontext/packages/rjob
+ - ads/yacontext/packages/tabkit
+ - afisha/infra/juggler-bundles/juggler-check-bundle-alet/bin/afisha-export-checker
+ - alice/bitbucket/pynorm
+ - alice/boltalka/telegram_bot
+ - alice/boltalka/tools/build_mx_pool
+ - alice/boltalka/tools/dssm_preprocessing/add_manual_negatives
+ - alice/boltalka/tools/dssm_preprocessing/build_twitter_dialogues
+ - alice/boltalka/tools/dssm_preprocessing/join_identificator
+ - alice/boltalka/tools/dssm_preprocessing/train_validation_split_by_column
+ - alice/boltalka/tools/dssm_preprocessing/twitter_to_key_value
+ - alice/boltalka/tools/reply_rewriter
+ - alice/boltalka/tools/static_factors/calc_frequencies
+ - alice/rtlog/ut/python
+ - alice/vins_contrib/pytest-mongodb
+ - alice/vins_contrib/pytest-randomly
+ - antiadblock/configs_api/lib
+ - antirobot/scripts/access_log
+ - antirobot/scripts/learn/make_learn_data
+ - antirobot/scripts/log_viewer/app
+ - antirobot/scripts/log_viewer/precalc
+ - antirobot/scripts/log_viewer/slow_search
+ - antirobot/scripts/nanny_release
+ - april/motivation/motivation/mp/migrations
+ - april/tools/django_direct_forecaster/direct_forecaster/migrations
+ - april/web/bas/bm/migrations
+ - april/web/bas/ca/migrations
+ - april/web/bas/collector/migrations
+ - april/web/bas/cpa/migrations
+ - april/web/bas/display/migrations
+ - april/web/bas/dwr/migrations
+ - april/web/bas/qa/migrations
+ - april/web/bas/rd/migrations
+ - april/web/bas/tq/migrations
+ - aurora/library/Pyro4
+ - aurora/library/serpent
+ - balancer/production/x/yasm_errors_collector
+ - billing/agency_rewards/tests_platform/common
+ - billing/agency_rewards/tests_platform/generators
+ - billing/balance
+ - billing/balance_utils
+ - billing/bcl/src
+ - billing/contract_iface
+ - billing/contrib/mdswrapper/src
+ - billing/contrib/yutil/src
+ - billing/ift/src
+ - billing/library/recipes/pg
+ - billing/log_tariffication/maintenance
+ - billing/mdh/src
+ - billing/refs/src
+ - billing/reports
+ - billing/snout/brest
+ - billing/snout/yb_snout_api
+ - billing/snout/yb_snout_proxy
+ - billing/statreports
+ - catboost/python-package/catboost
+ - cloud/ai/datasphere/lib/stt/metrics/python_package/stt_metrics
+ - cloud/ai/datasphere/lib/stt/deployment/python_package/stt_deployment
+ - cloud/ai/speechkit/stt/bin/data_pipeline/select_records_split_for_markup
+ - cloud/ai/speechkit/stt/bin/data_scripts/migrations/ASREXP-378/missing_tags_and_records_fix
+ - cloud/ai/speechkit/stt/bin/data_scripts/records/download_records
+ - cloud/ai/speechkit/stt/bin/data_scripts/tags/calculate_tags_statistics
+ - cloud/ai/speechkit/stt/bin/eval/configure_evaluations_launcher
+ - cloud/ai/speechkit/stt/bin/experiments/libri_speech_mer_pipeline/run_markup_sbs
+ - cloud/ai/speechkit/stt/bin/tmp/ASREXP_778/evaluate
+ - cloud/ai/speechkit/stt/bin/tmp/ASREXP_778/receive_submission
+ - cloud/ai/speechkit/stt/lib/data/model
+ - cloud/ai/speechkit/stt/lib/data/ops
+ - cloud/ai/speechkit/stt/lib/data_pipeline/files
+ - cloud/ai/speechkit/stt/lib/data_pipeline/honeypots
+ - cloud/ai/speechkit/stt/lib/data_pipeline/import_data/records
+ - cloud/ai/speechkit/stt/lib/data_pipeline/import_data/voicetable
+ - cloud/ai/speechkit/stt/lib/data_pipeline/join
+ - cloud/ai/speechkit/stt/lib/data_pipeline/markup_cost
+ - cloud/ai/speechkit/stt/lib/data_pipeline/markup_params
+ - cloud/ai/speechkit/stt/lib/data_pipeline/markup_quality
+ - cloud/ai/speechkit/stt/lib/data_pipeline/obfuscate
+ - cloud/ai/speechkit/stt/lib/data_pipeline/records_splitting
+ - cloud/ai/speechkit/stt/lib/data_pipeline/select_records_joins
+ - cloud/ai/speechkit/stt/lib/data_pipeline/toloka
+ - cloud/ai/speechkit/stt/lib/data_pipeline/transcription_tasks
+ - cloud/ai/speechkit/stt/lib/eval
+ - cloud/ai/speechkit/stt/lib/experiments
+ - cloud/ai/speechkit/stt/lib/text/cluster_references
+ - cloud/ai/speechkit/stt/lib/text/text_comparison_stop_words
+ - cloud/ai/speechkit/stt/lib/tmp/ASREXP_778
+ - cloud/ai/speechkit/stt/lib/utils/arcadia
+ - cloud/ai/speechkit/stt/lib/utils/s3
+ - cloud/bitbucket/python-common
+ - cloud/gauthling/auth_token_python/lib
+ - cloud/gauthling/gauthling_daemon/lib
+ - cloud/gauthling/gauthling_daemon_mock/lib
+ - cloud/gauthling/yc_auth/lib
+ - cloud/gauthling/yc_auth_tornado/lib
+ - cloud/gauthling/yc_requests/lib
+ - cloud/mdb/dbaas-internal-api-image/dbaas_internal_api/utils/dataproc_joblog
+ - comdep_analytics/telephony
+ - crowdsourcing/thirium-mitm-proxy
+ - cv/cbir_search/onto_validation/grep_onto_state
+ - cv/imageproc/faces/video_face_recognition/face_recognition_stream_viewer
+ - cv/imgclassifiers/danet/scripts
+ - cv/imgclassifiers/framework/stat
+ - datacloud/ml_utils/grid_search_wrapper/nirvana_cube
+ - datacloud/stability
+ - dict/lm/ngrams/lib/build_ngrams
+ - dict/misspell/python/metrics
+ - dict/misspell/python/misspell
+ - dict/mt/analytics/metrics/quality/mt/stupids/vh/save_honeypots
+ - dict/mt/analytics/metrics/quality/mt/stupids/vh/stupids_metric
+ - dict/mt/analytics/metrics/quality/mt/stupids/vh/stupids_metric_copying
+ - dict/mt/analytics/metrics/quality/mt/stupids/vh/stupids_metric_over_under
+ - dict/mt/analytics/metrics/quality/mt/stupids/vh/utils
+ - dict/mt/benchmarks/tfnn
+ - dict/mt/eval/eval_viewer/lib/util/rich_traceback
+ - dict/mt/eval/monitoring/gather_translation_problem_stats
+ - dict/mt/eval/monitoring/run_monitoring
+ - dict/mt/localization_proxy
+ - dict/mt/logs/vh
+ - dict/mt/make/db
+ - dict/mt/make/modules/corpus
+ - dict/mt/make/modules/fallback_classifier
+ - dict/mt/make/modules/filter
+ - dict/mt/make/modules/lang_detector
+ - dict/mt/make/modules/parallel_classifier
+ - dict/mt/make/modules/search_suggest
+ - dict/mt/make/modules/sentence_breaker
+ - dict/mt/make/modules/tfnn
+ - dict/mt/make/modules/token
+ - dict/mt/make/modules/torch
+ - dict/mt/make/modules/translit
+ - dict/mt/make/modules/util
+ - dict/mt/make/modules/voc
+ - dict/mt/make/tools/build_prob_dict
+ - dict/mt/make/tools/corpus_classifier
+ - dict/mt/make/tools/filter_corpus_by_rules
+ - dict/mt/make/tools/filter_mono
+ - dict/mt/make/tools/filter_pt
+ - dict/mt/make/tools/filter_toksent
+ - dict/mt/make/tools/generate_tfnn_lm
+ - dict/mt/make/tools/jamo_tool/lib/jamo
+ - dict/mt/make/tools/make_lm
+ - dict/mt/make/tools/mt_release
+ - dict/mt/make/tools/replace_bad_chars
+ - dict/mt/make/tools/tfnn/average_npz
+ - dict/mt/make/tools/tfnn/ckpt_reformator
+ - dict/mt/make/tools/tfnn/compare_npz
+ - dict/mt/make/tools/tfnn/convert_tfnn_to_mtd
+ - dict/mt/make/tools/translate_mtd_in_nirvana
+ - dict/mt/make/tools/translate_mtd_to_pack
+ - dict/mt/make/tools/translate_tfnn
+ - dict/mt/make/tools/translate_with_hop
+ - dict/mt/make/tools/update_testsets
+ - dict/mt/make/tools/yt_transform
+ - dict/mt/mtdict/make/definitions/vh/blocks
+ - dict/mt/tools/mobile/build_neural_package
+ - dict/mt/tools/suggest_alternatives_recall_calculator
+ - dict/ontodb
+ - direct/infra/resmon/dt-resmon-yasm
+ - distribution_interface/backend/backend/acts/migrations
+ - distribution_interface/backend/backend/audi/migrations
+ - distribution_interface/backend/backend/autogen/migrations
+ - distribution_interface/backend/backend/basic_stats/migrations
+ - distribution_interface/backend/backend/blob/migrations
+ - distribution_interface/backend/backend/contract/migrations
+ - distribution_interface/backend/backend/dashboard/migrations
+ - distribution_interface/backend/backend/didict/migrations
+ - distribution_interface/backend/backend/distribution/migrations
+ - distribution_interface/backend/backend/idm/migrations
+ - distribution_interface/backend/backend/intake/migrations
+ - distribution_interface/backend/backend/intermediate_models/migrations
+ - distribution_interface/backend/backend/kladr/migrations
+ - distribution_interface/backend/backend/multistate/migrations
+ - distribution_interface/backend/backend/product/migrations
+ - distribution_interface/backend/backend/razlomon/migrations
+ - distribution_interface/backend/backend/self_employed/migrations
+ - distribution_interface/backend/backend/signup/migrations
+ - distribution_interface/backend/backend/users/migrations
+ - dj/services/mail/sr/viewer
+ - dj/services/video/viewer/viewer
+ - dj/tools/train/recommender_config/basic_features
+ - dj/tools/train/recommender_config/cf_sharp
+ - dj/tools/train/recommender_config/mixigen
+ - drive/backend/client
+ - drive/qatool
+ - drive/tests/functional
+ - drive/tools/sox_audit
+ - entity/ontodb/robot/tools/send_daily_code_freshness_solomon_sensors/lib
+ - entity/quality/ontodb/ontodb_cleaner/verdicts_creator/lib/ut
+ - entity/recommender/nirvana/autodump
+ - entity/recommender/nirvana/operations/whereami
+ - entity/recommender/viewer
+ - entity/ugc/db/benchmark/generate_ammo
+ - entity/ugc/tools/nirvana/appsearch_activity
+ - entity/ugc/tools/nirvana/ugcdb1_process/backup
+ - entity/ugc/tools/nirvana/ugcdb1_process/process_profiles
+ - entity/ugc/tools/nirvana/ugcdb1_process/proxy_backups
+ - entity/ugc/tools/nirvana/ugcdb1_process/ydb_commit
+ - entity/ugc/tools/nirvana/ugcdb2_process/proxy
+ - extsearch/audio/deepdive/graphs/operations
+ - extsearch/audio/deepdive/graphs/run_full
+ - extsearch/audio/deepdive/tools/deep_dive_release/bin
+ - extsearch/audio/deepdive/tools/deep_dive_rollback/bin
+ - extsearch/collections/tools/polirovka/collections_gui
+ - extsearch/geo/tools/rubric_synonyms/automation
+ - extsearch/geo/tools/rubric_synonyms_mining/metasearch
+ - extsearch/geo/tools/similar_orgs/acceptance/similars_search
+ - extsearch/images/functionality/monit_robot_process/monit_client
+ - extsearch/images/functionality/rock/abgame_server
+ - extsearch/images/ganart/viewer
+ - extsearch/images/robot/index/testlib
+ - extsearch/images/robot/library/pyserver
+ - extsearch/images/robot/shard_tool
+ - extsearch/images/robot/taas/admin
+ - extsearch/images/robot/taas/client
+ - extsearch/images/robot/taas/daemon
+ - extsearch/images/robot/taas/dashboard
+ - extsearch/images/robot/thumbrella/viewer
+ - extsearch/images/robot/upbase/upbase_v1/lib
+ - extsearch/images/robot/upbase/upbase_v1/runner
+ - extsearch/images/robot/upbase/upbase_v1/upbase_queue
+ - extsearch/images/robot/upbase/upbase_v1/viewer
+ - extsearch/images/robot/viewers/docid_viewer/web
+ - extsearch/images/robot/viewers/images_dashboard
+ - extsearch/images/tools/nirvana/common
+ - extsearch/images/tools/nirvana/rim/evaluation
+ - extsearch/images/tools/nirvana/rim/serps_compare
+ - extsearch/images/tools/nirvana/sr_formula/get_pool_id
+ - extsearch/images/tools/nirvana/sr_formula/learn_sr
+ - extsearch/video/quality/recommender/1492/america/ckmeans
+ - extsearch/video/quality/recommender/1492/america/scripts/cluster
+ - extsearch/video/quality/recommender/1492/america/scripts/gen_config
+ - extsearch/video/quality/recommender/1492/america/train
+ - extsearch/video/quality/recommender/1492/cuba/scripts/gen_config
+ - extsearch/video/quality/recommender/1492/cuba/scripts/gen_indexattr
+ - extsearch/video/quality/recommender/1492/cuba/scripts/get_path_ns
+ - extsearch/video/quality/recommender/1492/cuba/scripts/prep_models
+ - extsearch/video/quality/recommender/1492/cuba/scripts/upload_index_files
+ - extsearch/video/quality/recommender/1492/cuba/test/tools/cm_runner
+ - extsearch/video/quality/recommender/1492/cuba/train
+ - extsearch/video/quality/recommender/1492/scripts/delete_prev
+ - extsearch/video/quality/recommender/1492/scripts/get_ext_data
+ - extsearch/video/quality/recommender/1492/scripts/upload_ns
+ - extsearch/video/quality/recommender/train_dssm
+ - extsearch/video/recommender/viewer/viewer
+ - extsearch/video/robot/avatars/delete
+ - extsearch/video/robot/avatars/merge
+ - extsearch/video/robot/avatars/upload
+ - extsearch/video/robot/frames/convert_portion
+ - extsearch/video/sepe/get_latest_resource
+ - gencfg/custom_generators/balancer_gencfg
+ - gencfg/gaux
+ - geobase/builder/ut/isp_checker
+ - geoproduct/advert_ranking/query_type_classifier_learn
+ - geoproduct/geocrm_search/data_import
+ - geoproduct/geocrm_search/engine
+ - geoproduct/geocrm_search/orm
+ - geosuggest/prepare_data/toponyms_factor_mapper
+ - haas/eng_topology/lib/struct
+ - haas/oebs_sync/oebs_lib
+ - health/turbo_articles/parser/libs
+ - health/turbo_articles/parser/manual_tests
+ - health/yamd/libs/cross_links/tests/common
+ - htf/predictions/common_data/blackbox_markup_puids
+ - infra/awacs/tools/awacsalerting/src
+ - infra/awacs/tools/awacscertsctl
+ - infra/awacs/tools/awacsemtool
+ - infra/awacs/tools/awacslinter
+ - infra/awacs/tools/awacsls
+ - infra/awacs/tools/awacsstatctl
+ - infra/awacs/tools/awacstoolslib
+ - infra/awacs/tools/awacszerodiffer
+ - infra/awacs/vendor/awacs
+ - infra/deploy_export_stats/contrib/thrift
+ - infra/deploy_export_stats/src
+ - infra/heartbeat-client
+ - infra/iss_local/iss
+ - infra/nanny/clusterpb
+ - infra/nanny/instancectl/src
+ - infra/nanny/its_client
+ - infra/nanny/nanny_rpc_client
+ - infra/nanny/sepelib/src
+ - infra/nanny/vendor/object-validator
+ - infra/nanny/vendor/porto_python
+ - infra/qyp/deploy
+ - infra/qyp/integration_tests
+ - infra/qyp/novnc_server/contrib/websockify
+ - infra/qyp/vmproxy/src
+ - infra/vmagent/src/vmagent_pb
+ - infra/wall-e/agent
+ - infra/wall-e/client
+ - infra/wall-e/sdk
+ - infra/walle/server/tests/lib
+ - infra/ya_salt/vendor/salt
+ - infra/yp/monitoring/pods_with_bad_ip
+ - infra/yp/monitoring/tmp_account_monitoring
+ - infra/yp_quota_distributor/app
+ - intranet/audit/src
+ - intranet/crt
+ - intranet/dogma/dogma/api
+ - intranet/dogma/dogma/api_v4
+ - intranet/dogma/dogma/core
+ - intranet/dogma/dogma/dashboard
+ - intranet/femida/src/candidates/migrations
+ - intranet/femida/src/communications/migrations
+ - intranet/femida/src/interviews/migrations
+ - intranet/femida/src/offers/migrations
+ - intranet/femida/src/permissions/migrations
+ - intranet/femida/src/professions/migrations
+ - intranet/femida/src/users/migrations
+ - intranet/femida/src/vacancies/migrations
+ - intranet/hidereferer/src
+ - intranet/magiclinks/src
+ - intranet/paste/src
+ - intranet/table_flow/src/rules/migrations
+ - intranet/table_flow/src/users/migrations
+ - intranet/webauth/lib
+ - intranet/webauth/tests
+ - intranet/wiki/tests
+ - intranet/yandex_directory/src
+ - ipreg/geogen-www/app/slow_search
+ - ipreg/python/ipreg-diff/executive
+ - ipreg/python/util
+ - keyboard/dict/learn_transfemes/pt_converter
+ - keyboard/dict/learn_transfemes/word_aligner
+ - keyboard/dict/lemmer_filter
+ - keyboard/dict/nirvana
+ - keyboard/dict/train_ranker/filter_samples
+ - keyboard/dict/train_ranker/filter_sentences
+ - keyboard/grid/tap_model/python/annotate
+ - keyboard/proxy/images
+ - library/python/bclclient
+ - library/python/blackbox
+ - library/python/clickhouse_client
+ - library/python/dir-sync
+ - library/python/django-idm-api
+ - library/python/django-multic
+ - library/python/django_abc_data
+ - library/python/django_alive
+ - library/python/django_mds
+ - library/python/django_pgaas
+ - library/python/django_russian
+ - library/python/django_template_common
+ - library/python/django_tools_log_context
+ - library/python/dssclient
+ - library/python/filelock
+ - library/python/golovan_stats_aggregator
+ - library/python/granular_settings
+ - library/python/ids
+ - library/python/intrasearch_fetcher
+ - library/python/metrics_framework
+ - library/python/oauth/example
+ - library/python/pytest
+ - library/python/python-django-yauth
+ - library/python/refsclient
+ - library/python/solomon
+ - library/python/startrek_python_client
+ - library/python/statface_client
+ - library/python/tools_mongodb_cache
+ - library/python/tvm2
+ - library/python/windows
+ - library/python/yandex_tracker_client
+ - library/python/ylog
+ - library/python/yt
+ - logbroker/admin
+ - logbroker/mops
+ - logbroker/tools/lb-cm
+ - logbroker/tools/manual/send_projections_to_solomon
+ - logbroker/tools/manual/test_front
+ - mail/contrib/aioconsole
+ - mail/contrib/aiohttp-swagger
+ - mail/contrib/asyncpgsa
+ - mail/contrib/python/bottle
+ - mail/contrib/python/exchangelib
+ - mail/contrib/python/ntlm-auth
+ - mail/contrib/python/python-ipy
+ - mail/contrib/python/vobject
+ - mail/contrib/tatsu
+ - mail/python/tvm_requests
+ - mail/xiva/core
+ - mapreduce/library/mr_packet_lib/mr_packet_lib
+ - mapreduce/yt/python
+ - maps/contrib/pylibs/googlemaps
+ - maps/contrib/pylibs/mox
+ - maps/goods/contrib/pylibs/xlrd
+ - maps/pylibs/utils/lib
+ - maps/pymod/yandex/maps/test_utils
+ - maps/renderer/designs_config/libs/pymod
+ - maps/routing/router/regression/gen-stopwatch-ammo-mt
+ - maps/streetview/backoffice/lib
+ - maps/streetview/backoffice/tools/cut_images_yt
+ - maps/streetview/backoffice/tools/detect_session_privacy
+ - maps/streetview/backoffice/tools/grid
+ - maps/streetview/backoffice/tools/image_checker/python
+ - maps/streetview/backoffice/tools/pano_snippets_updater
+ - maps/streetview/backoffice/tools/set_not_uploaded
+ - maps/streetview/backoffice/tools/source_validator
+ - maps/wikimap/mapspro/services/tasks/fastcgi/bin
+ - maps/wikimap/mapspro/services/tasks/fastcgi/lib
+ - maps/wikimap/mapspro/services/tasks/fastcgi/modules
+ - market/analytics/adfox_banners
+ - market/dynamic_pricing/deprecated/autostrategy_bounds/lib
+ - market/dynamic_pricing/deprecated/autostrategy_export_data_to_axapta/lib
+ - market/dynamic_pricing/deprecated/autostrategy_filter_data_for_axapta/lib
+ - market/dynamic_pricing/deprecated/autostrategy_prices_quick_change/lib
+ - market/dynamic_pricing/deprecated/autostrategy_stats_raw/lib
+ - market/dynamic_pricing/deprecated/autostrategy_update_current_prices/lib
+ - market/dynamic_pricing/deprecated/tests/lib
+ - market/dynamic_pricing/deprecated/utilities/lib
+ - market/dynamic_pricing/price_collector/bin
+ - market/dynamic_pricing/price_collector/lib
+ - market/dynamic_pricing/tools/delivery_checker/bin
+ - market/dynamic_pricing/tools/hide_rules_exceptions/bin
+ - market/dynamic_pricing/tools/kvi_evaluation/bin
+ - market/forecaster/lite/core
+ - market/guru-models-dumper/utils
+ - market/library/cpp_meta_parser
+ - market/report/lite/core
+ - market/sre/services/mcm/mcm
+ - market/sre/tools/etcd/prometheus_graphite_bridge/prometheus_client
+ - market/tools/develop/report_deploy
+ - market/tools/resource_monitor/lib
+ - market/ugc/daemon/ht
+ - market/yamarec/edera/edera
+ - mds/cocaine/burlak/src
+ - mds/cocaine/darkvoice/src
+ - mds/cocaine/framework/python
+ - mds/cocaine/tools
+ - mds/eblob_kit
+ - mds/elliptics/bindings/python
+ - mds/elliptics/recovery/elliptics_recovery
+ - mds/elliptics/tests/pytests
+ - mds/libs/eblob/tests/python
+ - mds/libs/jerasure/python
+ - mds/lrc-tools
+ - mds/mastermind/common
+ - mds/mastermind/core/foreign/opster
+ - mds/mastermind/core/src
+ - mds/mastermind/flowmastermind/src
+ - mds/mastermind/job_processor
+ - mds/mastermind/jobs_integration_tests/src
+ - mds/mastermind/minion
+ - mds/mastermind/monolith
+ - mds/mastermind/scheduler
+ - mds/nscfg/lib
+ - metrika/admin/python/cms/frontend/base
+ - metrika/core/programs/mobile_startup_admin/base
+ - metrika/pylib/auth
+ - metrika/pylib/log
+ - ml/tensorflow/tfnn/src
+ - ml/tensorflow/ytensorflow/bin/ytf-local-inference
+ - ml/tensorflow/ytensorflow/bin/ytf-yt-inference
+ - ml/tensorflow/ytensorflow/ytensorflow/build
+ - mlp/mail/smart_reply/gen_finder/replacer
+ - mlp/mail/smartcompose/dev/SC-210/get_stats
+ - mlp/mail/smartcompose/dev/SC-213
+ - mlp/mail/smartcompose/dev/alsafr_game
+ - mlp/mail/smartcompose/dev/recrypt
+ - mlp/mail/smartcompose/dev/request_entropy
+ - mlp/mail/smartcompose/gen_dssm_config
+ - mlp/mail/smartcompose/nirvana_graphs/train_catboost
+ - mlp/mail/smartcompose/tools/calc_matches_runtime
+ - mlp/mail/smartcompose/tools/calc_matches_translate
+ - mlp/mail/smartcompose/tools/make_cb_pool
+ - mlp/mail/smartcompose/tools/make_letters_split
+ - mlp/mail/smartcompose/tools/make_letters_split_v2
+ - mlp/mail/smartcompose/tools/upload_metrics_to_stat
+ - mlp/mail/smartsubject/juggler_bundle
+ - mlp/mail/smartsubject/nirvana_graphs/train_catboost
+ - mlp/mail/smartsubject/tools/calc_metrics
+ - mlp/mail/smartsubject/tools/upload_metrics
+ - mlp/mail/tools/clean_mail_text
+ - mlp/mail/tools/recrypt
+ - modadvert/oneshot/MODADVERT-589
+ - modadvert/oneshot/MODADVINCIDENTS-77.2
+ - modadvert/oneshot/MODDEV-2565
+ - modadvert/oneshot/SUPERMODRELEASE-57/migration
+ - mssngr/botplatform/src/bots/core/migrations
+ - mssngr/botplatform/src/vins_core
+ - mssngr/geobot/clients
+ - mssngr/geobot/postgresql
+ - mssngr/geobot/server
+ - mssngr/tools/console_client
+ - mssngr/tools/pyamb
+ - mssngr/tools/stress/uniproxy
+ - nirvana/libs/nirvana_graph_decomposition_util
+ - nirvana/libs/simple_python_nirvana_api
+ - nirvana/naive_valkyrja/tool
+ - nirvana/valhalla/src
+ - nirvana/valhalla/tests_lib/cross_interface_tests_lib
+ - nirvana/valhalla/tests_lib/integration_tests_lib
+ - nirvana/valhalla_util/src
+ - noc/aioalexandria
+ - noc/annlib/contrib/valkit
+ - noc/checkist/clients/python/swagger_client
+ - noc/hbf-server
+ - noc/soft_pingers
+ - noc/yanet/yanetagent
+ - ofd/notifier/server/blueprints/monitoring
+ - ofd/runbackproxy/bin
+ - ofd/runbackproxy/lib
+ - offline_data/task_switch
+ - orgvisits/library/python/toloka
+ - orgvisits/metrics/toloka/preparations
+ - orgvisits/toloka/taskuploader
+ - orgvisits/viewers/geotrack/backend
+ - passport/backend/adm_api/common
+ - passport/backend/adm_api/settings
+ - passport/backend/adm_api/tests/views
+ - passport/backend/api
+ - passport/backend/core/yasms/test
+ - passport/backend/library/historydbloader
+ - passport/backend/logbroker_client/core
+ - passport/backend/meltingpot/core/meltingpot
+ - passport/backend/configs/golovan
+ - passport/backend/contrib/cassandra
+ - passport/backend/contrib/django_contrib_comments
+ - passport/backend/contrib/elementflow
+ - passport/backend/contrib/formencode
+ - passport/backend/contrib/gsm0338
+ - passport/backend/contrib/nose_parameterized
+ - passport/backend/contrib/oauthlib
+ - passport/backend/contrib/py-radix
+ - passport/backend/contrib/py2casefold
+ - passport/backend/contrib/pyisemail
+ - passport/backend/tools/rm_attrs
+ - payplatform/balance_support_dev/dev_kpi_counter
+ - payplatform/balance_support_dev/support_kpi_counter
+ - payplatform/findep/findepstbot
+ - payplatform/findep/stcreate
+ - payplatform/logs/log_enrichment/daily_merger
+ - payplatform/logs/log_enrichment/tool
+ - payplatform/nirvana/check_export_queue
+ - payplatform/nirvana/close_fcm_task
+ - payplatform/nirvana/filter_cash_register_csv_file
+ - payplatform/nirvana/lib
+ - payplatform/nirvana/merge_nirvana_task_statuses
+ - payplatform/nirvana/wait_fcm_task
+ - payplatform/nirvana/wiki_post_link
+ - payplatform/tools/draw_microphase_monitoring
+ - payplatform/tools/draw_mnclose_graph
+ - payplatform/tools/fcm_mnclose_gantt_and_visualisation
+ - payplatform/tools/generate_mnclose_percentils
+ - payplatform/tools/kkt/commands_parallel_executor
+ - payplatform/tools/kkt/resend_analytics
+ - payplatform/tools/lib
+ - payplatform/tools/old_support_stats
+ - payplatform/tools/support_stats
+ - payplatform/tools/user_analytics_tool
+ - paysys/pylibrary/pipelines-api
+ - paysys/pylibrary/solomon_client
+ - paysys/pylibrary/timeline-events
+ - plus/cobra/cobra/migrations
+ - plus/gift/gift/migrations
+ - plus/landing_backend/landing/migrations
+ - plus/landing_backend/notification/migrations
+ - plus/oneyear/my2020/migrations
+ - plus/oneyear/navi_music/migrations
+ - quality/functionality/chats/floyd/src/floyd/common
+ - quality/functionality/chats/loadtest
+ - quality/functionality/content_plugins/scripts/lib
+ - quality/functionality/content_plugins/scripts/process_exports
+ - quality/functionality/content_plugins/scripts/regular_updates
+ - quality/functionality/content_plugins/scripts/tools/deps
+ - quality/functionality/dialogs/tools/filter_by_regexp_mr
+ - quality/functionality/entity_search/factqueries/release/scripts/build_facts_mr
+ - quality/functionality/entity_search/factqueries/table_facts/russian_holidays/build_source
+ - quality/functionality/entity_search/factqueries/table_facts/russian_holidays/update_holidays
+ - quality/functionality/entity_search/factqueries/tools/acceptance/generate_diff
+ - quality/functionality/entity_search/factqueries/tools/beta/common
+ - quality/functionality/entity_search/factqueries/tools/dsat/dialogs/build_queryminer_results
+ - quality/functionality/entity_search/factqueries/tools/dsat/e2e_source_metrics
+ - quality/functionality/entity_search/factqueries/tools/dump_possible_answers
+ - quality/functionality/entity_search/factqueries/tools/fetch_serpdata/lib
+ - quality/functionality/parsepl/server/apps/storage/migrations
+ - quality/functionality/rtx/nirvana/reactor
+ - quality/functionality/rtx/notebooks
+ - quality/functionality/rtx/scripts/oo-toloka
+ - quality/functionality/rtx/scripts/plot
+ - quality/functionality/rtx/scripts/social-serp/bell
+ - quality/functionality/rtx/scripts/social-serp/cleanweb
+ - quality/functionality/rtx/scripts/social-serp/toloka
+ - quality/functionality/rtx/scripts/sup-plot
+ - quality/functionality/rtx/trends/bot/rec-bot
+ - quality/functionality/rtx/trends/bot/suspect-trends
+ - quality/functionality/rtx/trends/bot/trends-for-morda
+ - quality/functionality/scripts/psuh/HWPushTool
+ - quality/functionality/turbo/rss/parser_job/lib
+ - quality/functionality/turbo/rss/rss_to_serp
+ - quality/functionality/turbo/zen_saas_process
+ - quality/legacy_crons/mobile_apps_info_to_ferryman
+ - quality/logs/baobab/examples/python/nile_libra_wizard_clicks_dynamic_and_dwelltime
+ - quality/logs/baobab/examples/python/redir_log_map_yt_clicks
+ - quality/logs/baobab/examples/python/uslugi_clicks_with_weak_ties
+ - quality/logs/scarab/logsng2scarab
+ - quality/neural_net/tf_model_lib/lib
+ - quality/neural_net/tf_model_lib/tools/edik_standartize
+ - quality/neural_net/tf_model_lib/tools/serialize_n_batch
+ - quality/relev_tools/lboost_ops/core_maker
+ - quality/relev_tools/lboost_ops/mr_index_nirvana
+ - quality/relev_tools/lboost_ops/nirvana/api
+ - quality/relev_tools/web_learn/stream_size_opt/graphs/lib
+ - quality/relev_tools/web_learn/stream_size_opt/opt_with_goal_dbd/lib
+ - quality/short_beak/build_db
+ - quality/short_beak/content_db_lib
+ - quality/short_beak/manip_db
+ - quality/short_beak/prepare_db_source
+ - quality/short_beak/update_content
+ - quality/short_beak/upload_trie
+ - quality/short_beak/wui_new/context_lib
+ - quality/tools/find_word
+ - quality/user_sessions/createlib/qb3/tools/merge
+ - quality/user_sessions/data_com/merge_details_to_dataset
+ - quality/user_sessions/data_com/yt_configuration
+ - quality/user_sessions/data_com/yt_tables
+ - quality/user_sessions/libra/examples/libra_performance
+ - quality/user_sessions/reactor/us_processes
+ - quality/user_sessions/reactor/us_reactor/lib
+ - quality/user_sessions/reactor/us_reactor/tools/change_timeline
+ - quality/user_sessions/rem_processes
+ - quality/user_sessions/tools/yt_combine_chunks
+ - quality/user_sessions/tools/yt_pack
+ - quality/user_sessions/tools/yt_transfer_yt
+ - razladki/razladki
+ - rem/python
+ - robot/catfilter/viewer
+ - robot/fast_ban/fill_ban
+ - robot/kwyt/scripts/convert
+ - robot/kwyt/viewers/kwyt
+ - robot/lemur/tools/add_formula_to_dir
+ - robot/lemur/tools/ban_detector/checker
+ - robot/lemur/tools/ban_detector/exporter
+ - robot/lemur/tools/ban_detector/forced_host_headers_tool
+ - robot/lemur/tools/ban_detector/postman
+ - robot/lemur/tools/ban_detector/zora_hosts
+ - robot/lemur/tools/count_candidates_top
+ - robot/lemur/tools/depleted_queues
+ - robot/lemur/tools/draw_quality_metrics
+ - robot/lemur/tools/fetch_robot_metrics
+ - robot/lemur/tools/googleapi_key_checker
+ - robot/lemur/tools/histo_db_updater
+ - robot/lemur/tools/host_sample_limiter
+ - robot/lemur/tools/process_logs_new
+ - robot/lemur/tools/ranks_stat
+ - robot/lemur/tools/stage_durations
+ - robot/lemur/tools/stg_notifier
+ - robot/metrics/actuality/nirvana/generate
+ - robot/metrics/actuality/stat_report
+ - robot/metrics/speed_sbr/pylib
+ - robot/samovar/tools/features/run_samovar_rank_graph
+ - robot/saved_copy/tools/phantom_ammo_generator
+ - robot/zora/tools/digger
+ - rt-research/multik/pylib/operations_queue/migrations
+ - rt-research/multik/server/multik/migrations
+ - rtc/recorder
+ - rtmapreduce/config/presets
+ - rtmapreduce/config/src
+ - samogon
+ - sandbox/common
+ - sandbox/fileserver
+ - sandbox/projects/AnnotateFML2575Comments
+ - sandbox/projects/AntirobotCollectFeatures
+ - sandbox/projects/AutocheckDiff
+ - sandbox/projects/BackupMongo
+ - sandbox/projects/BackupMongoManyDatabases
+ - sandbox/projects/BnoNewsBuild
+ - sandbox/projects/BnoRecipesBuild
+ - sandbox/projects/Bolver
+ - sandbox/projects/BroadmatchBuildMRCatalogia
+ - sandbox/projects/BroadmatchOverdraft
+ - sandbox/projects/BuildAddrSnippetData
+ - sandbox/projects/BuildAuroraBundle
+ - sandbox/projects/BuildBalancerConfigGenerator
+ - sandbox/projects/BuildBkhtTickersApp
+ - sandbox/projects/BuildBlockstatDict
+ - sandbox/projects/BuildClustermaster
+ - sandbox/projects/BuildClustermasterDeb
+ - sandbox/projects/BuildConfigGenerator
+ - sandbox/projects/BuildConfigGeneratorRepo
+ - sandbox/projects/BuildConfigGeneratorService
+ - sandbox/projects/BuildCoverage
+ - sandbox/projects/BuildCustomNginx
+ - sandbox/projects/BuildCvdupBundle
+ - sandbox/projects/BuildCyHash
+ - sandbox/projects/BuildDBMergeTool
+ - sandbox/projects/BuildDockerImage
+ - sandbox/projects/BuildDockerImageV6
+ - sandbox/projects/BuildFilterTrie
+ - sandbox/projects/BuildGGSConfig
+ - sandbox/projects/BuildGemini
+ - sandbox/projects/BuildGreenbox
+ - sandbox/projects/BuildHighlanderDataFull
+ - sandbox/projects/BuildHighlanderDataUpdate
+ - sandbox/projects/BuildIcookieDaemon
+ - sandbox/projects/BuildInfectedSerpMasks
+ - sandbox/projects/BuildJavaJDK
+ - sandbox/projects/BuildKwrich
+ - sandbox/projects/BuildMatrixnet
+ - sandbox/projects/BuildMemcached
+ - sandbox/projects/BuildMirrorScheduler
+ - sandbox/projects/BuildMonsysDC
+ - sandbox/projects/BuildMonsysDCWithVenv
+ - sandbox/projects/BuildNginx
+ - sandbox/projects/BuildNginxCplb
+ - sandbox/projects/BuildOntodbFixesSticky
+ - sandbox/projects/BuildPackagesForRem
+ - sandbox/projects/BuildPerconaXtraBackup
+ - sandbox/projects/BuildPerconaXtradbCluster
+ - sandbox/projects/BuildProjectStubNodejs
+ - sandbox/projects/BuildPumpkinIndex
+ - sandbox/projects/BuildPythonBundle
+ - sandbox/projects/BuildRazladki
+ - sandbox/projects/BuildReactUi
+ - sandbox/projects/BuildReadahead
+ - sandbox/projects/BuildReplicamap
+ - sandbox/projects/BuildSemanticMfVerifier
+ - sandbox/projects/BuildSemanticPublicApi
+ - sandbox/projects/BuildSemanticYtMapper
+ - sandbox/projects/BuildSuggest
+ - sandbox/projects/BuildSuggestForAll
+ - sandbox/projects/CalcCoverage
+ - sandbox/projects/CalculateMatrixnetModelsAndPredictions
+ - sandbox/projects/CheckRazladkaParseLib
+ - sandbox/projects/ClickdaemonKeygen
+ - sandbox/projects/CollectAntirobotData
+ - sandbox/projects/CompareEstFeaturesOutputs
+ - sandbox/projects/CompareGeosearchOutputs
+ - sandbox/projects/CompareGeosearchReqAnsLogs
+ - sandbox/projects/CompareMrProtoPools
+ - sandbox/projects/CompareProfileStats
+ - sandbox/projects/CopyDataRuntime
+ - sandbox/projects/CreateJavaJDK
+ - sandbox/projects/CreateUkropBranch
+ - sandbox/projects/DeployNannyReleaseRequests
+ - sandbox/projects/DeployUkrop
+ - sandbox/projects/DrawFreshnessPlots
+ - sandbox/projects/EntitySearch/AcceptanceEntitysearchBinary
+ - sandbox/projects/EntitySearch/common
+ - sandbox/projects/EntitySearch/get_prod_data_version
+ - sandbox/projects/EntitySearch/ner_data_build
+ - sandbox/projects/EntitySearch/ner_run_release_task
+ - sandbox/projects/EntitySearchDataBuild
+ - sandbox/projects/EntitySearchLogs
+ - sandbox/projects/GenerateLinearModelBinaryDump
+ - sandbox/projects/GenerateSportDeviceIds
+ - sandbox/projects/GenerateThumbDaemonRequests
+ - sandbox/projects/HttpGeobase
+ - sandbox/projects/NoapacheupperTests
+ - sandbox/projects/PSUtil
+ - sandbox/projects/ReleaseSdchDictionaryPack
+ - sandbox/projects/RunNirvanaOnlineLearning
+ - sandbox/projects/RunRemJobPacket
+ - sandbox/projects/RunScript
+ - sandbox/projects/SOC/YtSecretsDigger
+ - sandbox/projects/SOC/YtSecretsSearch
+ - sandbox/projects/SecDis
+ - sandbox/projects/Strm
+ - sandbox/projects/SupRegistrationLoad
+ - sandbox/projects/Superdups/BuildSuperdupsPackage
+ - sandbox/projects/TaxiGraphUpload
+ - sandbox/projects/TestConfigGenerator
+ - sandbox/projects/TestCvdupOnSynthetic
+ - sandbox/projects/TouchBuildPumpkinSerp
+ - sandbox/projects/Travel
+ - sandbox/projects/UrlsByShowCounters
+ - sandbox/projects/VerticalsSecurity
+ - sandbox/projects/VideoFreshReleaseQueryMarksTrie
+ - sandbox/projects/VideoSearch
+ - sandbox/projects/Wizards
+ - sandbox/projects/YaTestParent
+ - sandbox/projects/YabsServerDBSizeCmp
+ - sandbox/projects/ab_testing
+ - sandbox/projects/addurl
+ - sandbox/projects/advq
+ - sandbox/projects/answers/BuildAnswersDjRecommender
+ - sandbox/projects/answers/BuildAnswersDjRecommenderModelsArchive
+ - sandbox/projects/antiadblock
+ - sandbox/projects/app_host/BuildAndReleaseProductionResources
+ - sandbox/projects/app_host/BuildAppHostExecutables
+ - sandbox/projects/app_host/BuildAppHostGraphNameMapping
+ - sandbox/projects/app_host/CheckGolovanSignalsQuota
+ - sandbox/projects/app_host/TestYaToolApphost
+ - sandbox/projects/arcadia
+ - sandbox/projects/autobudget/export_rm_bids
+ - sandbox/projects/autobudget/ml
+ - sandbox/projects/balancer/UpdateYastaticWikiPanels
+ - sandbox/projects/blender/commit_blender_model
+ - sandbox/projects/blender/update_blender_online_models
+ - sandbox/projects/blender/util
+ - sandbox/projects/boltalka
+ - sandbox/projects/chats/run_loadtest
+ - sandbox/projects/cloud
+ - sandbox/projects/collections
+ - sandbox/projects/common
+ - sandbox/projects/cornholio
+ - sandbox/projects/devtools/ChangesDetector
+ - sandbox/projects/direct/DirectDeploy
+ - sandbox/projects/direct/tanker_translations
+ - sandbox/projects/direct_internal_analytics
+ - sandbox/projects/distbuild
+ - sandbox/projects/dj
+ - sandbox/projects/dsearch
+ - sandbox/projects/geobase
+ - sandbox/projects/geosearch/UploadEdaWizards/PrepareEdaWizards
+ - sandbox/projects/home
+ - sandbox/projects/horizon
+ - sandbox/projects/images/CvdupAcceptanceTasks
+ - sandbox/projects/images/ImagesBuildHeaterPlan
+ - sandbox/projects/images/ImagesBuildMainIndexNightlyBinaries
+ - sandbox/projects/images/ImagesBuildMmetaHeaterPlan
+ - sandbox/projects/images/ImagesBuildSearchBinary
+ - sandbox/projects/images/ImagesBuildTagsDictFioModelsBundle
+ - sandbox/projects/images/ImagesBuildTagsDictRankingModelsBundle
+ - sandbox/projects/images/ImagesBuildTagsMMetaModelsBundle
+ - sandbox/projects/images/ImagesCheckThumbsChecksum
+ - sandbox/projects/images/ImagesCompareSearchDaemonResponses
+ - sandbox/projects/images/ImagesExamineCbirIntegrity
+ - sandbox/projects/images/ImagesExamineSpecialRequests
+ - sandbox/projects/images/ImagesGetSaasResponses
+ - sandbox/projects/images/ImagesGrayQueriesFilter
+ - sandbox/projects/images/ImagesPriemkaThumbs
+ - sandbox/projects/images/ImagesRtUltraAcceptance
+ - sandbox/projects/images/ImagesShardmapThumb
+ - sandbox/projects/images/ImagesShardmapThumbBySvn
+ - sandbox/projects/images/ImagesTagsMrIndex
+ - sandbox/projects/images/ImagesTagsMrIndexConfig
+ - sandbox/projects/images/ImagesTest
+ - sandbox/projects/images/ImagesTestMrindex
+ - sandbox/projects/images/ImagesTestMrindexMetadoc
+ - sandbox/projects/images/ImagesTestSaas
+ - sandbox/projects/images/ImagesTestSaasBasics
+ - sandbox/projects/images/ImagesUltraAcceptance
+ - sandbox/projects/images/ImagesUploadSaas
+ - sandbox/projects/images/bans/ImagesReleaseAntipirateIndexBan
+ - sandbox/projects/images/bans/ImagesReleaseAntipirateThumbBan
+ - sandbox/projects/images/bans/ImagesReleaseAntispamBan
+ - sandbox/projects/images/bans/ImagesReleaseCommercialQueryBan
+ - sandbox/projects/images/bans/ImagesReleaseCvBan
+ - sandbox/projects/images/bans/ImagesReleaseQueryUrlBan
+ - sandbox/projects/images/bans/ImagesReleaseRottenHostBan
+ - sandbox/projects/images/basesearch/ImagesRunStandaloneBasesearch
+ - sandbox/projects/images/basesearch/ImagesTestBasesearchMassif
+ - sandbox/projects/images/daemons/ImagesBuildCbirdaemon2Database
+ - sandbox/projects/images/daemons/ImagesCompareCbirdaemon2ApphostResponses
+ - sandbox/projects/images/daemons/ImagesGenerateCbirdaemon2Requests
+ - sandbox/projects/images/daemons/ImagesProdCompareRimResponses
+ - sandbox/projects/images/deployment
+ - sandbox/projects/images/devops
+ - sandbox/projects/images/embedding/ImagesRunStandaloneEDaemon
+ - sandbox/projects/images/embedding/ImagesTestEmbeddingStoragePerformance
+ - sandbox/projects/images/guppy/ImagesBuildGuppyResources
+ - sandbox/projects/images/inverted_index/ImagesRunStandalonePDaemon
+ - sandbox/projects/images/metasearch/ImagesPriemkaMiddlesearchDatabase
+ - sandbox/projects/images/polish
+ - sandbox/projects/images/prism
+ - sandbox/projects/images/resources/ImagesFetchThumbRequests
+ - sandbox/projects/images/resources/ImagesGenerateSearchDaemonsRequests
+ - sandbox/projects/images/resources/ImagesGenerateTestenvData
+ - sandbox/projects/images/resources/ImagesLoadMiddlesearchResources
+ - sandbox/projects/images/resources/ImagesLoadTestenvData
+ - sandbox/projects/images/saas_acceptance/ImagesTestRobotSaas
+ - sandbox/projects/images/tags/ImagesTagsBuildAndCommitAliceBans
+ - sandbox/projects/images/tags/ImagesTagsReleaseAliceBans
+ - sandbox/projects/images/upbase/ImagesBuildUpbaseResources
+ - sandbox/projects/images/upbase/ImagesBuildUpbaseViewerResources
+ - sandbox/projects/inventori
+ - sandbox/projects/juggler
+ - sandbox/projects/jupiter/ReleaseGeminiData
+ - sandbox/projects/jupiter/ReleaseNavsource
+ - sandbox/projects/jurassic/BuildPatchedJurassic
+ - sandbox/projects/lemur
+ - sandbox/projects/limbo
+ - sandbox/projects/logfeller/AccountSnapshot
+ - sandbox/projects/logfeller/common
+ - sandbox/projects/logs
+ - sandbox/projects/mail
+ - sandbox/projects/maps
+ - sandbox/projects/market/checkout
+ - sandbox/projects/market/contentApi
+ - sandbox/projects/market/dynamic_pricing
+ - sandbox/projects/market/ff
+ - sandbox/projects/market/front
+ - sandbox/projects/market/idx
+ - sandbox/projects/market/infra
+ - sandbox/projects/market/ir
+ - sandbox/projects/market/kombat
+ - sandbox/projects/market/lilucrm
+ - sandbox/projects/market/logistics
+ - sandbox/projects/market/mcrp/MarketMcrpAbcSync
+ - sandbox/projects/market/mcrp/MarketMcrpAbcTopServicesSync
+ - sandbox/projects/market/mcrp/MarketMcrpReport
+ - sandbox/projects/market/monitoring
+ - sandbox/projects/market/multitesting
+ - sandbox/projects/market/promocoordinator
+ - sandbox/projects/market/qa
+ - sandbox/projects/market/report
+ - sandbox/projects/market/resource_monitor
+ - sandbox/projects/market/sre
+ - sandbox/projects/market/stock_storage
+ - sandbox/projects/market/tpl
+ - sandbox/projects/masstransit/MapsBicycleRouterShooting
+ - sandbox/projects/masstransit/MapsMasstransitDataDeploymentStatistics
+ - sandbox/projects/masstransit/MapsMasstransitMtinfoShooting
+ - sandbox/projects/masstransit/MapsMasstransitMtrouterShooting
+ - sandbox/projects/masstransit/MapsMasstransitSrcExportDownloader
+ - sandbox/projects/mlp
+ - sandbox/projects/mlportal
+ - sandbox/projects/modadvert
+ - sandbox/projects/mt
+ - sandbox/projects/noc
+ - sandbox/projects/nocdev/nocdev_ticket_helper
+ - sandbox/projects/ofd
+ - sandbox/projects/oops
+ - sandbox/projects/ott
+ - sandbox/projects/paysys/tasks/docker
+ - sandbox/projects/porto/BuildPorto
+ - sandbox/projects/rasp
+ - sandbox/projects/report
+ - sandbox/projects/rthub
+ - sandbox/projects/saas
+ - sandbox/projects/samovar
+ - sandbox/projects/sandbox
+ - sandbox/projects/sandbox_ci
+ - sandbox/projects/security/CodeQLArcadia
+ - sandbox/projects/security/logfeller_quarantine
+ - sandbox/projects/setrace
+ - sandbox/projects/shiny_discovery
+ - sandbox/projects/skynet
+ - sandbox/projects/solomon
+ - sandbox/projects/sonic
+ - sandbox/projects/sport_wizard
+ - sandbox/projects/stoker
+ - sandbox/projects/suggest/dicts/News
+ - sandbox/projects/suggest/dicts/TailDictionary
+ - sandbox/projects/suggest/tools
+ - sandbox/projects/suggest/watchdog/watchdog_tests
+ - sandbox/projects/sup
+ - sandbox/projects/tank
+ - sandbox/projects/testpalm
+ - sandbox/projects/travel_analytics
+ - sandbox/projects/ugc
+ - sandbox/projects/userdata
+ - sandbox/projects/voicetech
+ - sandbox/projects/walle
+ - sandbox/projects/weather
+ - sandbox/projects/websearch/PerlReport2Base
+ - sandbox/projects/websearch/PerlReportBase
+ - sandbox/projects/websearch/basesearch
+ - sandbox/projects/websearch/begemot/tasks
+ - sandbox/projects/websearch/devops
+ - sandbox/projects/websearch/middlesearch
+ - sandbox/projects/websearch/tunneller/tasks
+ - sandbox/projects/websearch/upper
+ - sandbox/projects/woland/WolandAlerting
+ - sandbox/projects/yadrive/YaDriveFunctionalTest
+ - sandbox/projects/yadrive/YaDriveGenerateAnalyzerCache
+ - sandbox/projects/yadrive/YaDriveTestAccountsGenerator
+ - sandbox/projects/yane/common
+ - sandbox/projects/ydo
+ - sandbox/projects/yf
+ - sandbox/projects/younglings
+ - sandbox/projects/yp/BuildYpEmergencyBreak
+ - sandbox/projects/yp/BuildYpPodEvictionMonitoring
+ - sandbox/projects/yp/BuildYpUnknownPodMonitoring
+ - sandbox/projects/yql
+ - sandbox/proxy/flask_uwsgi_websocket
+ - sandbox/proxy/websocket
+ - sandbox/yasandbox/controller
+ - scarab/api/python3
+ - sdg/sdc
+ - search/begemot/tools/apphost/graph_modifier
+ - search/begemot/tools/spellchecker/framework_adapter
+ - search/begemot/tools/spellchecker/framework_api
+ - search/geo/tools/base_pool_from_meta
+ - search/geo/tools/comparer
+ - search/geo/tools/personal_pois/tools/future_click_pool
+ - search/geo/tools/qloss
+ - search/geo/tools/ranking
+ - search/geo/tools/social_links/quality_scripts/extract_facts_analysis
+ - search/geo/tools/util
+ - search/gta/hc2ch/lib
+ - search/gta/ltv/hc1_reducer/lib
+ - search/gta/utils/nile_4
+ - search/gta/utils/statutils
+ - search/horadric2/example/services
+ - search/horadric2/hmock/services
+ - search/martylib
+ - search/mon/iconostasis_validator/libs
+ - search/mon/rviewer
+ - search/mon/screenshoter/src
+ - search/mon/stater/contrib/datemath
+ - search/mon/stater/src/bin
+ - search/mon/stater/src/libs
+ - search/mon/stater/src/modules
+ - search/mon/tickenator/services
+ - search/mon/tickenator/sqla/ultima
+ - search/mon/wabbajack/libs/generated/iss3
+ - search/mon/wabbajack/libs/modlib
+ - search/mon/workplace/src/services
+ - search/mon/workplace/src/sqla/workplace
+ - search/resonance/pylib
+ - search/resonance/tester/tools/viewer
+ - search/sawmill/services
+ - search/sawmill/sqla/sawmill
+ - search/stoker/services
+ - search/stoker/sqla/stoker
+ - search/tools/devops/apphost/find_bad_backends
+ - search/tools/devops/libs
+ - search/tools/devops/overcommit
+ - search/tools/devops/panel_generator
+ - search/tools/findurl/src
+ - search/tools/idx_ops/comparer/to_html_converter
+ - search/tools/woland/contrib/yasmapi
+ - search/zephyr/services
+ - security/takeout
+ - security/yodax/lib/formatters
+ - security/yodax/lib/gixy
+ - smarttv/droideka/proxy/migrations
+ - smarttv/plant/plant/migrations
+ - smm/tools/stack
+ - sport/backend/sport/data/migrations
+ - sport/backend/sport/images/migrations
+ - sport/backend/sport/projects/basketball/migrations
+ - sport/backend/sport/projects/cybersport/migrations
+ - sport/backend/sport/projects/football/migrations
+ - sport/backend/sport/projects/formula1/migrations
+ - sport/backend/sport/projects/games/migrations
+ - sport/backend/sport/projects/hockey/migrations
+ - sport/backend/sport/projects/martial_arts/migrations
+ - sport/backend/sport/projects/tennis/migrations
+ - sport/backend/sport/projects/time_judge/migrations
+ - sport/backend/sport/projects/volleyball/migrations
+ - sport/backend/sport/sport/migrations
+ - sport/backend/sport/translations/migrations
+ - sport/backend/sport/tv/migrations
+ - sport/backend/tests/projects/batches
+ - sprav/java/editor/recipe
+ - sprav/mining/ontodb
+ - sprav/mining/partners/gis/lib
+ - sprav/mining/quarantine/feature_grep/lib
+ - sprav/tycoon/tools/add_table_replica
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/app_sessions
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/broapp_sessions
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/bs_actions
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/crypta_features
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/has_pp_bro_devices
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/inapp_scenaries_report
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/long_metrics
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/ppapp_sessions
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/screenshots
+ - statbox/jam/jobs/outer-job/dmz_reports/superapp-1/web_sessions
+ - statbox/jam/libs/superapp
+ - statbox/jam/libs/zalogin
+ - statbox/libstatbox/python
+ - statbox/python-statinfra
+ - statbox/step_client
+ - taxi/antifraud/adhoc/TAXISECTEAM-4126
+ - taxi/antifraud/adhoc/TAXISECTEAM-4126-refunds/downloader
+ - taxi/antifraud/adhoc/TAXISECTEAM-4126-refunds/parser
+ - taxi/graph/tools/generate-cmake
+ - taxi/python-modules/pystache
+ - taxi/python-modules/pyyaml
+ - taxi_efficiency/libs/tariff_computations
+ - testenv/jobs
+ - tools/pycron
+ - tools/releaser/src/lib/deblibs
+ - transfer_manager/copy_yt_to_clickhouse/python/clickhouse
+ - transfer_manager/copy_yt_to_clickhouse/python/cluster_client
+ - transfer_manager/copy_yt_to_clickhouse/python/configs
+ - transfer_manager/copy_yt_to_clickhouse/python/copy_table
+ - transfer_manager/copy_yt_to_clickhouse/python/job_executors
+ - transfer_manager/copy_yt_to_clickhouse/python/parsers
+ - transfer_manager/copy_yt_to_clickhouse/python/support
+ - transfer_manager/copy_yt_to_clickhouse/python/task_state
+ - transfer_manager/copy_yt_to_clickhouse/python/tm_tracker
+ - transfer_manager/copy_yt_to_clickhouse/python/tool
+ - transfer_manager/copy_yt_to_clickhouse/python/yt
+ - transfer_manager/python/dbaas
+ - transfer_manager/server/bin/server
+ - transfer_manager/server/bin/watchdog
+ - transfer_manager/server/lib
+ - travel/avia/library/python/common/protobuf_converting/big_wizard/proto
+ - travel/avia/library/python/common/saas/proto
+ - travel/hotels/devops/l2_tool
+ - travel/hotels/feeders/lib
+ - travel/hotels/tools/catroom_stat
+ - travel/hotels/tools/cli
+ - travel/hotels/tools/expedia_property_pansions_builder
+ - travel/hotels/tools/sitemap_builder
+ - travel/hotels/tools/slug_builder
+ - travel/hotels/tools/spyt_runner
+ - travel/marketing/content/admin
+ - travel/rasp/admin
+ - travel/rasp/bus/toloka_matching/src
+ - travel/rasp/library/common_recipe
+ - travel/rasp/library/python/common
+ - travel/rasp/library/python/route_search/migrations
+ - travel/rasp/morda
+ - travel/rasp/mysql_dumper/lib
+ - travel/rasp/suburban_tasks
+ - travel/rasp/touch
+ - trust/bill76/convert_terminal_rates
+ - trust/bill76/create_yt_tables_for_datalens
+ - trust/bill76/create_yt_tables_for_export
+ - trust/dev/qyp_enviroment
+ - vcs/hg/common
+ - voicetech/asr/cloud_engine/vh/bin/build_cloud_lingware_yt
+ - voicetech/asr/cloud_engine/vh/bin/kenlm_pipeline_yt
+ - voicetech/asr/cloud_engine/vh/bin/light_lm_pipeline_s3
+ - voicetech/asr/cloud_engine/vh/bin/light_lm_pipeline_yt
+ - voicetech/asr/cloud_engine/vh/bin/normalize_dataset_yt
+ - voicetech/asr/cloud_engine/vh/bin/subword_lm_pipeline_s3
+ - voicetech/asr/cloud_engine/vh/bin/subword_lm_pipeline_yt
+ - voicetech/asr/cloud_engine/vh/graphs
+ - voicetech/asr/cloud_engine/vh/operations
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_subword_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_unigram_model
+ - voicetech/asr/core/lib/subword_ngram_lm/nirvana/eval_perplexity
+ - voicetech/asr/experiments/partial_prefetch/bin/build_data
+ - voicetech/asr/experiments/partial_prefetch/bin/eval
+ - voicetech/asr/experiments/partial_prefetch/lib
+ - voicetech/asr/pipeline/annotation/bin
+ - voicetech/asr/pipeline/annotation/lib
+ - voicetech/asr/pipeline/create_search_logs_lm
+ - voicetech/asr/pipeline/dataset/bin/voicetable2features
+ - voicetech/asr/pipeline/filter_turkish_search_logs_by_intent
+ - voicetech/asr/pipeline/generate_texts/lib
+ - voicetech/asr/pipeline/language_models/assistant_lm
+ - voicetech/asr/pipeline/language_models/general_logs
+ - voicetech/asr/pipeline/language_models/linear_lm_merge
+ - voicetech/asr/pipeline/language_models/quasar_lm
+ - voicetech/asr/pipeline/language_models/tools/run_lm_pipeline
+ - voicetech/asr/pipeline/train_pytorch/lib
+ - voicetech/asr/tools/ctc_visualize
+ - voicetech/asr/tools/decoder_sweeper/lib
+ - voicetech/asr/tools/decoding_result_viewer
+ - voicetech/asr/tools/intents_decompose
+ - voicetech/asr/tools/language_model/scripts/bin/table2lm
+ - voicetech/asr/tools/language_model/scripts/bin/yt2arpa
+ - voicetech/asr/tools/language_model/scripts/lib
+ - voicetech/asr/tools/nirvana_sync
+ - voicetech/asr/tools/train_helpers/checkpoint_downloader
+ - voicetech/asr/tools_cloud/char_ngram/dataset/utils
+ - voicetech/asr/tools_cloud/datasets/audio_datasets/prepare_atc
+ - voicetech/asr/tools_cloud/datasets/audio_datasets/prepare_biovitrum
+ - voicetech/asr/tools_cloud/datasets/audio_datasets/prepare_from_yt
+ - voicetech/asr/tools_cloud/datasets/audio_datasets/prepare_kaspi
+ - voicetech/asr/tools_cloud/datasets/audio_datasets/prepare_toloka
+ - voicetech/asr/tools_cloud/datasets/lib
+ - voicetech/asr/tools_cloud/experiments/scripts/spellcheck/tools
+ - voicetech/asr/tools_cloud/experiments/scripts/wer_from_yt
+ - voicetech/asr/tools_cloud/upload_records_to_yt/collect_audio
+ - voicetech/asr/tools_cloud/upload_records_to_yt/collect_texts
+ - voicetech/asr/tools_cloud/utils/generate_table_name
+ - voicetech/asr/tools_cloud/utils/split_yt_table
+ - voicetech/asr/tools_cloud/utils/tables_cache_cleaner
+ - voicetech/bio/pybio/train/tf_patched_models
+ - voicetech/bio/tf_future
+ - voicetech/common/kaldi_features_lib/python-package/kaldi_features
+ - voicetech/infra/gdpr_proxy/gdpr-filter
+ - voicetech/infra/lingwarefactory/yaldi-apply-soundset
+ - voicetech/infra/qa/speechbase-voiceproxy-logsv3-cleanup
+ - voicetech/infra/qa/uniproxy-logs-gen-params
+ - weather/libs/utils/meteo
+ - weather/meteo/flow/scheduler
+ - weather/meteo/models/repository
+ - weather/ml/libs/geo_utils/python
+ - weather/ml/misc/grid_utils
+ - weather/ml/quality/stand/misc/artifacts
+ - weather/ml/quality/stand/misc/external/pytlib
+ - weather/ml/quality/stand/misc/wrappers
+ - weather/workers/warnings
+ - weather/yasm/workerstats
+ - apphost/daemons/horizon/contrib
+ - apphost/tools/event_log_filter/tests/lib
+ - web/daemons/begemot/scripts/yt_priemka
+ - wmconsole/backend/packaging-tools
+ - yabs/amazon/cache_proxy
+ - yabs/basic_packages/yabs-global-info/py-modules
+ - yabs/bscount/protocol/pyfbs
+ - yabs/cache-proxy/plugin/proxy_b2b/templates
+ - yabs/libs/ua_traits/orig/pymodules
+ - yabs/qa/b2b_utils/bsserver_b2b/engine/external_logs
+ - yabs/qa/bsinfo
+ - yabs/qa/oneshots/inna-kudelkina/BSDEV-75160/create_new_templates
+ - yabs/qa/oneshots/inna-kudelkina/BSDEV-75160/test_681_684_697_725_json_templates
+ - yabs/qa/oneshots/inna-kudelkina/BSDEV-75160/test_add_callouts_to_681_684_697_725_json_templates
+ - yabs/qa/oneshots/inna-kudelkina/BSDEV-77853/test_yt_delete_resource_product
+ - yabs/qa/oneshots/inna-kudelkina/BSSERVER-11616/cumulative_oneshot_for_test
+ - yabs/qa/oneshots/inna-kudelkina/BSSERVER-12582/yt_test_create_template_and_res
+ - yabs/qa/oneshots/inna-kudelkina/BSSERVER-14676/yt_oneshot_test_add_template_banner_res
+ - yabs/qa/oneshots/naignatov/BSDEV-80708
+ - yabs/qa/oneshots/yambulatov/BSSERVER-14195/test-resource-addition
+ - yabs/qa/sandbox_helper/launcher
+ - yabs/qa/yabs_b2b_tank/qabs/common
+ - yabs/sbyt/devutils/move-release
+ - yabs/sbyt/migration/BSDEV-75115-AdvmachineBanners
+ - yabs/sbyt/supervisor
+ - yabs/server/cs/pylibs/yt_query_map
+ - yabs/server/infra/transport/yabs_file_transport
+ - yabs/server/infra/validator
+ - yabs/server/libs/py_pretty
+ - yabs/server/libs/py_view_base
+ - yabs/server/test/qabs_bsserver_pytest/data
+ - yabs/stat/monitor/metrics_proxy
+ - yabs/stat/monitor/setup_solomon
+ - yabs/tests/bsdbx2/replica_speed_monitoring
+ - yabs/umbrella/mapreduce_antifraud/bad-rambler-distributions
+ - yabs/umbrella/mapreduce_antifraud/check-ip
+ - yabs/umbrella/mapreduce_antifraud/py-modules/antifraud
+ - yabs/umbrella/mapreduce_antifraud/rtb_antifraud_launcher
+ - yabs/umbrella/mapreduce_antifraud/serp_no_clicks_users
+ - yabs/vh/cms-pgaas/thumb_selector
+ - yql/cli
+ - yql/library/python
+ - yql/library/test_framework/recipe
+ - yql/tests/dq/lib
+ - yql/tools/job_perf
+ - yql/tools/nginx_mon
+ - yql/tools/yqlflask
+ - yql/tools/yqltornado
+ - yt/admin/acl_dumper/src
+ - yt/admin/brahmagupta/src/brahmagupta_api
+ - yt/admin/core
+ - yt/admin/perf_scraper/src
+ - yt/admin/perf_scraper/vendor/supervise
+ - yt/admin/shiva/services
+ - yt/admin/ytcfgen/vendor/pyinotify/python2
+ - yt/cron/balance_bundles
+ - yt/hermes/contrib/gitdb2
+ - yt/hermes/contrib/gitpython
+ - yt/hermes/contrib/smmap2
+ - yt/odin/bin/cleanup
+ - yt/odin/bin/odin
+ - yt/odin/bin/webservice
+ - yt/odin/lib/odinserver
+ - yt/odin/tests/data/checks/available
+ - yt/odin/tests/data/checks/invalid
+ - yt/odin/tests/data/checks/long
+ - yt/odin/tests/data/checks/partial
+ - yt/odin/tests/data/checks/with_data
+ - yt/odin/tests/data/checks/with_invalid_return_value
+ - yt/odin/tests/data/checks/with_options
+ - yt/python/contrib/python-argcomplete
+ - yt/python/contrib/python-backports.ssl_match_hostname
+ - yt/python/contrib/python-certifi
+ - yt/python/contrib/python-chardet
+ - yt/python/contrib/python-dill
+ - yt/python/contrib/python-fusepy
+ - yt/python/contrib/python-idna
+ - yt/python/contrib/python-requests
+ - yt/python/contrib/python-six
+ - yt/python/contrib/python-urllib3
+ - yt/python/yt
+ - yt/yt/experiments/dyntables_stress_test
+ - yweb/antimalware/visual_html_parser/yandex-search-antivirus-discovery
+ - yweb/antiporno/bert/development/python/lib/google_bert
+ - yweb/antiporno/queries_active_learning/work_with_markup_cache
+ - yweb/antiporno/site_reachability/lib/retraversal_sites
+ - yweb/antiporno/site_reachability/lib/spy_handling
+ - yweb/antispam/phishing/lib/python
+ - yweb/antispam/phishing/models/limixis_log_regression
+ - yweb/antispam/phishing/screenshots_cbir/dnsdb_filter
+ - yweb/antispam/util/scraper
+ - yweb/antispam/whois/scripts
+ - yweb/blender/newsletter/top_negative_intents
+ - yweb/blender/online_learning/bin/rtmr_helper
+ - yweb/blender/scripts/blender_viewer/contrib/abt_backend
+ - yweb/blender/scripts/click_int_formula/analysis
+ - yweb/blender/scripts/click_int_formula/common
+ - yweb/blender/scripts/click_int_formula/config
+ - yweb/blender/scripts/click_int_formula/eval_feature_lib
+ - yweb/blender/scripts/click_int_formula/eval_program
+ - yweb/blender/scripts/click_int_formula/factors_lib
+ - yweb/blender/scripts/click_int_formula/formula_model
+ - yweb/blender/scripts/click_int_formula/pool
+ - yweb/blender/scripts/click_int_formula/pool_iterator
+ - yweb/blender/scripts/click_int_formula/tar_model_handler
+ - yweb/blender/scripts/click_int_formula/training
+ - yweb/blender/scripts/click_int_formula/xtd_templates
+ - yweb/blender/scripts/fconsole/tools/lib_sandbox_publish
+ - yweb/blender/scripts/fconsole/tools/publish_fact_data
+ - yweb/blender/scripts/fconsole/tools/publish_wizard_fast_data
+ - yweb/blender/scripts/landing_load_data/common
+ - yweb/blender/scripts/landing_load_data/log_service_data_ts
+ - yweb/blender/scripts/landing_load_data/prepare_for_saas
+ - yweb/blender/scripts/nirvana/workflows/lib
+ - yweb/blender/scripts/nirvana/workflows/operation_updater
+ - yweb/blender/scripts/nv_common
+ - yweb/blender/scripts/offline_replay/html_metrics_formatter
+ - yweb/blender/scripts/patch_fml_config
+ - yweb/blender/scripts/tools
+ - yweb/crawlrank/config/src
+ - yweb/freshness/rtmr_metrics/fresh_surplus/tools/dump_state
+ - yweb/freshness/scripts/rem
+ - yweb/incproc/komutator/python
+ - yweb/mail/webmail-search-quality
+ - yweb/music/pylib
+ - yweb/news/app_host/api_responder/recipe
+ - yweb/news/python/contrib/yasmapi
+ - yweb/robot/analitics/crawlview/histoviewer
+ - yweb/robot/js/tools/viewer
+ - yweb/robot/ukrop/nirvana_tools/crawl_result
+ - yweb/robot/ukrop/nirvana_tools/graph_starter
+ - yweb/sitelinks/astrolabe/build_bna/candidates/bno_clicks_squeeze
+ - yweb/tellurium/lib
+ - yweb/webscripts/video/common/sandbox
+ - yweb/webscripts/video/docker/cm_tool
+ - yweb/yasap/answers/3rdparty/apns
+ - yweb/yasap/answers/3rdparty/falcon_apispec
+ - yweb/yasap/answers/3rdparty/sendgrid
+ - yweb/yasap/answers/database_migrations
+ - yweb/yasap/common/saas
+ - yweb/yasap/pdb/library/batch_processing
+ - yweb/yasap/pdb/library/toloka-client
+ - yweb/yasap/pdb/pdb-backend/src
+ - yweb/yasap/pdb/pdb-backend/tests/lib/recipe_utils
+ - yweb/yasap/pdb/pdb-backend/tests/lib/test_utils
+ - yweb/yasap/pdb/quality/card_recommender/viewer/viewer
+ - yweb/yasap/pdb/quality/hot_feed/tools/viewer
+ - yweb/yasap/pdb/quality/master_item_recommender/viewer
+ - yweb/yasap/pdb/viewers/c2c_toloka_viewer
+ - yweb/yasap/pdb/viewers/knn_viewer
+ - yweb/younglings/education/regular/clear_old_tables
+ - yweb/younglings/education/regular/docs_vertical/bestreferat_parser
+ - yweb/younglings/education/regular/requests_timing/scripts/generate_html
+ - yweb/younglings/education/regular/requests_timing/scripts/send_to_solomon
+ - yweb/younglings/education/regular/yt_eventlog_grep_errors/generate_email
+ - yweb/younglings/tasks/YOUNGLINGS-403/secondary_from_csv
+ - zootopia/hub/orgthief_project/orgthief
+ - zootopia/hub/orgthief_project/tycoon
+ - zootopia/library/py/latlon
+ - zootopia/library/py/saaspy
+ - zootopia/library/py/statfacepy
+ - FactExtract/Parser/aftextminer/tests/aftextminer_bastard
+ - FactExtract/Parser/aftextminer/tests/aftextminer_contacts
+ - FactExtract/Parser/aftextminer/tests/aftextminer_fdo
+ - FactExtract/Parser/aftextminer/tests/aftextminer_geo
+ - FactExtract/Parser/aftextminer/tests/aftextminer_mail_events
+ - FactExtract/Parser/aftextminer/tests/aftextminer_prettyoutput
+ - FactExtract/Parser/aftextminer/tests/aftextminer_status
+ - FactExtract/Parser/aftextminer/tests/aftextminer_ukr
+ - FactExtract/address_extractor/tests/address_extractor
+ - FactExtract/address_extractor/tests/address_extractor_agree
+ - FactExtract/address_extractor/tests/address_extractor_interface
+ - FactExtract/address_extractor/tests/address_extractor_max_fact
+ - FactExtract/address_extractor/tests/address_extractor_threaded
+ - FactExtract/address_extractor/tests/after_bugs
+ - FactExtract/print_addr_filter/tests
+ - ads/autobudget/ml_pipeline/scripts/convert_yt_pool_catboost/lib/ft
+ - ads/autobudget/ml_pipeline/scripts/create_cd_file/lib/ft
+ - ads/bsyeti/libs/py_tnode/ut
+ - ads/factor_check/mutial_information/yql/tests
+ - ads/libs/py_autobudget/ut
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/t/mapreducelib
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/t/mapreducelib_emulator
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/t/yabs/tabtools
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/test_pt/functional
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/test_pt/functional_skiff
+ - ads/libs/py_matrixnet/ut
+ - ads/libs/py_ml_factors/fat/test_mappers
+ - ads/libs/py_ml_factors/fat/test_preprocessors_first_batch
+ - ads/libs/py_ml_factors/fat/test_preprocessors_second_batch
+ - ads/libs/py_vw_lib/ut
+ - ads/libs/test_yt/example/run
+ - ads/libs/yql/ft
+ - ads/libs/yql/testlib/ft
+ - ads/libs/yql/ut/test
+ - ads/mr_tools/record_formats/ut
+ - ads/mr_tools/slotrecord/ut
+ - ads/nirvana/difacto/dmlc_launcher/test
+ - ads/nirvana/online_learning/run_flowkeeper/workflow_tests
+ - ads/pytorch/deploy/bindings/ut
+ - ads/quality/adv_machine/tsar/cm_robot/cmpy/adv_machine_models
+ - ads/quality/adv_machine/tsar/cm_robot/cmpy/transfer_manager
+ - ads/quality/adv_machine/tsar/cm_robot/cmpy/turbo
+ - ads/quality/bid_correction/lib/ut
+ - ads/quality/metric_eval/tests/ut
+ - ads/sandbox_scripts/logs_scheme/fat
+ - ads/targeting/cross_check/ut
+ - advq/generation/broadmatch_export/tests
+ - advq/generation/chrono_db_generator/tests
+ - advq/generation/common/generators/phits_index_uploader/tests
+ - advq/generation/common/generators/sumhits_generator/tests
+ - advq/generation/common/linguistics/tests
+ - advq/generation/common/queries/tests
+ - advq/generation/common/tests
+ - advq/generation/phits_generator/tests
+ - advq/generation/prsya_generator/ut
+ - advq/offline_phits/direct_export/ut/test_export
+ - advq/offline_phits/library/ut/process
+ - advq/offline_pkz/test
+ - alice/library/python/decoder/tests
+ - antiadblock/cryprox/tests/functional
+ - antiadblock/postgres_local/tests
+ - april/mediaplan/mediaplan/forecaster/migrations
+ - billing/agency_rewards/tests
+ - bindings/java/abt/abt-native/android/tests
+ - build/scripts
+ - cloud/ai/speechkit/stt/tests/data/model
+ - cloud/ai/speechkit/stt/tests/eval/metrics
+ - cloud/gauthling/yc_auth_tornado/test
+ - cloud/mdb/dbaas-internal-api-image/dbaas_internal_api/utils/dataproc_joblog
+ - cloud/mdb/salt/salt/components/datacloud/dist-sync/tests
+ - cv/imageproc/ocr/ocr_runner/load_cfg
+ - cv/imageproc/ocr/ocr_runner/tests
+ - cv/library/imageparserlib/rawinterface/tests
+ - datacloud/features/dssm/tests
+ - datacloud/features/geo/tests
+ - dict/ext/pairfreq/findpairs3/tests/ctxt
+ - dict/ext/pairfreq/findpairs3/tests/ctxtid
+ - dict/ext/pairfreq/findpairs3/tests/estim
+ - dict/ext/pairfreq/findpairs3/tests/find
+ - dict/ext/pairfreq/findpairs3/tests/lemmatize
+ - dict/gen_phrases/tests
+ - dict/geninflnames/tests
+ - dict/mt/make/tools/build_unigram_blacklist/tests
+ - dict/mt/make/tools/lm_diff/tests
+ - dict/mt/make/tools/make_cap_model/ut
+ - dict/mt/make/tools/tfnn/tests
+ - dict/mt/make/tools/title_rate_filter/tests
+ - dict/mt/make/tools/yt_shuffle/tests
+ - dict/mt/pt_build/tools/yql_build/test
+ - dict/mt/tools/cluster_filter_yt/test
+ - dict/mt/tools/deduplicate_yt/test
+ - dict/mt/tools/hierarchy_clustering/tests
+ - dict/mt/tools/rake_filter_yt/test
+ - dict/mt/tools/zipf_filter_yt/test
+ - dict/mystem/tests/pipe
+ - dict/tools/disamb_test/tests
+ - dict/tools/docrec_html_parser/tests
+ - dict/tools/make_morphdict/main/tests
+ - dict/tools/make_morphdict/normalize/tests
+ - dict/tools/make_morphdict/scripts/prepare/tests
+ - dict/tools/make_morphdict/scripts/schemes/tests
+ - dict/tools/make_morphdict/tests
+ - dict/tools/morphotest/morphopy/tests
+ - dict/tools/query_disamb_test/tests
+ - dict/tools/unicode_test/tests
+ - dict/tools/untransliter/tests
+ - dict/word2vec/tools/convert_model/tests
+ - dj/lib/shard2/yt_prepare/ut/run_test
+ - dj/tools/rthub_profiles/profile_update_triggers/profile_update_trigger_rtmr/tests
+ - entity/ontodb/robot/tests/integration
+ - entity/ontodb/tasks/watson_converter/lib/ut
+ - entity/recommender/nirvana/operations/build_static_profiles/ut
+ - entity/recommender/nirvana/operations/build_tops_profiles/ut
+ - entity/recommender/nirvana/operations/make_sbs_film_polls/lib/ut
+ - entity/recommender/tools/features_diff_checker/ut
+ - extsearch/audio/yamrec/upper
+ - extsearch/fresh/meta/rearrange_data/tests
+ - extsearch/images/robot/parsers/html_parser/imagelib/ut2
+ - extsearch/images/tools/cbircomparer/tests
+ - extsearch/images/tools/query_filter/ut
+ - extsearch/video/indexer/indexurlseq/create/tests
+ - extsearch/video/quality/deep_click/tests
+ - extsearch/video/quality/delayed_view/trie_ops/tests
+ - extsearch/video/quality/vuserdata2/tests
+ - extsearch/video/robot/authorfromjson/tests
+ - extsearch/video/robot/authorthumbs/tests
+ - extsearch/video/robot/crawling/custom_html_parser/bin/tests
+ - extsearch/video/robot/crawling/partner_api/bin/tests
+ - extsearch/video/robot/deletes/player_ban/tests
+ - extsearch/video/robot/docbase/docauthor/tests
+ - extsearch/video/robot/docbase/docfactor/tests
+ - extsearch/video/robot/docbase/factors/annfexport/tests
+ - extsearch/video/robot/docbase/factors/authfexport/tests
+ - extsearch/video/robot/docbase/factors/hostfexport/tests
+ - extsearch/video/robot/docbase/factors/thumbfexport/tests
+ - extsearch/video/robot/docbase/indexdocs/tests
+ - extsearch/video/robot/docbase/postcalc/tests
+ - extsearch/video/robot/docbase/vegas/adaptor/tests
+ - extsearch/video/robot/frames/merge/tests
+ - extsearch/video/robot/hostsdb/tool/tests
+ - extsearch/video/robot/index/indexfactors/tests
+ - extsearch/video/vh/indexer/tests
+ - extsearch/wizards/fastres2/daemon/tests/small
+ - geobase/python
+ - geobase/tests/timezone_getter
+ - health/turbo_articles/parser/tests
+ - health/turbo_articles/turbo_to_yt/tests
+ - health/yamd/health_backend/tests
+ - health/yamd/libs/data_layer/tests
+ - infra/deploy_export_stats/tests
+ - infra/nanny/instancectl/tests/func
+ - infra/nanny/instancectl/tests/func_legacy
+ - infra/nanny/instancectl/tests/unit
+ - infra/nanny/sepelib/tests
+ - infra/qyp/vmctl/tests
+ - infra/wall-e/checks/tests
+ - intranet/dogma/dogma_tests
+ - intranet/hidereferer/tests
+ - intranet/magiclinks/tests
+ - intranet/yandex_directory/tests
+ - juggler/juggler_client/lib/tests
+ - juggler/libjuggler/tests
+ - kernel/extended_mx_calcer/tools/calcers_test/tests
+ - kernel/geo/tests/geo_utils/tests
+ - kernel/title_ranges/test_title_ranges/tests
+ - library/cpp/codecs/static/tools/tests
+ - library/cpp/deprecated/solartrie/test/tests
+ - library/cpp/file_checker/test/tests
+ - library/cpp/pybind/example/ut
+ - library/python/cyson/ut
+ - library/python/vault_client/ut/tests
+ - logbroker/push-client/ft
+ - logfeller/lib/table_allocator/functional_tests/dyn_allocator_tests
+ - mail/xiva/mobile/tests-system
+ - mapreduce/library/native2streaming/tests/tests
+ - mapreduce/yt/tests
+ - maps/fastcgi/meta/bin/tests
+ - maps/libs/tile/pymod-tests
+ - maps/wikimap/mapspro/tools/topology_fixer/tests
+ - market/contrib/python/BitTorrent
+ - market/dynamic_pricing/pricing/common/checks/checker/ut
+ - market/dynamic_pricing/pricing/common/checks/solomon_sender/ut
+ - market/dynamic_pricing/pricing/dynamic_pricing/tests
+ - market/forecaster/lite-offline
+ - market/idx/marketindexer/medium_tests/yatf/external
+ - market/yamarec/edera/tests/unit
+ - market/yamarec/yamarec/tests/functional
+ - mds/cocaine/darkvoice/tests
+ - mds/cocaine/plugins/geobase/tests
+ - mds/cocaine/plugins/langdetect/tests
+ - mds/cocaine/plugins/regional-units/tests
+ - mds/cocaine/plugins/uatraits/tests
+ - mds/libs/thevoid/tests
+ - mds/lrc-tools/tests/test_check_defrag
+ - mds/lrc-tools/tests/test_converter
+ - mds/lrc-tools/tests/test_defrag
+ - mds/lrc-tools/tests/test_defrag_analyzer
+ - mds/lrc-tools/tests/test_defrag_job
+ - mds/lrc-tools/tests/test_listing
+ - mds/lrc-tools/tests/test_mocked_restore
+ - mds/lrc-tools/tests/test_read_records
+ - mds/lrc-tools/tests/test_reader
+ - mds/lrc-tools/tests/test_recovery
+ - mds/lrc-tools/tests/test_remove_records
+ - mds/lrc-tools/tests/test_remover
+ - mds/lrc-tools/tests/test_restore
+ - media/recommender/zen/factor_url_socnet/tests
+ - mediapers/rtmr/tasks/kp/recommendations/tests
+ - metrika/admin/brb/server/tests
+ - ml/cf_sharp/tests
+ - modadvert/libs/algorithms/ut
+ - modadvert/programs/catalogia_flags_diff/ut
+ - modadvert/programs/minus_regions/ut
+ - mssngr/tools/pytests/setup/local
+ - nirvana/libs/comparable_dumped_workflow/ut
+ - nirvana/valhalla/tests
+ - ofd/notifier/tests/test_unit/test_sender/test_event_types
+ - ofd/notifier/tests/test_unit/test_sender/test_notification_types
+ - passport/backend/logbroker_client/account_events/tests
+ - passport/backend/logbroker_client/oauth/tests
+ - passport/backend/logbroker_client/xiva/tests
+ - passport/backend/tools/metrics/ut
+ - passport/backend/vault/cli/yav/tests
+ - quality/ab_testing/scripts/exp_veles/exp_mr_server/scripts/ut
+ - quality/ab_testing/tools/postgres_local/tests
+ - quality/click_machine/tests
+ - quality/functionality/chats/common/feedback_client/tests
+ - quality/functionality/content_plugins/runner/tests
+ - quality/functionality/content_plugins/tools/cut_snippets/tests
+ - quality/functionality/entity_search/factqueries/facts_builder_mr/tests/medium
+ - quality/functionality/ideal_snippets/release_data/tests
+ - quality/functionality/parsepl/nirvana/parse_kwyt_sample/tests
+ - quality/functionality/toloka_lib/tests
+ - quality/functionality/turbo/rss/host_ban_job/tests
+ - quality/logs/baobab/api/cpp/tests
+ - quality/logs/baobab/tamus/python/ut
+ - quality/logs/baobab/tamus/tests/dump_test
+ - quality/logs/baobab/tests/validation_lib
+ - quality/logs/log_splitter_lib/tests/rec_splitter/tests
+ - quality/logs/logs_ng_verifier/tests
+ - quality/mr_apps/mr_cat/test
+ - quality/mr_apps/mr_cp/test
+ - quality/mr_apps/mr_data_manip/test
+ - quality/mr_apps/mr_diff/test
+ - quality/mr_apps/mr_files/test
+ - quality/mr_apps/mr_find/test
+ - quality/mr_apps/mr_get_keys/test
+ - quality/mr_apps/mr_get_table_part/test
+ - quality/mr_apps/mr_grep/test
+ - quality/mr_apps/mr_hash/test
+ - quality/mr_apps/mr_head/test
+ - quality/mr_apps/mr_hist/test
+ - quality/mr_apps/mr_key_count/test
+ - quality/mr_apps/mr_ls/test
+ - quality/mr_apps/mr_mv/test
+ - quality/mr_apps/mr_rm/test
+ - quality/mr_apps/mr_set_ops/test
+ - quality/mr_apps/mr_sort/test
+ - quality/mr_apps/mr_stat/test
+ - quality/mr_apps/mr_touch/test
+ - quality/mr_apps/mr_uniq/test
+ - quality/mr_apps/mr_wc/test
+ - quality/mr_test/tests
+ - quality/mr_trie_tools/mr_coded_blob_test/tests
+ - quality/mr_trie_tools/mr_trie_test/tests
+ - quality/pers/ml/atom/calctarg/tests
+ - quality/pers/ml/atom/distribution/collect_user_ids/tests
+ - quality/pers/ml/atom/distribution/convert_logs/tests
+ - quality/pers/ml/atom/distribution/conveyor/pool_builder/tests
+ - quality/pers/ml/atom/distribution/counter_stat/tests
+ - quality/pers/ml/atom/distribution/crypta_extract/tests
+ - quality/pers/ml/atom/distribution/generate_user_id_mapping/tests
+ - quality/pers/ml/atom/distribution/joiner/tests
+ - quality/pers/ml/atom/distribution/parse_atom_events/tests
+ - quality/pers/ml/atom/distribution/postprocess_product_profiles/tests
+ - quality/pers/ml/atom/distribution/product_profile_and_candidate_score_matcher/tests
+ - quality/pers/ml/atom/distribution/product_profiles2/tests
+ - quality/pers/ml/atom/distribution/search_profiles/tests
+ - quality/pers/ml/atom/docscore/tests
+ - quality/pers/ml/atom/project-specific/entity_search/makepool/tests
+ - quality/pers/ml/outflow/tests
+ - quality/pers/rerank_service/tests/service-test
+ - quality/pers/user_buckets/tests
+ - quality/pers/user_history/geo_requests/tests
+ - quality/pers/user_profiles/tests/local_mr
+ - quality/pers/user_profiles/tests/rtmr
+ - quality/relev_tools/fml_mr_utils/pool_sampler/test
+ - quality/relev_tools/fml_mr_utils/prs_intersector/test
+ - quality/relev_tools/fml_mr_utils/prs_unrater/test
+ - quality/relev_tools/fml_plot/tests
+ - quality/relev_tools/lboost_ops/makereqbundle/tests/from_plain_text
+ - quality/relev_tools/lboost_ops/makereqbundle/tests/from_qtree
+ - quality/relev_tools/lboost_ops/tm_calc/tests
+ - quality/relev_tools/vpcg/bin/ut
+ - quality/relev_tools/xfactor-yt/lib/ut/build_apply_dictionaries
+ - quality/relev_tools/xfactor-yt/lib/ut/collaborative_filtering
+ - quality/relev_tools/xfactor-yt/lib/ut/convert_output
+ - quality/relev_tools/xfactor-yt/lib/ut/metric_export
+ - quality/relev_tools/xfactor-yt/lib/ut/prepare_input
+ - quality/relev_tools/xfactor-yt/yt_operations/ut
+ - quality/short_beak/sg_collector/tests
+ - quality/tools/scripts/tests
+ - quality/traffic/tests/iterator/tests
+ - quality/trailer/rich_suggest_data/fast_thematic_personalization/tests
+ - quality/user_search/qnorm_manip/tests
+ - quality/user_sessions/bali/tests
+ - quality/user_sessions/createlib/qb3/parser/helpers_example/tests
+ - quality/user_sessions/createlib/qb3/parser/local_yt_test_example
+ - quality/user_sessions/createlib/qb3/parser/local_yt_test_example_proto
+ - quality/user_sessions/createlib/qb3/parser/local_yt_test_example_proto_v2
+ - quality/user_sessions/createlib/tests
+ - quality/userdata/prep/tests
+ - quality/ytlib/ytweave/tests
+ - robot/favicon/tests
+ - robot/lemur/ci_yt/smoke
+ - robot/library/oxygen/indexer/input/collection/tests
+ - robot/library/oxygen/indexer/mapper/links/tests
+ - robot/library/oxygen/indexer/output/tests
+ - robot/library/oxygen/indexer/processor/arcdir/tests
+ - robot/library/oxygen/indexer/processor/pruning/tests
+ - rt-research/common/bindings/jupiter_canonizer/ut/lib
+ - rtmapreduce/mrtasks/bs_fast_stat/tests
+ - rtmapreduce/mrtasks/cocaine_log/tests
+ - rtmapreduce/mrtasks/images_freon_sample/tests
+ - rtmapreduce/mrtasks/keyslist/tests
+ - rtmapreduce/mrtasks/orgvisits/tests
+ - rtmapreduce/mrtasks/parselib_errors/tests
+ - rtmapreduce/mrtasks/postprocess_sessions/tests
+ - rtmapreduce/mrtasks/rtmr/pqout/tests
+ - rtmapreduce/mrtasks/rtmr/rtmr_kpi/tests
+ - rtmapreduce/mrtasks/rtmr/splitter/tests
+ - rtmapreduce/mrtasks/sample/tests
+ - rtmapreduce/mrtasks/sbapi_split/tests
+ - rtmapreduce/mrtasks/sessions2detector/tests
+ - rtmapreduce/mrtasks/sessions2trender/tests
+ - rtmapreduce/mrtasks/video_player_errors/tests
+ - rtmapreduce/tests/pusher-test/tests
+ - saas/rtyserver_test/tests/cluster
+ - saas/rtyserver_test/tests/unit_10m
+ - saas/rtyserver_test/tests/with_data
+ - saas/tools/printposfilter/tests
+ - sandbox/projects/devtools/ChangesDetector
+ - scarab/api/tests/java-mobile-minimal/ut
+ - scarab/api/tests/js/ut
+ - scarab/api/tests/perl/ut
+ - scarab/api/tests/python/ut
+ - scarab/api/tests/swift/ut
+ - search/begemot/tools/spellchecker/framework_adapter
+ - search/geo/tools/golovan/extevlogproc/tests
+ - search/gta/ltv/hc1_reducer/tests
+ - search/lingboost/saas/codecs/test_bundle_codecs/tests/slow
+ - search/panther/tests/convert
+ - search/tools/idx_ops/comparer/tests
+ - search/tools/idx_ops/converter/tests
+ - search/tools/request_sampler/tests
+ - search/web/personalization/test_features/tests
+ - search/wizard/entitysearch/tools/outentity/tests
+ - search/wizard/entitysearch/tools/outnerobject/tests
+ - search/wizard/entitysearch/tools/tests
+ - serp/foreverdata/test/patcher
+ - strm/vast_converter/tests
+ - tools/clustermaster/tests
+ - tools/langdiscr-test/tests
+ - tools/lemmer-test/tests
+ - tools/nlp_test/tests
+ - tools/nodeiter_test/tests
+ - tools/printreqs/tests
+ - tools/rcgtest/tests
+ - tools/recode/tests
+ - tools/segutils/tests/dater2_test/tests
+ - tools/segutils/tests/dater_test/tests
+ - tools/segutils/tests/segmentator_test/tests
+ - tools/segutils/tests/zones_test/tests
+ - tools/snipmake/steam/page_factors/cpp_factors/segmentator_tool/tests
+ - tools/snipmake/urlcut_test/tests
+ - tools/test_norm/tests
+ - tools/tokenize/tests
+ - tools/untranslit_test/tests
+ - transfer_manager/server/tests/e2e
+ - vh/recommender/tools/build_offline_doc2doc/tests
+ - vh/recommender/tools/build_offline_recommendations/tests
+ - vh/recommender/tools/dssm_profiles/ut
+ - voicetech/asr/cloud_engine/cli/app/pytest/large
+ - voicetech/asr/cloud_engine/cli/app/pytest/medium
+ - voicetech/asr/cloud_engine/server/stt/pytest/medium
+ - weather/libs/secrets/tests
+ - weather/workers/apply/yt/apply/tests
+ - weather/workers/common/location_indices/tests
+ - yabs/indoor/tests
+ - yabs/rmp/backend/tests/lib/zora
+ - yabs/server/libs/py_decrypt_predictions/test
+ - yabs/server/libs/py_pibf/test
+ - yabs/server/test/ft/lua/page_1
+ - yabs/server/test/ft/lua/page_1037
+ - yabs/server/test/ft/lua/page_14
+ - yabs/server/test/ft/lua/page_158973
+ - yabs/server/test/ft/lua/page_162514
+ - yabs/server/test/ft/lua/page_164717
+ - yabs/server/test/ft/lua/page_168577
+ - yabs/server/test/ft/lua/page_180897
+ - yabs/server/test/ft/lua/page_185459
+ - yabs/server/test/ft/lua/page_186549
+ - yabs/server/test/ft/lua/page_2
+ - yabs/server/test/ft/lua/page_242
+ - yabs/server/test/ft/lua/page_243449
+ - yabs/server/test/ft/lua/page_244345
+ - yabs/server/test/ft/lua/page_270715
+ - yabs/server/test/ft/lua/page_273214
+ - yabs/server/test/ft/lua/page_278239
+ - yabs/server/test/ft/lua/page_280743
+ - yabs/server/test/ft/lua/page_281945
+ - yabs/server/test/ft/lua/page_285318
+ - yabs/server/test/ft/lua/page_2_on_trafarets
+ - yabs/server/test/ft/lua/page_323453
+ - yabs/server/test/ft/lua/page_338535
+ - yabs/server/test/ft/lua/page_341469
+ - yabs/server/test/ft/lua/page_342532
+ - yabs/server/test/ft/lua/page_355611
+ - yabs/server/test/ft/lua/page_357267
+ - yabs/server/test/ft/lua/page_3897
+ - yabs/server/test/ft/lua/page_417631
+ - yabs/server/test/ft/lua/page_420097
+ - yabs/server/test/ft/lua/page_92550
+ - yabs/server/test/pylibs/blowfish/test
+ - yabs/server/test/tools/oneshot_tester/lib/tests
+ - yabs/vh/cms-pgaas/test/ft/ad_config_importer
+ - yabs/vh/cms-pgaas/test/ft/admin_api
+ - yabs/vh/cms-pgaas/test/ft/content_ksiva_api
+ - yabs/vh/cms-pgaas/test/ft/self_service_api
+ - yabs/vh/frontend/test/ft/VH-3242
+ - yql/library/embedded/python/test
+ - yql/scripts/local
+ - yql/tests/cli
+ - yql/tests/jdbc
+ - yql/tests/multi_process
+ - yt/admin/drive_monitor/tests/unit
+ - yt/admin/perf_scraper/tests
+ - yt/admin/shiva/tests/unit
+ - yt/odin/tests/suites
+ - yweb/antimalware/libs/yttools/py/tests
+ - yweb/antiporno/pyutil/draft/simple_yt/tests
+ - yweb/antiporno/pyutil/tests
+ - yweb/antiporno/site_reachability/lib/botanik/tests/small
+ - yweb/antiporno/site_reachability/lib/export/video/tests/medium
+ - yweb/antiporno/yt_tools/rsync_yt/tests/medium
+ - yweb/antiporno/yt_tools/rsync_yt/tests/small
+ - yweb/antispam/tools/masks2qd_trie/tests
+ - yweb/antispam/url_ndp/url_ndp_lua/http_api
+ - yweb/antispam/url_ndp/url_ndp_lua/ut
+ - yweb/autoclassif/subquery/indexer/tests
+ - yweb/blender/lib/libblndr/tests
+ - yweb/blender/scripts/fml_config_server
+ - yweb/freshness/fresh_suggest/tests
+ - yweb/freshness/news_doc_contrast/rtmr/tests
+ - yweb/freshness/rtmr_collect_news_bursts/tests
+ - yweb/freshness/rtmr_metrics/fresh_clicks/tests
+ - yweb/freshness/rtmr_metrics/fresh_surplus/tests
+ - yweb/news/bindings/python/url/test
+ - yweb/news/mr_indexer/tests
+ - yweb/news/rtmr/user_story_visits/tests
+ - yweb/peoplesearch/rtysearch/lib/profile_dumper/tests/tests
+ - yweb/peoplesearch/rtysearch/rtyindexer/tests
+ - yweb/peoplesearch/social_users/lib/common/tests/tests
+ - yweb/peoplesearch/yweb_social_snippet/tools/socnetsnip_querydata_formatter/tests
+ - yweb/peoplesearch/yweb_social_snippet/tools/yweb_social_snippet_generator_mr/tests
+ - yweb/pumpkin/mrcollector/tests
+ - yweb/querydata/querydata_indexer/tests
+ - yweb/querydata/querydata_indexer_saas/ferryman/abstract_worker/local_yt_tests
+ - yweb/querydata/querydata_indexer_saas/ferryman/json_worker/local_yt_tests
+ - yweb/querydata/querydata_indexer_saas/ferryman/tests/local_yt_tests
+ - yweb/querydata/querydata_indexer_saas/ferryman/worker/local_yt_tests
+ - yweb/querydata/tools/trie_searcher_test/tests
+ - yweb/querydata/tools/url2docid/tests
+ - yweb/querydata/tools/url2owner/tests
+ - yweb/querydata/totalban2/tests
+ - yweb/rca/tools/crca/tests
+ - yweb/robot/kiwi_queries/robot/triggers/dateextractortrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/disambmasktrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/extbreaktrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/freqcalculatortrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/httpparsetrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/mediawikitrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/mergedatacontainertrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/metadescrtrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/rus_docs
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/rus_fio
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/tur_docs
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/tur_fio
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/ukr_docs
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/nameextractortriggertest/tests/ukr_fio
+ - yweb/robot/kiwi_queries/robot/triggers/nameextractortrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/numbertrigger/numbertriggertest/tests
+ - yweb/robot/kiwi_queries/robot/triggers/numbertrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/phonenumbertrigger/phonetest/tests
+ - yweb/robot/kiwi_queries/robot/triggers/reviewtrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/segmentatortrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/shoptrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/simhashtrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/urlsegtrigger/test
+ - yweb/robot/kiwi_queries/robot/triggers/yapreviewtrigger/test
+ - yweb/robot/kiwi_queries/test_udf/python
+ - yweb/robot/refarc2omni/test
+ - yweb/safesearch/government/python/tests
+ - yweb/sitelinks/astrolabe/build_bna/candidates/tests/test_daily_logs
+ - yweb/sitelinks/astrolabe/build_bna/candidates/tests/test_merge_daily_logs
+ - yweb/sitelinks/astrolabe/build_bna/candidates/tests/test_nanos
+ - yweb/sitelinks/astrolabe/build_bna/candidates/tests/test_region
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_canonizations/test_apply_canonizations
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_canonizations/test_prepare_canonizations
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_gemini_input
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_generate_sitelinks_from_titles
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_get_candidates_from_refarc
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_naming_candidates
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_prepare_html_urls
+ - yweb/sitelinks/astrolabe/build_bna/naming/tests/test_prepare_input_for_refarc
+ - yweb/structhtml/mediawiki/tool/tests
+ - yweb/structhtml/microform/tool/tests/datavoctest
+ - yweb/structhtml/microform/tool/tests/microtests
+ - yweb/structhtml/microform/tool/tests/namevaltest
+ - yweb/structhtml/microform/tool/tests/structhtmltest
+ - yweb/structhtml/richsnippets/productoffer/tool/tests
+ - yweb/structhtml/richsnippets/recipe/tool/tests
+ - yweb/structhtml/richsnippets/semanticdata2json/tool/tests
+ - yweb/structhtml/richsnippets/videoobject/tool/tests
+ - yweb/structhtml/schemaorg/tool/tests
+ - yweb/video/index/vtriebuilder/tests
+ - yweb/video/mr_scripts/calcstaticfactors/tests
+ - yweb/video/mr_scripts/vmetamerge/tests
+ - yweb/video/robot/freshness/mr_sbrstats/tests
+ - yweb/video/series/heartbeat/tests
+ - yweb/video/tools/url2fastban/tests
+ - yweb/video/vprintwzrd_mr/tests
+ - yweb/webdaemons/explogdaemon/tests
+ - yweb/webscripts/video/fastrecrawl/fresh_deltas/tests
+ - yweb/webscripts/video/redirects_unwind
+ - yweb/yasap/pdb/pdb-backend/tests/lib/commands/set_market_merchant_data
+ - yweb/yasap/pdb/pdb-backend/tests/lib/its
+ - yweb/yasap/pdb/pdb-backend/tests/lib/mds
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/avatars
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/boards/resources
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/ban
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/bulk
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/complaints
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/creation
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/delete
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/delete_board
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/forbid_patch
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/get
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/image_props
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/log
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/market
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/merchants
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/organization
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/other
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/patch
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/samovar
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/series
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/shares
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/source_types
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/user
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards/resources/wish
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/celery
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/clicks
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/common
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/complaints
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/components
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/ephemeral
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/events/tasks
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/export
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/favorites
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/langdetect
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/metrics
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/object_answers
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/object_tags
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/organizations
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/pages
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/shares
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/stats
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/tasks
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/ugcdb
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/underside
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/user/resources
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/yauth
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/ydb
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/actions/tasks
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/boards
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/complaints
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/contents
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/e2e
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/idm
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/object_answers
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/recipes
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/resources
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/teasers
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/toloka
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/trashcan
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/turbo
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/users
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_ext/kombu
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_ext/mongoengine
+ - yweb/yasap/pdb/pdb-backend/tests/lib/saas
+ - yweb/yasap/pdb/pdb-backend/tests/lib/sb
+ - yweb/yasap/pdb/pdb-backend/tests/lib/videosearch
+ - yweb/yasap/pdb/pdb-backend/tests/lib/ydb
+ - yweb/yasap/pdb/quality/profile/action_v2/rtmr/tests
+ - yweb/yasap/pdb/quality/profile/fresh_profiles/event_log_converter_rtmr/tests
+ - yweb/yasap/pdb/quality/profile/redir_actions/rtmr_redir_actions/tests
+ - zen/rtmr/push_processing/tests
+ - quality/mapreduce/tests/common
+ - ads/factor_check/features/tests
+ - ads/libs/py_ml_factors/mt/baseline_model
+ - quality/user_sessions/createlib/qb3/parser/local_yt_test_example_proto_v2
+ - billing/agency_rewards/tests_platform
+ - balancer/test/functional/instance
+ - balancer/test/functional/aab_cookie_verify
+ - dict/mystem/tests
+ - infra/walle/server/tests
+ - market/forecaster/lite
+ - market/idx/marketindexer/medium_tests/yatf
+ - market/report/lite
+ - ofd/notifier/tests/test_unit
+ - saas/rtyserver_test/tests
+ - search/lingboost/saas/codecs/test_bundle_codecs/tests
+ - transfer_manager/server/tests
+ - yql/tests/s-expressions
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/boards
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/cards
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/events
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb/user
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/actions
+ - yweb/yasap/pdb/pdb-backend/tests/lib/podb_admin/cards
+ - ads/libs/py_autobudget/ft/test_ab_target_mapper
+ - ads/libs/py_autobudget/ft/test_attribution_preprocessor
+ - ads/libs/py_autobudget/ft/test_common_qid_mapper
+ - ads/libs/py_autobudget/ft/test_meaningful_goals_goal_id_mapper
+ - ads/libs/py_autobudget/ft/test_meaningful_goals_mapper
+ - ads/libs/py_autobudget/ft/test_meaningful_goals_to_column_mapper
+ - ads/libs/py_autobudget/ft/test_resampling_preprocessor
+ - ads/libs/py_autobudget/ft/test_reweighting
+ - ads/libs/py_autobudget/ft/test_row_duplicator_mapper
+ - ads/libs/py_autobudget/ft/test_scale_by_column_preprocessor
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/t
+ - ads/libs/py_mapreduce/yabs-mapreduce-modules/test_pt
+ - balancer/test/functional/rfc_http
+ - balancer/test/functional/dynamic
+ - balancer/test/functional/antirobot
+ - balancer/test/functional/h100
+ - balancer/test/functional/errordocument
+ - balancer/test/functional/active_check_reply
+ - balancer/test/functional/rendezvous_hashing
+ - balancer/test/functional/consistent_hashing
+ - balancer/test/functional/pingerprocess
+ - balancer/test/functional/unistat
+ - ads/sandbox_scripts/visibility_stats/fat
+ - ads/pytorch/lib/preprocess/medium_ut
+ - ads/pytorch/lib/online_learning/production/model_folder/medium_ut
+ - ads/pytorch/ads_pytorch_integration_test
+ - ads/nirvana/online_learning/prepare_factorization_table/tsar_preprocessor/ut
+ - ads/nirvana/automl/pipelines/mlmarines/medium_ut
+ - ads/nirvana/automl/lib/preprocess_pytorch/medium_ut
+ - ads/nirvana/automl/lib/metric_eval/medium_ut
+ - ads/nirvana/automl/lib/joiner/medium_ut
+ - ads/libs/py_ml_factors/ut/preprocessors
+ - ads/libs/py_ml_factors/ut/matrixnet
+ - ads/libs/py_lmcompute/ut
+ - ads/libs/py_lmcompute/ft
+ - ads/libs/py_autobudget/mt/test_attribution_preprocessor
+ - ads/bigkv/tensor_transport/tests
+ - scarab/api/python3
+ - mssngr/botplatform/src/vins_core
+ - mssngr/botplatform/src/bots/core/migrations
diff --git a/build/rules/flake8/ya.make b/build/rules/flake8/ya.make
new file mode 100644
index 0000000000..c77a54d621
--- /dev/null
+++ b/build/rules/flake8/ya.make
@@ -0,0 +1 @@
+OWNER(g:yatest g:python-contrib)
diff --git a/build/rules/go/.devexp.json b/build/rules/go/.devexp.json
new file mode 100644
index 0000000000..3a49601806
--- /dev/null
+++ b/build/rules/go/.devexp.json
@@ -0,0 +1,18 @@
+{
+ "auto_start": true,
+ "notification": "telegram",
+ "approve_count": 1,
+ "total_reviewers": 4,
+ "static_members": [
+ "buglloc",
+ "gzuykov",
+ "prime",
+ "sidh"
+ ],
+ "strict": true,
+ "reset_after_publish": true,
+ "update_status": true,
+ "update_reviewers": false,
+ "update_assignees": false,
+ "update_labels": true
+}
diff --git a/build/rules/go/README.md b/build/rules/go/README.md
new file mode 100644
index 0000000000..82b1b50b97
--- /dev/null
+++ b/build/rules/go/README.md
@@ -0,0 +1,9 @@
+# PEERDIR policy for Go
+
+## IMPORTANT
+None of files in this directory can be moved or split into multiple files without explicit OK from go-com@yandex-team.ru
+Doing otherwise will break vendoring tooling.
+
+ * `contrib.policy` - special exceptions for patched contribs
+ * `migrations.yaml` - exceptions for linters (no additions allowed except when implementing new linters or updating old ones)
+ * `vendor.policy` - general PEERDIR policy for contribs
diff --git a/build/rules/go/contrib.policy b/build/rules/go/contrib.policy
new file mode 100644
index 0000000000..1c7810e2bc
--- /dev/null
+++ b/build/rules/go/contrib.policy
@@ -0,0 +1,33 @@
+# Permanent exceptions for heavily-patched Go contribs. Those responsible must support them
+# in any way required (update on demand, fix bugs, etc).
+
+# CSADMIN-26541. responsible: maxk@, g:marketsre
+ALLOW market/sre/tools/config-primer/src/internal/blogic -> contrib/go/patched/hugo
+
+# CONTRIB-1627. responsible: g:edadeal-go
+ALLOW edadeal -> contrib/go/patched/cony
+ALLOW contrib/go/patched/cony -> contrib/go/patched/cony
+
+# STRM-1124. responsible: grihabor@, g:strm-admin
+ALLOW strm/plgo -> contrib/go/patched/m3u8
+ALLOW contrib/go/patched/m3u8/example -> contrib/go/patched/m3u8
+
+# CONTRIB-1496 RTP/RTCP stack for Go. responsible: rmcf@
+# Moved to contrib/go, because library is not go-gettable.
+ALLOW yabs/telephony/platform/internal/rtp -> contrib/go/GoRTP
+
+# STRM-4414. responsible: nkhitrov@, g:strm-admin
+ALLOW strm/gorshok -> contrib/go/patched/gobgp
+ALLOW contrib/go/patched/gobgp -> contrib/go/patched/gobgp
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/sirupsen/logrus
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/eapache/channels
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/dgryski/go-farm
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/google/uuid
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/spf13/viper
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/k-sone/critbitgo
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/coreos/go-systemd/daemon
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/jessevdk/go-flags
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/kr/pretty
+ALLOW contrib/go/patched/gobgp -> vendor/github.com/go-test/deep
+
+DENY .* -> contrib/go/patched/
diff --git a/build/rules/go/migrations.yaml b/build/rules/go/migrations.yaml
new file mode 100644
index 0000000000..c041d0fbb2
--- /dev/null
+++ b/build/rules/go/migrations.yaml
@@ -0,0 +1,99 @@
+migrations:
+ stylecheck:
+ checks:
+ - ST1001
+ - ST1003
+ - ST1005
+ - ST1006
+ - ST1008
+ - ST1011
+ - ST1012
+ - ST1013
+ - ST1015
+ - ST1016
+ - ST1017
+ - ST1018
+ packages:
+ - a.yandex-team.ru/cloud/blockstore/public/sdk/go/client
+ - a.yandex-team.ru/cloud/blockstore/public/sdk/go/client/ut
+ - a.yandex-team.ru/cloud/netinfra/tflow/sflow
+ - a.yandex-team.ru/cloud/serverless/triggers/internal/queue-processor
+ - a.yandex-team.ru/cloud/serverless/triggers/metrics
+ - a.yandex-team.ru/cloud/serverless/triggers/pkg/ymq
+ - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/iss3 # autogenerated
+ - a.yandex-team.ru/locdoc/doc/daas-farm/pkg/directory
+ - a.yandex-team.ru/locdoc/doc/daas-farm/pkg/linkresolver
+ - a.yandex-team.ru/locdoc/doc/daas-farm/pkg/linkresolver/tests
+ - a.yandex-team.ru/locdoc/doc/daas-farm/pkg/menugen
+ - a.yandex-team.ru/mail/imap-fuzzer
+ - a.yandex-team.ru/mail/imap-fuzzer/fuzz
+ - a.yandex-team.ru/mail/imap-fuzzer/fuzz/logic
+ - a.yandex-team.ru/mail/imap-fuzzer/fuzz/naughty
+ - a.yandex-team.ru/mail/imap-fuzzer/fuzz/operations
+ - a.yandex-team.ru/mail/imap-fuzzer/fuzz/types
+ - a.yandex-team.ru/mail/imap-fuzzer/imap
+ - a.yandex-team.ru/mail/payments-sdk-backend/backend/cmd/server
+ - a.yandex-team.ru/mail/payments-sdk-backend/backend/cmd/server_test
+ - a.yandex-team.ru/quasar/gackend
+ - a.yandex-team.ru/quasar/gackend/db
+ - a.yandex-team.ru/quasar/gackend_test
+ - a.yandex-team.ru/quasar/gackend/model
+ - a.yandex-team.ru/quasar/go/middleware
+ - a.yandex-team.ru/quasar/go/retryablehttp
+ - a.yandex-team.ru/quasar/go/zaplogger
+ - a.yandex-team.ru/quasar/tsup/db
+ - a.yandex-team.ru/quasar/tsup/server
+ - a.yandex-team.ru/cloud/iam/accessservice/client/go/cloudauth
+ - a.yandex-team.ru/cloud/iam/accessservice/client/go/cloudauth_test
+ protonaming:
+ packages:
+ - a.yandex-team.ru/extsearch/video/content_id/proto
+ - a.yandex-team.ru/extsearch/video/robot/rt_transcoder/ad/proto
+ - a.yandex-team.ru/extsearch/video/robot/rt_transcoder/ng/proto
+ - a.yandex-team.ru/extsearch/video/robot/rt_transcoder/proto
+ - a.yandex-team.ru/extsearch/video/robot/rt_transcoder/qproxy/proto
+ - a.yandex-team.ru/infra/diskmanager/proto
+ - a.yandex-team.ru/infra/maxwell/go/proto
+ - a.yandex-team.ru/infra/nanny2/proto
+ - a.yandex-team.ru/infra/ya_salt/proto
+ - a.yandex-team.ru/mds/valve/proto
+ - a.yandex-team.ru/transfer_manager/go/cmd/yql_server/proto
+ - a.yandex-team.ru/transfer_manager/go/proto
+ - a.yandex-team.ru/yabs/proto
+ - a.yandex-team.ru/yweb/video/faas/proto
+ - a.yandex-team.ru/zen/integration/proto
+ unusedwrite:
+ packages:
+ - a.yandex-team.ru/alice/gamma/sdk/golang
+ - a.yandex-team.ru/alice/gamma/sdk/golang_test
+ - a.yandex-team.ru/alice/iot/adapters/tuya_adapter/server
+ - a.yandex-team.ru/alice/iot/bulbasaur/db
+ - a.yandex-team.ru/alice/iot/bulbasaur/db/gotest/data
+ - a.yandex-team.ru/alice/iot/bulbasaur/db_test
+ - a.yandex-team.ru/alice/iot/bulbasaur/model
+ - a.yandex-team.ru/alice/iot/bulbasaur/model_test
+ - a.yandex-team.ru/cloud/compute/snapshot/snapshot/lib/tasks
+ - a.yandex-team.ru/cloud/compute/snapshot/snapshot/lib/tasks_test
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/core/types
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/core/types_test
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/datastore/redis
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/datastore/redis_test
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/dbspecific
+ - a.yandex-team.ru/cloud/mdb/mdb-health/pkg/dbspecific_test
+ - a.yandex-team.ru/cloud/mdb/mdb-internal-api/internal/logic/internal/compute/provider
+ - a.yandex-team.ru/cloud/mdb/mdb-internal-api/internal/logic/internal/compute/provider_test
+ - a.yandex-team.ru/cloud/mdb/mdb-internal-api/internal/logic/internal/sessions/provider
+ - a.yandex-team.ru/cloud/mdb/mdb-internal-api/internal/logic/internal/sessions/provider_test
+ - a.yandex-team.ru/cloud/ps/gore/internal/app/api
+ - a.yandex-team.ru/direct/infra/dt-db-manager/cmd/server
+ - a.yandex-team.ru/market/logistics/wms-load/api
+ - a.yandex-team.ru/market/logistics/wms-load/api_test
+ - a.yandex-team.ru/mds/s3/quota_controller/internal/yarl
+ - a.yandex-team.ru/strm/plgo/pkg/playlist/mpd
+ - a.yandex-team.ru/strm/plgo/pkg/playlist/mpd_test
+ - a.yandex-team.ru/travel/avia/shared_flights/api/internal/services/flightdata
+ - a.yandex-team.ru/travel/avia/shared_flights/api/internal/services/flightdata_test
+ - a.yandex-team.ru/travel/avia/shared_flights/api/internal/storage/flight
+ - a.yandex-team.ru/travel/avia/shared_flights/api/internal/storage/flight_test
+ - a.yandex-team.ru/travel/library/go/service_template/internal/schedule/service/schedule
+ - a.yandex-team.ru/zootopia/analytics/drive/operations/orders
diff --git a/build/rules/go/vendor.policy b/build/rules/go/vendor.policy
new file mode 100644
index 0000000000..b6afff53d6
--- /dev/null
+++ b/build/rules/go/vendor.policy
@@ -0,0 +1,1036 @@
+# IMPORTANT
+# This file cannot be moved or split into multiple files without explicit OK from go-com@yandex-team.ru
+# Doing otherwise will break vendoring tooling.
+
+ALLOW vendor/ -> .*
+
+# CONTRIB-2311 gossip discovery protocol implementation
+ALLOW .* -> vendor/github.com/hashicorp/memberlist
+
+# CONTRIB-2177 testing helpers for terraform
+ALLOW .* -> vendor/github.com/gruntwork-io/terratest/modules/terraform
+
+# CONTRIB-2078 provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
+ALLOW .* -> vendor/github.com/prometheus/procfs
+
+# CONTRIB-2166
+ALLOW .* -> vendor/github.com/openconfig/gnmi
+
+# CONTRIB-2197
+ALLOW .* -> vendor/k8s.io/client-go/discovery
+ALLOW .* -> vendor/k8s.io/client-go/discovery/fake
+ALLOW .* -> vendor/k8s.io/client-go/kubernetes
+ALLOW .* -> vendor/k8s.io/client-go/plugin/pkg/client
+ALLOW .* -> vendor/k8s.io/client-go/plugin/pkg/client/auth/azure
+ALLOW .* -> vendor/k8s.io/client-go/plugin/pkg/client/auth/exec
+ALLOW .* -> vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp
+ALLOW .* -> vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc
+ALLOW .* -> vendor/k8s.io/client-go/rest
+ALLOW .* -> vendor/k8s.io/client-go/testing
+ALLOW .* -> vendor/k8s.io/client-go/tools/auth
+ALLOW .* -> vendor/k8s.io/client-go/tools/cache
+ALLOW .* -> vendor/k8s.io/client-go/tools/clientcmd
+ALLOW .* -> vendor/k8s.io/client-go/tools/events
+ALLOW .* -> vendor/k8s.io/client-go/tools/leaderelection
+ALLOW .* -> vendor/k8s.io/client-go/tools/metrics
+ALLOW .* -> vendor/k8s.io/client-go/tools/pager
+ALLOW .* -> vendor/k8s.io/client-go/tools/portforward
+ALLOW .* -> vendor/k8s.io/client-go/tools/record
+ALLOW .* -> vendor/k8s.io/client-go/tools/reference
+ALLOW .* -> vendor/k8s.io/client-go/tools/remotecommand
+ALLOW .* -> vendor/k8s.io/client-go/tools/watch
+ALLOW .* -> vendor/k8s.io/client-go/util/flowcontrol
+ALLOW .* -> vendor/k8s.io/client-go/util/workqueue
+ALLOW .* -> vendor/k8s.io/api/apps/v1
+ALLOW .* -> vendor/k8s.io/api/authentication/v1
+ALLOW .* -> vendor/k8s.io/api/batch/v1
+ALLOW .* -> vendor/k8s.io/api/core/v1
+ALLOW .* -> vendor/k8s.io/api/rbac/v1
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/apis/meta/v1
+ALLOW .* -> vendor/k8s.io/client-go/util/homedir
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/api/errors
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/labels
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/runtime
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/runtime/schema
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/runtime/serializer
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/types
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/util/clock
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/util/runtime
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/util/wait
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/watch
+ALLOW .* -> vendor/k8s.io/apimachinery/pkg/api/resource
+
+# CONTRIB-2279
+ALLOW .* -> vendor/sigs.k8s.io/controller-runtime
+ALLOW .* -> vendor/github.com/go-logr/logr
+
+# CONTRIB-2195
+ALLOW .* -> vendor/github.com/timakin/bodyclose
+# github.com/gostaticanalysis/comment tests depends on the unlicensed package https://github.com/tenntenn/text
+DENY .* -> vendor/github.com/gostaticanalysis/comment;test
+
+# CONTRIB-2196
+ALLOW .* -> vendor/github.com/jingyugao/rowserrcheck
+
+# CONTRIB-2163
+ALLOW .* -> vendor/go.temporal.io/sdk
+ALLOW .* -> vendor/go.temporal.io/api
+
+# CONTRIB-2353
+ALLOW vendor -> vendor/github.com/aromanovich/thrift
+ALLOW .* -> vendor/go.temporal.io/server
+ALLOW infra/temporal/swat/server -> vendor/github.com/urfave/cli
+ALLOW infra/temporal/swat/tctl -> vendor/github.com/urfave/cli
+ALLOW infra/temporal -> vendor/github.com/uber-go/tally
+
+# CONTRIB-2116
+ALLOW .* -> vendor/github.com/google/licensecheck
+
+# CONTRIB-2087
+ALLOW .* -> vendor/github.com/armon/go-radix
+
+# CONTRIB-1972 stomp protocol
+ALLOW .* -> vendor/github.com/go-stomp/stomp
+
+# CONTRIB-1946 htmp tag selecting / parsing
+ALLOW .* -> vendor/github.com/andybalholm/cascadia
+
+# CONTRIB-2082 prometheus-libvirt-exporter
+ALLOW .* -> vendor/github.com/zhangjianweibj/prometheus-libvirt-exporter
+
+# CONTRIB-2086 go-libvirt
+ALLOW .* -> vendor/github.com/digitalocean/go-libvirt
+
+# CONTRIB-1872 pure ipp proto implementation
+ALLOW .* -> vendor/github.com/phin1x/go-ipp
+
+# CONTRIB-2113 gobreaker
+ALLOW .* -> vendor/github.com/sony/gobreaker
+
+# Validate and define text-based and dynamic configuration
+ALLOW .* -> vendor/cuelang.org/go
+
+# driver for write to and read from XLSX files
+ALLOW .* -> vendor/github.com/360EntSecGroup-Skylar/excelize/v2
+
+# in-process redis server for tests
+ALLOW .* -> vendor/github.com/alicebob/miniredis/v2
+
+# AMQP client with RabbitMQ extensions
+ALLOW .* -> vendor/github.com/streadway/amqp
+
+# AWS client libraries
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/aws
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/s3
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/sqs
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/kms
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/ec2
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/route53
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/kinesis
+ALLOW .* -> vendor/github.com/aws/aws-sdk-go/service/sts
+
+# TOML parser/encoder with reflection
+ALLOW .* -> vendor/github.com/BurntSushi/toml
+
+# helpers for data sizes (kilobytes, petabytes), human readable sizes, parsing
+ALLOW .* -> vendor/github.com/c2h5oh/datasize
+
+# Disable tests because testdata won't fit into arcadia commit.
+DENY .* -> vendor/github.com/go-git/go-git/v5/storage/test
+DENY .* -> vendor/github.com/go-git/go-git/v5/plumbing/transport/test
+DENY .* -> vendor/github.com/go-git/go-git/v5;test
+ALLOW .* -> vendor/github.com/go-git/go-git/v5
+ALLOW .* -> vendor/github.com/go-git/go-billy/v5
+
+# etcd client
+DENY .* -> vendor/go.etcd.io/etcd/clientv3/naming
+ALLOW .* -> vendor/go.etcd.io/etcd/mvcc
+ALLOW .* -> vendor/go.etcd.io/etcd/etcdserver/api
+ALLOW .* -> vendor/go.etcd.io/etcd/wal
+ALLOW .* -> vendor/go.etcd.io/etcd/raft
+ALLOW .* -> vendor/go.etcd.io/etcd/clientv3
+ALLOW .* -> vendor/go.etcd.io/etcd/pkg/fileutil
+ALLOW .* -> vendor/go.etcd.io/etcd/pkg/stringutil
+ALLOW .* -> vendor/go.etcd.io/etcd/pkg/transport
+ALLOW .* -> vendor/go.etcd.io/etcd/pkg/types
+
+# logging to systemd
+ALLOW .* -> vendor/github.com/coreos/go-systemd/journal
+
+# CONTRIB-2336 logging to systemd v22
+ALLOW .* -> vendor/github.com/coreos/go-systemd/v22/journal
+
+# systemd dbus
+ALLOW .* -> vendor/github.com/coreos/go-systemd/v22/dbus
+
+# mocking for database/sql
+ALLOW .* -> vendor/github.com/DATA-DOG/go-sqlmock
+
+# Cucumber-like BDD for Go
+## New location
+ALLOW .* -> vendor/github.com/cucumber/godog
+## Old location (deprecated)
+ALLOW .* -> vendor/github.com/DATA-DOG/godog
+
+# pretty printer for GO
+ALLOW .* -> vendor/github.com/davecgh/go-spew/spew
+
+# CONTRIB-425 implementation of JSON Web Tokens (JWT)
+ALLOW .* -> vendor/github.com/golang-jwt/jwt
+
+# Docker API client
+# docker tests depends on broken package: gotest.tools
+DENY .* -> vendor/github.com/docker/docker;test
+DENY .* -> vendor/github.com/docker/docker/api/server
+DENY .* -> vendor/github.com/docker/docker/api/types/backend
+ALLOW .* -> vendor/github.com/docker/docker/client
+ALLOW .* -> vendor/github.com/docker/docker/api
+ALLOW .* -> vendor/github.com/docker/go-connections
+
+# cross-platform file system notifications
+ALLOW .* -> vendor/github.com/fsnotify/fsnotify
+
+# lightweight, idiomatic and composable router
+ALLOW .* -> vendor/github.com/go-chi/chi/v5
+
+# a pure Go MySQL driver
+ALLOW .* -> vendor/github.com/go-sql-driver/mysql
+
+# a Go MSSQL driver
+ALLOW .* -> vendor/github.com/denisenkom/go-mssqldb
+
+# thread-safe file locking library
+ALLOW .* -> vendor/github.com/gofrs/flock
+
+# a pure Go implementation of Universally Unique Identifiers
+ALLOW .* -> vendor/github.com/gofrs/uuid
+
+# websocket protocol
+ALLOW .* -> vendor/github.com/gorilla/websocket
+
+# http sessions with cookie and filesystem session storage
+ALLOW .* -> vendor/github.com/gorilla/sessions
+
+# Package gorilla/schema fills a struct with form values
+ALLOW .* -> vendor/github.com/gorilla/schema
+
+# S2 geometry
+ALLOW .* -> vendor/github.com/golang/geo
+
+# snappy compression
+ALLOW .* -> vendor/github.com/golang/snappy
+
+# CONTRIB-632, CONTRIB-1992 API for sentry
+DENY .* -> vendor/github.com/AndreasBriese/bbloom;test
+DENY .* -> vendor/github.com/getsentry/sentry-go;test
+DENY .* -> vendor/github.com/gavv/httpexpect/_examples
+DENY .* -> vendor/github.com/getsentry/sentry-go/example
+DENY .* -> vendor/github.com/getsentry/sentry-go/fasthttp
+DENY .* -> vendor/github.com/getsentry/sentry-go/gin
+DENY .* -> vendor/github.com/getsentry/sentry-go/iris
+DENY .* -> vendor/github.com/getsentry/sentry-go/martini
+DENY .* -> vendor/github.com/getsentry/sentry-go/negroni
+DENY .* -> vendor/github.com/rs/cors/examples
+DENY .* -> vendor/github.com/rs/cors/wrapper/gin
+
+ALLOW .* -> vendor/github.com/getsentry/sentry-go
+ALLOW .* -> vendor/github.com/getsentry/raven-go
+
+# configuration library
+ALLOW .* -> vendor/github.com/heetch/confita
+
+# string case conversion library
+ALLOW .* -> vendor/github.com/iancoleman/strcase
+
+# PostgreSQL driver and toolkit for Go
+ALLOW .* -> vendor/github.com/jackc/pgx/v4
+ALLOW .* -> vendor/github.com/jackc/pgconn
+ALLOW .* -> vendor/github.com/jackc/pgtype
+ALLOW .* -> vendor/github.com/jackc/pgerrcode
+ALLOW .* -> vendor/github.com/jackc/pgproto3/v2
+ALLOW .* -> vendor/github.com/jackc/pgio
+ALLOW .* -> vendor/github.com/jackc/pglogrepl
+
+# database/sql wrapper with a lot of helper functions
+ALLOW .* -> vendor/github.com/jmoiron/sqlx
+
+# gorm and drivers
+ALLOW .* -> vendor/gorm.io/gorm
+ALLOW .* -> vendor/gorm.io/driver/sqlite
+ALLOW .* -> vendor/gorm.io/driver/postgres
+ALLOW .* -> vendor/gorm.io/plugin/dbresolver
+
+# clock mock for tests
+ALLOW .* -> vendor/github.com/jonboulle/clockwork
+
+# LRU Cache with TTL
+ALLOW .* -> vendor/github.com/karlseguin/ccache/v2
+
+# Garbage collector-sensitive patricia tree for IP/CIDR tagging
+ALLOW .* -> vendor/github.com/kentik/patricia
+
+# driver for ClickHouse column-oriented database management system
+ALLOW .* -> vendor/github.com/ClickHouse/clickhouse-go
+
+# High performance, minimalist web framework
+ALLOW .* -> vendor/github.com/labstack/echo/v4
+
+# fluent SQL builder
+ALLOW .* -> vendor/github.com/Masterminds/squirrel
+
+# isatty for golang
+ALLOW .* -> vendor/github.com/mattn/go-isatty
+
+# go-sqlite3 for golang
+ALLOW .* -> vendor/github.com/mattn/go-sqlite3
+
+# complete and usable DNS library
+ALLOW .* -> vendor/github.com/miekg/dns
+
+# deep copying values
+ALLOW .* -> vendor/github.com/mitchellh/copystructure
+
+# decoding generic map values to structures and vice versa
+ALLOW .* -> vendor/github.com/mitchellh/mapstructure
+
+# library for detecting and expanding the user's home directory without cgo
+ALLOW .* -> vendor/github.com/mitchellh/go-homedir
+
+# A well tested and comprehensive Golang statistics library package with no dependencies
+ALLOW .* -> vendor/github.com/montanaflynn/stats
+
+# runtime dependencies of go-swagger
+ALLOW .* -> vendor/github.com/go-openapi
+
+# CONTRIB-469: swagger code generator for both client and server
+ALLOW .* -> vendor/github.com/go-swagger/go-swagger/cmd/swagger
+
+# redis client
+ALLOW .* -> vendor/github.com/go-redis/redis/v8
+
+# library for accessing the GitHub API v3
+ALLOW .* -> vendor/github.com/google/go-github/v35/github
+
+# fast JSON serializer for golang. relies on code generation.
+ALLOW .* -> vendor/github.com/mailru/easyjson
+
+# lz4 compression codec
+ALLOW .* -> vendor/github.com/pierrec/lz4
+
+# library for HTML DOM manipulations and searching nodes by CSS selectors
+ALLOW .* -> vendor/github.com/PuerkitoBio/goquery
+
+# prometheus client
+ALLOW .* -> vendor/github.com/prometheus/client_golang
+ALLOW .* -> vendor/github.com/prometheus/client_model
+ALLOW .* -> vendor/github.com/prometheus/common
+
+# ZooKeeper client
+ALLOW .* -> vendor/github.com/go-zookeeper/zk
+
+# Consistent hashring implementation (using the same algorithm as libketama)
+ALLOW .* -> vendor/github.com/serialx/hashring
+
+# Slack API in Go
+ALLOW .* -> vendor/github.com/slack-go/slack
+
+# Text diffing.
+ALLOW .* -> vendor/github.com/pmezard/go-difflib
+
+# statsd client library
+ALLOW .* -> vendor/github.com/smira/go-statsd
+
+# ICMP Ping library
+ALLOW .* -> vendor/github.com/sparrc/go-ping
+
+# safe and easy casting from one type to another
+ALLOW .* -> vendor/github.com/spf13/cast
+
+# library for creating CLI applications
+ALLOW .* -> vendor/github.com/spf13/cobra
+
+# drop-in replacement for stdlib flag module
+ALLOW .* -> vendor/github.com/spf13/pflag
+
+# a toolkit with common test assertions and mocks
+ALLOW .* -> vendor/github.com/stretchr/testify
+
+# very fast json parser and encoder.
+# uses dynamic message structure, suitable for cases where json structure is not known in advance.
+ALLOW .* -> vendor/github.com/valyala/fastjson
+
+# xxhash32 and xxhash64 hash functions
+ALLOW .* -> vendor/github.com/OneOfOne/xxhash
+
+# default logging library. See also: library/go/core/log.
+ALLOW .* -> vendor/go.uber.org/zap
+
+# package for writing logs to rolling files.
+ALLOW .* -> vendor/gopkg.in/natefinch/lumberjack.v2
+
+# Find goroutine leaks in tests.
+ALLOW .* -> vendor/go.uber.org/goleak
+
+# golang.org/x/net
+ALLOW .* -> vendor/golang.org/x/net
+
+# golang.org/x/oauth2
+ALLOW .* -> vendor/golang.org/x/oauth2
+
+# golang.org/x/crypto
+ALLOW .* -> vendor/golang.org/x/crypto
+
+# golang.org/x/tools
+ALLOW .* -> vendor/golang.org/x/tools
+
+# golang.org/x/sync
+ALLOW .* -> vendor/golang.org/x/sync
+
+# golang.org/x/text
+ALLOW .* -> vendor/golang.org/x/text
+
+# golang.org/x/time
+ALLOW .* -> vendor/golang.org/x/time
+
+# golang.org/x/image/webp
+ALLOW .* -> vendor/golang.org/x/image/webp
+
+# less experimental implementation of Go error inspection
+ALLOW .* -> vendor/golang.org/x/xerrors
+
+# golang.org/x/sys required for SO_REUSEPORT, for example
+ALLOW .* -> vendor/golang.org/x/sys
+
+ALLOW .* -> vendor/golang.org/x/mod
+
+# basic LDAP v3 functionality for the GO programming language
+ALLOW .* -> vendor/gopkg.in/ldap.v3
+
+# simple HTTP and REST client library
+ALLOW .* -> vendor/github.com/go-resty/resty/v2
+
+# YAML support for Go
+ALLOW .* -> vendor/gopkg.in/yaml.v2
+
+# INI file format
+ALLOW .* -> vendor/gopkg.in/ini.v1
+
+# JSONPath
+ALLOW .* -> vendor/github.com/PaesslerAG/jsonpath
+
+# Protocol buffers
+ALLOW .* -> vendor/github.com/golang/protobuf
+ALLOW .* -> vendor/google.golang.org/protobuf
+
+# Google RPC
+ALLOW .* -> vendor/google.golang.org/grpc
+
+# Go generated proto packages
+ALLOW .* -> vendor/google.golang.org/genproto/protobuf
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/api
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/api
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/rpc
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/iam
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/logging
+ALLOW .* -> vendor/google.golang.org/genproto/googleapis/type
+
+# Usefull GRPC interceptors
+ALLOW .* -> vendor/github.com/grpc-ecosystem/go-grpc-middleware
+
+# GRPC Intercaptors for Prometheus monitoring
+ALLOW .* -> vendor/github.com/grpc-ecosystem/go-grpc-prometheus
+
+# Protobuf and gRPC reflection
+ALLOW .* -> vendor/github.com/jhump/protoreflect
+
+# gRPC opentracing
+ALLOW .* -> vendor/github.com/opentracing-contrib/go-grpc
+
+# Job Scheduling Package
+ALLOW .* -> vendor/github.com/jasonlvhit/gocron
+
+# The MongoDB supported driver for Go
+ALLOW .* -> vendor/go.mongodb.org/mongo-driver
+
+# Package for comparing Go values in tests
+ALLOW .* -> vendor/github.com/google/go-cmp
+
+# CORS is a net/http handler implementing Cross Origin Resource Sharing W3 specification
+ALLOW .* -> vendor/github.com/rs/cors
+
+# read and write from the serial port as a stream of bytes
+ALLOW .* -> vendor/github.com/tarm/serial
+
+# generation tool and serialization library for MessagePack
+ALLOW .* -> vendor/github.com/tinylib/msgp
+ALLOW .* -> vendor/github.com/vmihailenco/msgpack
+
+# Generate fancy REST API from grpc api
+ALLOW .* -> vendor/github.com/grpc-ecosystem/grpc-gateway
+
+# tus: the open protocol for resumable file uploads
+ALLOW .* -> vendor/github.com/tus/tusd
+
+# Fast, fully fledged murmur3 in Go.
+ALLOW .* -> vendor/github.com/twmb/murmur3
+
+# gopsutil: psutil for golang
+ALLOW .* -> vendor/github.com/shirou/gopsutil/v3
+
+# Go Imagick is a Go bind to ImageMagick's MagickWand C API
+ALLOW .* -> vendor/gopkg.in/gographics/imagick.v2
+
+# fixed-size thread safe LRU cache
+ALLOW .* -> vendor/github.com/hashicorp/golang-lru
+
+# A wrapper around os/exec.Cmd to run external commands asynchronously (for Linux and macOS)
+ALLOW .* -> vendor/github.com/go-cmd/cmd
+
+# NVIDIA Management Library (NVML) is a C-based API for monitoring and managing NVIDIA GPU devices (for Linux only)
+ALLOW .* -> vendor/github.com/NVIDIA/gpu-monitoring-tools/bindings/go
+
+# Opentracing interface and implementation.
+ALLOW .* -> vendor/github.com/uber/jaeger-client-go
+ALLOW .* -> vendor/github.com/uber/jaeger-lib/metrics
+ALLOW .* -> vendor/github.com/opentracing/opentracing-go
+
+# Opentracing contribs
+# CONTRIB-1778
+ALLOW .* -> vendor/github.com/opentracing-contrib/go-stdlib
+
+# CONTRIB-1299. Date parser. resposible: tserakhau@
+ALLOW .* -> vendor/github.com/araddon/dateparse
+
+# Semantic versioning parsing and comparision library
+ALLOW .* -> vendor/github.com/blang/semver/v4
+
+# Go implementation of SipHash-2-4
+ALLOW .* -> vendor/github.com/dchest/siphash
+
+# CONTRIB-1415. Atomic.
+ALLOW .* -> vendor/go.uber.org/atomic
+
+# CONTRIB-1302. Godbus goes to Arcadia
+ALLOW .* -> vendor/github.com/godbus/dbus/v5
+
+# CONTRIB-1300. Osquery SDK goes to Arcadia
+ALLOW .* -> vendor/github.com/kolide/osquery-go
+
+# CONTRIB-1383. Groupcache is a caching and cache-filling library
+ALLOW .* -> vendor/github.com/golang/groupcache
+
+# Mocking framework for go.
+ALLOW .* -> vendor/github.com/golang/mock
+
+# Go load generator. Can be used as library for custom load tools. CONTRIB-1420
+ALLOW .* -> vendor/github.com/yandex/pandora
+
+# CONTRIB-1450 Apple notifcation service client
+ALLOW .* -> vendor/github.com/sideshow/apns2
+
+# CONTRIB-1459 Merging same-type structs with exported fields initialized as zero value of their type and same-types maps
+ALLOW .* -> vendor/github.com/imdario/mergo
+
+# CONTRIB-1468 Terminal interactive progress bar
+ALLOW .* -> vendor/github.com/vbauerster/mpb
+
+# CONTRIB-1451 Google firebase library
+ALLOW .* -> vendor/firebase.google.com/go
+#transitive dependency for firebase
+ALLOW .* -> vendor/google.golang.org/api/option
+
+# CONTRIB-1899 Firebase Remote Config client library
+ALLOW .* -> vendor/google.golang.org/api/firebaseremoteconfig/v1
+
+# CONTRIB-1497 Go package to encode and decode ITU-T G.711 sound data
+ALLOW .* -> vendor/github.com/zaf/g711
+
+# CONTRIB-1505 The exponential backoff algorithm & retry library
+ALLOW .* -> vendor/github.com/cenkalti/backoff/v4
+
+# CONTRIB-1491 A parser library for Go
+ALLOW .* -> vendor/github.com/alecthomas/participle
+
+# CONTRIB-1539 staticcheck
+ALLOW library/go/yolint -> vendor/honnef.co/go/tools
+
+# CONTRIB-1542 Simple netlink library for go.
+ALLOW .* -> vendor/github.com/vishvananda/netlink
+
+# CONTRIB-1542 Simple network namespace handling for go.
+ALLOW .* -> vendor/github.com/vishvananda/netns
+
+# CONTRIB-1545 Go bindings for creating BPF programs.
+ALLOW .* -> vendor/github.com/iovisor/gobpf
+
+# CONTRIB-1878 pure Go library for loading, compiling, and debugging eBPF programs
+ALLOW .* -> vendor/github.com/cilium/ebpf
+
+# CONTRIB-1561 Go pretty format for numbers
+ALLOW .* -> vendor/github.com/dustin/go-humanize
+
+# CONTRIB-1615 Go pretty table formatter similar to python PrettyTable
+ALLOW .* -> vendor/github.com/olekukonko/tablewriter
+
+# CONTRIB-1596 embedded key/value database
+ALLOW .* -> vendor/go.etcd.io/bbolt
+
+# CONTRIB-1616 Gountries provides structured countries data
+ALLOW .* -> vendor/github.com/pariz/gountries
+
+# CONTRIB-1630- Go binding for qemu/qmp runtime
+ALLOW .* -> vendor/github.com/intel/govmm/qemu
+
+# CONTRIB-1650 golang ftp server library with a sample implementation
+ALLOW .* -> vendor/github.com/fclairamb/ftpserver
+
+# CONTRIB-1647 golang binlog replication implementation
+ALLOW .* -> vendor/github.com/siddontang/go-mysql/replication
+ALLOW .* -> vendor/github.com/siddontang/go-mysql/canal
+ALLOW .* -> vendor/github.com/siddontang/go-mysql/mysql
+
+# CONTRIB-1849 binding to internal log for binlog replication
+ALLOW library/go/core/log/compat/golog -> vendor/github.com/siddontang/go-log/log
+
+# CONTRIB-1656 golang sftp server library
+ALLOW .* -> vendor/github.com/pkg/sftp
+
+# CONTRIB-1670
+ALLOW .* -> vendor/github.com/soniah/gosnmp
+
+# CONTRIB-1686 markdown parser
+ALLOW .* -> vendor/github.com/yuin/goldmark
+
+# CONTRIB-1681 A FileSystem Abstraction System for Go
+ALLOW .* -> vendor/github.com/spf13/afero
+
+# CONTRIB-1702 parse and generate XML easily in go
+ALLOW .* -> vendor/github.com/beevik/etree
+
+# CONTRIB-1703 telebot client for telegram. responsible: alittleprince@
+ALLOW .* -> vendor/gopkg.in/tucnak/telebot.v2
+
+# CONTRIB-1726 helpers for working with protobuf field masks
+ALLOW .* -> vendor/github.com/mennanov/fieldmask-utils
+
+# CONTRIB-1810 Fast directory traversal for Golang
+ALLOW .* -> vendor/github.com/karrick/godirwalk
+
+# CONTRIB-1864 Zstandard (zstd) data compression algorithm
+ALLOW .* -> vendor/github.com/klauspost/compress/zstd
+
+# CONTRIB-1865 Decorated Syntax Tree for Go AST
+ALLOW .* -> vendor/github.com/dave/dst
+
+# CONTRIB-1874 Parse and demux MPEG Transport Streams
+ALLOW .* -> vendor/github.com/asticode/go-astits
+
+# CONTRIB-1896 Fast, portable, non-Turing complete expression evaluation with gradual typing
+ALLOW .* -> vendor/github.com/google/cel-go
+
+# CONTRIB-1654 Hard to misuse extensible crypto library
+ALLOW .* -> vendor/github.com/google/tink/go
+
+# CONTRIB-1907 Parser of the Graphviz DOT language
+ALLOW .* -> vendor/github.com/awalterschulze/gographviz
+
+# CONTRIB-1923 memcache client
+ALLOW .* -> vendor/github.com/bradfitz/gomemcache
+
+# Yandex' hasql
+ALLOW .* -> vendor/golang.yandex/hasql
+
+# CONTRIB-1974 Optimized Sha256
+ALLOW .* -> vendor/github.com/minio/sha256-simd
+
+# CONTRIB-1979 command line editor with history
+ALLOW .* -> vendor/github.com/peterh/liner
+
+# CONTRIB-1999 strongSwan vici client library
+ALLOW .* -> vendor/github.com/strongswan/govici/vici
+
+# CONTRIB-2002 A Go implementation of RTP
+ALLOW .* -> vendor/github.com/pion/rtp
+
+# CONTRIB-1959 Добавить casbin
+ALLOW .* -> vendor/github.com/casbin/casbin/v2
+
+# CONTRIB-2027 caddy
+ALLOW infra/rsm/dnsmanager/internal/libcoredns -> vendor/github.com/coredns/caddy
+
+# CONTRIB-1931 coredns
+ALLOW .* -> vendor/github.com/coredns/coredns/request
+ALLOW .* -> vendor/github.com/coredns/coredns/core/dnsserver
+ALLOW .* -> vendor/github.com/coredns/coredns/coremain
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/bind
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/cache
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/chaos
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/forward
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/file
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/health
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/log
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/metrics
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/pkg
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/reload
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/rewrite
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/ready
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/root
+ALLOW .* -> vendor/github.com/coredns/coredns/plugin/loadbalance
+
+# CONTRIB-2021
+ALLOW .* -> vendor/github.com/shopspring/decimal
+
+# CONTRIB-2050
+ALLOW .* -> vendor/github.com/brianvoe/gofakeit/v6
+
+# CONTRIB-2051
+ALLOW .* -> vendor/github.com/envoyproxy/go-control-plane
+
+# CONTRIB-2043
+ALLOW .* -> vendor/github.com/xitongsys/parquet-go
+ALLOW vendor -> vendor/github.com/slon/thrift
+
+# CONTRIB-2063 flatbuffers support
+ALLOW .* -> vendor/github.com/google/flatbuffers/go
+
+# CONTRIB-2073
+ALLOW .* -> vendor/github.com/andybalholm/brotli
+
+# CONTRIB-2081 BTree implementation for Go
+ALLOW .* -> vendor/github.com/google/btree
+
+# CONTRIB-2136 simple lexer for go, it's like shlex.py with whitespace_split=True
+ALLOW .* -> vendor/github.com/google/shlex
+
+# CONTRIB-2084 Word transformation
+ALLOW .* -> vendor/github.com/jinzhu/inflection
+#
+# CONTRIB-2069
+ALLOW .* -> vendor/github.com/coredhcp/coredhcp
+ALLOW .* -> vendor/github.com/insomniacslk/dhcp
+
+# CONTRIB-2094
+ALLOW .* -> vendor/github.com/osrg/gobgp
+
+#
+# CONTRIB-2097 QUIC(HTTP/3) implementation library
+#
+ALLOW .* -> vendor/github.com/lucas-clemente/quic-go
+
+# CONTRIB-2111 distributed lock on redis
+ALLOW .* -> vendor/github.com/go-redsync/redsync/v4
+
+ALLOW library/go/core/log/compat/logrus -> vendor/github.com/sirupsen/logrus
+
+# CONTRIB-2127
+ALLOW .* -> vendor/github.com/hashicorp/terraform-plugin-sdk/v2
+
+# CONTRIB-2139 library for building GraphQL servers without any fuss.
+ALLOW .* -> vendor/github.com/99designs/gqlgen
+ALLOW .* -> vendor/github.com/vektah/gqlparser/v2
+
+# CONTRIB-2148 dsl for json generating
+DENY .* -> vendor/github.com/google/go-jsonnet/c-bindings
+ALLOW .* -> vendor/github.com/google/go-jsonnet
+
+# CONTRIB-2152 JMESPath is a query language for JSON
+ALLOW .* -> vendor/github.com/jmespath/go-jmespath
+
+# CONTRIB-2156 library that communicates directly with a TPM device on Linux or Windows machines
+ALLOW .* -> vendor/github.com/google/go-tpm/tpm2
+ALLOW .* -> vendor/github.com/google/go-tpm/tpmutil
+
+# CONTRIB-2165: Go-bindings for using parsers generated by ANTLR4
+ALLOW .* -> vendor/github.com/antlr/antlr4/runtime/Go/antlr
+
+# CONTRIB-2216: CGO-based library for fast ZSTD compression and decompression.
+ALLOW .* -> vendor/github.com/DataDog/zstd
+
+# CONTRIB-2234
+ALLOW .* -> vendor/github.com/google/gopacket
+
+# CONTRIB-2235 library for building interactive prompts on terminals.
+ALLOW .* -> vendor/github.com/AlecAivazis/survey/v2
+
+# CONTRIB-2224
+ALLOW .* -> vendor/github.com/segmentio/kafka-go
+
+# CONTRIB-2240 utilities for efficiently performing Win32 IO operations in Go.
+ALLOW .* -> vendor/github.com/Microsoft/go-winio
+
+# CONTRIB-2241
+ALLOW .* -> vendor/github.com/aymerick/raymond
+
+# CONTRIB-2176
+ALLOW .* -> vendor/github.com/masterzen/winrm
+
+# CONTRIB-2267
+ALLOW .* -> vendor/github.com/apparentlymart/go-cidr
+
+# CONTRIB-2266
+ALLOW .* -> vendor/github.com/vertica/vertica-sql-go
+
+# CONTRIB-2277
+ALLOW .* -> vendor/github.com/miekg/pkcs11
+
+# CONTRIB-2278
+ALLOW .* -> vendor/github.com/ThalesIgnite/crypto11
+
+# CONTRIB-2396: graphql client library
+ALLOW .* -> vendor/github.com/hasura/go-graphql-client
+
+# CONTRIB-2301: RTSP 1.0 client and server library
+ALLOW .* -> vendor/github.com/aler9/gortsplib
+
+# CONTRIB-2305: graph algorithms
+ALLOW .* -> vendor/github.com/yourbasic/graph
+
+# CONTRIB-2328: histogram
+ALLOW .* -> vendor/github.com/HdrHistogram/hdrhistogram-go
+
+# CONTRIB-2348: SDP implementation
+ALLOW .* -> vendor/github.com/pion/sdp/v3
+
+# CONTRIB-2350
+ALLOW .* -> vendor/inet.af/netaddr
+
+# CONTRIB-2368: embedding resources in a Windows executable
+ALLOW .* -> vendor/github.com/tc-hib/winres
+
+# CONTRIB-2346: repatriate ydb-go-sdk
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-genproto
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk/v3
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-metrics
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-prometheus
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-zap
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-zerolog
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-opentracing
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-sdk-opentracing/internal/cmd/bench
+ALLOW .* -> vendor/github.com/ydb-platform/ydb-go-yc-metadata
+
+# CONTRIB-2099
+ALLOW .* -> vendor/github.com/haivision/srtgo
+
+# CONTRIB-2307
+ALLOW .* -> vendor/github.com/airbusgeo/godal
+ALLOW .* -> vendor/github.com/airbusgeo/osio
+
+# CONTRIB-2167
+ALLOW .* -> vendor/github.com/jarcoal/httpmock
+
+# CONTRIB-2423
+ALLOW .* -> vendor/github.com/godror/godror
+
+# CONTRIB-2439
+ALLOW .* -> vendor/github.com/elimity-com/scim
+
+# CONTRIB-2363 JSON Schema
+ALLOW .* -> vendor/github.com/santhosh-tekuri/jsonschema
+
+# CONTRIB-2356 Django-syntax like template-engine
+ALLOW .* -> vendor/github.com/flosch/pongo2/v4
+
+# CONTRIB-2355 Minifiers for web formats
+DENY .* -> vendor/github.com/tdewolff/minify/v2/cmd
+ALLOW .* -> vendor/github.com/tdewolff/minify/v2
+
+# CONTRIB-2354 Simple image processing package
+ALLOW .* -> vendor/github.com/disintegration/imaging
+
+# CONTRIB-2376 HAProxy Native Golang Client
+ALLOW .* -> vendor/github.com/haproxytech/client-native/v2
+ALLOW .* -> vendor/github.com/haproxytech/config-parser/v4
+ALLOW .* -> vendor/github.com/haproxytech/go-logger
+
+# CONTRIB-2416 Bit Reader/Writer
+ALLOW .* -> vendor/github.com/icza/bitio
+
+# CONTRIB-2420 Syslog server/parser
+ALLOW .* -> vendor/gopkg.in/mcuadros/go-syslog.v2
+
+# CONTRIB-2448 filesystem xattr support
+ALLOW .* -> vendor/github.com/pkg/xattr
+
+# CONTRIB-2452
+ALLOW .* -> vendor/github.com/scim2/filter-parser/v2
+
+#
+# Tools
+#
+
+# Native Go debugger
+ALLOW vendor -> vendor/github.com/go-delve/delve/cmd/dlv
+
+# Profile visualization
+ALLOW .* -> vendor/github.com/google/pprof
+
+# gRPCurl
+ALLOW vendor -> vendor/github.com/fullstorydev/grpcurl/cmd/grpcurl
+
+
+#
+# Temporary exceptions.
+#
+
+
+# CONTRIB-1863. resposible: tserakhau@
+
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/pingcap/errors
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/pingcap/parser/ast
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/pingcap/parser/format
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/pingcap/parser
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/satori/go.uuid
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/siddontang/go-log/log
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/siddontang/go-mysql/client
+ALLOW transfer_manager/go/pkg/source/mysql/canal -> vendor/github.com/siddontang/go-mysql/schema
+
+# CONTRIB-1244. resposible: frystile@
+ALLOW cloud/compute/gokikimr/client -> vendor/github.com/rcrowley/go-metrics
+ALLOW cloud/compute/snapshot/snapshot/lib/misc -> vendor/github.com/rcrowley/go-metrics
+
+# IGNIETFERRO-1287
+ALLOW cloud/compute/snapshot/snapshot/config -> vendor/github.com/pkg/errors
+ALLOW cloud/compute/snapshot/snapshot/lib/chunker -> vendor/github.com/pkg/errors
+ALLOW contrib/go/patched/hugo -> vendor/github.com/pkg/errors
+ALLOW edadeal/backend/go/charm/internal/pkg/store/pg -> vendor/github.com/pkg/errors
+ALLOW extsearch/video/station/starter/downloader -> vendor/github.com/pkg/errors
+ALLOW extsearch/video/station/starter/input -> vendor/github.com/pkg/errors
+ALLOW extsearch/video/station/starter/players -> vendor/github.com/pkg/errors
+ALLOW extsearch/video/station/starter/pusher -> vendor/github.com/pkg/errors
+ALLOW extsearch/video/station/starter/rules -> vendor/github.com/pkg/errors
+ALLOW library/go/yandex/solomon/reporters/pusher/httppusher -> vendor/github.com/pkg/errors
+ALLOW locdoc/doc/daas-farm/pkg/daasclient -> vendor/github.com/pkg/errors
+ALLOW locdoc/doc/daas-farm/pkg/menugen -> vendor/github.com/pkg/errors
+ALLOW locdoc/doc/daas-farm/pkg/wikiclient -> vendor/github.com/pkg/errors
+ALLOW locdoc/doc/daas-farm/pkg/wikigen -> vendor/github.com/pkg/errors
+ALLOW market/sre/services/rtcstats2graphite/src/internal/blogic -> vendor/github.com/pkg/errors
+ALLOW market/sre/services/rtcstats2graphite/src/internal/nanny -> vendor/github.com/pkg/errors
+ALLOW market/sre/services/rtcstats2graphite/src/internal/oops -> vendor/github.com/pkg/errors
+ALLOW market/sre/services/rtcstats2graphite/src/internal/walle -> vendor/github.com/pkg/errors
+ALLOW market/sre/services/rtcstats2graphite/src/internal/yasm -> vendor/github.com/pkg/errors
+ALLOW market/sre/tools/ya-gde/src/cmd/getthefacts -> vendor/github.com/pkg/errors
+ALLOW market/sre/tools/ya-gde/src/pkg/hostinfo -> vendor/github.com/pkg/errors
+ALLOW market/sre/tools/ya-gde/src/pkg/util -> vendor/github.com/pkg/errors
+ALLOW transfer_manager/go/pkg/abstract -> vendor/github.com/pkg/errors
+ALLOW yabs/telephony/platform/inventory/api/http -> vendor/github.com/pkg/errors
+
+# IGNIETFERRO-1396
+
+ALLOW district/feed_reader/app/lib -> vendor/github.com/jackc/pgx
+ALLOW edadeal/backend/go/charm/cmd/charm -> vendor/github.com/jackc/pgx
+ALLOW edadeal/backend/go/gluon/internal/app/bootstrap -> vendor/github.com/jackc/pgx
+ALLOW edadeal/backend/go/nachalnik/internal/app/bootstrap -> vendor/github.com/jackc/pgx
+ALLOW edadeal/backend/go/nachalnik/internal/pkg/store -> vendor/github.com/jackc/pgx
+ALLOW extsearch/video/robot/rt_transcoder/video-manager/db -> vendor/github.com/jackc/pgx
+ALLOW games/backend/internal/dbutils -> vendor/github.com/jackc/pgx
+ALLOW games/backend/pkg/database -> vendor/github.com/jackc/pgx
+ALLOW mail/calendar/load/bbmock -> vendor/github.com/jackc/pgx
+ALLOW mail/collectors/tests-load/pandora -> vendor/github.com/jackc/pgx
+ALLOW market/sre/services/dist_meta_store/app -> vendor/github.com/jackc/pgx
+ALLOW market/sre/services/dist_meta_store/database -> vendor/github.com/jackc/pgx
+ALLOW quasar/gackend/db -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/cmd/load_generator -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/mapreduce/pg_to_yt -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/sink/pg -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/source/pg -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/storage/pg -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/worker/tasks -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/pkg/dataagent/pg -> vendor/github.com/jackc/pgx
+ALLOW transfer_manager/go/tests/e2e/pg2pg/replication -> vendor/github.com/jackc/pgx
+ALLOW yabs/telephony/platform/common/db -> vendor/github.com/jackc/pgx
+ALLOW yabs/telephony/platform/common/lifecycle -> vendor/github.com/jackc/pgx
+ALLOW yabs/telephony/platform/registrar-agent -> vendor/github.com/jackc/pgx
+ALLOW yabs/vh/cms-pgaas/dhdd/db -> vendor/github.com/jackc/pgx
+ALLOW yabs/vh/cms-pgaas/transcoded -> vendor/github.com/jackc/pgx
+
+
+#
+# Permanent exceptions.
+#
+
+# Docker is not vendored property. Docker dependency must be pulled-in explicitly.
+ALLOW vendor/ -> vendor/github.com/opencontainers/go-digest
+
+# CONTRIB-865. Jaeger YT plugin. responsible: prime@
+ALLOW yt/jaeger/plugin -> vendor/github.com/jaegertracing/jaeger/plugin/storage/grpc
+ALLOW yt/jaeger/plugin -> vendor/github.com/jaegertracing/jaeger/storage/spanstore
+ALLOW yt/jaeger/plugin -> vendor/github.com/jaegertracing/jaeger/storage/dependencystore
+ALLOW yt/jaeger/plugin -> vendor/github.com/jaegertracing/jaeger/model
+ALLOW yt/jaeger/plugin -> vendor/github.com/gogo/protobuf
+ALLOW yt/jaeger/plugin -> vendor/github.com/hashicorp/go-plugin
+
+# CONTRIB-1518 client for monkey-patched Apache Pulsar by TuyaInc. responsible: jock@
+ALLOW alice/iot/adapters/tuya_adapter -> vendor/github.com/TuyaInc/tuya_pulsar_sdk_go
+ALLOW alice/iot/adapters/tuya_adapter/server -> vendor/github.com/sirupsen/logrus
+
+# SUBBOTNIK-90
+ALLOW infra/rtc/instance_resolver/pkg/clients/iss3 -> vendor/git.apache.org/thrift.git/lib/go
+
+# Benchmarks using github.com/pkg/errors
+ALLOW library/go/core/xerrors -> vendor/github.com/pkg/errors
+
+
+## LOAD-1046: Pandora perftool. responsible: load@
+# CONTRIB-2040
+ALLOW load/projects/pandora -> vendor/github.com/pkg/errors
+
+# CONTRIB-2032
+ALLOW load/projects/pandora -> vendor/github.com/onsi/gomega
+
+# CONTRIB-2009
+ALLOW load/projects/pandora -> vendor/github.com/hashicorp/go-multierror
+
+# CONTRIB-2006
+ALLOW load/projects/pandora -> vendor/github.com/asaskevich/govalidator
+
+# CONTRIB-2041
+ALLOW load/projects/pandora -> vendor/github.com/spf13/viper
+
+# CONTRIB-2008
+ALLOW load/projects/pandora -> vendor/github.com/fatih/structs
+
+# CONTRIB-2007
+ALLOW load/projects/pandora -> vendor/github.com/facebookgo/stack
+
+# CONTRIB-2036
+ALLOW load/projects/pandora -> vendor/gopkg.in/bluesuncorp/validator.v9
+
+# CONTRIB-2088
+ALLOW load/projects/pandora -> vendor/github.com/pquerna/ffjson/fflib/v1
+
+# CONTRIB-2039
+ALLOW load/projects/pandora -> vendor/github.com/json-iterator/go
+
+# CONTRIB-2089
+ALLOW load/projects/pandora -> vendor/github.com/onsi/ginkgo
+
+# CONTRIB-2029
+ALLOW load/projects/pandora -> vendor/github.com/magiconair/properties/assert
+
+# CONTRIB-2255
+ALLOW transfer_manager/go/pkg/source/eventhub -> vendor/github.com/Azure/azure-event-hubs-go/v3
+ALLOW transfer_manager/go/pkg/source/eventhub -> vendor/github.com/Azure/azure-amqp-common-go/v3/sas
+
+# CONTRIB-2347
+ALLOW trust/psp/core/go -> vendor/github.com/gorilla/mux
+ALLOW trust/psp/core/handler -> vendor/github.com/gorilla/mux
+
+# CONTRIB-2337 Cloud GPU migration: validator for structs and fields
+ALLOW cloud/compute/go-common/pkg/validation -> vendor/github.com/go-playground/validator/v10
+
+# CONTRIB-2412
+ALLOW infra/infractl/.* -> vendor/github.com/google/gnostic/openapiv3
+ALLOW infra/infractl/.* -> vendor/github.com/google/gnostic/compiler
+ALLOW infra/infractl/.* -> vendor/gopkg.in/yaml.v3
+
+# CONTRIB-2445
+ALLOW psp -> vendor/github.com/zimmski/go-mutesting
+
+# CONTRIB-2460
+ALLOW .* -> vendor/github.com/dgraph-io/ristretto
+
+#
+# This section is for EXCEPTIONS. Add new rule above, not here.
+#
+
+DENY .* -> vendor/
diff --git a/build/rules/go/ya.make b/build/rules/go/ya.make
new file mode 100644
index 0000000000..f6443653c0
--- /dev/null
+++ b/build/rules/go/ya.make
@@ -0,0 +1 @@
+OWNER(g:go-library)
diff --git a/build/rules/jstyle/migrations.yaml b/build/rules/jstyle/migrations.yaml
new file mode 100644
index 0000000000..5a159eaa75
--- /dev/null
+++ b/build/rules/jstyle/migrations.yaml
@@ -0,0 +1,11 @@
+jstyle:
+ NoLint:
+ ignore:
+ - '*'
+ prefixes: []
+ NoParameterNumber:
+ ignore:
+ - 'ParameterNumber'
+ prefixes:
+ - 'tracker'
+ - 'ci'
diff --git a/build/rules/jstyle/ya.make b/build/rules/jstyle/ya.make
new file mode 100644
index 0000000000..dd09a3a75d
--- /dev/null
+++ b/build/rules/jstyle/ya.make
@@ -0,0 +1 @@
+OWNER(g:yatest g:java-contrib)
diff --git a/build/rules/junk.policy b/build/rules/junk.policy
new file mode 100644
index 0000000000..20b9820fbd
--- /dev/null
+++ b/build/rules/junk.policy
@@ -0,0 +1,10 @@
+# DISCLAIMER: Everything in junk is junk. You are allowed to peerdir anything
+# you want, be it a banned library or some project gory guts, whatever, but
+# such junk code cannot be considered as a reason to add any new contribs,
+# no matter how big the junk code is and how much does it cost (always zero).
+#
+# See contrib/README.md for more details about contribs.
+# See https://wiki.yandex-team.ru/arcadia/junk/ for junk restrictions.
+
+ALLOW junk -> .*
+DENY .* -> junk
diff --git a/build/rules/kikimr.policy b/build/rules/kikimr.policy
new file mode 100644
index 0000000000..5bb6426e30
--- /dev/null
+++ b/build/rules/kikimr.policy
@@ -0,0 +1,188 @@
+# temporary allow to depend (FIXME: gvit)
+ALLOW yabs/sbyt/testing/scenarios/bigstart -> kikimr/ci
+# temporary allow to depend (FIXME: gvit)
+ALLOW mssngr/router/tests/lib -> kikimr/ci
+# temporary allow to depend (FIXME: gvit)
+ALLOW market/idx/yatf -> kikimr/public/tools/lib
+# temporary allow to depend (FIXME: gvit)
+ALLOW quality/deprecated/mapreducelib -> kikimr/library/common
+ALLOW quality/deprecated/mapreducelib -> kikimr/core/erasure
+ALLOW quality/deprecated/mapreducelib -> kikimr/library/hdrplanner
+ALLOW quality/deprecated/mapreducelib -> kikimr/library/sched/dev/actors/lib
+ALLOW quality/deprecated/mapreducelib -> kikimr/library/sched/dev/supp/pages/lib
+# temporary allow to depend (FIXME: gvit)
+ALLOW solomon/ -> kikimr/core/protos
+ALLOW solomon/ -> kikimr/public/lib/deprecated/kicli
+ALLOW solomon/ -> kikimr/library/mkql_proto/protos
+ALLOW solomon/ -> kikimr/yq/libs/config/protos
+ALLOW solomon/ -> kikimr/library/folder_service/proto
+ALLOW solomon/ -> kikimr/library/login/protos
+# temporary (FIXME: gvit)
+ALLOW yweb/robot/fetcher/generic_actors -> kikimr/core/protos
+# temporary dep, remove this project (FIXME gvit)
+ALLOW yql/udfs/kikimr -> kikimr
+# temporary (move to kikimr)
+ALLOW yql/tests/sql/kikimr_tpch -> kikimr
+# temporary
+ALLOW yabs/sbyt/testing/scenarios/bigstart -> kikimr/public/tools/lib
+# temporary
+ALLOW infra/qloud/kikimr-logs-gateway -> kikimr/library/aclib/protos
+# temporary
+ALLOW entity/ugc/db/legacy/workload -> kikimr/public/lib/deprecated/kicli
+ALLOW entity/ugc/db/storage/public -> kikimr/public/lib/deprecated/kicli
+ALLOW entity/ugc/db/storage/testing -> kikimr/public/lib/deprecated/kicli
+ALLOW entity/ugc/server/modules/schema -> kikimr/public/lib/deprecated/kicli
+# temporary
+ALLOW rtmapreduce/mrtasks/rtmr/ydbout/lib -> kikimr/public/lib/deprecated/kicli
+ALLOW rtmapreduce/mrtasks/rtmr/ydbout/lib -> kikimr/core/engine
+ALLOW rtmapreduce/tools/config-full/handlers -> kikimr/public/lib/base
+ALLOW rtmapreduce/tools/config-full/handlers -> kikimr/public/lib/deprecated/kicli
+# temporary
+ALLOW travel/cpa/tests/lib -> kikimr/public/tools/lib
+# temporary
+ALLOW market/idx/feeds/qparser/tests -> kikimr/library/pretty_types_print/protobuf
+# temporary
+ALLOW robot/rthub/yql/udfs -> kikimr/core/engine
+ALLOW robot/rthub/yql/udfs -> kikimr/public/lib/deprecated/kicli
+# temporary
+ALLOW robot/mercury/library/datasources -> kikimr/library/persqueue/topic_parser
+
+ALLOW kikimr -> kikimr/ci
+ALLOW kikimr -> kikimr/library/ci
+
+# filestore & blockstore & disk_manager are allowed to depend on our ci libraries.
+ALLOW cloud/filestore -> kikimr/ci
+ALLOW cloud/blockstore -> kikimr/ci
+ALLOW cloud/disk_manager -> kikimr/ci
+ALLOW cloud/storage -> kikimr/ci
+
+ALLOW cloud/filestore -> kikimr/library/ci
+ALLOW cloud/blockstore -> kikimr/library/ci
+ALLOW cloud/disk_manager -> kikimr/library/ci
+ALLOW cloud/storage -> kikimr/library/ci
+
+# public dependencies
+ALLOW .* -> kikimr/public/sdk
+ALLOW .* -> kikimr/persqueue
+ALLOW .* -> kikimr/public/api
+ALLOW .* -> kikimr/public/lib/json_value
+ALLOW .* -> kikimr/public/lib/yson_value
+ALLOW .* -> kikimr/public/lib/ydb_cli
+
+ALLOW .* -> kikimr/yndx/api
+
+ALLOW cloud/blockstore -> kikimr/blockstore
+ALLOW cloud/blockstore -> kikimr/core
+ALLOW cloud/blockstore -> kikimr/driver_lib/run
+ALLOW cloud/blockstore -> kikimr/public/lib/deprecated/kicli
+ALLOW cloud/blockstore -> kikimr/yndx
+
+ALLOW cloud/filestore -> kikimr/core
+ALLOW cloud/filestore -> kikimr/driver_lib/run
+ALLOW cloud/filestore -> kikimr/public/lib/deprecated/kicli
+ALLOW cloud/filestore -> kikimr/yndx
+
+ALLOW cloud/storage -> kikimr/core
+
+ALLOW cloud/kms/benchcrypto/cpp -> kikimr/core/blobstorage/crypto
+
+ALLOW rtmapreduce -> kikimr/yf
+
+ALLOW rtmapreduce/libs -> kikimr/core
+ALLOW rtmapreduce/libs -> kikimr/yndx
+ALLOW rtmapreduce/libs -> kikimr/library/shop
+ALLOW rtmapreduce/libs -> kikimr/driver_lib/run
+ALLOW rtmapreduce/libs -> kikimr/library/aclib
+
+ALLOW rtmapreduce/tools/config-full/handlers -> kikimr/core
+ALLOW rtmapreduce/tools/config-full/handlers -> kikimr/library/shop
+
+ALLOW rtmapreduce/tests -> kikimr/core/blobstorage/pdisk
+
+ALLOW rtmapreduce/mrtasks/rtmr/ydbout/lib/ut -> kikimr/core/testlib
+ALLOW rtmapreduce/mrtasks/rtmr/ydbout/lib -> kikimr/core/engine
+
+ALLOW robot/mercury/library/datasources -> $S/kikimr/library/persqueue/topic_parser
+
+ALLOW logbroker/pipe-parser -> kikimr/core/scheme
+ALLOW logbroker/pipe-parser -> kikimr/public/lib/deprecated/client
+ALLOW logbroker/pipe-parser -> kikimr/library/persqueue/topic_parser
+ALLOW logbroker/pipe-parser -> kikimr/core/protos
+ALLOW logbroker/pipe-parser -> kikimr/core/testlib
+
+ALLOW logbroker/push-agent/daemon/sinks/bus -> kikimr/core/protos
+
+ALLOW logbroker/config-manager -> kikimr/core/grpc_services
+ALLOW logbroker/config-manager -> kikimr/core/mon
+ALLOW logbroker/config-manager -> kikimr/core/security
+ALLOW logbroker/config-manager -> kikimr/core/util
+ALLOW logbroker/config-manager -> kikimr/library/persqueue/topic_parser
+ALLOW logbroker/config-manager -> kikimr/public/lib/deprecated/kicli
+ALLOW logbroker/config-manager -> kikimr/library/security
+ALLOW logbroker/config-manager -> kikimr/yndx/security
+ALLOW logbroker/config-manager -> kikimr/core/testlib
+
+ALLOW logbroker/push-agent/ut -> kikimr/core/testlib
+
+ALLOW logbroker/mops -> kikimr/core/protos
+
+ALLOW logbroker/ -> kikimr/juggler
+
+ALLOW logbroker/tools -> kikimr/core/protos
+ALLOW logbroker/tools -> kikimr/public/lib/deprecated/client
+ALLOW logbroker/tools -> kikimr/public/lib/deprecated/kicli
+ALLOW logbroker/tools -> kikimr/library/aclib
+ALLOW logbroker/tools -> kikimr/library/persqueue/topic_parser
+ALLOW logbroker/tools -> kikimr/tools/monitoring
+
+ALLOW solomon/ -> kikimr/core/protos
+ALLOW solomon/ -> kikimr/public/lib/deprecated/kicli
+ALLOW solomon/ -> kikimr/library/mkql_proto/protos
+ALLOW solomon/ -> kikimr/yq/libs/config/protos
+ALLOW solomon/ -> kikimr/library/login/protos
+
+ALLOW ydb/library/yql/providers/dq/actors -> kikimr/core/base
+ALLOW ydb/library/yql/providers/dq/worker_manager -> kikimr/core/kqp
+
+ALLOW ydb/library/yql/providers/clickhouse/provider -> kikimr/yq/libs/db_resolver
+ALLOW ydb/library/yql/providers/clickhouse/provider -> kikimr/yq/libs/common
+
+ALLOW ydb/library/yql/providers/pq/provider -> kikimr/yq/libs/db_resolver
+ALLOW ydb/library/yql/providers/pq/provider -> kikimr/yq/libs/common
+
+ALLOW yql/tools/yqlworker/dq/worker_manager -> kikimr/core/kqp
+
+ALLOW ydb/library/yql/dq/actors/compute -> kikimr/core/kqp/runtime
+ALLOW ydb/library/yql/dq/actors/compute -> kikimr/core/kqp/common
+ALLOW ydb/library/yql/dq/actors/compute -> kikimr/core/protos
+
+ALLOW yql/ -> kikimr/library/mkql_proto
+ALLOW yql/ -> kikimr/library/binary_json
+ALLOW yql/ -> kikimr/library/dynumber
+ALLOW yql/ -> kikimr/yndx/security
+
+ALLOW ydb/library/yql/providers/ydb -> kikimr/yq
+ALLOW ydb/library/yql/providers/ydb -> kikimr/public/lib/experimental
+
+ALLOW yql/udfs/ydb -> kikimr/public/lib/experimental
+
+ALLOW yql/library/actor_log -> kikimr/core/protos
+
+ALLOW yql/library/testlib -> kikimr/core/client
+ALLOW yql/library/testlib -> kikimr/core/testlib
+ALLOW yql/library/testlib -> kikimr/public/lib/base
+ALLOW yql/library/test_framework -> kikimr/yf/sdk/python/native
+
+ALLOW yql/providers/rtmr/gateway -> kikimr/yf/yf_client
+ALLOW yql/providers/rtmr/gateway -> kikimr/yf/util
+ALLOW ydb/library/yql/providers/common/ut_helpers -> kikimr/core/testlib/basics
+
+ALLOW yql/tests -> kikimr/yf
+ALLOW yql/tests -> kikimr/yq
+ALLOW yql/.*/ut -> kikimr/core/testlib/basics
+
+ALLOW kikimr/ -> kikimr
+
+# FIXME temporary allow ydb depend on kikimr
+ALLOW ydb/ -> kikimr
+DENY .* -> kikimr
diff --git a/build/rules/library_deprecated.policy b/build/rules/library_deprecated.policy
new file mode 100644
index 0000000000..af1eb06386
--- /dev/null
+++ b/build/rules/library_deprecated.policy
@@ -0,0 +1,364 @@
+ALLOW kernel/geo -> library/cpp/deprecated/small_array
+ALLOW ysite/yandex/clicks -> library/cpp/deprecated/small_array
+ALLOW ysite/yandex/indexuser -> library/cpp/deprecated/small_array
+DENY .* -> library/cpp/deprecated/small_array
+
+ALLOW jupytercloud/arcadia_kernel -> library/python/clickhouse_client
+ALLOW market/idx/export/mbi_qdata_reporter/bin -> library/python/clickhouse_client
+ALLOW sandbox/projects/oko -> library/python/clickhouse_client
+ALLOW statbox/python-statinfra -> library/python/clickhouse_client
+ALLOW quality/ab_testing/cofe/bin/lib/files/py2/cofe_kernel_yql -> library/python/clickhouse_client
+DENY .* -> library/python/clickhouse_client
+
+# ticket_parser2
+# TODO: drop temporary rule with entire library: PASSP-30786
+DENY .* -> library/java/ticket_parser2
+
+# please use https://a.yandex-team.ru/arc/trunk/arcadia/library/python/tvmauth instead
+# https://clubs.at.yandex-team.ru/passport/3619
+ALLOW addappter/backend/addappter -> library/python/deprecated/ticket_parser2
+ALLOW ads/bsyeti/bb_viewer/viewer -> library/python/deprecated/ticket_parser2
+ALLOW ads/bsyeti/caesar/tools/logtests/samplers -> library/python/deprecated/ticket_parser2
+ALLOW ads/bsyeti/tests/test_lib/data_collector -> library/python/deprecated/ticket_parser2
+ALLOW ads/bsyeti/tools/bb_requester -> library/python/deprecated/ticket_parser2
+ALLOW alice/uniproxy/library/auth -> library/python/deprecated/ticket_parser2
+ALLOW alice/uniproxy/library/integration_tests -> library/python/deprecated/ticket_parser2
+ALLOW alice/vins/apps/navi -> library/python/deprecated/ticket_parser2
+ALLOW analytics/geo/navi/team-x-vin-transfer -> library/python/deprecated/ticket_parser2
+ALLOW analytics/images/upload_urls_to_avatars -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/argus/result_agregate_task -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/configs_api/lib -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/cryprox/cryprox -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/monrelay -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/autoredirect_data -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/change_current_cookie -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/configs_stub_server -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/decrypt_url_configs -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/experiments/lib -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/gdpr_aab_cookies -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/money_tickets_updater/plugins -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/tools -> library/python/deprecated/ticket_parser2
+ALLOW antiadblock/tasks/update_lj_custom_domains -> library/python/deprecated/ticket_parser2
+ALLOW antirobot/captcha/captcha_test_service/bin -> library/python/deprecated/ticket_parser2
+ALLOW antirobot/cbb/cbb_django/cbb/views -> library/python/deprecated/ticket_parser2
+ALLOW antirobot/scripts/parsers/cbb_api_clear_from_dump -> library/python/deprecated/ticket_parser2
+ALLOW antirobot/scripts/parsers/cbb_api_example -> library/python/deprecated/ticket_parser2
+ALLOW antirobot/scripts/parsers/upload_ip_to_cbb -> library/python/deprecated/ticket_parser2
+ALLOW april/common -> library/python/deprecated/ticket_parser2
+ALLOW april/etl/utils -> library/python/deprecated/ticket_parser2
+ALLOW april/tools/clients/tvm_client -> library/python/deprecated/ticket_parser2
+ALLOW billing/bcl/src/tests/regression -> library/python/deprecated/ticket_parser2
+ALLOW billing/dcs/dcs -> library/python/deprecated/ticket_parser2
+ALLOW cloud/bootstrap/api/src/backend -> library/python/deprecated/ticket_parser2
+ALLOW cloud/marketplace/queue/yc_marketplace_queue -> library/python/deprecated/ticket_parser2
+ALLOW cloud/mdb/dbm/internal -> library/python/deprecated/ticket_parser2
+ALLOW cmnt/tools/regression/lib -> library/python/deprecated/ticket_parser2
+ALLOW cmnt/tools/request_generator -> library/python/deprecated/ticket_parser2
+ALLOW cv/cbir_search/yt_classifier/image_tools -> library/python/deprecated/ticket_parser2
+ALLOW datacloud/dev_utils/tvm -> library/python/deprecated/ticket_parser2
+ALLOW datacloud/log_reader/lib -> library/python/deprecated/ticket_parser2
+ALLOW datalens/backend/app/bi_billing -> library/python/deprecated/ticket_parser2
+ALLOW datalens/backend/lib/bi_core -> library/python/deprecated/ticket_parser2
+ALLOW devtools/experimental/tvm2 -> library/python/deprecated/ticket_parser2
+ALLOW devtools/experimental/xprod/score_api -> library/python/deprecated/ticket_parser2
+ALLOW devtools/qafw/selenium/lb_sender -> library/python/deprecated/ticket_parser2
+ALLOW devtools/yanotifybot/server/lib -> library/python/deprecated/ticket_parser2
+ALLOW dict/mt/web/misc/identity -> library/python/deprecated/ticket_parser2
+ALLOW dict/mt/web/misc/takeout -> library/python/deprecated/ticket_parser2
+ALLOW district/scripts/nirvana_actions_lb_writer -> library/python/deprecated/ticket_parser2
+ALLOW district/scripts/push_triggers_to_lb -> library/python/deprecated/ticket_parser2
+ALLOW dj/services/ecom/lib/pymiddle_turbo_requester -> library/python/deprecated/ticket_parser2
+ALLOW drive/analytics/pybase/helpers -> library/python/deprecated/ticket_parser2
+ALLOW education/lib/clients -> library/python/deprecated/ticket_parser2
+ALLOW entity/ontodb/tasks/import_persons_to_saas/lib -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/db/python/client -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/nirvana/utils/yt -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/robot/tools/achivery/lib -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/robot/tools/antispam/lib -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/robot/tools/ugcdb/ugcdb_uploader -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/comments/business_reply_fix_util -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/nirvana/blackbox -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/nirvana/comments/init_commentator_chat -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/nirvana/comments/wait_comment_moderation -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/nirvana/enricher/lib -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/nirvana/ugcdb/lib -> library/python/deprecated/ticket_parser2
+ALLOW entity/ugc/tools/viewer_server/lib -> library/python/deprecated/ticket_parser2
+ALLOW ether/ether_common -> library/python/deprecated/ticket_parser2
+ALLOW ether/zen/highlights/ugc/highlight_importer -> library/python/deprecated/ticket_parser2
+ALLOW ether/zen/highlights/vh/video_exporter -> library/python/deprecated/ticket_parser2
+ALLOW ether/zen/zen_tools -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/geo/conveyors/gdpr/takeout_daemon -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/geo/conveyors/gdpr/uploader -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/video/quality/recommender/tools/zen_load -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/video/robot/crawling/stevenson/backend/bin/webapp -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/video/ugc/sqs_moderation/clients -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/video/vh/ydb/lb2ydb -> library/python/deprecated/ticket_parser2
+ALLOW extsearch/wizards/fastres2/tools/data_delivery/rtmr/delivery/common -> library/python/deprecated/ticket_parser2
+ALLOW geoproduct/external_cc_events/app -> library/python/deprecated/ticket_parser2
+ALLOW geoproduct/price_info_proxy/app -> library/python/deprecated/ticket_parser2
+ALLOW haas/terminal_itdc/export_tasks -> library/python/deprecated/ticket_parser2
+ALLOW health/articles/articles_pipeline/lib -> library/python/deprecated/ticket_parser2
+ALLOW health/common_libs/utils -> library/python/deprecated/ticket_parser2
+ALLOW health/turbo_articles/commentator_api -> library/python/deprecated/ticket_parser2
+ALLOW health/turbo_articles/parser/libs -> library/python/deprecated/ticket_parser2
+ALLOW htf/predictions/common_data/blackbox_markup_puids -> library/python/deprecated/ticket_parser2
+ALLOW htf/viewers/demo -> library/python/deprecated/ticket_parser2
+ALLOW infra/deploy_notifications_controller/lib -> library/python/deprecated/ticket_parser2
+ALLOW infra/nanny/instancectl/src -> library/python/deprecated/ticket_parser2
+ALLOW infra/qyp/qdm/src -> library/python/deprecated/ticket_parser2
+ALLOW infra/qyp/vmagent/src -> library/python/deprecated/ticket_parser2
+ALLOW infra/qyp/vmproxy/src -> library/python/deprecated/ticket_parser2
+ALLOW infra/swatlib -> library/python/deprecated/ticket_parser2
+ALLOW infra/vmagent/src/vmagent -> library/python/deprecated/ticket_parser2
+ALLOW infra/walle/server/walle -> library/python/deprecated/ticket_parser2
+ALLOW intranet/trip/ext_api/src -> library/python/deprecated/ticket_parser2
+ALLOW inventori/etl -> library/python/deprecated/ticket_parser2
+ALLOW inventori/pylibs/common -> library/python/deprecated/ticket_parser2
+ALLOW junk/kalmykov-ad/geocoder -> library/python/deprecated/ticket_parser2
+ALLOW junk/swarmer/news/vh_selfservice_resend_tool -> library/python/deprecated/ticket_parser2
+ALLOW junk/ulgen4a/devops/schedule -> library/python/deprecated/ticket_parser2
+ALLOW junk/zankin/docker_example -> library/python/deprecated/ticket_parser2
+ALLOW kikimr/juggler/ydb_availability -> library/python/deprecated/ticket_parser2
+ALLOW kikimr/tools/duty_bot -> library/python/deprecated/ticket_parser2
+ALLOW kikimr/tools/rolling_restart -> library/python/deprecated/ticket_parser2
+ALLOW library/python/awssdk-extensions -> library/python/deprecated/ticket_parser2
+ALLOW library/python/awssdk_async_extensions/lib -> library/python/deprecated/ticket_parser2
+ALLOW library/python/deprecated/ticket_parser2 -> library/python/deprecated/ticket_parser2
+ALLOW library/python/flask_passport -> library/python/deprecated/ticket_parser2
+ALLOW library/recipes/tvmapi/ut_simple -> library/python/deprecated/ticket_parser2
+ALLOW library/recipes/tvmapi/ut_with_tvmtool -> library/python/deprecated/ticket_parser2
+ALLOW load/projects/lunaparkapi/web -> library/python/deprecated/ticket_parser2
+ALLOW logbroker/tools/ansible/plugins -> library/python/deprecated/ticket_parser2
+ALLOW logbroker/tools/python3 -> library/python/deprecated/ticket_parser2
+ALLOW mail/calendar-attach-processor -> library/python/deprecated/ticket_parser2
+ALLOW mail/calendar/python/client -> library/python/deprecated/ticket_parser2
+ALLOW mail/catdog/catdog/requirements -> library/python/deprecated/ticket_parser2
+ALLOW mail/collectors-ext/tests-system/src -> library/python/deprecated/ticket_parser2
+ALLOW mail/collectors/tests-system/src -> library/python/deprecated/ticket_parser2
+ALLOW mail/furita/tests/common/utils -> library/python/deprecated/ticket_parser2
+ALLOW mail/payments/payments -> library/python/deprecated/ticket_parser2
+ALLOW mail/so/daemons/knn_bot -> library/python/deprecated/ticket_parser2
+ALLOW mail/support/nirvana/pdb_fos -> library/python/deprecated/ticket_parser2
+ALLOW mail/tools/yamail_info/lib -> library/python/deprecated/ticket_parser2
+ALLOW mail/transfer -> library/python/deprecated/ticket_parser2
+ALLOW maps/analytics/legacy/nirvana/navi/team-x-vin-transfer -> library/python/deprecated/ticket_parser2
+ALLOW maps/analyzer/services/eta_comparison/lib -> library/python/deprecated/ticket_parser2
+ALLOW maps/automotive/carwashes/tools/carwashes_downloader -> library/python/deprecated/ticket_parser2
+ALLOW maps/automotive/tollroads/tools/plazas_downloader -> library/python/deprecated/ticket_parser2
+ALLOW maps/geomarketing/Roland/consumer -> library/python/deprecated/ticket_parser2
+ALLOW maps/geomarketing/Virgille/consumer -> library/python/deprecated/ticket_parser2
+ALLOW maps/renderer/stylerepo/lib -> library/python/deprecated/ticket_parser2
+ALLOW maps/search/scripts/transit/coverage/lib -> library/python/deprecated/ticket_parser2
+ALLOW market/checkout/checkouter-load-test/checkouter-market-delivery-blue-order-creator -> library/python/deprecated/ticket_parser2
+ALLOW market/idx/admin/system_offers/lib -> library/python/deprecated/ticket_parser2
+ALLOW market/idx/api/backend -> library/python/deprecated/ticket_parser2
+ALLOW market/idx/devtools/dukalis/offer_diagnostics/lib/analyzer -> library/python/deprecated/ticket_parser2
+ALLOW market/idx/devtools/dukalis/promo_diagnostics/lib/analyzer -> library/python/deprecated/ticket_parser2
+ALLOW market/pylibrary/logbroker -> library/python/deprecated/ticket_parser2
+ALLOW market/sre/services/colba/common/lb_client -> library/python/deprecated/ticket_parser2
+ALLOW market/sre/services/colba/dispatcher -> library/python/deprecated/ticket_parser2
+ALLOW market/sre/services/colba/master -> library/python/deprecated/ticket_parser2
+ALLOW market/sre/services/colba/minion -> library/python/deprecated/ticket_parser2
+ALLOW market/tools/corewatcher-rtc/src -> library/python/deprecated/ticket_parser2
+ALLOW market/vimobu/lib -> library/python/deprecated/ticket_parser2
+ALLOW mds/nscfg/server -> library/python/deprecated/ticket_parser2
+ALLOW mds/s3/s3_mds_proxy -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/brb/server/lib/utils -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/bishop/config_api/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/bishop/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/clickhouse_backups/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/clickhouse_rbac/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/cms/agent/lib -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/cms/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/cms/lib -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/duty/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/mi/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/scripts/oauth-tokens-checker -> library/python/deprecated/ticket_parser2
+ALLOW metrika/admin/python/zooface/frontend/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/core/programs/mobile_startup_admin/base -> library/python/deprecated/ticket_parser2
+ALLOW metrika/pylib/auth/tvm -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartcompose/dev/SMARTCOMPOSE-154 -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartcompose/dev/SMARTCOMPOSE-192 -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartcompose/dev/SMARTCOMPOSE-197 -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartcompose/dev/hounder -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartcompose/tools/calc_matches_runtime -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartsubject/dev/SMARTSUBJECT-5 -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartsubject/juggler_bundle -> library/python/deprecated/ticket_parser2
+ALLOW mlp/mail/smartsubject/tools/calc_metrics -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/libs/connectors/loggers/it -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/libs/http -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/libs/laas/workers/logging_worker -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/libs/program/tvm_mixin -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/libs/tvm -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/nirvana/send_to_lb/libs -> library/python/deprecated/ticket_parser2
+ALLOW modadvert/test_utils/tvm -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/botplatform/src/bots/common -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/botplatform/src/bots/core/testutils -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/lib/python/userid -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/lib/python/utils -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/chat_mirror_test/test_suites/light -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/files_test/test_suites/light -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/lb_subscriber2_test/test_suites/light -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/registry_test/test_suites/light -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/server_test/test_suites/fat -> library/python/deprecated/ticket_parser2
+ALLOW mssngr/router/tests/support_gateway_test/test_suites/light -> library/python/deprecated/ticket_parser2
+ALLOW noc/ipv4mgr -> library/python/deprecated/ticket_parser2
+ALLOW ofd/common/services/tvm -> library/python/deprecated/ticket_parser2
+ALLOW ofd/common/tests/test_tvm_service -> library/python/deprecated/ticket_parser2
+ALLOW offline_data/call_center/nirvana/send_sms -> library/python/deprecated/ticket_parser2
+ALLOW orgvisits/viewers/geotrack/backend -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/social/common -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/tvm_keyring -> library/python/deprecated/ticket_parser2
+ALLOW passport/infra/daemons/tvmapi/ut_py -> library/python/deprecated/ticket_parser2
+ALLOW passport/infra/daemons/tvmtool/ut_py -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/grants -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/logging_utils -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/tvm/faker/tests -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/tvm/faker -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/tvm/tests -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/core/tvm -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/tasks_nirvana/antifraud -> library/python/deprecated/ticket_parser2
+ALLOW passport/backend/vault/api -> library/python/deprecated/ticket_parser2
+ALLOW payplatform/nirvana/lib -> library/python/deprecated/ticket_parser2
+ALLOW plus/analytics/tools/bb_user_info -> library/python/deprecated/ticket_parser2
+ALLOW plus/cobra/project -> library/python/deprecated/ticket_parser2
+ALLOW plus/gift/project -> library/python/deprecated/ticket_parser2
+ALLOW plus/landing_backend/project -> library/python/deprecated/ticket_parser2
+ALLOW plus/oneyear/project -> library/python/deprecated/ticket_parser2
+ALLOW plus/plusminus/project -> library/python/deprecated/ticket_parser2
+ALLOW quality/antifraud/scripts/prod/dump_viewers_data -> library/python/deprecated/ticket_parser2
+ALLOW quality/antifraud/xurma/tools/xurma_admin/lib -> library/python/deprecated/ticket_parser2
+ALLOW quality/antifraud/xurma/tools/xurma_viewer/backend/lib -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/chats/common/tvm_client -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/entity_search/factqueries/custom/metro -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/entity_search/factqueries/instructions/avatars_uploader -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/turbo/ecommerce/smart_campaign_uploader/lib -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/turbo/forms/job/lib -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/turbo/tools/api_tasks/lib -> library/python/deprecated/ticket_parser2
+ALLOW quality/functionality/turbo/tools/duty_absence_notifier -> library/python/deprecated/ticket_parser2
+ALLOW quasar/infra/tasklets/datasync_uploader/impl -> library/python/deprecated/ticket_parser2
+ALLOW quasar/infra/tasklets/group_maintenance/impl -> library/python/deprecated/ticket_parser2
+ALLOW robot/pluto/patents/apphost -> library/python/deprecated/ticket_parser2
+ALLOW robot/samovar/tools/wikimedia_updates_reader -> library/python/deprecated/ticket_parser2
+ALLOW rt-research/broadmatching/scripts/tvm/update_service_tickets -> library/python/deprecated/ticket_parser2
+ALLOW rtc/recorder -> library/python/deprecated/ticket_parser2
+ALLOW rtmapreduce/monitoring/solomon -> library/python/deprecated/ticket_parser2
+ALLOW saas/tools/devops/billing_send -> library/python/deprecated/ticket_parser2
+ALLOW saas/tools/refresh_mon -> library/python/deprecated/ticket_parser2
+ALLOW saas/tools/user_if/ssm-front/backend -> library/python/deprecated/ticket_parser2
+ALLOW samogon/libs/tvm_api -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/ab_testing -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/metrika/mobile/ios/symbols/upload_system_ios_symbols -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/noc/ExportNetworkMetering -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/noc/MeteringCacheZapekatel -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/noc/TopAS -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/quasar/datasync_uploader/lib -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/qyp -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/staff_login_checker/PrepareUidsFile -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/suggest/watchdog -> library/python/deprecated/ticket_parser2
+ALLOW sandbox/projects/yabs/duty_calendar -> library/python/deprecated/ticket_parser2
+ALLOW search/metadoc/tools/request_saas -> library/python/deprecated/ticket_parser2
+ALLOW security/takeout -> library/python/deprecated/ticket_parser2
+ALLOW sport/backend -> library/python/deprecated/ticket_parser2
+ALLOW sprav/snezhana_v3/lib -> library/python/deprecated/ticket_parser2
+ALLOW sup/ml/saas -> library/python/deprecated/ticket_parser2
+ALLOW sup/tools/bell_delete -> library/python/deprecated/ticket_parser2
+ALLOW sup/tools/datasync_loader -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/library/cargo_ld_test -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/tools/configure-sharding -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/tools/qa-axe/platform_requests -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/tools/quick-tvm/quick_tvm_generator -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/tools/rt-robot-dc-configuration -> library/python/deprecated/ticket_parser2
+ALLOW taxi/logistic-dispatcher/tools/unsafe-robot-configurations -> library/python/deprecated/ticket_parser2
+ALLOW testenv/core/api/ci -> library/python/deprecated/ticket_parser2
+ALLOW testenv/core/common -> library/python/deprecated/ticket_parser2
+ALLOW travel/avia/subscriptions/app/settings -> library/python/deprecated/ticket_parser2
+ALLOW travel/avia/travelers -> library/python/deprecated/ticket_parser2
+ALLOW travel/cpa/collectors/avia/aeroflot_boy -> library/python/deprecated/ticket_parser2
+ALLOW travel/cpa/collectors/generic/order -> library/python/deprecated/ticket_parser2
+ALLOW travel/cpa/collectors/lib -> library/python/deprecated/ticket_parser2
+ALLOW travel/cpa/collectors/suburban/suburban_boy -> library/python/deprecated/ticket_parser2
+ALLOW travel/cpa/collectors/train/im_boy -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/devops/slack_forwarder -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/lib/python3/tvm -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/tools/api_req_replicator -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/tools/cli -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/tools/expedia_token_validator -> library/python/deprecated/ticket_parser2
+ALLOW travel/hotels/tools/room_photos_uploader -> library/python/deprecated/ticket_parser2
+ALLOW travel/library/python/tvm_ticket_provider -> library/python/deprecated/ticket_parser2
+ALLOW travel/orders/tools/library -> library/python/deprecated/ticket_parser2
+ALLOW travel/rasp/bus/admin/app -> library/python/deprecated/ticket_parser2
+ALLOW travel/rasp/bus_gdpr_api/src -> library/python/deprecated/ticket_parser2
+ALLOW travel/rasp/pathfinder_maps -> library/python/deprecated/ticket_parser2
+ALLOW travel/rasp/pathfinder_proxy/settings -> library/python/deprecated/ticket_parser2
+ALLOW travel/rasp/pathfinder_proxy -> library/python/deprecated/ticket_parser2
+ALLOW trust/utils -> library/python/deprecated/ticket_parser2
+ALLOW weather/libs/utils/tvm -> library/python/deprecated/ticket_parser2
+ALLOW weather/workers/exports/logbroker -> library/python/deprecated/ticket_parser2
+ALLOW yabs/indoor/py_libs/banana_client -> library/python/deprecated/ticket_parser2
+ALLOW yabs/indoor/py_libs/indoor_client -> library/python/deprecated/ticket_parser2
+ALLOW yabs/indoor/py_libs/tvm -> library/python/deprecated/ticket_parser2
+ALLOW yabs/outdoor/libs/operators_api -> library/python/deprecated/ticket_parser2
+ALLOW yabs/python-libs/tornado-utils -> library/python/deprecated/ticket_parser2
+ALLOW yabs/python-libs/tvm -> library/python/deprecated/ticket_parser2
+ALLOW yabs/rmp/backend/src/tvm -> library/python/deprecated/ticket_parser2
+ALLOW yabs/stat/infra/idm/src -> library/python/deprecated/ticket_parser2
+ALLOW yabs/telephony/telephony_data_transfer -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/chat_creator -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/chat_lib -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/cmnt_lib -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/cms_common -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/logbroker -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/partner_api -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/self_service_api -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/strm_thumb_repeat_importer -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/ugc_api -> library/python/deprecated/ticket_parser2
+ALLOW yabs/vh/cms-pgaas/utils/auth/tvm -> library/python/deprecated/ticket_parser2
+ALLOW yaphone/advisor/advisor -> library/python/deprecated/ticket_parser2
+ALLOW yaphone/advisor/common -> library/python/deprecated/ticket_parser2
+ALLOW yaphone/advisor/project -> library/python/deprecated/ticket_parser2
+ALLOW yaphone/dialer/project -> library/python/deprecated/ticket_parser2
+ALLOW ydo/analytics/nirvana/puidification/phone_masks_retriever -> library/python/deprecated/ticket_parser2
+ALLOW ydo/async_api/lib/logbroker_consumer -> library/python/deprecated/ticket_parser2
+ALLOW ydo/bg_task_processor/bin -> library/python/deprecated/ticket_parser2
+ALLOW ydo/libs/blackbox/test -> library/python/deprecated/ticket_parser2
+ALLOW ydo/libs/blackbox -> library/python/deprecated/ticket_parser2
+ALLOW ydo/libs/tvm -> library/python/deprecated/ticket_parser2
+ALLOW ydo/payments/product_orders_processor/bin -> library/python/deprecated/ticket_parser2
+ALLOW ydo/tools/messenger/sms_notify/lib -> library/python/deprecated/ticket_parser2
+ALLOW ydo/tools/messenger/sms_notify -> library/python/deprecated/ticket_parser2
+ALLOW ydo/tools/search_index/prepare_index_data/prepare_direct_certificates/lib -> library/python/deprecated/ticket_parser2
+ALLOW yp/idm_role_provider/src -> library/python/deprecated/ticket_parser2
+ALLOW yp/tests/blackbox_recipe/bin -> library/python/deprecated/ticket_parser2
+ALLOW yp/tests/secret_vault_recipe/bin -> library/python/deprecated/ticket_parser2
+ALLOW yt/cron/duty -> library/python/deprecated/ticket_parser2
+ALLOW yt/cron/map_users_to_pools -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antiporno/cp_conv/prepare_suggestive_cp_img_basket -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/cid/library/normalizer -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/cid/library -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/clean_web/lib -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/clean_web/tools/make_alert -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/clean_web/tools/upload_images_to_mds -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/mascot/sources -> library/python/deprecated/ticket_parser2
+ALLOW yweb/antispam/pth/instances/ownpth/hostinfo_viewer -> library/python/deprecated/ticket_parser2
+ALLOW yweb/blender/data_delivery/rtmr_uploader -> library/python/deprecated/ticket_parser2
+ALLOW yweb/freshness/coronavirus/upload_data_to_rtmr -> library/python/deprecated/ticket_parser2
+ALLOW yweb/freshness/scripts/sport_wizard -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/common/python/logbroker -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/common/python/logbroker_py2 -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/common/python/tvm -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/media/vh_selfservice -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/news_back/api/partner -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/pq_importer -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/python -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/search/pyuploader -> library/python/deprecated/ticket_parser2
+ALLOW yweb/news/zen/video_export -> library/python/deprecated/ticket_parser2
+ALLOW yweb/rca/server/app -> library/python/deprecated/ticket_parser2
+ALLOW yweb/verticals/scripts/sport_chats -> library/python/deprecated/ticket_parser2
+ALLOW yweb/yasap/answers/answers -> library/python/deprecated/ticket_parser2
+ALLOW yweb/yasap/answers/answers_history/lib -> library/python/deprecated/ticket_parser2
+ALLOW yweb/yasap/pdb/pdb-backend/src -> library/python/deprecated/ticket_parser2
+ALLOW zootopia/analytics/drive/binary/drive -> library/python/deprecated/ticket_parser2
+ALLOW zootopia/analytics/drive/source/drive/utils -> library/python/deprecated/ticket_parser2
+ALLOW zootopia/hub/planex/promo_backend/dispenser -> library/python/deprecated/ticket_parser2
+DENY .* -> library/python/deprecated/ticket_parser2
diff --git a/build/rules/library_deps.policy b/build/rules/library_deps.policy
new file mode 100644
index 0000000000..954d0198c6
--- /dev/null
+++ b/build/rules/library_deps.policy
@@ -0,0 +1,44 @@
+ALLOW library -> build
+ALLOW library -> contrib
+ALLOW library -> util
+ALLOW library -> library
+ALLOW library -> certs
+ALLOW library/.*/(n)?yt -> mapreduce/yt
+ALLOW library/java -> devtools/junit5-runner
+ALLOW library/java/.*/ut -> devtools/(jtest)|(junit-runner)
+ALLOW library/java/.*/src/test -> devtools/(jtest)|(junit-runner)
+ALLOW library/java/.*/tests -> devtools/(jtest)|(junit-runner)
+ALLOW library/java/hnsw/ut -> devtools/(jtest)|(junit-runner)
+ALLOW library/python/.*/test -> devtools/ya/(test)|(exts)
+ALLOW library/(python/)?testing -> devtools/ya/
+ALLOW library/recipes -> devtools/ya/
+ALLOW library/.*/ipreg -> ipreg
+ALLOW library/cpp/deprecated/ipreg1 -> ipreg
+ALLOW library/cpp/geobase -> geobase
+ALLOW library/python/zipatch -> vcs/svn/wc/client
+ALLOW library/(java/ticket_parser2)|(hnsw) -> iceberg
+ALLOW library/python/bstr -> yt/python/client
+ALLOW library/python/django -> devtools/ya/yalibrary/makelists
+ALLOW library/python/django_abc_data -> intranet/sync_tools
+ALLOW library/python/coredump_filter -> sandbox/sdk2/helpers/coredump_filter
+ALLOW library/python/cqueue -> skynet/api/copier
+ALLOW library/python/monitoring/solo/handlers/solomon/v3/base -> solomon/protos/api/v3
+ALLOW library/python/monitoring/solo/objects/solomon/v3 -> solomon/protos/api/v3
+ALLOW library/python/nirvana -> yt/python/client
+ALLOW library/python/type_info -> yt/python/client
+ALLOW library/python/ylock -> yt/python/yt/wrapper
+ALLOW library/python/yt -> yt/python/client_lite
+ALLOW library/python/yt/example -> yt/python/client
+ALLOW library/python/statface_client -> statbox/libstatbox/python
+ALLOW library/python/pytest-mongodb -> devtools/swag/lib
+ALLOW library/cpp/minhash/tools/mr_hash -> mapreduce
+ALLOW library/cpp/token/ut -> kernel
+ALLOW library/cpp/infected_masks -> kernel
+ALLOW library/cpp/deprecated/dater_old/scanner -> kernel
+ALLOW library/cpp/http/client/fetch -> kernel
+ALLOW library/cpp/text_processing/yandex_specific_lemmer -> kernel/lemmer
+ALLOW library/cpp/digest/benchmark -> yabs/server/util
+ALLOW library/cpp/eventlog/rt/tool -> search/idl
+ALLOW library/cpp/dolbilo/planner -> search/idl
+ALLOW library/cpp/vowpalwabbit/tools/vw_ops -> ml/differential_evolution
+DENY library -> .*
diff --git a/build/rules/local.blacklist b/build/rules/local.blacklist
new file mode 100644
index 0000000000..46d8cff894
--- /dev/null
+++ b/build/rules/local.blacklist
@@ -0,0 +1,3 @@
+# Local blacklist
+# The list of top level directories excluded from local build
+mobile
diff --git a/build/rules/maps/maps.policy b/build/rules/maps/maps.policy
new file mode 100644
index 0000000000..8abf3fbbd7
--- /dev/null
+++ b/build/rules/maps/maps.policy
@@ -0,0 +1,179 @@
+ALLOW maps/infra/ratelimiter2/server -> maps/libs/deprecated/bson
+ALLOW maps/tools/grinder -> maps/libs/deprecated/bson
+ALLOW taxi/tools/dorblu -> maps/libs/deprecated/bson
+
+ALLOW maps/masstransit/info -> maps/libs/deprecated/mongo
+ALLOW taxi/tools/dorblu -> maps/libs/deprecated/mongo
+
+# Use maps/libs/locale instead
+ALLOW maps/automotive/remote_access/libs/i18n -> maps/libs/deprecated/localeutils
+ALLOW maps/carparks/renderer/datasource -> maps/libs/deprecated/localeutils
+ALLOW maps/fastcgi/tilerenderer-serv -> maps/libs/deprecated/localeutils
+ALLOW maps/garden/modules/renderer_denormalization -> maps/libs/deprecated/localeutils
+ALLOW maps/infopoint -> maps/libs/deprecated/localeutils
+ALLOW maps/jams/renderer2 -> maps/libs/deprecated/localeutils
+ALLOW maps/libs/i18n -> maps/libs/deprecated/localeutils
+ALLOW maps/libs/i18n-geobase -> maps/libs/deprecated/localeutils
+ALLOW maps/libs/jams/static-graph -> maps/libs/deprecated/localeutils
+ALLOW maps/libs/locale/compatibility -> maps/libs/deprecated/localeutils
+ALLOW maps/libs/road_graph -> maps/libs/deprecated/localeutils
+ALLOW maps/poi/personalized_poi -> maps/libs/deprecated/localeutils
+ALLOW maps/renderer -> maps/libs/deprecated/localeutils
+ALLOW maps/routing/router -> maps/libs/deprecated/localeutils
+ALLOW maps/routing/graph-tile-builder -> maps/libs/deprecated/localeutils
+ALLOW maps/snippets/tools/masstransit -> maps/libs/deprecated/localeutils
+ALLOW maps/tools/indoor -> maps/libs/deprecated/localeutils
+ALLOW maps/wikimap/mapspro/services/mrc -> maps/libs/deprecated/localeutils
+ALLOW netsys/tiles-vcdiff/gen-tiles -> maps/libs/deprecated/localeutils
+
+# Use maps/libs/geolib instead
+ALLOW maps/streetview/backoffice/lib -> maps/libs/deprecated/coordtrans_pymod
+
+# Use std::chrono or util/datetime instead
+ALLOW maps/analyzer -> maps/libs/deprecated/boost_time
+ALLOW maps/routing -> maps/libs/deprecated/boost_time
+ALLOW maps/tools/naviguide/lib -> maps/libs/deprecated/boost_time
+
+# Stop spreading deprecated stuff
+ALLOW maps/libs/deprecated -> maps/libs/deprecated
+DENY .* -> maps/libs/deprecated
+
+# maps/doc/proto holds proto interface for maps backends. Anyone can use them.
+ALLOW .* -> maps/doc/proto
+
+# These libraries are allowed for general use
+ALLOW .* -> maps/libs/common
+ALLOW .* -> maps/libs/csv
+ALLOW .* -> maps/libs/enum_io
+ALLOW .* -> maps/libs/geolib
+ALLOW .* -> maps/libs/http
+ALLOW .* -> maps/libs/json
+ALLOW .* -> maps/libs/nirvana
+ALLOW .* -> maps/libs/local_postgres
+ALLOW .* -> maps/libs/locale
+ALLOW .* -> maps/libs/pgpool
+ALLOW .* -> maps/libs/s3mds
+ALLOW .* -> maps/libs/sql_chemistry
+ALLOW .* -> maps/libs/st
+ALLOW .* -> maps/libs/tile
+ALLOW .* -> maps/libs/ttl_cache
+ALLOW .* -> maps/pylibs/local_postgres
+
+# Fix current PEERDIRs and prevent any further growth
+ALLOW media/road-graph-tool -> maps/libs/road_graph
+ALLOW media/road-graph-tool -> maps/libs/snap
+ALLOW media/road-graph-tool -> maps/libs/succinct_rtree
+ALLOW netsys/tiles-vcdiff/gen-tiles -> maps/renderer
+ALLOW quality/ab_testing/cofe/projects/maps -> maps/analytics
+ALLOW taxi/antifraud/mult_id -> maps/libs/geolib
+ALLOW taxi/graph/external/graph2/tests/mapmatcher -> maps/libs/mms
+ALLOW taxi/graph/external/graph2/tests/mapmatcher -> maps/libs/mms
+ALLOW taxi/graph/libs/easyview_helpers -> maps/analyzer/libs/common
+ALLOW taxi/graph/libs/easyview_helpers -> maps/tools/easyview/lib/io
+ALLOW taxi/graph/libs/graph -> maps/analyzer/libs/data
+ALLOW taxi/graph/libs/graph -> maps/analyzer/libs/graphmatching
+ALLOW taxi/graph/libs/graph -> maps/libs/common
+ALLOW taxi/graph/libs/graph -> maps/libs/edge_persistent_index
+ALLOW taxi/graph/libs/graph -> maps/libs/edge_persistent_index/packer/lib
+ALLOW taxi/graph/libs/graph -> maps/libs/jams/graph-spatial
+ALLOW taxi/graph/libs/graph -> maps/libs/jams/router
+ALLOW taxi/graph/libs/graph -> maps/libs/jams/static-graph
+ALLOW taxi/graph/libs/graph -> maps/libs/mms
+ALLOW taxi/graph/libs/graph -> maps/libs/road_graph
+ALLOW taxi/graph/libs/graph -> maps/libs/road_graph/serialization
+ALLOW taxi/graph/libs/graph -> maps/libs/snap
+ALLOW taxi/graph/libs/graph -> maps/libs/succinct_rtree/serialization
+ALLOW taxi/graph/libs/graph -> maps/routing/common
+ALLOW taxi/graph/libs/graph -> maps/routing/turn_penalties
+ALLOW taxi/graph/libs/graph -> maps/tools/easyview/lib/io
+ALLOW taxi/graph/libs/graph-test -> maps/libs/geolib
+ALLOW taxi/graph/libs/mapmatcher -> maps/analyzer/libs/common
+ALLOW taxi/graph/libs/mapmatcher -> maps/analyzer/libs/data
+ALLOW taxi/graph/libs/mapmatcher -> maps/analyzer/libs/graphmatching
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/common
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/edge_persistent_index
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/jams/graph-spatial
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/jams/router
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/jams/static-graph
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/mms
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/road_graph
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/road_graph/serialization
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/snap
+ALLOW taxi/graph/libs/mapmatcher -> maps/libs/succinct_rtree/serialization
+ALLOW taxi/graph/libs/mapmatcher -> maps/routing/common
+ALLOW taxi/graph/libs/mapmatcher -> maps/routing/turn_penalties
+ALLOW taxi/graph/libs/mapmatcher -> maps/tools/easyview/lib/io
+ALLOW taxi/graph/libs/mapmatcher -> maps/analyzer/libs/guidance
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/common
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/jams/graph-spatial
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/jams/router
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/jams/static-graph
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/mms
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/road_graph
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/road_graph/serialization
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/snap
+ALLOW taxi/graph/libs/nearest_edges -> maps/libs/succinct_rtree/serialization
+ALLOW taxi/graph/libs/nearest_edges -> maps/tools/easyview/lib/io
+ALLOW taxi/graph/libs/predict -> maps/analyzer/libs/common
+ALLOW taxi/graph/libs/probmatching -> maps/analyzer/libs/mapmatching
+ALLOW taxi/graph/libs/routing -> maps/libs/common
+ALLOW taxi/graph/libs/routing -> maps/libs/leptidea
+ALLOW taxi/graph/libs/routing -> maps/libs/road_graph
+ALLOW taxi/graph/libs/routing -> maps/routing/common
+ALLOW taxi/graph/libs/search -> maps/analyzer/libs/common
+ALLOW taxi/graph/libs/shortest_path -> maps/analyzer/libs/data
+ALLOW taxi/graph/libs/shortest_path -> maps/analyzer/libs/shortest_path
+ALLOW taxi/graph/libs/shortest_path -> maps/libs/common
+ALLOW taxi/graph/libs/shortest_path -> maps/libs/mms
+ALLOW taxi/graph/libs/shortest_path -> maps/routing/common
+ALLOW taxi/graph/libs/shortest_path -> maps/routing/turn_penalties
+ALLOW taxi/graph/libs/tests/graph -> maps/libs/jams/static-graph
+ALLOW taxi/graph/libs/tests/mapmatcher -> maps/analyzer/libs/track_generator
+ALLOW taxi/graph/libs/tests/mapmatcher -> maps/libs/mms
+ALLOW taxi/graph/libs/tests/nearest_edges -> maps/libs/jams/static-graph
+ALLOW taxi/graph/libs/tests/routing -> maps/libs/road_graph
+ALLOW taxi/graph/tools/bench-nearest-edges -> maps/libs/jams/static-graph
+ALLOW taxi/graph/tools/bench-nearest-edges -> maps/libs/road_graph
+ALLOW taxi/graph/tools/find-one-way-gates -> maps/tools/easyview/lib/io
+ALLOW taxi/graph/tools/generate-graph-tracks -> maps/analyzer/libs/track_generator
+ALLOW taxi/graph/tools/generate-graph-tracks -> maps/libs/mms
+ALLOW taxi/graph/tools/lib -> maps/libs/road_graph
+ALLOW taxi/graph/tools/ -> maps/tools/easyview/pylib
+ALLOW taxi/tools/dorblu/lib -> maps/libs/common
+ALLOW taxi/tools/dorblu/lib -> maps/libs/deprecated/bson
+ALLOW taxi/tools/dorblu/lib -> maps/libs/deprecated/mongo
+ALLOW taxi/tools/dorblu/lib -> maps/libs/json
+ALLOW taxi/tools/dorblu/lib -> maps/libs/log8
+ALLOW taxi/tools/dorblu/agent -> maps/libs/log8
+ALLOW taxi/tools/dorblu/aggregator -> maps/libs/log8
+ALLOW taxi/tools/dorblu/lib -> maps/libs/http
+ALLOW yql/udfs/taxi/graph -> maps/libs/leptidea
+
+ALLOW maps/ -> maps/
+ALLOW sandbox/projects/maps -> maps/
+ALLOW sandbox/projects/mapsearch -> maps/
+ALLOW sandbox/projects/masstransit -> maps/
+ALLOW sprav/altay/panorama -> maps/streetview/libs
+ALLOW yql/udfs/maps -> maps/
+
+# maps_adv will be split into maps and smb
+ALLOW maps_adv/ -> maps/
+ALLOW maps_adv/ -> maps_adv/
+ALLOW smb/ -> maps_adv/
+DENY .* -> maps_adv/
+
+ALLOW sdg/library/python/revision_manager -> maps/wikimap/mapspro/libs/common
+ALLOW sdg/library/python/revision_manager -> maps/wikimap/mapspro/libs/revision
+
+# Ydo libs can use some maps stuff
+ALLOW ydo/libs/dispatch -> maps/libs/pbstream
+ALLOW ydo/libs/dispatch -> maps/libs/kdtree
+
+# use of privacy_detector
+ALLOW toloka -> maps/wikimap/mapspro/services/mrc/libs/
+
+# allow using yacare to implement piglet sync service
+ALLOW devtools/contrib -> maps/infra/yacare
+
+# Do not allow PEERDIRs into maps unless such PEERDIRs have be explicitly allowed above
+DENY .* -> maps/
diff --git a/build/rules/maps/ya.make b/build/rules/maps/ya.make
new file mode 100644
index 0000000000..b73cd6d73c
--- /dev/null
+++ b/build/rules/maps/ya.make
@@ -0,0 +1 @@
+OWNER(g:maps-dragon-fighters)
diff --git a/build/rules/passport.policy b/build/rules/passport.policy
new file mode 100644
index 0000000000..f4358c718b
--- /dev/null
+++ b/build/rules/passport.policy
@@ -0,0 +1,14 @@
+# PERSISTENT EXCEPTION: 'ya yav' handler
+ALLOW devtools/ya/handlers/yav -> passport/backend/vault/cli/yav/vault_client_cli
+
+# PERSISTENT EXCEPTION: PASSP-31449
+ALLOW mail/so/daemons/antifraud -> passport/infra/daemons/ysa/fingerprint
+
+# PERSISTENT EXCEPTION: useful for debug purposes
+ALLOW junk -> passport/
+
+# COMMON RULE: Self using
+ALLOW passport -> passport/
+
+# COMMON RULE: we need freedom for refactorings
+DENY .* -> passport/
diff --git a/build/rules/py2_deprecation/readme.md b/build/rules/py2_deprecation/readme.md
new file mode 100644
index 0000000000..02af9087ef
--- /dev/null
+++ b/build/rules/py2_deprecation/readme.md
@@ -0,0 +1,9 @@
+# Python 2 в Аркадии deprecated
+
+Arcadia мигрирует на Python 3 и код на Python 2 [объявлен deprecated](https://clubs.at.yandex-team.ru/arcadia/23044)
+
+Чтобы не перегружать большими портянками предупреждений консоль все такие ошибки по умолчанию выводятся через этот модуль и потому фигурирут одной строкой.
+
+Чтобы увидеть все ошибки достаточно запустить вашу сборку с дополнительным флагом `-DFAIL_PY2`. Это вызовет configure-ошибки во всех стартовых Python2-only модулях:
+программах - `PY2_PROGRAM`, тестах (`PY2TEST`) и Sandbox-задачах (`SANDBOX_TASK`). `PY2_LIBRARY` на данный момент не вызывает ошибок, потому что достаточно сложно
+отследить зависимости на них из разрешённых `PY23_LIBRARY` и `PY23_TEST`. \ No newline at end of file
diff --git a/build/rules/py2_deprecation/ya.make b/build/rules/py2_deprecation/ya.make
new file mode 100644
index 0000000000..f488d5e97b
--- /dev/null
+++ b/build/rules/py2_deprecation/ya.make
@@ -0,0 +1,6 @@
+OWNER(g:ymake)
+RESOURCES_LIBRARY()
+
+MESSAGE(WARNING You are using deprecated Python2-only code. Please consider rewriting to Python 3. To list all such errors use `ya make -DFAIL_PY2`.)
+
+END()
diff --git a/build/rules/taxi.policy b/build/rules/taxi.policy
new file mode 100644
index 0000000000..76cc083ef2
--- /dev/null
+++ b/build/rules/taxi.policy
@@ -0,0 +1,3 @@
+# userver-specific libc overrides, pending removal
+ALLOW taxi/uservices/userver -> contrib/libs/libc_userver_workarounds
+DENY .* -> contrib/libs/libc_userver_workarounds
diff --git a/build/rules/ya.make b/build/rules/ya.make
new file mode 100644
index 0000000000..cc926680e8
--- /dev/null
+++ b/build/rules/ya.make
@@ -0,0 +1 @@
+OWNER(g:ymake g:contrib)
diff --git a/build/rules/yadi.policy b/build/rules/yadi.policy
new file mode 100644
index 0000000000..6196552936
--- /dev/null
+++ b/build/rules/yadi.policy
@@ -0,0 +1 @@
+# There will be policy from Yadi: YADI-105 \ No newline at end of file
diff --git a/build/rules/yp.policy b/build/rules/yp.policy
new file mode 100644
index 0000000000..b4c88a9f7c
--- /dev/null
+++ b/build/rules/yp.policy
@@ -0,0 +1,3 @@
+ALLOW yp -> yp/server
+
+DENY .* -> yp/server
diff --git a/build/rules/yt.policy b/build/rules/yt.policy
new file mode 100644
index 0000000000..2924025dd5
--- /dev/null
+++ b/build/rules/yt.policy
@@ -0,0 +1,6 @@
+ALLOW yt -> yt/yt/server
+
+DENY .* -> yt/yt/server
+
+ALLOW mapreduce/yt/experiments -> mapreduce/yt/experiments
+DENY .* -> mapreduce/yt/experiments
diff --git a/build/sanitize-blacklist.txt b/build/sanitize-blacklist.txt
new file mode 100644
index 0000000000..c1fb5e539f
--- /dev/null
+++ b/build/sanitize-blacklist.txt
@@ -0,0 +1,4 @@
+src:*contrib/tools/python/src*
+src:*contrib/tools/python3/src*
+src:*contrib/libs/luajit*
+type:std::__*::locale::id=init
diff --git a/build/scripts/_check_compiler.cpp b/build/scripts/_check_compiler.cpp
new file mode 100644
index 0000000000..53c5fdf179
--- /dev/null
+++ b/build/scripts/_check_compiler.cpp
@@ -0,0 +1 @@
+#include <stdio.h>
diff --git a/build/scripts/_fake_src.cpp b/build/scripts/_fake_src.cpp
new file mode 100644
index 0000000000..139597f9cb
--- /dev/null
+++ b/build/scripts/_fake_src.cpp
@@ -0,0 +1,2 @@
+
+
diff --git a/build/scripts/append_file.py b/build/scripts/append_file.py
new file mode 100644
index 0000000000..6b5d53bc71
--- /dev/null
+++ b/build/scripts/append_file.py
@@ -0,0 +1,9 @@
+import sys
+
+
+if __name__ == "__main__":
+
+ file_path = sys.argv[1]
+ with open(file_path, "a") as f:
+ for text in sys.argv[2:]:
+ print >>f, text
diff --git a/build/scripts/autotar_gendirs.py b/build/scripts/autotar_gendirs.py
new file mode 100644
index 0000000000..a1228108aa
--- /dev/null
+++ b/build/scripts/autotar_gendirs.py
@@ -0,0 +1,70 @@
+from __future__ import print_function
+
+import os
+import sys
+import argparse
+import tarfile
+import subprocess
+
+
+def is_exe(fpath):
+ return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+
+
+def pack_dir(dir_path, dest_path):
+ dir_path = os.path.abspath(dir_path)
+ for tar_exe in ('/usr/bin/tar', '/bin/tar'):
+ if is_exe(tar_exe):
+ subprocess.check_call([tar_exe, '-cf', dest_path, '-C', os.path.dirname(dir_path), os.path.basename(dir_path)])
+ break
+ else:
+ with tarfile.open(dest_path, 'w') as out:
+ out.add(dir_path, arcname=os.path.basename(dir_path))
+
+
+def unpack_dir(tared_dir, dest_path):
+ tared_dir = os.path.abspath(tared_dir)
+ if not os.path.exists(dest_path):
+ os.makedirs(dest_path)
+ for tar_exe in ('/usr/bin/tar', '/bin/tar'):
+ if is_exe(tar_exe):
+ subprocess.check_call([tar_exe, '-xf', tared_dir, '-C', dest_path])
+ break
+ else:
+ with tarfile.open(tared_dir, 'r') as tar_file:
+ tar_file.extractall(dest_path)
+
+
+# Must only be used to pack directories in build root
+# Must silently accept empty list of dirs and do nothing in such case (workaround for ymake.core.conf limitations)
+def main(args):
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--pack', action='store_true', default=False)
+ parser.add_argument('--unpack', action='store_true', default=False)
+ parser.add_argument('--ext')
+ parser.add_argument('--outs', nargs='*', default=[])
+ parser.add_argument('dirs', nargs='*')
+ args = parser.parse_args(args)
+
+ if args.pack:
+ if len(args.dirs) != len(args.outs):
+ print("Number and oder of dirs to pack must match to the number and order of outs", file=sys.stderr)
+ return 1
+ for dir, dest in zip(args.dirs, args.outs):
+ pack_dir(dir, dest)
+ elif args.unpack:
+ for tared_dir in args.dirs:
+ if not tared_dir.endswith(args.ext):
+ print("Requested to unpack '{}' which do not have required extension '{}'".format(tared_dir, args.ext), file=sys.stderr)
+ return 1
+ dest = os.path.dirname(tared_dir)
+ unpack_dir(tared_dir, dest)
+ else:
+ print("Neither --pack nor --unpack specified. Don't know what to do.", file=sys.stderr)
+ return 1
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/build/scripts/build_catboost.py b/build/scripts/build_catboost.py
new file mode 100755
index 0000000000..78334fc5f7
--- /dev/null
+++ b/build/scripts/build_catboost.py
@@ -0,0 +1,71 @@
+import sys
+import os
+import shutil
+import re
+import subprocess
+
+def get_value(val):
+ dct = val.split('=', 1)
+ if len(dct) > 1:
+ return dct[1]
+ return ''
+
+
+class BuildCbBase(object):
+ def run(self, cbmodel, cbname, cb_cpp_path):
+
+ data_prefix = "CB_External_"
+ data = data_prefix + cbname
+ datasize = data + "Size"
+
+ cbtype = "const NCatboostCalcer::TCatboostCalcer"
+ cbload = "(ReadModel({0}, {1}, EModelType::CatboostBinary))".format(data, datasize)
+
+ cb_cpp_tmp_path = cb_cpp_path + ".tmp"
+ cb_cpp_tmp = open(cb_cpp_tmp_path, 'w')
+
+ cb_cpp_tmp.write("#include <kernel/catboost/catboost_calcer.h>\n")
+
+ ro_data_path = os.path.dirname(cb_cpp_path) + "/" + data_prefix + cbname + ".rodata"
+ cb_cpp_tmp.write("namespace{\n")
+ cb_cpp_tmp.write(" extern \"C\" {\n")
+ cb_cpp_tmp.write(" extern const unsigned char {1}{0}[];\n".format(cbname, data_prefix))
+ cb_cpp_tmp.write(" extern const ui32 {1}{0}Size;\n".format(cbname, data_prefix))
+ cb_cpp_tmp.write(" }\n")
+ cb_cpp_tmp.write("}\n")
+ archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", ro_data_path, cbmodel], stdout=None, stderr=subprocess.PIPE)
+ archiverCall.wait()
+ cb_cpp_tmp.write("extern {0} {1};\n".format(cbtype, cbname))
+ cb_cpp_tmp.write("{0} {1}{2};".format(cbtype, cbname, cbload))
+ cb_cpp_tmp.close()
+ shutil.move(cb_cpp_tmp_path, cb_cpp_path)
+
+class BuildCb(BuildCbBase):
+ def run(self, argv):
+ if len(argv) < 5:
+ print >>sys.stderr, "BuildCb.Run(<ARCADIA_ROOT> <archiver> <mninfo> <mnname> <cppOutput> [params...])"
+ sys.exit(1)
+
+ self.SrcRoot = argv[0]
+ self.archiver = argv[1]
+ cbmodel = argv[2]
+ cbname = argv[3]
+ cb_cpp_path = argv[4]
+
+ super(BuildCb, self).run(cbmodel, cbname, cb_cpp_path)
+
+
+def build_cb_f(argv):
+ build_cb = BuildCb()
+ build_cb.run(argv)
+
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ print >>sys.stderr, "Usage: build_cb.py <funcName> <args...>"
+ sys.exit(1)
+
+ if (sys.argv[2:]):
+ globals()[sys.argv[1]](sys.argv[2:])
+ else:
+ globals()[sys.argv[1]]()
diff --git a/build/scripts/build_dll_and_java.py b/build/scripts/build_dll_and_java.py
new file mode 100644
index 0000000000..b9d8aff4df
--- /dev/null
+++ b/build/scripts/build_dll_and_java.py
@@ -0,0 +1,47 @@
+import os
+import subprocess
+import sys
+
+
+def just_do_it(argv):
+ delim = argv[0]
+ args = []
+ for item in argv:
+ if item == delim:
+ args.append([])
+ else:
+ args[-1].append(item)
+ dll_cmd, java_cmd, inputs, dll_out, java_out, jsrs_out, roots = args
+ dll_out, java_out, jsrs_out, build_root, source_root = dll_out[0], java_out[0], jsrs_out[0], roots[0], roots[1]
+ for inp in inputs:
+ origin_inp = inp
+ if os.path.isabs(inp):
+ if os.path.relpath(inp, build_root).startswith('..'):
+ inp = os.path.relpath(inp, source_root)
+ else:
+ inp = os.path.relpath(inp, build_root)
+ ext = os.path.splitext(inp)[1]
+ if ext in ('.o', '.obj'):
+ if os.path.join(build_root, inp) in java_cmd:
+ inp = os.path.join(build_root, inp)
+ if sys.platform == 'win32':
+ inp = inp.replace('\\', '/')
+ if inp not in java_cmd:
+ inp = build_root + '/' + inp
+ java_cmd.remove(inp)
+ if ext in ('.java', '.jsrc'):
+ if origin_inp in dll_cmd:
+ inp = origin_inp
+ elif os.path.join(build_root, inp) in dll_cmd:
+ inp = os.path.join(build_root, inp)
+ if sys.platform == 'win32':
+ inp = inp.replace('\\', '/')
+ dll_cmd.remove(inp)
+ java_cmd.insert(java_cmd.index(dll_out), java_out)
+ java_cmd.remove(dll_out)
+ subprocess.check_call(java_cmd)
+ subprocess.check_call(dll_cmd)
+
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/build_info_gen.py b/build/scripts/build_info_gen.py
new file mode 100644
index 0000000000..949e0a1636
--- /dev/null
+++ b/build/scripts/build_info_gen.py
@@ -0,0 +1,63 @@
+import subprocess
+import os
+import sys
+import re
+
+indent = " "
+
+
+def escape_special_symbols(strval):
+ retval = ""
+ for c in strval:
+ if c in ("\\", "\""):
+ retval += "\\" + c
+ elif ord(c) < 0x20:
+ retval += c.encode("string_escape")
+ else:
+ retval += c
+ return retval
+
+
+def escape_line_feed(strval):
+ return re.sub(r'\\n', r'\\n"\\\n' + indent + '"', strval)
+
+
+def escaped_define(strkey, strval):
+ return "#define " + strkey + " \"" + escape_line_feed(escape_special_symbols(strval)) + "\""
+
+
+def get_build_info(compiler, flags):
+ build_info = "Build info:\n"
+ build_info += indent + "Compiler: " + compiler + "\n"
+ build_info += indent + "Compiler version: \n" + get_compiler_info(compiler) + "\n"
+ build_info += indent + "Compile flags: " + (flags if flags else "no flags info")
+ return build_info
+
+
+def get_compiler_info(compiler):
+ compiler_binary = os.path.basename(compiler).lower()
+ if len(compiler.split(' ')) > 1 or compiler_binary == "ymake" or compiler_binary == "ymake.exe":
+ compiler_ver_out = "Build by wrapper. No useful info here."
+ else:
+ compiler_ver_cmd = [compiler]
+ if compiler_binary not in ("cl", "cl.exe"):
+ compiler_ver_cmd.append('--version')
+ compiler_ver_out = subprocess.Popen(compiler_ver_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.read()
+ return "\n".join(['{}{}'.format(indent * 2, line.strip()) for line in compiler_ver_out.splitlines() if line.strip()])
+
+
+def main():
+ if len(sys.argv) != 4:
+ print >>sys.stderr, "Usage: build_info_gen.py <output file> <CXX compiler> <CXX flags>"
+ sys.exit(1)
+ cxx_compiler = sys.argv[2]
+ cxx_flags = sys.argv[3]
+ with open(sys.argv[1], 'w') as result:
+ print >> result, "#pragma once\n"
+ print >> result, escaped_define("BUILD_INFO", get_build_info(cxx_compiler, cxx_flags))
+ print >> result, escaped_define("BUILD_COMPILER", cxx_compiler)
+ print >> result, escaped_define("BUILD_COMPILER_VERSION", get_compiler_info(cxx_compiler))
+ print >> result, escaped_define("BUILD_COMPILER_FLAGS", cxx_flags)
+
+if __name__ == "__main__":
+ main()
diff --git a/build/scripts/build_java_codenav_index.py b/build/scripts/build_java_codenav_index.py
new file mode 100644
index 0000000000..d7ac4f3213
--- /dev/null
+++ b/build/scripts/build_java_codenav_index.py
@@ -0,0 +1,49 @@
+import sys
+import re
+import os
+import subprocess
+
+FAKE_ARCADIA_ROOT = 'fake_arcadia_root'
+FAKE_BUILD_ROOT = 'fake_build_root'
+
+
+def modify_sources_file(origin, target, source_roots_map):
+ def _cut_source_root(src):
+ for pref, fake_root in source_roots_map.items():
+ if src.startswith(pref):
+ return os.path.join(fake_root, os.path.relpath(src, pref))
+ return src
+
+ with open(origin) as o:
+ srcs = [i for line in o for i in re.split('\\s+', line) if i]
+ new_srcs = map(_cut_source_root, srcs)
+ with open(target, 'w') as t:
+ t.write(' '.join(new_srcs))
+
+
+def just_do_it(argv):
+ corpus_name, build_root, arcadia_root, sources_file, javac_tail_cmd = argv[0], argv[1], argv[2], argv[3], argv[4:]
+ fake_arcadia_root = os.path.join(build_root, FAKE_ARCADIA_ROOT)
+ fake_build_root = os.path.join(build_root, FAKE_BUILD_ROOT)
+ fake_source_roots = {
+ arcadia_root: fake_arcadia_root,
+ build_root: fake_build_root,
+ }
+ modify_sources_file(sources_file, os.path.join(os.path.dirname(sources_file), '_' + os.path.basename(sources_file)), fake_source_roots)
+ kindex_data_root = '{}/kindex'.format(os.path.join(build_root, os.path.dirname(corpus_name)))
+ if not os.path.exists(kindex_data_root):
+ os.makedirs(kindex_data_root)
+ env = os.environ.copy()
+ env['KYTHE_ROOT_DIRECTORY'] = build_root
+ env['KYTHE_OUTPUT_DIRECTORY'] = kindex_data_root
+ env['KYTHE_CORPUS'] = os.path.relpath(corpus_name, build_root)
+ os.symlink(arcadia_root, fake_arcadia_root)
+ os.symlink(build_root, fake_build_root)
+ try:
+ subprocess.check_call(javac_tail_cmd, env=env)
+ finally:
+ os.unlink(fake_arcadia_root)
+ os.unlink(fake_build_root)
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/build_java_with_error_prone.py b/build/scripts/build_java_with_error_prone.py
new file mode 100644
index 0000000000..910443552e
--- /dev/null
+++ b/build/scripts/build_java_with_error_prone.py
@@ -0,0 +1,36 @@
+import sys
+import os
+
+ERROR_PRONE_FLAGS = [
+ '-Xep:FunctionalInterfaceMethodChanged:WARN',
+ '-Xep:ReturnValueIgnored:WARN',
+]
+
+JAVA10_EXPORTS = [
+ '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED'
+]
+
+
+def just_do_it(argv):
+ java, error_prone_tool, javac_cmd = argv[0], argv[1], argv[2:]
+ if java.endswith('javac') or java.endswith('javac.exe'):
+ for f in javac_cmd:
+ if f.startswith('-Xep'):
+ ERROR_PRONE_FLAGS.append(f)
+ for f in ERROR_PRONE_FLAGS:
+ if f in javac_cmd:
+ javac_cmd.remove(f)
+ os.execv(java, [java] + JAVA10_EXPORTS + ['-processorpath', error_prone_tool, '-XDcompilePolicy=byfile'] + [(' '.join(['-Xplugin:ErrorProne'] + ERROR_PRONE_FLAGS))] + javac_cmd)
+ else:
+ os.execv(java, [java, '-Xbootclasspath/p:' + error_prone_tool, 'com.google.errorprone.ErrorProneCompiler'] + ERROR_PRONE_FLAGS + javac_cmd)
+
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/build_java_with_error_prone2.py b/build/scripts/build_java_with_error_prone2.py
new file mode 100644
index 0000000000..4efc1e444a
--- /dev/null
+++ b/build/scripts/build_java_with_error_prone2.py
@@ -0,0 +1,87 @@
+import sys
+import os
+import re
+import subprocess
+import platform
+
+
+ERROR_PRONE_FLAGS = [
+ '-Xep:FunctionalInterfaceMethodChanged:WARN',
+ '-Xep:ReturnValueIgnored:WARN',
+]
+
+JAVA10_EXPORTS = [
+ '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
+ '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED',
+]
+
+
+def get_java_version(exe):
+ p = subprocess.Popen([exe, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ for line in ((out or '').strip() + (err or '').strip()).split("\n"):
+ m = re.match(r'java version "(.+)"', line)
+ if m:
+ parts = m.groups()[0].split(".")
+ return parts[1] if parts[0] == "1" else parts[0]
+ m = re.match(r'openjdk version "(\d+).*"', line)
+ if m:
+ parts = m.groups()[0].split(".")
+ return parts[0]
+ return None
+
+
+def get_classpath(cmd):
+ for i, part in enumerate(cmd):
+ if part == '-classpath':
+ i += 1
+ if i < len(cmd):
+ return cmd[i]
+ else:
+ return None
+ return None
+
+
+def parse_args(argv):
+ parsed = []
+ for i in range(len(argv)):
+ if not argv[i].startswith('-'):
+ parsed.append(argv[i])
+ if len(parsed) >= 3:
+ break
+ return parsed + [argv[i + 1:]]
+
+
+def just_do_it(argv):
+ java, javac, error_prone_tool, javac_cmd = parse_args(argv)
+ ver = get_java_version(java)
+ if not ver:
+ raise Exception("Can't determine java version")
+ if int(ver) >= 10:
+ for f in javac_cmd:
+ if f.startswith('-Xep'):
+ ERROR_PRONE_FLAGS.append(f)
+ for f in ERROR_PRONE_FLAGS:
+ if f in javac_cmd:
+ javac_cmd.remove(f)
+ if '-processor' in javac_cmd:
+ classpath = get_classpath(javac_cmd)
+ if classpath:
+ error_prone_tool = error_prone_tool + os.pathsep + classpath
+ cmd = [javac] + JAVA10_EXPORTS + ['-processorpath', error_prone_tool, '-XDcompilePolicy=byfile'] + [(' '.join(['-Xplugin:ErrorProne'] + ERROR_PRONE_FLAGS))] + javac_cmd
+ else:
+ cmd = [java, '-Xbootclasspath/p:' + error_prone_tool, 'com.google.errorprone.ErrorProneCompiler'] + ERROR_PRONE_FLAGS + javac_cmd
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(cmd).wait())
+ else:
+ os.execv(cmd[0], cmd)
+
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/build_mn.py b/build/scripts/build_mn.py
new file mode 100755
index 0000000000..5bb03c247c
--- /dev/null
+++ b/build/scripts/build_mn.py
@@ -0,0 +1,330 @@
+#!/usr/bin/env python
+# Ymake MatrixNet support
+
+import sys
+import os
+import shutil
+import re
+import subprocess
+
+
+def get_value(val):
+ dct = val.split('=', 1)
+ if len(dct) > 1:
+ return dct[1]
+ return ''
+
+
+class BuildMnBase(object):
+ def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False):
+ self.mninfo = mninfo
+ self.mnname = mnname
+ self.mnrankingSuffix = mnrankingSuffix
+ self.mncppPath = mncppPath
+ self.check = check
+ self.ptr = ptr
+ self.multi = multi
+ dataprefix = "MN_External_"
+ mninfoName = os.path.basename(self.mninfo)
+ data = dataprefix + mnname
+ datasize = data + "Size"
+
+ if self.multi:
+ if self.ptr:
+ mntype = "const NMatrixnet::TMnMultiCategPtr"
+ mnload = "(new NMatrixnet::TMnMultiCateg( {1}, {2}, \"{0}\"))".format(mninfoName, data, datasize)
+ else:
+ mntype = "const NMatrixnet::TMnMultiCateg"
+ mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize)
+ else:
+ if self.ptr:
+ mntype = "const NMatrixnet::TMnSsePtr"
+ mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize)
+ else:
+ mntype = "const NMatrixnet::TMnSseInfo"
+ mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize)
+
+ if self.check:
+ self.CheckMn()
+
+ mncpptmpPath = self.mncppPath + ".tmp"
+ mncpptmp = open(mncpptmpPath, 'w')
+
+ if self.multi:
+ mncpptmp.write("#include <kernel/matrixnet/mn_multi_categ.h>\n")
+ else:
+ mncpptmp.write("#include <kernel/matrixnet/mn_sse.h>\n")
+
+ rodatapath = os.path.dirname(self.mncppPath) + "/" + dataprefix + self.mnname + ".rodata"
+ mncpptmp.write("namespace{\n")
+ mncpptmp.write(" extern \"C\" {\n")
+ mncpptmp.write(" extern const unsigned char {1}{0}[];\n".format(self.mnname, dataprefix))
+ mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix))
+ mncpptmp.write(" }\n")
+ mncpptmp.write("}\n")
+ archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", rodatapath, self.mninfo], stdout=None, stderr=subprocess.PIPE)
+ archiverCall.wait()
+ mncpptmp.write("extern {0} {1};\n".format(mntype, self.mnname))
+ mncpptmp.write("{0} {1}{2};".format(mntype, self.mnname, mnload))
+ mncpptmp.close()
+ shutil.move(mncpptmpPath, self.mncppPath)
+
+ def CheckMn(self):
+ if not self.fml_unused_tool:
+ print >>sys.stderr, "fml_unused_tool undefined!"
+ failed_msg = "fml_unused_tool failed: {0} -A {1} -e -r {2}".format(self.fml_unused_tool, self.SrcRoot, self.mninfo)
+ assert not subprocess.call([self.fml_unused_tool, "-A", self.SrcRoot, "-e", "-r", self.mninfo]), failed_msg
+
+
+class BuildMn(BuildMnBase):
+ def Run(self, argv):
+ if len(argv) < 6:
+ print >>sys.stderr, "BuildMn.Run(<ARCADIA_ROOT> <archiver> <mninfo> <mnname> <mnrankingSuffix> <cppOutput> [params...])"
+ sys.exit(1)
+
+ self.SrcRoot = argv[0]
+ self.archiver = argv[1]
+
+ mninfo = argv[2]
+ mnname = argv[3]
+ mnrankingSuffix = argv[4]
+ mncppPath = argv[5]
+ check = False
+ ptr = False
+ multi = False
+ self.fml_unused_tool = ''
+ for param in argv[6:]:
+ if param == "CHECK":
+ check = True
+ elif param == "PTR":
+ ptr = True
+ elif param == "MULTI":
+ multi = True
+ elif param.startswith('fml_tool='):
+ self.fml_unused_tool = get_value(param)
+ else:
+ print >>sys.stdout, "Unknown param: {0}".format(param)
+ super(BuildMn, self).Run(mninfo, mnname, mnrankingSuffix, mncppPath, check=check, ptr=ptr, multi=multi)
+
+
+class BuildMns(BuildMnBase):
+ def InitBase(self, listname, mnrankingSuffix):
+ self.autogen = '// DO NOT EDIT THIS FILE DIRECTLY, AUTOGENERATED!\n'
+ self.mnrankingSuffix = mnrankingSuffix
+ self.mnlistname = listname + mnrankingSuffix
+ self.mnlistelem = "const NMatrixnet::TMnSsePtr*"
+ mnlisttype = "TMap< TString, {0} >".format(self.mnlistelem)
+ self.mnlist = "const {0} {1}".format(mnlisttype, self.mnlistname)
+
+ self.mnmultilistname = "{0}{1}Multi".format(listname, self.mnrankingSuffix)
+ self.mnmultilistelem = "const NMatrixnet::TMnMultiCategPtr*"
+ mnmultilisttype = "TMap< TString, {0} >".format(self.mnmultilistelem)
+ self.mnmultilist = "const {0} {1}".format(mnmultilisttype, self.mnmultilistname)
+
+ def InitForAll(self, argv):
+ if len(argv) < 8:
+ print >>sys.stderr, "BuildMns.InitForAll(<ARCADIA_ROOT> <BINDIR> <archiver> <listname> <mnranking_suffix> <hdrfile> <srcfile> <mninfos> [fml_tool=<fml_unused_tool> CHECK])"
+ sys.exit(1)
+
+ bmns_args = []
+ self.check = False
+ self.fml_unused_tool = ''
+ for arg in argv:
+ if arg == "CHECK":
+ self.check = True
+ elif arg.startswith('fml_tool='):
+ self.fml_unused_tool = get_value(arg)
+ else:
+ bmns_args.append(arg)
+
+ self.SrcRoot = bmns_args[0]
+ self.BINDIR = bmns_args[1]
+ self.archiver = bmns_args[2]
+ self.listname = bmns_args[3]
+ self.mnrankingSuffix = get_value(bmns_args[4])
+ self.hdrfile = bmns_args[5]
+ self.srcfile = bmns_args[6]
+ self.mninfos = bmns_args[7:]
+
+ self.InitBase(self.listname, self.mnrankingSuffix)
+
+ def InitForHeader(self, argv):
+ if len(argv) < 4:
+ print >>sys.stderr, "BuildMns.InitForHeader(<listname> <rankingSuffix> <hdrfile> <mninfos...>)"
+ sys.exit(1)
+
+ self.listname = argv[0]
+ self.mnrankingSuffix = get_value(argv[1])
+ self.hdrfile = argv[2]
+ self.mninfos = argv[3:]
+
+ self.InitBase(self.listname, self.mnrankingSuffix)
+
+ def InitForCpp(self, argv):
+ if len(argv) < 5:
+ print >>sys.stderr, "BuildMns.InitForCpp(<listname> <rankingSuffix> <hdrfile> <srcfile> <mninfos...>)"
+ sys.exit(1)
+
+ self.listname = argv[0]
+ self.mnrankingSuffix = get_value(argv[1])
+ self.hdrfile = argv[2]
+ self.srcfile = argv[3]
+ self.mninfos = argv[4:]
+
+ self.InitBase(self.listname, self.mnrankingSuffix)
+
+ def InitForFiles(self, argv):
+ if len(argv) < 7:
+ print >>sys.stderr, "BuildMns.InitForFiles(<ARCADIA_ROOT> <BINDIR> <archiver> <fml_unused_tool> <listname> <rankingSuffix> <mninfos...> [CHECK])"
+ sys.exit(1)
+
+ bmns_args = []
+ self.check = False
+ self.fml_unused_tool = ''
+ for arg in argv:
+ if arg == "CHECK":
+ self.check = True
+ elif arg.startswith('fml_tool='):
+ self.fml_unused_tool = get_value(arg)
+ else:
+ bmns_args.append(arg)
+
+ self.SrcRoot = bmns_args[0]
+ self.BINDIR = bmns_args[1]
+ self.archiver = bmns_args[2]
+ self.listname = bmns_args[3]
+ self.mnrankingSuffix = get_value(bmns_args[4])
+ self.mninfos = bmns_args[5:]
+
+ def BuildMnsHeader(self):
+ if self.mninfos:
+ self.mninfos = sorted(set(self.mninfos))
+
+ tmpHdrPath = self.hdrfile + ".tmp"
+ tmpHdrFile = open(tmpHdrPath, 'w')
+
+ tmpHdrFile.write(self.autogen)
+ tmpHdrFile.write("#include <kernel/matrixnet/mn_sse.h>\n")
+ tmpHdrFile.write("#include <kernel/matrixnet/mn_multi_categ.h>\n\n")
+ tmpHdrFile.write("extern {0};\n".format(self.mnlist))
+ tmpHdrFile.write("extern {0};\n".format(self.mnmultilist))
+
+ for item in self.mninfos:
+ mnfilename = os.path.basename(item)
+ mnfilename, ext = os.path.splitext(mnfilename)
+
+ mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename)
+
+ if ext == ".info":
+ mnname = "staticMn{0}{1}Ptr".format(self.mnrankingSuffix, mnname)
+ tmpHdrFile.write("extern const NMatrixnet::TMnSsePtr {0};\n".format(mnname))
+ elif ext == ".mnmc":
+ mnname = "staticMnMulti{0}{1}Ptr".format(self.mnrankingSuffix, mnname)
+ tmpHdrFile.write("extern const NMatrixnet::TMnMultiCategPtr {0};\n".format(mnname))
+
+ tmpHdrFile.close()
+ shutil.move(tmpHdrPath, self.hdrfile)
+
+ def BuildMnFiles(self):
+ for item in self.mninfos:
+ mnfilename = os.path.basename(item)
+ mnfilename, ext = os.path.splitext(mnfilename)
+
+ mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename)
+
+ if ext == ".info":
+ mnname = "staticMn{0}{1}Ptr".format(self.mnrankingSuffix, mnname)
+ super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mn.{0}.cpp".format(mnname), check=self.check, ptr=True, multi=False)
+ elif ext == ".mnmc":
+ mnname = "staticMnMulti{0}{1}Ptr".format(self.mnrankingSuffix, mnname)
+ # BUILD_MN_PTR_MULTI
+ super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mnmulti.{0}.cpp".format(mnname), check=False, ptr=True, multi=True)
+
+ def BuildMnsCpp(self):
+ if self.mninfos:
+ self.mninfos = sorted(set(self.mninfos))
+
+ tmpSrcPath = self.srcfile + ".tmp"
+ tmpSrcFile = open(tmpSrcPath, 'w')
+ hdrrel = os.path.basename(self.hdrfile)
+
+ mnnames = []
+ mnmultinames = []
+ for item in self.mninfos:
+ mnfilename = os.path.basename(item)
+ mnfilename, ext = os.path.splitext(mnfilename)
+
+ if ext == ".info":
+ mnnames.append(mnfilename)
+ elif ext == ".mnmc":
+ mnmultinames.append(mnfilename)
+
+ tmpSrcFile.write(self.autogen)
+ tmpSrcFile.write("#include \"{0}\"\n\n".format(hdrrel))
+
+ if mnnames:
+ mndata = self.mnlistname + "_data"
+ tmpSrcFile.write("static const std::pair< TString, {0} > {1}[] = {{\n".format(self.mnlistelem, mndata))
+ for item in mnnames:
+ mnname = re.sub("[^-a-zA-Z0-9_]", "_", item)
+ tmpSrcFile.write(" std::make_pair(TString(\"{0}\"), &staticMn{1}{2}Ptr),\n".format(item, self.mnrankingSuffix, mnname))
+ tmpSrcFile.write("};\n")
+ tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n\n".format(self.mnlist, mndata))
+ else:
+ tmpSrcFile.write("{0};\n\n".format(self.mnlist))
+
+ if mnmultinames:
+ mnmultidata = self.mnmultilistname + "_data"
+ tmpSrcFile.write("static const std::pair< TString, {0} > {1}[] = {{\n".format(self.mnmultilistelem, mnmultidata))
+ for item in mnmultinames:
+ mnname = re.sub("[^-a-zA-Z0-9_]", "_", item)
+ tmpSrcFile.write(" std::make_pair(TString(\"{0}\"), &staticMnMulti{1}{2}Ptr),\n".format(item, self.mnrankingSuffix, mnname))
+ tmpSrcFile.write("};\n")
+ tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n".format(self.mnmultilist, mnmultidata))
+ else:
+ tmpSrcFile.write("{0};\n".format(self.mnmultilist))
+
+ tmpSrcFile.close()
+ shutil.move(tmpSrcPath, self.srcfile)
+
+
+def BuildMnsAllF(argv):
+ bldMns = BuildMns()
+ bldMns.InitForAll(argv)
+ bldMns.BuildMnsCpp()
+ bldMns.BuildMnsHeader()
+ bldMns.BuildMnFiles()
+
+
+def BuildMnsCppF(argv):
+ bldMns = BuildMns()
+ bldMns.InitForCpp(argv)
+ bldMns.BuildMnsCpp()
+
+
+def BuildMnsHeaderF(argv):
+ bldMns = BuildMns()
+ bldMns.InitForHeader(argv)
+ bldMns.BuildMnsHeader()
+
+
+def BuildMnsFilesF(argv):
+ bldMns = BuildMns()
+ bldMns.InitForFiles(argv)
+ bldMns.BuildMnFiles()
+
+
+def BuildMnF(argv):
+ bldMn = BuildMn()
+ bldMn.Run(argv)
+
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ print >>sys.stderr, "Usage: build_mn.py <funcName> <args...>"
+ sys.exit(1)
+
+ if (sys.argv[2:]):
+ globals()[sys.argv[1]](sys.argv[2:])
+ else:
+ globals()[sys.argv[1]]()
diff --git a/build/scripts/build_pln_header.py b/build/scripts/build_pln_header.py
new file mode 100755
index 0000000000..c73693f444
--- /dev/null
+++ b/build/scripts/build_pln_header.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+import sys
+import os
+
+
+def BuildPlnHeader():
+ if len(sys.argv) < 2:
+ print >>sys.stderr, "Usage: build_pln_header.py <absolute/path/to/OutFile>"
+ sys.exit(1)
+
+ print >>sys.stdout, "Build Pln Header..."
+ outPath = sys.argv[1]
+ tmpPath = outPath + '.tmp'
+ tmpFile = open(tmpPath, 'w')
+
+ tmpFile.write('#include <library/cpp/sse/sse.h>\n')
+ tmpFile.write('#include <kernel/relevfml/relev_fml.h>\n')
+ for path in sys.argv[2:]:
+ name = os.path.basename(path).split(".")[0] # name without extensions
+ tmpFile.write('\nextern SRelevanceFormula fml{0};\n'.format(name))
+ tmpFile.write('float {0}(const float* f);\n'.format(name))
+ tmpFile.write('void {0}SSE(const float* const* factors, float* result);\n'.format(name))
+ tmpFile.close()
+ try:
+ os.remove(outPath)
+ except:
+ pass
+ try:
+ os.rename(tmpPath, outPath)
+ except:
+ print >>sys.stdout, 'Error: Failed to rename ' + tmpPath + ' to ' + outPath
+
+if __name__ == '__main__':
+ BuildPlnHeader()
diff --git a/build/scripts/c_templates/svn_interface.c b/build/scripts/c_templates/svn_interface.c
new file mode 100644
index 0000000000..d8bdd1a70d
--- /dev/null
+++ b/build/scripts/c_templates/svn_interface.c
@@ -0,0 +1,184 @@
+// Used indirectly. See build/scripts/vcs_info.py
+// ya-bin dump vcs-info > vcs.json
+// python build/scripts/vcs_info.py vcs.json out.c build/scripts/c_templates/svn_interface.c <any_prefix>library/cpp/svnversion<any_suffix>
+
+
+#include "build/scripts/c_templates/svnversion.h"
+
+#define STR1(x) #x
+#define STR2(x) STR1(x)
+
+const char* GetProgramSvnVersion() {
+#if defined(REVISION)
+// for package systems generating from svn export but providing REVISION macro
+#define STRREVISION STR2(REVISION)
+#define REVISIONINFO "r" STRREVISION
+#if defined(PROGRAM_VERSION)
+ return PROGRAM_VERSION "\n\n" REVISIONINFO;
+#else
+ return REVISIONINFO " "__DATE__
+ " "__TIME__;
+#endif
+#elif defined(PROGRAM_VERSION)
+ return PROGRAM_VERSION;
+#else
+ return "No program version found";
+#endif
+}
+
+const char* GetArcadiaSourcePath() {
+#if defined(ARCADIA_SOURCE_PATH)
+ return ARCADIA_SOURCE_PATH;
+#else
+ return "";
+#endif
+}
+
+const char* GetArcadiaSourceUrl() {
+#if defined(ARCADIA_SOURCE_URL)
+ return ARCADIA_SOURCE_URL;
+#else
+ return "";
+#endif
+}
+
+int GetArcadiaLastChangeNum() {
+#if defined(ARCADIA_SOURCE_LAST_CHANGE)
+ return ARCADIA_SOURCE_LAST_CHANGE;
+#else
+ return 0;
+#endif
+}
+
+const char* GetArcadiaLastChange() {
+#if defined(ARCADIA_SOURCE_LAST_CHANGE)
+ return STR2(ARCADIA_SOURCE_LAST_CHANGE);
+#else
+ return "";
+#endif
+}
+
+const char* GetArcadiaLastAuthor() {
+#if defined(ARCADIA_SOURCE_LAST_AUTHOR)
+ return ARCADIA_SOURCE_LAST_AUTHOR;
+#else
+ return "";
+#endif
+}
+
+int GetProgramSvnRevision() {
+#if defined(ARCADIA_SOURCE_REVISION)
+ return ARCADIA_SOURCE_REVISION;
+#else
+ return 0;
+#endif
+}
+
+const char* GetVCSDirty()
+{
+#if defined(DIRTY)
+ return DIRTY;
+#else
+ return 0;
+#endif
+}
+
+const char* GetProgramHash() {
+#if defined(ARCADIA_SOURCE_HG_HASH)
+ return ARCADIA_SOURCE_HG_HASH;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramCommitId() {
+#if defined(ARCADIA_SOURCE_REVISION)
+ if (ARCADIA_SOURCE_REVISION <= 0) {
+ return GetProgramHash();
+ }
+ return STR2(ARCADIA_SOURCE_REVISION);
+#else
+ return GetProgramHash();
+#endif
+}
+
+const char* GetProgramScmData() {
+#if defined(SCM_DATA)
+ return SCM_DATA;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramShortVersionData() {
+#if defined(SVN_REVISION) && defined(SVN_TIME)
+ return STR2(SVN_REVISION) " (" SVN_TIME ")";
+#else
+ return GetProgramHash();
+#endif
+}
+
+const char* GetProgramBuildUser() {
+#if defined(BUILD_USER)
+ return BUILD_USER;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramBuildHost() {
+#if defined(BUILD_HOST)
+ return BUILD_HOST;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramBuildDate() {
+#if defined(BUILD_DATE)
+ return BUILD_DATE;
+#else
+ return "";
+#endif
+}
+
+int GetProgramBuildTimestamp() {
+#if defined(BUILD_TIMESTAMP)
+ return BUILD_TIMESTAMP;
+#else
+ return 0;
+#endif
+}
+
+
+const char* GetVCS() {
+#if defined(VCS)
+ return VCS;
+#else
+ return "";
+#endif
+}
+
+const char* GetBranch() {
+#if defined(BRANCH)
+ return BRANCH;
+#else
+ return "";
+#endif
+}
+
+int GetArcadiaPatchNumber() {
+#if defined(ARCADIA_PATCH_NUMBER)
+ return ARCADIA_PATCH_NUMBER;
+#else
+ return 42;
+#endif
+}
+
+const char* GetTag() {
+#if defined(ARCADIA_TAG)
+ return ARCADIA_TAG;
+#else
+ return "";
+#endif
+}
diff --git a/build/scripts/c_templates/svnversion.h b/build/scripts/c_templates/svnversion.h
new file mode 100644
index 0000000000..7aece931aa
--- /dev/null
+++ b/build/scripts/c_templates/svnversion.h
@@ -0,0 +1,42 @@
+#pragma once
+
+// Permit compilation with NO_UTIL():
+// util/system/compiler.h
+#if !defined(Y_HIDDEN)
+#if defined(__GNUC__)
+#define Y_HIDDEN __attribute__((visibility("hidden")))
+#else
+#define Y_HIDDEN
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+const char* GetProgramSvnVersion() Y_HIDDEN; // verbose multiline message
+void PrintProgramSvnVersion() Y_HIDDEN;
+const char* GetArcadiaSourcePath() Y_HIDDEN; // "/home/myltsev/arcadia"
+const char* GetArcadiaSourceUrl() Y_HIDDEN; // "svn+ssh://arcadia.yandex.ru/arc/trunk/arcadia"
+const char* GetArcadiaLastChange() Y_HIDDEN; // "2902074"
+int GetArcadiaLastChangeNum() Y_HIDDEN; // 2902074
+const char* GetArcadiaLastAuthor() Y_HIDDEN; // "dieash"
+int GetProgramSvnRevision() Y_HIDDEN; // 2902074
+const char* GetVCSDirty() Y_HIDDEN;
+const char* GetProgramHash() Y_HIDDEN;
+const char* GetProgramCommitId() Y_HIDDEN;
+void PrintSvnVersionAndExit(int argc, char* argv[]) Y_HIDDEN;
+void PrintSvnVersionAndExitEx(int argc, char* argv[], const char* opts) Y_HIDDEN;
+void PrintSvnVersionAndExit0() Y_HIDDEN;
+const char* GetProgramScmData() Y_HIDDEN; // verbose multiline message
+const char* GetProgramShortVersionData() Y_HIDDEN;
+const char* GetProgramBuildUser() Y_HIDDEN;
+const char* GetProgramBuildHost() Y_HIDDEN;
+const char* GetProgramBuildDate() Y_HIDDEN;
+int GetProgramBuildTimestamp() Y_HIDDEN;
+const char* GetVCS() Y_HIDDEN;
+const char* GetBranch() Y_HIDDEN;
+const char* GetTag() Y_HIDDEN;
+int GetArcadiaPatchNumber() Y_HIDDEN;
+#if defined(__cplusplus)
+}
+#endif
diff --git a/build/scripts/c_templates/ya.make b/build/scripts/c_templates/ya.make
new file mode 100644
index 0000000000..b395e11021
--- /dev/null
+++ b/build/scripts/c_templates/ya.make
@@ -0,0 +1,7 @@
+OWNER(g:ymake)
+
+LIBRARY(dummy-vcs)
+NO_PLATFORM()
+
+SRCS(svn_interface.c)
+END()
diff --git a/build/scripts/cat.py b/build/scripts/cat.py
new file mode 100755
index 0000000000..0c3f73d96f
--- /dev/null
+++ b/build/scripts/cat.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import sys
+from shutil import copyfileobj as copy
+import os.path
+
+if __name__ == '__main__':
+ for filename in sys.argv[1:] or ["-"]:
+ if filename == "-":
+ copy(sys.stdin, sys.stdout)
+ else:
+ if os.path.exists(filename):
+ with open(filename, 'rb') as file:
+ copy(file, sys.stdout)
+ else:
+ sys.stderr.write('cat.py: {0}: No such file or directory\n'.format(filename))
diff --git a/build/scripts/cgo1_wrapper.py b/build/scripts/cgo1_wrapper.py
new file mode 100644
index 0000000000..986082f7e9
--- /dev/null
+++ b/build/scripts/cgo1_wrapper.py
@@ -0,0 +1,45 @@
+import argparse
+import shutil
+import subprocess
+import sys
+
+
+CGO1_SUFFIX='.cgo1.go'
+
+
+def call(cmd, cwd, env=None):
+ # sys.stderr.write('{}\n'.format(' '.join(cmd)))
+ return subprocess.call(cmd, stdin=None, stderr=sys.stderr, stdout=sys.stdout, cwd=cwd, env=env)
+
+
+def process_file(source_root, source_prefix, build_root, build_prefix, src_path, comment_prefix):
+ dst_path = '{}.tmp'.format(src_path)
+ with open(src_path, 'r') as src_file, open(dst_path, 'w') as dst_file:
+ for line in src_file:
+ if line.startswith(comment_prefix):
+ dst_file.write(line.replace(source_root, source_prefix).replace(build_root, build_prefix))
+ else:
+ dst_file.write(line)
+ shutil.move(dst_path, src_path)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--build-prefix', default='__ARCADIA_BUILD_ROOT_PREFIX__')
+ parser.add_argument('--build-root', required=True)
+ parser.add_argument('--cgo1-files', nargs='+', required=True)
+ parser.add_argument('--cgo2-files', nargs='+', required=True)
+ parser.add_argument('--source-prefix', default='__ARCADIA_SOURCE_ROOT_PREFIX__')
+ parser.add_argument('--source-root', required=True)
+ parser.add_argument('cgo1_cmd', nargs='*')
+ args = parser.parse_args()
+
+ exit_code = call(args.cgo1_cmd, args.source_root)
+ if exit_code != 0:
+ sys.exit(exit_code)
+
+ for src_path in args.cgo1_files:
+ process_file(args.source_root, args.source_prefix, args.build_root, args.build_prefix, src_path, '//')
+
+ for src_path in args.cgo2_files:
+ process_file(args.source_root, args.source_prefix, args.build_root, args.build_prefix, src_path, '#line')
diff --git a/build/scripts/check_config_h.py b/build/scripts/check_config_h.py
new file mode 100644
index 0000000000..07bc12e230
--- /dev/null
+++ b/build/scripts/check_config_h.py
@@ -0,0 +1,89 @@
+import sys
+
+data = """
+#if defined(SIZEOF_LONG)
+static_assert(sizeof(long) == SIZEOF_LONG, "fixme 1");
+#endif
+
+#if defined(SIZEOF_PTHREAD_T)
+#include <pthread.h>
+
+static_assert(sizeof(pthread_t) == SIZEOF_PTHREAD_T, "fixme 2");
+#endif
+
+#if defined(SIZEOF_SIZE_T)
+#include <stddef.h>
+
+static_assert(sizeof(size_t) == SIZEOF_SIZE_T, "fixme 3");
+#endif
+
+#if defined(SIZEOF_TIME_T)
+#include <time.h>
+
+static_assert(sizeof(time_t) == SIZEOF_TIME_T, "fixme 4");
+#endif
+
+#if defined(SIZEOF_UINTPTR_T)
+#include <stdint.h>
+
+static_assert(sizeof(uintptr_t) == SIZEOF_UINTPTR_T, "fixme 5");
+#endif
+
+#if defined(SIZEOF_VOID_P)
+static_assert(sizeof(void*) == SIZEOF_VOID_P, "fixme 6");
+#endif
+
+#if defined(SIZEOF_FPOS_T)
+#include <stdio.h>
+
+static_assert(sizeof(fpos_t) == SIZEOF_FPOS_T, "fixme 7");
+#endif
+
+#if defined(SIZEOF_DOUBLE)
+static_assert(sizeof(double) == SIZEOF_DOUBLE, "fixme 8");
+#endif
+
+#if defined(SIZEOF_LONG_DOUBLE)
+static_assert(sizeof(long double) == SIZEOF_LONG_DOUBLE, "fixme 9");
+#endif
+
+#if defined(SIZEOF_FLOAT)
+static_assert(sizeof(float) == SIZEOF_FLOAT, "fixme 10");
+#endif
+
+#if defined(SIZEOF_INT)
+static_assert(sizeof(int) == SIZEOF_INT, "fixme 11");
+#endif
+
+#if defined(SIZEOF_LONG_LONG)
+static_assert(sizeof(long long) == SIZEOF_LONG_LONG, "fixme 12");
+#endif
+
+#if defined(SIZEOF_OFF_T)
+#include <stdio.h>
+
+static_assert(sizeof(off_t) == SIZEOF_OFF_T, "fixme 13");
+#endif
+
+#if defined(SIZEOF_PID_T)
+#include <unistd.h>
+
+static_assert(sizeof(pid_t) == SIZEOF_PID_T, "fixme 14");
+#endif
+
+#if defined(SIZEOF_SHORT)
+static_assert(sizeof(short) == SIZEOF_SHORT, "fixme 15");
+#endif
+
+#if defined(SIZEOF_WCHAR_T)
+static_assert(sizeof(wchar_t) == SIZEOF_WCHAR_T, "fixme 16");
+#endif
+
+#if defined(SIZEOF__BOOL)
+//TODO
+#endif
+"""
+if __name__ == '__main__':
+ with open(sys.argv[2], 'w') as f:
+ f.write('#include <' + sys.argv[1] + '>\n\n')
+ f.write(data)
diff --git a/build/scripts/clang_tidy.py b/build/scripts/clang_tidy.py
new file mode 100644
index 0000000000..eb1b690ee9
--- /dev/null
+++ b/build/scripts/clang_tidy.py
@@ -0,0 +1,170 @@
+import argparse
+import contextlib
+import json
+import os
+import re
+import shutil
+import sys
+import tempfile
+
+import subprocess
+
+import yaml
+
+
+def setup_script(args):
+ global tidy_config_validation
+ sys.path.append(os.path.dirname(args.config_validation_script))
+ import tidy_config_validation
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--testing-src", required=True)
+ parser.add_argument("--clang-tidy-bin", required=True)
+ parser.add_argument("--config-validation-script", required=True)
+ parser.add_argument("--ymake-python", required=True)
+ parser.add_argument("--tidy-json", required=True)
+ parser.add_argument("--source-root", required=True)
+ parser.add_argument("--build-root", required=True)
+ parser.add_argument("--default-config-file", required=True)
+ parser.add_argument("--project-config-file", required=True)
+ parser.add_argument("--export-fixes", required=True)
+ parser.add_argument("--checks", required=False, default="")
+ parser.add_argument("--header-filter", required=False, default=None)
+ return parser.parse_known_args()
+
+
+def generate_compilation_database(clang_cmd, source_root, filename, path):
+ compile_database = [
+ {
+ "file": filename,
+ "command": subprocess.list2cmdline(clang_cmd),
+ "directory": source_root,
+ }
+ ]
+ compilation_database_json = os.path.join(path, "compile_commands.json")
+ with open(compilation_database_json, "w") as afile:
+ json.dump(compile_database, afile)
+ return compilation_database_json
+
+
+@contextlib.contextmanager
+def gen_tmpdir():
+ path = tempfile.mkdtemp()
+ yield path
+ shutil.rmtree(path)
+
+
+@contextlib.contextmanager
+def gen_tmpfile():
+ _, path = tempfile.mkstemp()
+ yield path
+ os.remove(path)
+
+
+def load_profile(path):
+ if os.path.exists(path):
+ files = os.listdir(path)
+ if len(files) == 1:
+ with open(os.path.join(path, files[0])) as afile:
+ return json.load(afile)["profile"]
+ elif len(files) > 1:
+ return {
+ "error": "found several profile files: {}".format(files),
+ }
+ return {
+ "error": "profile file is missing",
+ }
+
+
+def load_fixes(path):
+ if os.path.exists(path):
+ with open(path, 'r') as afile:
+ return afile.read()
+ else:
+ return ""
+
+
+def is_generated(testing_src, build_root):
+ return testing_src.startswith(build_root)
+
+
+def generate_outputs(output_json):
+ output_obj = os.path.splitext(output_json)[0] + ".o"
+ open(output_obj, "w").close()
+ open(output_json, "w").close()
+
+
+def filter_configs(result_config, filtered_config):
+ with open(result_config, 'r') as afile:
+ input_config = yaml.safe_load(afile)
+ result_config = tidy_config_validation.filter_config(input_config)
+ with open(filtered_config, 'w') as afile:
+ yaml.safe_dump(result_config, afile)
+
+
+def main():
+ args, clang_cmd = parse_args()
+ setup_script(args)
+ clang_tidy_bin = args.clang_tidy_bin
+ output_json = args.tidy_json
+ generate_outputs(output_json)
+ if is_generated(args.testing_src, args.build_root):
+ return
+ if args.header_filter is None:
+ header_filter = r"^" + re.escape(os.path.dirname(args.testing_src)) + r".*" # .pb.h files will be excluded because they are not in source_root
+ else:
+ header_filter = r"^(" + args.header_filter + r").*"
+
+ with gen_tmpdir() as profile_tmpdir, gen_tmpdir() as db_tmpdir, gen_tmpfile() as fixes_file, gen_tmpdir() as config_dir:
+ result_config_file = args.default_config_file
+ if args.project_config_file != args.default_config_file:
+ result_config = os.path.join(config_dir, "result_tidy_config.yaml")
+ filtered_config = os.path.join(config_dir, "filtered_tidy_config.yaml")
+ filter_configs(args.project_config_file, filtered_config)
+ result_config_file = tidy_config_validation.merge_tidy_configs(base_config_path=args.default_config_file, additional_config_path=filtered_config, result_config_path=result_config)
+ compile_command_path = generate_compilation_database(clang_cmd, args.source_root, args.testing_src, db_tmpdir)
+ cmd = [
+ clang_tidy_bin,
+ args.testing_src,
+ "-p",
+ compile_command_path,
+ "--warnings-as-errors",
+ "*",
+ "--config-file",
+ result_config_file,
+ "--header-filter",
+ header_filter,
+ "--use-color",
+ "--enable-check-profile",
+ "--store-check-profile={}".format(profile_tmpdir),
+ ]
+ if args.export_fixes == "yes":
+ cmd += ["--export-fixes", fixes_file]
+
+ if args.checks:
+ cmd += ["--checks", args.checks]
+ res = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = res.communicate()
+ exit_code = res.returncode
+ profile = load_profile(profile_tmpdir)
+ testing_src = os.path.relpath(args.testing_src, args.source_root)
+ tidy_fixes = load_fixes(fixes_file)
+
+ with open(output_json, "wb") as afile:
+ json.dump(
+ {
+ "file": testing_src,
+ "exit_code": exit_code,
+ "profile": profile,
+ "stderr": err,
+ "stdout": out,
+ "fixes": tidy_fixes,
+ },
+ afile,
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/build/scripts/clang_tidy_arch.py b/build/scripts/clang_tidy_arch.py
new file mode 100644
index 0000000000..7caf623a3d
--- /dev/null
+++ b/build/scripts/clang_tidy_arch.py
@@ -0,0 +1,33 @@
+import os
+import argparse
+import json
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--output-file")
+ parser.add_argument("--build-root")
+ parser.add_argument("--source-root")
+ return parser.parse_known_args()
+
+
+def main():
+ args, unknown_args = parse_args()
+ inputs = unknown_args
+ result_json = {}
+ for inp in inputs:
+ if os.path.exists(inp) and inp.endswith("tidyjson"):
+ with open(inp, 'r') as afile:
+ file_content = afile.read().strip()
+ if not file_content:
+ continue
+ errors = json.loads(file_content)
+ testing_src = errors["file"]
+ result_json[testing_src] = errors
+
+ with open(args.output_file, 'w') as afile:
+ json.dump(result_json, afile, indent=4) # TODO remove indent
+
+
+if __name__ == "__main__":
+ main()
diff --git a/build/scripts/clang_wrapper.py b/build/scripts/clang_wrapper.py
new file mode 100644
index 0000000000..af3869f789
--- /dev/null
+++ b/build/scripts/clang_wrapper.py
@@ -0,0 +1,53 @@
+import subprocess
+import sys
+
+
+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
+
+ # 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('\\', '/')
+
+
+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)
diff --git a/build/scripts/collect_java_srcs.py b/build/scripts/collect_java_srcs.py
new file mode 100644
index 0000000000..170002520a
--- /dev/null
+++ b/build/scripts/collect_java_srcs.py
@@ -0,0 +1,51 @@
+import os
+import sys
+import contextlib
+import tarfile
+import zipfile
+
+
+if __name__ == '__main__':
+ build_root = sys.argv[1]
+ root = os.path.normpath(sys.argv[2])
+ dest = os.path.normpath(sys.argv[3])
+ srcs = sys.argv[4:]
+
+ for src in srcs:
+ src = os.path.normpath(src)
+ if src.endswith('.java') or src.endswith('.kt'):
+ src_rel_path = os.path.relpath(src, root)
+
+ if os.path.join(root, src_rel_path) == src:
+ # Inside root
+ dst = os.path.join(dest, src_rel_path)
+
+ else:
+ # Outside root
+ print>>sys.stderr, 'External src file "{}" is outside of srcdir {}, ignore'.format(
+ os.path.relpath(src, build_root),
+ os.path.relpath(root, build_root),
+ )
+ continue
+
+ if os.path.exists(dst):
+ print>>sys.stderr, 'Duplicate external src file {}, choice is undefined'.format(
+ os.path.relpath(dst, root)
+ )
+
+ else:
+ destdir = os.path.dirname(dst)
+ if destdir and not os.path.exists(destdir):
+ os.makedirs(destdir)
+ os.rename(src, dst)
+
+ elif src.endswith('.jsr'):
+ with contextlib.closing(tarfile.open(src, 'r')) as tf:
+ tf.extractall(dst)
+
+ elif src.endswith('-sources.jar'):
+ with zipfile.ZipFile(src) as zf:
+ zf.extractall(dst)
+
+ else:
+ print>>sys.stderr, 'Unrecognized file type', os.path.relpath(src, build_root)
diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py
new file mode 100644
index 0000000000..c0bec50b2a
--- /dev/null
+++ b/build/scripts/compile_cuda.py
@@ -0,0 +1,152 @@
+import sys
+import subprocess
+import os
+import collections
+import re
+import tempfile
+
+
+def is_clang(command):
+ for word in command:
+ if '--compiler-bindir' in word and 'clang' in word:
+ return True
+
+ return False
+
+
+def main():
+ try:
+ sys.argv.remove('--y_skip_nocxxinc')
+ skip_nocxxinc = True
+ except ValueError:
+ skip_nocxxinc = False
+
+ spl = sys.argv.index('--cflags')
+ mtime0 = sys.argv[1]
+ command = sys.argv[2: spl]
+ cflags = sys.argv[spl + 1:]
+
+ dump_args = False
+ if '--y_dump_args' in command:
+ command.remove('--y_dump_args')
+ dump_args = True
+
+ executable = command[0]
+ if not os.path.exists(executable):
+ print >> sys.stderr, '{} not found'.format(executable)
+ sys.exit(1)
+
+ if is_clang(command):
+ # nvcc concatenates the sources for clang, and clang reports unused
+ # things from .h files as if they they were defined in a .cpp file.
+ cflags += ['-Wno-unused-function', '-Wno-unused-parameter']
+
+ if not is_clang(command) and '-fopenmp=libomp' in cflags:
+ cflags.append('-fopenmp')
+ cflags.remove('-fopenmp=libomp')
+
+ skip_list = [
+ '-gline-tables-only',
+ # clang coverage
+ '-fprofile-instr-generate',
+ '-fcoverage-mapping',
+ '/Zc:inline', # disable unreferenced functions (kernel registrators) remove
+ '-Wno-c++17-extensions',
+ '-flto',
+ '-faligned-allocation',
+ ]
+
+ if skip_nocxxinc:
+ skip_list.append('-nostdinc++')
+
+ for flag in skip_list:
+ if flag in cflags:
+ cflags.remove(flag)
+
+ skip_prefix_list = [
+ '-fsanitize=',
+ '-fsanitize-coverage=',
+ '-fsanitize-blacklist=',
+ '--system-header-prefix',
+ ]
+ 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 = []
+ compiler_args = []
+
+ # NVCC requires particular MSVC versions which may differ from the version
+ # used to compile regular C++ code. We have a separate MSVC in Arcadia for
+ # the CUDA builds and pass it's root in $Y_VC_Root.
+ # The separate MSVC for CUDA may absent in Yandex Open Source builds.
+ vc_root = os.environ.get('Y_VC_Root')
+
+ cflags_queue = collections.deque(cflags)
+ while cflags_queue:
+
+ arg = cflags_queue.popleft()
+ 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:
+ value = cflags_queue.popleft()
+ if arg[1] == 'I':
+ cpp_args.append('-I{}'.format(value))
+ elif arg[1] == 'B': # todo: delete "B" flag check when cuda stop to use gcc
+ pass
+ continue
+
+ match = re.match(r'[-/]D(.*)', arg)
+ if match:
+ define = match.group(1)
+ # We have C++ flags configured for the regular C++ build.
+ # There is Y_MSVC_INCLUDE define with a path to the VC header files.
+ # We need to change the path accordingly when using a separate MSVC for CUDA.
+ 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
+
+ compiler_args.append(arg)
+
+ 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
+ # generated files (otherwise it also prepends tmpxft_{pid}_00000000-5), and
+ # cicc derives the module name from its {input}.cpp1.ii file name.
+ command += ['--keep', '--keep-dir', tempfile.mkdtemp(prefix='compile_cuda.py.')]
+ # nvcc generates symbols like __fatbinwrap_{len}_{basename}_{hash} where
+ # {basename} is {input}.cpp1.ii with non-C chars translated to _, {len} is
+ # {basename} length, and {hash} is the hash of first exported symbol in
+ # {input}.cpp1.ii if there is one, otherwise it is based on its modification
+ # time (converted to string in the local timezone) and the current working
+ # directory. To stabilize the names of these symbols we need to fix mtime,
+ # timezone, and cwd.
+ os.environ['LD_PRELOAD'] = mtime0
+ os.environ['TZ'] = 'UTC0' # POSIX fixed offset format.
+ os.environ['TZDIR'] = '/var/empty' # Against counterfeit /usr/share/zoneinfo/$TZ.
+
+ if dump_args:
+ sys.stdout.write('\n'.join(command))
+ else:
+ sys.exit(subprocess.Popen(command, stdout=sys.stderr, stderr=sys.stderr, cwd='/').wait())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/compile_java.py b/build/scripts/compile_java.py
new file mode 100644
index 0000000000..e95869e853
--- /dev/null
+++ b/build/scripts/compile_java.py
@@ -0,0 +1,102 @@
+import optparse
+import contextlib
+import os
+import shutil
+import subprocess as sp
+import tarfile
+import zipfile
+import sys
+
+
+def parse_args(args):
+ parser = optparse.OptionParser()
+ parser.add_option('--javac-bin')
+ parser.add_option('--jar-bin')
+ parser.add_option('--vcs-mf')
+ parser.add_option('--package-prefix')
+ parser.add_option('--jar-output')
+ parser.add_option('--srcs-jar-output')
+ return parser.parse_args(args)
+
+
+def mkdir_p(directory):
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+
+def split_cmd_by_delim(cmd, delim='DELIM'):
+ result = [[]]
+ for arg in cmd:
+ if arg == delim:
+ result.append([])
+ else:
+ result[-1].append(arg)
+ return result
+
+
+def main():
+ cmd_parts = split_cmd_by_delim(sys.argv)
+ assert len(cmd_parts) == 3
+ args, javac_opts, peers = cmd_parts
+ opts, jsrcs = parse_args(args)
+
+ jsrcs += list(filter(lambda x: x.endswith('.jsrc'), peers))
+ peers = list(filter(lambda x: not x.endswith('.jsrc'), peers))
+
+ sources_dir = 'src'
+ mkdir_p(sources_dir)
+ for s in jsrcs:
+ if s.endswith('.jsrc'):
+ with contextlib.closing(tarfile.open(s, 'r')) as tf:
+ tf.extractall(sources_dir)
+
+ srcs = []
+ for r, _, files in os.walk(sources_dir):
+ for f in files:
+ srcs.append(os.path.join(r, f))
+ srcs += jsrcs
+ srcs = list(filter(lambda x: x.endswith('.java'), srcs))
+
+ classes_dir = 'cls'
+ mkdir_p(classes_dir)
+ classpath = os.pathsep.join(peers)
+
+ if srcs:
+ temp_sources_file = 'temp.sources.list'
+ with open(temp_sources_file, 'w') as ts:
+ ts.write(' '.join(srcs))
+ sp.check_call([opts.javac_bin, '-nowarn', '-g', '-classpath', classpath, '-encoding', 'UTF-8', '-d', classes_dir] + javac_opts + ['@' + temp_sources_file])
+
+ for s in jsrcs:
+ if s.endswith('-sources.jar'):
+ with zipfile.ZipFile(s) as zf:
+ zf.extractall(sources_dir)
+
+ elif s.endswith('.jar'):
+ with zipfile.ZipFile(s) as zf:
+ zf.extractall(classes_dir)
+
+ if opts.vcs_mf:
+ sp.check_call([opts.jar_bin, 'cfm', opts.jar_output, opts.vcs_mf, os.curdir], cwd=classes_dir)
+ else:
+ sp.check_call([opts.jar_bin, 'cfM', opts.jar_output, os.curdir], cwd=classes_dir)
+
+ if opts.srcs_jar_output:
+ for s in jsrcs:
+ if s.endswith('.java'):
+ if opts.package_prefix:
+ d = os.path.join(sources_dir, *(opts.package_prefix.split('.') + [os.path.basename(s)]))
+
+ else:
+ d = os.path.join(sources_dir, os.path.basename(s))
+
+ shutil.copyfile(s, d)
+
+ if opts.vcs_mf:
+ sp.check_call([opts.jar_bin, 'cfm', opts.srcs_jar_output, opts.vcs_mf, os.curdir], cwd=sources_dir)
+ else:
+ sp.check_call([opts.jar_bin, 'cfM', opts.srcs_jar_output, os.curdir], cwd=sources_dir)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/compile_jsrc.py b/build/scripts/compile_jsrc.py
new file mode 100644
index 0000000000..8760e5eee9
--- /dev/null
+++ b/build/scripts/compile_jsrc.py
@@ -0,0 +1,24 @@
+import argparse
+import os
+import tarfile
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--input', nargs='*', required=True)
+ parser.add_argument('--output', required=True)
+ parser.add_argument('--prefix', required=True)
+
+ return parser.parse_args()
+
+
+def main():
+ args = parse_args()
+
+ with tarfile.open(args.output, 'w') as out:
+ for f in args.input:
+ out.add(f, arcname=os.path.relpath(f, args.prefix))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/compile_pysrc.py b/build/scripts/compile_pysrc.py
new file mode 100644
index 0000000000..e3637e18e2
--- /dev/null
+++ b/build/scripts/compile_pysrc.py
@@ -0,0 +1,101 @@
+import argparse
+import os
+import shutil
+import subprocess
+import tarfile
+
+
+LIMIT = 6000
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--input', required=True)
+ parser.add_argument('--output', required=True)
+ parser.add_argument('--rescompiler', required=True)
+ subparsers = parser.add_subparsers(dest='mode')
+
+ parser_py2 = subparsers.add_parser('py2')
+ parser_py2.add_argument('--py_compile', required=True)
+ parser_py2.add_argument('--python', required=True)
+
+ parser_py3 = subparsers.add_parser('py3')
+ parser_py3.add_argument('--pycc', required=True)
+
+ return parser.parse_args()
+
+
+def call(cmd, cwd=None, env=None):
+ return subprocess.check_output(cmd, stdin=None, stderr=subprocess.STDOUT, cwd=cwd, env=env)
+
+
+def iterate_py2_resource_params(py_files):
+ for py in py_files:
+ mod = py[:-3].replace('/', '.')
+ key = '/py_modules/{}'.format(mod)
+ yield py, key
+ yield '-', 'resfs/src/{}={}'.format(key, py)
+ yield '{}.yapyc'.format(py), '/py_code/{}'.format(mod)
+
+
+def iterate_py3_resource_params(py_files):
+ for py in py_files:
+ for ext in ('', '.yapyc3'):
+ path = '{}{}'.format(py, ext)
+ dest = 'py/{}'.format(path)
+ key = 'resfs/file/{}'.format(dest)
+ src = 'resfs/src/{}={}'.format(key, os.path.basename(path))
+ yield '-', src
+ yield path, key
+
+
+def main():
+ args = parse_args()
+
+ names = []
+ with tarfile.open(args.input, 'r') as tar:
+ names = tar.getnames()
+ tar.extractall()
+
+ if args.mode == 'py3':
+ pycc_cmd = [args.pycc]
+ pycc_ext = '.yapyc3'
+ iterate_resource_params = iterate_py3_resource_params
+ else:
+ pycc_cmd = [args.python, args.py_compile]
+ pycc_ext = '.yapyc'
+ iterate_resource_params = iterate_py2_resource_params
+
+ py_files = sorted(names)
+
+ for py in py_files:
+ cmd = pycc_cmd + ['{}-'.format(os.path.basename(py)), py, '{}{}'.format(py, pycc_ext)]
+ call(cmd)
+
+ outputs = []
+ cmd = [args.rescompiler, '{}.0'.format(args.output)]
+ size = 0
+ for path, key in iterate_resource_params(py_files):
+ addendum = len(path) + len(key)
+ if size + addendum > LIMIT and len(cmd) > 2:
+ call(cmd)
+ outputs.append(cmd[1])
+ cmd[1] = '{}.{}'.format(args.output, len(outputs))
+ cmd = cmd[0:2]
+ size = 0
+ cmd.extend([path, key])
+ size += addendum
+ if len(outputs) == 0:
+ cmd[1] = args.output
+ call(cmd)
+ else:
+ call(cmd)
+ outputs.append(cmd[1])
+ with open(args.output, 'w') as fout:
+ for fname in outputs:
+ with open(fname, 'r') as fin:
+ shutil.copyfileobj(fin, fout)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/configure_file.py b/build/scripts/configure_file.py
new file mode 100755
index 0000000000..1873ed70eb
--- /dev/null
+++ b/build/scripts/configure_file.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python2.7
+
+import sys
+import os.path
+import re
+
+cmakeDef01 = "#cmakedefine01"
+cmakeDef = "#cmakedefine"
+
+
+def replaceLine(l, varDict, define):
+ words = l.split()
+ if words:
+ if words[0] == cmakeDef:
+ sPos = l.find(cmakeDef)
+ ePos = sPos + len(cmakeDef)
+ l = l[:sPos] + define + l[ePos:] + '\n'
+ if words[0] == cmakeDef01:
+ var = words[1]
+ cmakeValue = varDict.get(var)
+ if cmakeValue == 'yes':
+ val = '1'
+ else:
+ val = '0'
+ sPos = l.find(cmakeDef01)
+ ePos = l.find(var) + len(var)
+ l = l[:sPos] + define + ' ' + var + ' ' + val + l[ePos + 1:] + '\n'
+
+ finder = re.compile(".*?(@[a-zA-Z0-9_]+@).*")
+ while True:
+ re_result = finder.match(l)
+ if not re_result:
+ return l
+ key = re_result.group(1)[1:-1]
+ l = l[:re_result.start(1)] + varDict.get(key, '') + l[re_result.end(1):]
+
+
+def main(inputPath, outputPath, varDict):
+ define = '#define' if os.path.splitext(outputPath)[1] != '.asm' else '%define'
+ with open(outputPath, 'w') as output:
+ with open(inputPath, 'r') as input:
+ for l in input:
+ output.write(replaceLine(l, varDict, define))
+
+
+def usage():
+ print "usage: configure_file.py inputPath outputPath key1=value1 ..."
+ exit(1)
+
+
+if __name__ == "__main__":
+ if len(sys.argv) < 3:
+ usage()
+ varDict = {}
+ for x in sys.argv[3:]:
+ key, value = str(x).split('=', 1)
+ varDict[key] = value
+
+ main(sys.argv[1], sys.argv[2], varDict)
diff --git a/build/scripts/copy_files_to_dir.py b/build/scripts/copy_files_to_dir.py
new file mode 100644
index 0000000000..ead57ba16e
--- /dev/null
+++ b/build/scripts/copy_files_to_dir.py
@@ -0,0 +1,59 @@
+import argparse
+import errno
+import os
+import process_command_files as pcf
+import shutil
+import sys
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--dest-dir', required=True)
+ parser.add_argument('--existing', choices=('skip', 'overwrite'), default='overwrite')
+ parser.add_argument('--flat', action='store_true')
+ parser.add_argument('--skip-prefix', dest='skip_prefixes', action='append', default=[])
+ parser.add_argument('files', nargs='*')
+ return parser.parse_args(pcf.get_args(sys.argv[1:]))
+
+
+def makedirs(dirname):
+ try:
+ os.makedirs(dirname)
+ except OSError as e:
+ if e.errno == errno.EEXIST and os.path.isdir(dirname):
+ pass
+ else:
+ raise
+
+
+def main():
+ args = parse_args()
+
+ dest_dir = os.path.normpath(args.dest_dir) + os.pathsep
+ makedirs(dest_dir)
+
+ prefixes = ['{}{}'.format(os.path.normpath(p), os.path.sep) for p in args.skip_prefixes]
+
+ for src in args.files:
+ src = os.path.normpath(src)
+ assert os.path.isfile(src)
+ if args.flat:
+ rel_dst = os.path.basename(src)
+ else:
+ rel_dst = src
+ for prefix in prefixes:
+ if src.startswith(prefix):
+ rel_dst = src[len(prefix):]
+ break
+ assert not os.path.isabs(rel_dst)
+ dst = os.path.join(args.dest_dir, rel_dst)
+ if os.path.isfile(dst) and args.existing == 'skip':
+ break
+
+ makedirs(os.path.dirname(dst))
+
+ shutil.copyfile(src, dst)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/copy_to_dir.py b/build/scripts/copy_to_dir.py
new file mode 100644
index 0000000000..9baeb5ffac
--- /dev/null
+++ b/build/scripts/copy_to_dir.py
@@ -0,0 +1,75 @@
+import errno
+import sys
+import os
+import shutil
+import optparse
+import tarfile
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.add_option('--build-root')
+ parser.add_option('--dest-dir')
+ parser.add_option('--dest-arch')
+ return parser.parse_args()
+
+
+def ensure_dir_exists(path):
+ try:
+ os.makedirs(path)
+ except OSError as e:
+ if e.errno == errno.EEXIST and os.path.isdir(path):
+ pass
+ else:
+ raise
+
+
+def hardlink_or_copy(src, dst):
+ if os.name == 'nt':
+ shutil.copy(src, dst)
+ else:
+ try:
+ os.link(src, dst)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ return
+ elif e.errno == errno.EXDEV:
+ sys.stderr.write("Can't make cross-device hardlink - fallback to copy: {} -> {}\n".format(src, dst))
+ shutil.copy(src, dst)
+ else:
+ raise
+
+
+def main():
+ opts, args = parse_args()
+ assert opts.build_root
+ assert opts.dest_dir
+
+ dest_arch = None
+ if opts.dest_arch:
+ if opts.dest_arch.endswith('.tar'):
+ dest_arch = tarfile.open(opts.dest_arch, 'w', dereference=True)
+ elif opts.dest_arch.endswith('.tar.gz') or opts.dest_arch.endswith('.tgz'):
+ dest_arch = tarfile.open(opts.dest_arch, 'w:gz', dereference=True)
+ else:
+ # TODO: move check to graph generation stage
+ raise Exception('Unsopported archive type for {}. Use one of: tar, tar.gz, tgz.'.format(os.path.basename(opts.dest_arch)))
+
+ for arg in args:
+ dst = arg
+ if dst.startswith(opts.build_root):
+ dst = dst[len(opts.build_root) + 1:]
+
+ if dest_arch and not arg.endswith('.pkg.fake'):
+ dest_arch.add(arg, arcname=dst)
+
+ dst = os.path.join(opts.dest_dir, dst)
+ ensure_dir_exists(os.path.dirname(dst))
+ hardlink_or_copy(arg, dst)
+
+ if dest_arch:
+ dest_arch.close()
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/build/scripts/coverage-info.py b/build/scripts/coverage-info.py
new file mode 100644
index 0000000000..94491d9256
--- /dev/null
+++ b/build/scripts/coverage-info.py
@@ -0,0 +1,282 @@
+import argparse
+import os
+import sys
+import tarfile
+import collections
+import subprocess
+import re
+
+
+GCDA_EXT = '.gcda'
+GCNO_EXT = '.gcno'
+
+
+def suffixes(path):
+ """
+ >>> list(suffixes('/a/b/c'))
+ ['c', 'b/c', '/a/b/c']
+ >>> list(suffixes('/a/b/c/'))
+ ['c', 'b/c', '/a/b/c']
+ >>> list(suffixes('/a'))
+ ['/a']
+ >>> list(suffixes('/a/'))
+ ['/a']
+ >>> list(suffixes('/'))
+ []
+ """
+ path = os.path.normpath(path)
+
+ def up_dirs(cur_path):
+ while os.path.dirname(cur_path) != cur_path:
+ cur_path = os.path.dirname(cur_path)
+ yield cur_path
+
+ for x in up_dirs(path):
+ yield path.replace(x + os.path.sep, '')
+
+
+def recast(in_file, out_file, probe_path, update_stat):
+ PREFIX = 'SF:'
+
+ probed_path = None
+
+ any_payload = False
+
+ with open(in_file, 'r') as input, open(out_file, 'w') as output:
+ active = True
+ for line in input:
+ line = line.rstrip('\n')
+ if line.startswith('TN:'):
+ output.write(line + '\n')
+ elif line.startswith(PREFIX):
+ path = line[len(PREFIX):]
+ probed_path = probe_path(path)
+ if probed_path:
+ output.write(PREFIX + probed_path + '\n')
+ active = bool(probed_path)
+ else:
+ if active:
+ update_stat(probed_path, line)
+ output.write(line + '\n')
+ any_payload = True
+
+ return any_payload
+
+
+def print_stat(da, fnda, teamcity_stat_output):
+ lines_hit = sum(map(bool, da.values()))
+ lines_total = len(da.values())
+ lines_coverage = 100.0 * lines_hit / lines_total if lines_total else 0
+
+ func_hit = sum(map(bool, fnda.values()))
+ func_total = len(fnda.values())
+ func_coverage = 100.0 * func_hit / func_total if func_total else 0
+
+ print >>sys.stderr, '[[imp]]Lines[[rst]] {: >16} {: >16} {: >16.1f}%'.format(lines_hit, lines_total, lines_coverage)
+ print >>sys.stderr, '[[imp]]Functions[[rst]] {: >16} {: >16} {: >16.1f}%'.format(func_hit, func_total, func_coverage)
+
+ if teamcity_stat_output:
+ with open(teamcity_stat_output, 'w') as tc_file:
+ tc_file.write("##teamcity[blockOpened name='Code Coverage Summary']\n")
+ tc_file.write("##teamcity[buildStatisticValue key=\'CodeCoverageAbsLTotal\' value='{}']\n".format(lines_total))
+ tc_file.write("##teamcity[buildStatisticValue key=\'CodeCoverageAbsLCovered\' value='{}']\n".format(lines_hit))
+ tc_file.write("##teamcity[buildStatisticValue key=\'CodeCoverageAbsMTotal\' value='{}']\n".format(func_total))
+ tc_file.write("##teamcity[buildStatisticValue key=\'CodeCoverageAbsMCovered\' value='{}']\n".format(func_hit))
+ tc_file.write("##teamcity[blockClosed name='Code Coverage Summary']\n")
+
+
+def chunks(l, n):
+ """
+ >>> list(chunks(range(10), 3))
+ [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]
+ >>> list(chunks(range(10), 5))
+ [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
+ """
+ for i in xrange(0, len(l), n):
+ yield l[i:i + n]
+
+
+def combine_info_files(lcov, files, out_file):
+ chunk_size = 50
+ files = list(set(files))
+
+ for chunk in chunks(files, chunk_size):
+ combine_cmd = [lcov]
+ if os.path.exists(out_file):
+ chunk.append(out_file)
+ for trace in chunk:
+ assert os.path.exists(trace), "Trace file does not exist: {} (cwd={})".format(trace, os.getcwd())
+ combine_cmd += ["-a", os.path.abspath(trace)]
+ print >>sys.stderr, '## lcov', ' '.join(combine_cmd[1:])
+ out_file_tmp = "combined.tmp"
+ with open(out_file_tmp, "w") as stdout:
+ subprocess.check_call(combine_cmd, stdout=stdout)
+ if os.path.exists(out_file):
+ os.remove(out_file)
+ os.rename(out_file_tmp, out_file)
+
+
+def probe_path_global(path, source_root, prefix_filter, exclude_files):
+ if path.endswith('_ut.cpp'):
+ return None
+
+ for suff in reversed(list(suffixes(path))):
+ if (not prefix_filter or suff.startswith(prefix_filter)) and (not exclude_files or not exclude_files.match(suff)):
+ full_path = source_root + os.sep + suff
+ if os.path.isfile(full_path):
+ return full_path
+
+ return None
+
+
+def update_stat_global(src_file, line, fnda, da):
+ if line.startswith("FNDA:"):
+ visits, func_name = line[len("FNDA:"):].split(',')
+ fnda[src_file + func_name] += int(visits)
+
+ if line.startswith("DA"):
+ line_number, visits = line[len("DA:"):].split(',')
+ if visits == '=====':
+ visits = 0
+
+ da[src_file + line_number] += int(visits)
+
+
+def gen_info_global(cmd, cov_info, probe_path, update_stat, lcov_args):
+ print >>sys.stderr, '## geninfo', ' '.join(cmd)
+ subprocess.check_call(cmd)
+ if recast(cov_info + '.tmp', cov_info, probe_path, update_stat):
+ lcov_args.append(cov_info)
+
+
+def init_all_coverage_files(gcno_archive, fname2gcno, fname2info, geninfo_executable, gcov_tool, gen_info, prefix_filter, exclude_files):
+ with tarfile.open(gcno_archive) as gcno_tf:
+ for gcno_item in gcno_tf:
+ if gcno_item.isfile() and gcno_item.name.endswith(GCNO_EXT):
+ gcno_tf.extract(gcno_item)
+
+ gcno_name = gcno_item.name
+ source_fname = gcno_name[:-len(GCNO_EXT)]
+ if prefix_filter and not source_fname.startswith(prefix_filter):
+ sys.stderr.write("Skipping {} (doesn't match prefix '{}')\n".format(source_fname, prefix_filter))
+ continue
+ if exclude_files and exclude_files.search(source_fname):
+ sys.stderr.write("Skipping {} (matched exclude pattern '{}')\n".format(source_fname, exclude_files.pattern))
+ continue
+
+ fname2gcno[source_fname] = gcno_name
+
+ if os.path.getsize(gcno_name) > 0:
+ coverage_info = source_fname + '.' + str(len(fname2info[source_fname])) + '.info'
+ fname2info[source_fname].append(coverage_info)
+ geninfo_cmd = [
+ geninfo_executable,
+ '--gcov-tool', gcov_tool,
+ '-i', gcno_name,
+ '-o', coverage_info + '.tmp'
+ ]
+ gen_info(geninfo_cmd, coverage_info)
+
+
+def process_all_coverage_files(gcda_archive, fname2gcno, fname2info, geninfo_executable, gcov_tool, gen_info):
+ with tarfile.open(gcda_archive) as gcda_tf:
+ for gcda_item in gcda_tf:
+ if gcda_item.isfile() and gcda_item.name.endswith(GCDA_EXT):
+ gcda_name = gcda_item.name
+ source_fname = gcda_name[:-len(GCDA_EXT)]
+ for suff in suffixes(source_fname):
+ if suff in fname2gcno:
+ gcda_new_name = suff + GCDA_EXT
+ gcda_item.name = gcda_new_name
+ gcda_tf.extract(gcda_item)
+ if os.path.getsize(gcda_new_name) > 0:
+ coverage_info = suff + '.' + str(len(fname2info[suff])) + '.info'
+ fname2info[suff].append(coverage_info)
+ geninfo_cmd = [
+ geninfo_executable,
+ '--gcov-tool', gcov_tool,
+ gcda_new_name,
+ '-o', coverage_info + '.tmp'
+ ]
+ gen_info(geninfo_cmd, coverage_info)
+
+
+def gen_cobertura(tool, output, combined_info):
+ cmd = [
+ tool,
+ combined_info,
+ '-b', '#hamster#',
+ '-o', output
+ ]
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if p.returncode:
+ raise Exception('lcov_cobertura failed with exit code {}\nstdout: {}\nstderr: {}'.format(p.returncode, out, err))
+
+
+def main(source_root, output, gcno_archive, gcda_archive, gcov_tool, prefix_filter, exclude_regexp, teamcity_stat_output, coverage_report_path, gcov_report, lcov_cobertura):
+ exclude_files = re.compile(exclude_regexp) if exclude_regexp else None
+
+ fname2gcno = {}
+ fname2info = collections.defaultdict(list)
+ lcov_args = []
+ geninfo_executable = os.path.join(source_root, 'devtools', 'lcov', 'geninfo')
+
+ def probe_path(path):
+ return probe_path_global(path, source_root, prefix_filter, exclude_files)
+
+ fnda = collections.defaultdict(int)
+ da = collections.defaultdict(int)
+
+ def update_stat(src_file, line):
+ update_stat_global(src_file, line, da, fnda)
+
+ def gen_info(cmd, cov_info):
+ gen_info_global(cmd, cov_info, probe_path, update_stat, lcov_args)
+
+ init_all_coverage_files(gcno_archive, fname2gcno, fname2info, geninfo_executable, gcov_tool, gen_info, prefix_filter, exclude_files)
+ process_all_coverage_files(gcda_archive, fname2gcno, fname2info, geninfo_executable, gcov_tool, gen_info)
+
+ if coverage_report_path:
+ output_dir = coverage_report_path
+ else:
+ output_dir = output + '.dir'
+
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
+ teamcity_stat_file = None
+ if teamcity_stat_output:
+ teamcity_stat_file = os.path.join(output_dir, 'teamcity.out')
+ print_stat(da, fnda, teamcity_stat_file)
+
+ if lcov_args:
+ output_trace = "combined.info"
+ combine_info_files(os.path.join(source_root, 'devtools', 'lcov', 'lcov'), lcov_args, output_trace)
+ cmd = [os.path.join(source_root, 'devtools', 'lcov', 'genhtml'), '-p', source_root, '--ignore-errors', 'source', '-o', output_dir, output_trace]
+ print >>sys.stderr, '## genhtml', ' '.join(cmd)
+ subprocess.check_call(cmd)
+ if lcov_cobertura:
+ gen_cobertura(lcov_cobertura, gcov_report, output_trace)
+
+ with tarfile.open(output, 'w') as tar:
+ tar.add(output_dir, arcname='.')
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('--source-root', action='store')
+ parser.add_argument('--output', action='store')
+ parser.add_argument('--gcno-archive', action='store')
+ parser.add_argument('--gcda-archive', action='store')
+ parser.add_argument('--gcov-tool', action='store')
+ parser.add_argument('--prefix-filter', action='store')
+ parser.add_argument('--exclude-regexp', action='store')
+ parser.add_argument('--teamcity-stat-output', action='store_const', const=True)
+ parser.add_argument('--coverage-report-path', action='store')
+ parser.add_argument('--gcov-report', action='store')
+ parser.add_argument('--lcov-cobertura', action='store')
+
+ args = parser.parse_args()
+ main(**vars(args))
diff --git a/build/scripts/cpp_flatc_wrapper.py b/build/scripts/cpp_flatc_wrapper.py
new file mode 100644
index 0000000000..78a20e0280
--- /dev/null
+++ b/build/scripts/cpp_flatc_wrapper.py
@@ -0,0 +1,31 @@
+import os
+import subprocess
+import sys
+
+
+def main():
+ cmd = sys.argv[1:]
+ h_file = None
+ try:
+ index = cmd.index('-o')
+ h_file = cmd[index+1]
+ cmd[index+1] = os.path.dirname(h_file)
+ except (ValueError, IndexError):
+ pass
+ p = subprocess.Popen(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if p.returncode:
+ if out:
+ sys.stderr.write('stdout:\n{}\n'.format(out))
+ if err:
+ sys.stderr.write('stderr:\n{}\n'.format(err))
+ sys.exit(p.returncode)
+ if h_file and h_file.endswith(('.fbs.h', '.fbs64.h')):
+ cpp_file = '{}.cpp'.format(h_file[:-2])
+ with open(cpp_file, 'w') as f:
+ f.write('#include "{}"\n'.format(os.path.basename(h_file)))
+ sys.exit(0)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/create_jcoverage_report.py b/build/scripts/create_jcoverage_report.py
new file mode 100644
index 0000000000..45083ff4f7
--- /dev/null
+++ b/build/scripts/create_jcoverage_report.py
@@ -0,0 +1,112 @@
+import argparse
+import tarfile
+import zipfile
+import os
+import sys
+import time
+import subprocess
+
+
+def mkdir_p(path):
+ try:
+ os.makedirs(path)
+ except OSError:
+ pass
+
+
+class Timer(object):
+
+ def __init__(self):
+ self.start = time.time()
+
+ def step(self, msg):
+ sys.stderr.write("{} ({}s)\n".format(msg, int(time.time() - self.start)))
+ self.start = time.time()
+
+
+def main(source, output, java, prefix_filter, exclude_filter, jars_list, output_format, tar_output, agent_disposition, runners_paths):
+ timer = Timer()
+ reports_dir = 'jacoco_reports_dir'
+ mkdir_p(reports_dir)
+ with tarfile.open(source) as tf:
+ tf.extractall(reports_dir)
+ timer.step("Coverage data extracted")
+ reports = [os.path.join(reports_dir, fname) for fname in os.listdir(reports_dir)]
+
+ with open(jars_list) as f:
+ jars = f.read().strip().split()
+ if jars and runners_paths:
+ for r in runners_paths:
+ try:
+ jars.remove(r)
+ except ValueError:
+ pass
+
+ src_dir = 'sources_dir'
+ cls_dir = 'classes_dir'
+
+ mkdir_p(src_dir)
+ mkdir_p(cls_dir)
+
+ for jar in jars:
+ if jar.endswith('devtools-jacoco-agent.jar'):
+ agent_disposition = jar
+
+ # Skip java contrib - it's irrelevant coverage
+ if jar.startswith('contrib/java'):
+ continue
+
+ with zipfile.ZipFile(jar) as jf:
+ for entry in jf.infolist():
+ if entry.filename.endswith('.java'):
+ dest = src_dir
+
+ elif entry.filename.endswith('.class'):
+ dest = cls_dir
+
+ else:
+ continue
+
+ entry.filename = entry.filename.encode('utf-8')
+ jf.extract(entry, dest)
+ timer.step("Jar files extracted")
+
+ if not agent_disposition:
+ print>>sys.stderr, 'Can\'t find jacoco agent. Will not generate html report for java coverage.'
+
+ if tar_output:
+ report_dir = 'java.report.temp'
+ else:
+ report_dir = output
+ mkdir_p(report_dir)
+
+ if agent_disposition:
+ agent_cmd = [java, '-jar', agent_disposition, src_dir, cls_dir, prefix_filter or '.', exclude_filter or '__no_exclude__', report_dir, output_format]
+ agent_cmd += reports
+ subprocess.check_call(agent_cmd)
+ timer.step("Jacoco finished")
+
+ if tar_output:
+ with tarfile.open(output, 'w') as outf:
+ outf.add(report_dir, arcname='.')
+
+
+if __name__ == '__main__':
+ if 'LC_ALL' in os.environ:
+ if os.environ['LC_ALL'] == 'C':
+ os.environ['LC_ALL'] = 'en_GB.UTF-8'
+
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('--source', action='store')
+ parser.add_argument('--output', action='store')
+ parser.add_argument('--java', action='store')
+ parser.add_argument('--prefix-filter', action='store')
+ parser.add_argument('--exclude-filter', action='store')
+ parser.add_argument('--jars-list', action='store')
+ parser.add_argument('--output-format', action='store', default="html")
+ parser.add_argument('--raw-output', dest='tar_output', action='store_false', default=True)
+ parser.add_argument('--agent-disposition', action='store')
+ parser.add_argument('--runner-path', dest='runners_paths', action='append', default=[])
+ args = parser.parse_args()
+ main(**vars(args))
diff --git a/build/scripts/custom_link_green_mysql.py b/build/scripts/custom_link_green_mysql.py
new file mode 100644
index 0000000000..13bb9e4ac7
--- /dev/null
+++ b/build/scripts/custom_link_green_mysql.py
@@ -0,0 +1,97 @@
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+
+
+SYMBOLS_TO_PATCH = (
+ 'connect',
+ 'poll',
+ 'recv',
+ 'recvfrom',
+ 'send',
+ 'sendto',
+)
+
+class Error(Exception):
+ pass
+
+
+def find_compiler(args):
+ for arg in args:
+ if os.path.basename(arg) in ('clang', 'clang++'):
+ return arg
+ raise Error('No known compiler found in the command line')
+
+
+def find_libraries(project, args):
+ if not project.endswith('/'):
+ project = project + '/'
+
+ for arg in args:
+ if arg.startswith(project):
+ yield arg
+
+
+def rename_symbol(symbol):
+ return 'green_{}'.format(symbol)
+
+
+def patch_object(object_path, objcopy):
+ args = [objcopy]
+ for symbol in SYMBOLS_TO_PATCH:
+ args.extend(('--redefine-sym', '{}={}'.format(symbol, rename_symbol(symbol))))
+ args.append(object_path)
+ subprocess.check_call(args)
+
+
+def patch_library(library_path, ar, objcopy):
+ tmpdir = tempfile.mkdtemp(dir=os.path.dirname(library_path))
+ try:
+ subprocess.check_call((ar, 'x', library_path), cwd=tmpdir)
+ names = os.listdir(tmpdir)
+ for name in names:
+ patch_object(os.path.join(tmpdir, name), objcopy=objcopy)
+
+ new_library_path = os.path.join(tmpdir, 'library.a')
+ subprocess.check_call([ar, 'rcs', new_library_path] + names, cwd=tmpdir)
+
+ os.rename(new_library_path, library_path)
+
+ finally:
+ shutil.rmtree(tmpdir)
+
+
+def main():
+ try:
+ args = sys.argv[1:]
+ compiler = find_compiler(args)
+ compiler_dir = os.path.dirname(compiler)
+
+ def get_tool(name):
+ path = os.path.join(compiler_dir, name)
+ if not os.path.exists(path):
+ raise Error('No {} found alongside the compiler'.format(name))
+ return path
+
+ ar = get_tool('llvm-ar')
+ objcopy = get_tool('llvm-objcopy')
+
+ libraries = tuple(find_libraries('contrib/libs/libmysql_r', args))
+ for library in libraries:
+ library_path = os.path.abspath(library)
+ if not os.path.exists(library_path):
+ raise Error('No {} file exists'.format(library))
+
+ patch_library(library_path, ar=ar, objcopy=objcopy)
+
+ except Exception as error:
+ name = os.path.basename(sys.argv[0])
+ command = ' '.join(args)
+ message = '{name} failed: {error}\nCommand line: {command}'
+ print >> sys.stderr, message.format(**locals())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/decimal_md5.py b/build/scripts/decimal_md5.py
new file mode 100644
index 0000000000..e70ca80a09
--- /dev/null
+++ b/build/scripts/decimal_md5.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import hashlib
+import struct
+import sys
+import os
+import argparse
+
+
+def print_code(checksum, func_name):
+ if len(func_name) == 0: # safe fallback for old ya.make files
+ func_name = "DecimalMD5"
+ print 'const char* ' + func_name + '() {return "' + checksum + '";}'
+
+
+def ensure_paths_exist(paths):
+ bad_paths = sorted(
+ path for path in paths
+ if not os.path.exists(path)
+ )
+ if bad_paths:
+ print >> sys.stderr, "decimal_md5 inputs do not exist:"
+ for path in bad_paths:
+ print >> sys.stderr, path
+ sys.exit(1)
+
+
+def _update_digest_with_file_contents(digest, path, block_size=65535):
+ with open(path) as f:
+ while True:
+ block = f.read(block_size)
+ if not block:
+ break
+ digest.update(block)
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--fixed-output", help="don not calculate md5, use this value instead")
+ parser.add_argument("--lower-bits", help="use specified count of lower bits", type=int, default=32)
+ parser.add_argument("--source-root", help="arcadia source root")
+ parser.add_argument("--func-name", help="custom function name to be defined", default="DecimalMD5")
+ parser.add_argument("targets", nargs='*', default=['.'])
+
+ args = parser.parse_args()
+
+ abs_paths = [
+ os.path.join(args.source_root, target)
+ for target in args.targets
+ ]
+ ensure_paths_exist(abs_paths)
+
+ if args.fixed_output:
+ try:
+ bitmask = (1 << args.lower_bits) - 1
+ fmt = '{:0%dd}' % len(str(bitmask))
+ checksum = fmt.format(int(args.fixed_output) & bitmask)
+ except ValueError:
+ raise ValueError("decimal_md5: bad value passed via --fixed-output: %s" % args.fixed_output)
+ print_code(str(checksum), func_name=args.func_name)
+ return
+
+ md5 = hashlib.md5()
+ for path in abs_paths:
+ _update_digest_with_file_contents(md5, path)
+
+ md5_parts = struct.unpack('IIII', md5.digest())
+ md5_int = sum(part << (32 * n) for n, part in enumerate(md5_parts))
+ bitmask = (1 << args.lower_bits) - 1
+ fmt = '{:0%dd}' % len(str(bitmask))
+
+ checksum_str = fmt.format(md5_int & bitmask)
+ print_code(checksum_str, func_name=args.func_name)
+
+
+if __name__ == "__main__":
+ main()
+
diff --git a/build/scripts/error.py b/build/scripts/error.py
new file mode 100644
index 0000000000..f7d8ecb2cc
--- /dev/null
+++ b/build/scripts/error.py
@@ -0,0 +1,77 @@
+# Sync content of this file with devtools/ya/core/error/__init__.py
+
+TEMPORARY_ERROR_MESSAGES = [
+ 'Connection reset by peer',
+ 'Connection timed out',
+ 'Function not implemented',
+ 'I/O operation on closed file',
+ 'Internal Server Error',
+ 'Network connection closed unexpectedly',
+ 'Network is unreachable',
+ 'No route to host',
+ 'No space left on device',
+ 'Not enough space',
+ 'Temporary failure in name resolution',
+ 'The read operation timed out',
+ 'timeout: timed out',
+]
+
+
+# Node exit codes
+class ExitCodes(object):
+ TEST_FAILED = 10
+ COMPILATION_FAILED = 11
+ INFRASTRUCTURE_ERROR = 12
+ NOT_RETRIABLE_ERROR = 13
+ YT_STORE_FETCH_ERROR = 14
+
+
+def merge_exit_codes(exit_codes):
+ return max(e if e >= 0 else 1 for e in exit_codes) if exit_codes else 0
+
+
+def is_temporary_error(exc):
+ import logging
+ logger = logging.getLogger(__name__)
+
+ if getattr(exc, 'temporary', False):
+ logger.debug("Exception has temporary attribute: %s", exc)
+ return True
+
+ import errno
+ err = getattr(exc, 'errno', None)
+
+ if err == errno.ECONNREFUSED or err == errno.ENETUNREACH:
+ logger.debug("Exception has errno attribute: %s (errno=%s)", exc, err)
+ return True
+
+ import socket
+
+ if isinstance(exc, socket.timeout) or isinstance(getattr(exc, 'reason', None), socket.timeout):
+ logger.debug("Socket timeout exception: %s", exc)
+ return True
+
+ if isinstance(exc, socket.gaierror):
+ logger.debug("Getaddrinfo exception: %s", exc)
+ return True
+
+ import urllib2
+
+ if isinstance(exc, urllib2.HTTPError) and exc.code in (429, ):
+ logger.debug("urllib2.HTTPError: %s", exc)
+ return True
+
+ import httplib
+
+ if isinstance(exc, httplib.IncompleteRead):
+ logger.debug("IncompleteRead exception: %s", exc)
+ return True
+
+ exc_str = str(exc)
+
+ for message in TEMPORARY_ERROR_MESSAGES:
+ if message in exc_str:
+ logger.debug("Found temporary error pattern (%s): %s", message, exc_str)
+ return True
+
+ return False
diff --git a/build/scripts/extract_asrc.py b/build/scripts/extract_asrc.py
new file mode 100644
index 0000000000..89892ddf2d
--- /dev/null
+++ b/build/scripts/extract_asrc.py
@@ -0,0 +1,23 @@
+import argparse
+import os
+import tarfile
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--input', nargs='*', required=True)
+ parser.add_argument('--output', required=True)
+
+ return parser.parse_args()
+
+
+def main():
+ args = parse_args()
+
+ for asrc in filter(lambda x: x.endswith('.asrc') and os.path.exists(x), args.input):
+ with tarfile.open(asrc, 'r') as tar:
+ tar.extractall(path=args.output)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/extract_docs.py b/build/scripts/extract_docs.py
new file mode 100644
index 0000000000..cdcf93105f
--- /dev/null
+++ b/build/scripts/extract_docs.py
@@ -0,0 +1,36 @@
+import argparse
+import os
+import process_command_files as pcf
+import tarfile
+import sys
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--dest-dir', required=True)
+ parser.add_argument('--skip-prefix', dest='skip_prefixes', action='append', default=[])
+ parser.add_argument('docs', nargs='*')
+ return parser.parse_args(pcf.get_args(sys.argv[1:]))
+
+
+def main():
+ args = parse_args()
+
+ prefixes = ['{}{}'.format(os.path.normpath(p), os.path.sep) for p in args.skip_prefixes]
+
+ for src in filter(lambda(p): os.path.basename(p) == 'preprocessed.tar.gz', args.docs):
+ rel_dst = os.path.dirname(os.path.normpath(src))
+ for prefix in prefixes:
+ if src.startswith(prefix):
+ rel_dst = rel_dst[len(prefix):]
+ break
+ assert not os.path.isabs(rel_dst)
+ dest_dir = os.path.join(args.dest_dir, rel_dst)
+ if not os.path.exists(dest_dir):
+ os.makedirs(dest_dir)
+ with tarfile.open(src, 'r') as tar_file:
+ tar_file.extractall(dest_dir)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/extract_jacoco_report.py b/build/scripts/extract_jacoco_report.py
new file mode 100644
index 0000000000..02e4ba9f13
--- /dev/null
+++ b/build/scripts/extract_jacoco_report.py
@@ -0,0 +1,29 @@
+import argparse
+import os
+import re
+import tarfile
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('--archive', action='store')
+ parser.add_argument('--source-re', action='store')
+ parser.add_argument('--destination', action='store')
+
+ args = parser.parse_args()
+
+ with tarfile.open(args.archive) as tf:
+ open(args.destination, 'wb').close()
+ extract_list = []
+ matcher = re.compile(args.source_re)
+ temp_dir = os.path.join(os.path.dirname(args.destination), 'temp_profiles')
+ if not os.path.exists(temp_dir):
+ os.makedirs(temp_dir)
+ for f in [i for i in tf if matcher.match(i.name)]:
+ tf.extract(f, path=temp_dir)
+ for directory, _, srcs in os.walk(temp_dir):
+ for f in srcs:
+ with open(args.destination, 'ab') as dst:
+ with open(os.path.join(temp_dir, directory, f), 'rb') as src:
+ dst.write(src.read())
diff --git a/build/scripts/f2c.py b/build/scripts/f2c.py
new file mode 100644
index 0000000000..7021e1391f
--- /dev/null
+++ b/build/scripts/f2c.py
@@ -0,0 +1,58 @@
+import sys
+import subprocess
+import argparse
+import os
+
+
+header = '''\
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
+'''
+
+footer = '''
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+'''
+
+
+def mkdir_p(directory):
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('-t', '--tool')
+ parser.add_argument('-c', '--input')
+ parser.add_argument('-o', '--output')
+
+ args = parser.parse_args()
+ tmpdir = args.output + '.f2c'
+ mkdir_p(tmpdir)
+ # should parse includes, really
+ p = subprocess.Popen(
+ [args.tool, '-w', '-R', '-a', '-I' + os.path.dirname(args.input), '-T' + tmpdir],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ stdout, stderr = p.communicate(input=open(args.input).read())
+ ret = p.wait()
+
+ if ret:
+ print >>sys.stderr, 'f2c failed: %s, %s' % (stderr, ret)
+ sys.exit(ret)
+
+ if 'Error' in stderr:
+ print >>sys.stderr, stderr
+
+ with open(args.output, 'w') as f:
+ f.write(header)
+ f.write(stdout)
+ f.write(footer)
diff --git a/build/scripts/fail_module_cmd.py b/build/scripts/fail_module_cmd.py
new file mode 100644
index 0000000000..fa14c0d851
--- /dev/null
+++ b/build/scripts/fail_module_cmd.py
@@ -0,0 +1,7 @@
+import sys
+
+
+if __name__ == '__main__':
+ assert len(sys.argv) == 2, 'Unexpected number of arguments...'
+ sys.stderr.write('Error: module command for target [[bad]]{}[[rst]] was not executed due to build graph configuration errors...\n'.format(sys.argv[1]))
+ sys.exit(1)
diff --git a/build/scripts/fetch_from.py b/build/scripts/fetch_from.py
new file mode 100755
index 0000000000..db4fea50bf
--- /dev/null
+++ b/build/scripts/fetch_from.py
@@ -0,0 +1,375 @@
+import datetime as dt
+import errno
+import hashlib
+import json
+import logging
+import os
+import platform
+import random
+import shutil
+import socket
+import string
+import sys
+import tarfile
+import urllib2
+
+import retry
+
+
+def make_user_agent():
+ return 'fetch_from: {host}'.format(host=socket.gethostname())
+
+
+def add_common_arguments(parser):
+ parser.add_argument('--copy-to') # used by jbuild in fetch_resource
+ parser.add_argument('--rename-to') # used by test_node in inject_mds_resource_to_graph
+ parser.add_argument('--copy-to-dir')
+ parser.add_argument('--untar-to')
+ parser.add_argument('--rename', action='append', default=[], metavar='FILE', help='rename FILE to the corresponding output')
+ parser.add_argument('--executable', action='store_true', help='make outputs executable')
+ parser.add_argument('--log-path')
+ parser.add_argument('-v', '--verbose', action='store_true', default=os.environ.get('YA_VERBOSE_FETCHER'), help='increase stderr verbosity')
+ parser.add_argument('outputs', nargs='*', default=[])
+
+
+def ensure_dir(path):
+ if not (path == '' or os.path.isdir(path)):
+ os.makedirs(path)
+
+
+# Reference code: library/python/fs/__init__.py
+def hardlink_or_copy(src, dst):
+ ensure_dir(os.path.dirname(dst))
+
+ if os.name == 'nt':
+ shutil.copy(src, dst)
+ else:
+ try:
+ os.link(src, dst)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ return
+ elif e.errno in (errno.EXDEV, errno.EMLINK, errno.EINVAL, errno.EACCES):
+ sys.stderr.write("Can't make hardlink (errno={}) - fallback to copy: {} -> {}\n".format(e.errno, src, dst))
+ shutil.copy(src, dst)
+ else:
+ raise
+
+
+def rename_or_copy_and_remove(src, dst):
+ ensure_dir(os.path.dirname(dst))
+
+ try:
+ os.rename(src, dst)
+ except OSError:
+ shutil.copy(src, dst)
+ os.remove(src)
+
+
+class BadChecksumFetchError(Exception):
+ pass
+
+
+class IncompleteFetchError(Exception):
+ pass
+
+
+class ResourceUnpackingError(Exception):
+ pass
+
+
+class ResourceIsDirectoryError(Exception):
+ pass
+
+
+class OutputIsDirectoryError(Exception):
+ pass
+
+
+class OutputNotExistError(Exception):
+ pass
+
+
+def setup_logging(args, base_name):
+ def makedirs(path):
+ try:
+ os.makedirs(path)
+ except OSError:
+ pass
+
+ if args.log_path:
+ log_file_name = args.log_path
+ else:
+ log_file_name = base_name + ".log"
+
+ args.abs_log_path = os.path.abspath(log_file_name)
+ makedirs(os.path.dirname(args.abs_log_path))
+ logging.basicConfig(filename=args.abs_log_path, level=logging.DEBUG)
+ if args.verbose:
+ logging.getLogger().addHandler(logging.StreamHandler(sys.stderr))
+
+
+def is_temporary(e):
+
+ def is_broken(e):
+ return isinstance(e, urllib2.HTTPError) and e.code in (410, 404)
+
+ if is_broken(e):
+ return False
+
+ if isinstance(e, (BadChecksumFetchError, IncompleteFetchError, urllib2.URLError, socket.error)):
+ return True
+
+ import error
+
+ return error.is_temporary_error(e)
+
+
+def uniq_string_generator(size=6, chars=string.ascii_lowercase + string.digits):
+ return ''.join(random.choice(chars) for _ in range(size))
+
+
+def report_to_snowden(value):
+ def inner():
+ body = {
+ 'namespace': 'ygg',
+ 'key': 'fetch-from-sandbox',
+ 'value': json.dumps(value),
+ }
+
+ urllib2.urlopen(
+ 'https://back-snowden.qloud.yandex-team.ru/report/add',
+ json.dumps([body, ]),
+ timeout=5,
+ )
+
+ try:
+ inner()
+ except Exception as e:
+ logging.warning('report_to_snowden failed: %s', e)
+
+
+def copy_stream(read, *writers, **kwargs):
+ chunk_size = kwargs.get('size', 1024*1024)
+ while True:
+ data = read(chunk_size)
+ if not data:
+ break
+ for write in writers:
+ write(data)
+
+
+def md5file(fname):
+ res = hashlib.md5()
+ with open(fname, 'rb') as f:
+ copy_stream(f.read, res.update)
+ return res.hexdigest()
+
+
+def git_like_hash_with_size(filepath):
+ """
+ Calculate git like hash for path
+ """
+ sha = hashlib.sha1()
+
+ file_size = 0
+
+ with open(filepath, 'rb') as f:
+ while True:
+ block = f.read(2 ** 16)
+
+ if not block:
+ break
+
+ file_size += len(block)
+ sha.update(block)
+
+ sha.update('\0')
+ sha.update(str(file_size))
+
+ return sha.hexdigest(), file_size
+
+
+def size_printer(display_name, size):
+ sz = [0]
+ last_stamp = [dt.datetime.now()]
+
+ def printer(chunk):
+ sz[0] += len(chunk)
+ now = dt.datetime.now()
+ if last_stamp[0] + dt.timedelta(seconds=10) < now:
+ if size:
+ print >>sys.stderr, "##status##{} - [[imp]]{:.1f}%[[rst]]".format(display_name, 100.0 * sz[0] / size)
+ last_stamp[0] = now
+
+ return printer
+
+
+def fetch_url(url, unpack, resource_file_name, expected_md5=None, expected_sha1=None, tries=10, writers=None):
+ logging.info('Downloading from url %s name %s and expected md5 %s', url, resource_file_name, expected_md5)
+ tmp_file_name = uniq_string_generator()
+
+ request = urllib2.Request(url, headers={'User-Agent': make_user_agent()})
+ req = retry.retry_func(lambda: urllib2.urlopen(request, timeout=30), tries=tries, delay=5, backoff=1.57079)
+ logging.debug('Headers: %s', req.headers.headers)
+ expected_file_size = int(req.headers['Content-Length'])
+ real_md5 = hashlib.md5()
+ real_sha1 = hashlib.sha1()
+
+ with open(tmp_file_name, 'wb') as fp:
+ copy_stream(
+ req.read,
+ fp.write,
+ real_md5.update,
+ real_sha1.update,
+ size_printer(resource_file_name, expected_file_size),
+ *([] if writers is None else writers)
+ )
+
+ real_md5 = real_md5.hexdigest()
+ real_file_size = os.path.getsize(tmp_file_name)
+ real_sha1.update('\0')
+ real_sha1.update(str(real_file_size))
+ real_sha1 = real_sha1.hexdigest()
+
+ if unpack:
+ tmp_dir = tmp_file_name + '.dir'
+ os.makedirs(tmp_dir)
+ with tarfile.open(tmp_file_name, mode="r|gz") as tar:
+ tar.extractall(tmp_dir)
+ tmp_file_name = os.path.join(tmp_dir, resource_file_name)
+ real_md5 = md5file(tmp_file_name)
+
+ logging.info('File size %s (expected %s)', real_file_size, expected_file_size)
+ logging.info('File md5 %s (expected %s)', real_md5, expected_md5)
+ logging.info('File sha1 %s (expected %s)', real_sha1, expected_sha1)
+
+ if expected_md5 and real_md5 != expected_md5:
+ report_to_snowden(
+ {
+ 'headers': req.headers.headers,
+ 'expected_md5': expected_md5,
+ 'real_md5': real_md5
+ }
+ )
+
+ raise BadChecksumFetchError(
+ 'Downloaded {}, but expected {} for {}'.format(
+ real_md5,
+ expected_md5,
+ url,
+ )
+ )
+
+ if expected_sha1 and real_sha1 != expected_sha1:
+ report_to_snowden(
+ {
+ 'headers': req.headers.headers,
+ 'expected_sha1': expected_sha1,
+ 'real_sha1': real_sha1
+ }
+ )
+
+ raise BadChecksumFetchError(
+ 'Downloaded {}, but expected {} for {}'.format(
+ real_sha1,
+ expected_sha1,
+ url,
+ )
+ )
+
+ if expected_file_size != real_file_size:
+ report_to_snowden({'headers': req.headers.headers, 'file_size': real_file_size})
+
+ raise IncompleteFetchError(
+ 'Downloaded {}, but expected {} for {}'.format(
+ real_file_size,
+ expected_file_size,
+ url,
+ )
+ )
+
+ return tmp_file_name
+
+
+def chmod(filename, mode):
+ if platform.system().lower() == 'windows':
+ # https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions:
+ # hard to reset read-only attribute for removal if there are multiple hardlinks
+ return
+ stat = os.stat(filename)
+ if stat.st_mode & 0o777 != mode:
+ try:
+ os.chmod(filename, mode)
+ except OSError:
+ import pwd
+ sys.stderr.write("{} st_mode: {} pwuid: {}\n".format(filename, stat.st_mode, pwd.getpwuid(os.stat(filename).st_uid)))
+ raise
+
+
+def process(fetched_file, file_name, args, remove=True):
+ assert len(args.rename) <= len(args.outputs), (
+ 'too few outputs to rename', args.rename, 'into', args.outputs)
+
+ # Forbid changes to the loaded resource
+ chmod(fetched_file, 0o444)
+
+ if not os.path.isfile(fetched_file):
+ raise ResourceIsDirectoryError('Resource must be a file, not a directory: %s' % fetched_file)
+
+ if args.copy_to:
+ hardlink_or_copy(fetched_file, args.copy_to)
+ if not args.outputs:
+ args.outputs = [args.copy_to]
+
+ if args.rename_to:
+ args.rename.append(fetched_file)
+ if not args.outputs:
+ args.outputs = [args.rename_to]
+
+ if args.copy_to_dir:
+ hardlink_or_copy(fetched_file, os.path.join(args.copy_to_dir, file_name))
+
+ if args.untar_to:
+ ensure_dir(args.untar_to)
+ # Extract only requested files
+ try:
+ with tarfile.open(fetched_file, mode='r:*') as tar:
+ inputs = set(map(os.path.normpath, args.rename + args.outputs[len(args.rename):]))
+ members = [entry for entry in tar if os.path.normpath(os.path.join(args.untar_to, entry.name)) in inputs]
+ tar.extractall(args.untar_to, members=members)
+ # Forbid changes to the loaded resource data
+ for root, _, files in os.walk(args.untar_to):
+ for filename in files:
+ chmod(os.path.join(root, filename), 0o444)
+ except tarfile.ReadError as e:
+ logging.exception(e)
+ raise ResourceUnpackingError('File {} cannot be untared'.format(fetched_file))
+
+ for src, dst in zip(args.rename, args.outputs):
+ if src == 'RESOURCE':
+ src = fetched_file
+ if os.path.abspath(src) == os.path.abspath(fetched_file):
+ logging.info('Copying %s to %s', src, dst)
+ hardlink_or_copy(src, dst)
+ else:
+ logging.info('Renaming %s to %s', src, dst)
+ if os.path.exists(dst):
+ raise ResourceUnpackingError("Target file already exists ({} -> {})".format(src, dst))
+ if remove:
+ rename_or_copy_and_remove(src, dst)
+ else:
+ hardlink_or_copy(src, dst)
+
+ for path in args.outputs:
+ if not os.path.exists(path):
+ raise OutputNotExistError('Output does not exist: %s' % os.path.abspath(path))
+ if not os.path.isfile(path):
+ raise OutputIsDirectoryError('Output must be a file, not a directory: %s' % os.path.abspath(path))
+ if args.executable:
+ chmod(path, os.stat(path).st_mode | 0o111)
+ if os.path.abspath(path) == os.path.abspath(fetched_file):
+ remove = False
+
+ if remove:
+ os.remove(fetched_file)
diff --git a/build/scripts/fetch_from_archive.py b/build/scripts/fetch_from_archive.py
new file mode 100644
index 0000000000..57aff91b5e
--- /dev/null
+++ b/build/scripts/fetch_from_archive.py
@@ -0,0 +1,36 @@
+import os
+import sys
+import logging
+import argparse
+
+import fetch_from
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+ parser.add_argument('--file-name', required=True)
+ parser.add_argument('--archive', required=True)
+
+ return parser.parse_args()
+
+def main(args):
+ archive = args.archive
+ file_name = args.file_name.rstrip('-')
+
+ fetch_from.process(archive, file_name, args, remove=False)
+
+
+if __name__ == '__main__':
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)
diff --git a/build/scripts/fetch_from_external.py b/build/scripts/fetch_from_external.py
new file mode 100644
index 0000000000..d4ed6f4221
--- /dev/null
+++ b/build/scripts/fetch_from_external.py
@@ -0,0 +1,60 @@
+import sys
+import json
+import os.path
+import fetch_from
+import argparse
+import logging
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+ parser.add_argument('--external-file', required=True)
+ parser.add_argument('--custom-fetcher')
+ parser.add_argument('--resource-file')
+ return parser.parse_args()
+
+
+def main(args):
+ external_file = args.external_file.rstrip('.external')
+ if os.path.isfile(args.resource_file):
+ fetch_from.process(args.resource_file, os.path.basename(args.resource_file), args, False)
+ return
+
+ error = None
+ try:
+ with open(args.external_file) as f:
+ js = json.load(f)
+
+ if js['storage'] == 'SANDBOX':
+ import fetch_from_sandbox as ffsb
+ del args.external_file
+ args.resource_id = js['resource_id']
+ ffsb.main(args)
+ elif js['storage'] == 'MDS':
+ import fetch_from_mds as fmds
+ del args.external_file
+ args.key = js['resource_id']
+ fmds.main(args)
+ else:
+ error = 'Unsupported storage in {}'.format(external_file)
+ except:
+ logging.error('Invalid external file: {}'.format(external_file))
+ raise
+ if error:
+ raise Exception(error)
+
+
+if __name__ == '__main__':
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)
diff --git a/build/scripts/fetch_from_mds.py b/build/scripts/fetch_from_mds.py
new file mode 100644
index 0000000000..5e4e656394
--- /dev/null
+++ b/build/scripts/fetch_from_mds.py
@@ -0,0 +1,50 @@
+import os
+import sys
+import logging
+import argparse
+
+import fetch_from
+
+MDS_PREFIX = "https://storage.yandex-team.ru/get-devtools/"
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+
+ parser.add_argument('--key', required=True)
+
+ return parser.parse_args()
+
+
+def fetch(key):
+ parts = key.split("/")
+ if len(parts) != 3:
+ raise ValueError("Invalid MDS key '{}'".format(key))
+
+ _, sha1, file_name = parts
+
+ fetched_file = fetch_from.fetch_url(MDS_PREFIX + key, False, file_name, expected_sha1=sha1)
+
+ return fetched_file, file_name
+
+
+def main(args):
+ fetched_file, resource_file_name = fetch(args.key)
+
+ fetch_from.process(fetched_file, resource_file_name, args)
+
+
+if __name__ == '__main__':
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)
diff --git a/build/scripts/fetch_from_npm.py b/build/scripts/fetch_from_npm.py
new file mode 100644
index 0000000000..28a1e5c929
--- /dev/null
+++ b/build/scripts/fetch_from_npm.py
@@ -0,0 +1,104 @@
+import os
+import sys
+import time
+import logging
+import argparse
+import hashlib
+
+import sky
+import fetch_from
+
+
+NPM_BASEURL = "http://npm.yandex-team.ru/"
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+
+ parser.add_argument("--name", required=True)
+ parser.add_argument("--version", required=True)
+ parser.add_argument("--sky-id", required=True)
+ parser.add_argument("--integrity", required=True)
+ parser.add_argument("--integrity-algorithm", required=True)
+
+ return parser.parse_args()
+
+
+def fetch(name, version, sky_id, integrity, integrity_algorithm, file_name, tries=5):
+ """
+ :param name: package name
+ :type name: str
+ :param version: package version
+ :type version: str
+ :param sky_id: sky id of tarball
+ :type sky_id: str
+ :param integrity: tarball integrity (hex)
+ :type integrity: str
+ :param integrity_algorithm: integrity algorithm (known for openssl)
+ :type integrity_algorithm: str
+ :param tries: tries count
+ :type tries: int
+ :return: path to fetched file
+ :rtype: str
+ """
+ if sky.is_avaliable():
+ fetcher = lambda: sky.fetch(sky_id, file_name)
+ else:
+ fetcher = lambda: _fetch_via_http(name, version, integrity, integrity_algorithm, file_name)
+
+ fetched_file = None
+ exc_info = None
+
+ for i in range(0, tries):
+ try:
+ fetched_file = fetcher()
+ exc_info = None
+ break
+ except Exception as e:
+ logging.exception(e)
+ exc_info = exc_info or sys.exc_info()
+ time.sleep(i)
+
+ if exc_info:
+ raise exc_info[0], exc_info[1], exc_info[2]
+
+ return fetched_file
+
+
+def _fetch_via_http(name, version, integrity, integrity_algorithm, file_name):
+ # Example: "http://npm.yandex-team.ru/@scope/name/-/name-0.0.1.tgz" for @scope/name v0.0.1.
+ url = NPM_BASEURL + "/".join([name, "-", "{}-{}.tgz".format(name.split("/").pop(), version)])
+
+ hashobj = hashlib.new(integrity_algorithm)
+ fetched_file = fetch_from.fetch_url(url, False, file_name, tries=1, writers=[hashobj.update])
+
+ if hashobj.hexdigest() != integrity:
+ raise fetch_from.BadChecksumFetchError("Expected {}, but got {} for {}".format(
+ integrity,
+ hashobj.hexdigest(),
+ file_name,
+ ))
+
+ return fetched_file
+
+
+def main(args):
+ file_name = os.path.basename(args.copy_to)
+ fetched_file = fetch(args.name, args.version, args.sky_id, args.integrity, args.integrity_algorithm, file_name)
+ fetch_from.process(fetched_file, file_name, args)
+
+
+if __name__ == "__main__":
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)
diff --git a/build/scripts/fetch_from_sandbox.py b/build/scripts/fetch_from_sandbox.py
new file mode 100755
index 0000000000..a99542e174
--- /dev/null
+++ b/build/scripts/fetch_from_sandbox.py
@@ -0,0 +1,269 @@
+import itertools
+import json
+import logging
+import argparse
+import os
+import random
+import subprocess
+import sys
+import time
+import urllib2
+import uuid
+
+import fetch_from
+
+
+ORIGIN_SUFFIX = '?origin=fetch-from-sandbox'
+MDS_PREFIX = 'http://storage-int.mds.yandex.net/get-sandbox/'
+TEMPORARY_ERROR_CODES = (429, 500, 503, 504)
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+ parser.add_argument('--resource-id', type=int, required=True)
+ parser.add_argument('--custom-fetcher')
+ parser.add_argument('--resource-file')
+ return parser.parse_args()
+
+
+class ResourceInfoError(Exception):
+ pass
+
+
+class UnsupportedProtocolException(Exception):
+ pass
+
+
+def _sky_path():
+ return "/usr/local/bin/sky"
+
+
+def _is_skynet_avaliable():
+ if not os.path.exists(_sky_path()):
+ return False
+ try:
+ subprocess.check_output([_sky_path(), "--version"])
+ return True
+ except subprocess.CalledProcessError:
+ return False
+ except OSError:
+ return False
+
+
+def download_by_skynet(resource_info, file_name):
+ def sky_get(skynet_id, target_dir, timeout=None):
+ cmd_args = [_sky_path(), 'get', "-N", "Backbone", "--user", "--wait", "--dir", target_dir, skynet_id]
+ if timeout is not None:
+ cmd_args += ["--timeout", str(timeout)]
+ logging.info('Call skynet with args: %s', cmd_args)
+ stdout = subprocess.check_output(cmd_args).strip()
+ logging.debug('Skynet call with args %s is finished, result is %s', cmd_args, stdout)
+ return stdout
+
+ if not _is_skynet_avaliable():
+ raise UnsupportedProtocolException("Skynet is not available")
+
+ skynet_id = resource_info.get("skynet_id")
+ if not skynet_id:
+ raise ValueError("Resource does not have skynet_id")
+
+ temp_dir = os.path.abspath(fetch_from.uniq_string_generator())
+ os.mkdir(temp_dir)
+ sky_get(skynet_id, temp_dir)
+ return os.path.join(temp_dir, file_name)
+
+
+def _urlopen(url, data=None, headers=None):
+ n = 10
+ tout = 30
+ started = time.time()
+ reqid = uuid.uuid4()
+
+ request = urllib2.Request(url, data=data, headers=headers or {})
+ request.add_header('X-Request-Timeout', str(tout))
+ request.add_header('X-Request-Id', str(reqid))
+ request.add_header('User-Agent', 'fetch_from_sandbox.py')
+ for i in xrange(n):
+ retry_after = i
+ try:
+ request.add_header('X-Request-Duration', str(int(time.time() - started)))
+ return urllib2.urlopen(request, timeout=tout).read()
+
+ except urllib2.HTTPError as e:
+ logging.warning('failed to fetch URL %s with HTTP code %d: %s', url, e.code, e)
+ retry_after = int(e.headers.get('Retry-After', str(retry_after)))
+
+ if e.code not in TEMPORARY_ERROR_CODES:
+ raise
+
+ except Exception as e:
+ logging.warning('failed to fetch URL %s: %s', url, e)
+
+ if i + 1 == n:
+ raise e
+
+ time.sleep(retry_after)
+
+
+def _query(url):
+ return json.loads(_urlopen(url))
+
+
+_SANDBOX_BASE_URL = 'https://sandbox.yandex-team.ru/api/v1.0'
+
+
+def get_resource_info(resource_id, touch=False, no_links=False):
+ url = ''.join((_SANDBOX_BASE_URL, '/resource/', str(resource_id)))
+ headers = {}
+ if touch:
+ headers.update({'X-Touch-Resource': '1'})
+ if no_links:
+ headers.update({'X-No-Links': '1'})
+ return _query(url)
+
+
+def get_resource_http_links(resource_id):
+ url = ''.join((_SANDBOX_BASE_URL, '/resource/', str(resource_id), '/data/http'))
+ return [r['url'] + ORIGIN_SUFFIX for r in _query(url)]
+
+
+def fetch_via_script(script, resource_id):
+ return subprocess.check_output([script, str(resource_id)]).rstrip()
+
+
+def fetch(resource_id, custom_fetcher):
+ try:
+ resource_info = get_resource_info(resource_id, touch=True, no_links=True)
+ except Exception as e:
+ sys.stderr.write(
+ "Failed to fetch resource {}: {}\n".format(resource_id, str(e))
+ )
+ raise
+
+ if resource_info.get('state', 'DELETED') != 'READY':
+ raise ResourceInfoError("Resource {} is not READY".format(resource_id))
+
+ logging.info('Resource %s info %s', str(resource_id), json.dumps(resource_info))
+
+ resource_file_name = os.path.basename(resource_info["file_name"])
+ expected_md5 = resource_info.get('md5')
+
+ proxy_link = resource_info['http']['proxy'] + ORIGIN_SUFFIX
+
+ mds_id = resource_info.get('attributes', {}).get('mds')
+ mds_link = MDS_PREFIX + mds_id if mds_id else None
+
+ def get_storage_links():
+ storage_links = get_resource_http_links(resource_id)
+ random.shuffle(storage_links)
+ return storage_links
+
+ skynet = _is_skynet_avaliable()
+
+ if not skynet:
+ logging.info("Skynet is not available, will try other protocols")
+
+ def iter_tries():
+ if skynet:
+ yield lambda: download_by_skynet(resource_info, resource_file_name)
+
+ if custom_fetcher:
+ yield lambda: fetch_via_script(custom_fetcher, resource_id)
+
+ # Don't try too hard here: we will get back to proxy later on
+ yield lambda: fetch_from.fetch_url(proxy_link, False, resource_file_name, expected_md5, tries=2)
+ for x in get_storage_links():
+ # Don't spend too much time connecting single host
+ yield lambda: fetch_from.fetch_url(x, False, resource_file_name, expected_md5, tries=1)
+ if mds_link is not None:
+ # Don't try too hard here: we will get back to MDS later on
+ yield lambda: fetch_from.fetch_url(mds_link, True, resource_file_name, expected_md5, tries=2)
+ yield lambda: fetch_from.fetch_url(proxy_link, False, resource_file_name, expected_md5)
+ if mds_link is not None:
+ yield lambda: fetch_from.fetch_url(mds_link, True, resource_file_name, expected_md5)
+
+ if resource_info.get('attributes', {}).get('ttl') != 'inf':
+ sys.stderr.write('WARNING: resource {} ttl is not "inf".\n'.format(resource_id))
+
+ exc_info = None
+ for i, action in enumerate(itertools.islice(iter_tries(), 0, 10)):
+ try:
+ fetched_file = action()
+ break
+ except UnsupportedProtocolException:
+ pass
+ except subprocess.CalledProcessError as e:
+ logging.warning('failed to fetch resource %s with subprocess: %s', resource_id, e)
+ time.sleep(i)
+ except urllib2.HTTPError as e:
+ logging.warning('failed to fetch resource %s with HTTP code %d: %s', resource_id, e.code, e)
+ if e.code not in TEMPORARY_ERROR_CODES:
+ exc_info = exc_info or sys.exc_info()
+ time.sleep(i)
+ except Exception as e:
+ logging.exception(e)
+ exc_info = exc_info or sys.exc_info()
+ time.sleep(i)
+ else:
+ if exc_info:
+ raise exc_info[0], exc_info[1], exc_info[2]
+ else:
+ raise Exception("No available protocol and/or server to fetch resource")
+
+ return fetched_file, resource_info['file_name']
+
+
+def _get_resource_info_from_file(resource_file):
+ if resource_file is None or not os.path.exists(resource_file):
+ return None
+
+ RESOURCE_INFO_JSON = "resource_info.json"
+ RESOURCE_CONTENT_FILE_NAME = "resource"
+
+ resource_dir, resource_file = os.path.split(resource_file)
+ if resource_file != RESOURCE_CONTENT_FILE_NAME:
+ return None
+
+ resource_json = os.path.join(resource_dir, RESOURCE_INFO_JSON)
+ if not os.path.isfile(resource_json):
+ return None
+
+ try:
+ with open(resource_json, 'r') as j:
+ resource_info = json.load(j)
+ resource_info['file_name'] # check consistency
+ return resource_info
+ except:
+ logging.debug('Invalid %s in %s', RESOURCE_INFO_JSON, resource_dir)
+
+ return None
+
+
+def main(args):
+ custom_fetcher = os.environ.get('YA_CUSTOM_FETCHER')
+
+ resource_info = _get_resource_info_from_file(args.resource_file)
+ if resource_info:
+ fetched_file = args.resource_file
+ file_name = resource_info['file_name']
+ else:
+ # This code should be merged to ya and removed.
+ fetched_file, file_name = fetch(args.resource_id, custom_fetcher)
+
+ fetch_from.process(fetched_file, file_name, args, remove=not custom_fetcher and not resource_info)
+
+
+if __name__ == '__main__':
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)
diff --git a/build/scripts/fetch_resource.py b/build/scripts/fetch_resource.py
new file mode 100644
index 0000000000..d5af311e5d
--- /dev/null
+++ b/build/scripts/fetch_resource.py
@@ -0,0 +1,43 @@
+import urllib2
+import argparse
+import xmlrpclib
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-r', '--resource-id', type=int, required=True)
+ parser.add_argument('-o', '--output', required=True)
+ return parser.parse_args()
+
+
+def fetch(url, retries=4, timeout=5):
+ for i in xrange(retries):
+ try:
+ return urllib2.urlopen(url, timeout=timeout).read()
+
+ except Exception:
+ if i + 1 < retries:
+ continue
+
+ else:
+ raise
+
+
+def fetch_resource(id_):
+ urls = xmlrpclib.ServerProxy("https://sandbox.yandex-team.ru/sandbox/xmlrpc").get_resource_http_links(id_)
+
+ for u in urls:
+ try:
+ return fetch(u)
+
+ except Exception:
+ continue
+
+ raise Exception('Cannot fetch resource {}'.format(id_))
+
+
+if __name__ == '__main__':
+ args = parse_args()
+
+ with open(args.output, 'wb') as f:
+ f.write(fetch_resource(int(args.resource_id)))
diff --git a/build/scripts/filter_zip.py b/build/scripts/filter_zip.py
new file mode 100644
index 0000000000..b2121b9c9e
--- /dev/null
+++ b/build/scripts/filter_zip.py
@@ -0,0 +1,71 @@
+import argparse
+import os
+import re
+import uuid
+import zipfile
+
+
+def pattern_to_regexp(p):
+ return re.compile(
+ '^'
+ + re.escape(p)
+ .replace(r'\*\*\/', '[_DIR_]')
+ .replace(r'\*', '[_FILE_]')
+ .replace('[_DIR_]', '(.*/)?')
+ .replace('[_FILE_]', '([^/]*)')
+ + '$'
+ )
+
+
+def is_deathman(positive_filter, negative_filter, candidate):
+ remove = positive_filter
+ for pf in positive_filter:
+ if pf.match(candidate):
+ remove = False
+ break
+ if not negative_filter or remove:
+ return remove
+ for nf in negative_filter:
+ if nf.match(candidate):
+ remove = True
+ break
+ return remove
+
+
+def just_do_it():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--positive', action='append', default=[])
+ parser.add_argument('--negative', action='append', default=[])
+ parser.add_argument('--file', action='store', required=True)
+ args = parser.parse_args()
+ if not args.positive and not args.negative:
+ return
+ pos = [pattern_to_regexp(i) for i in args.positive]
+ neg = [pattern_to_regexp(i) for i in args.negative]
+ temp_dirname = None
+ for _ in range(10):
+ candidate = '__unpacked_{}__'.format(uuid.uuid4())
+ if not os.path.exists(candidate):
+ temp_dirname = candidate
+ os.makedirs(temp_dirname)
+ if not temp_dirname:
+ raise Exception("Can't generate name for temp dir")
+
+ with zipfile.ZipFile(args.file, 'r') as zip_ref:
+ zip_ref.extractall(temp_dirname)
+
+ for root, _, files in os.walk(temp_dirname):
+ for f in files:
+ candidate = os.path.join(root, f).replace('\\', '/')
+ if is_deathman(pos, neg, os.path.relpath(candidate, temp_dirname)):
+ os.remove(candidate)
+
+ with zipfile.ZipFile(args.file, 'w') as zip_ref:
+ for root, _, files in os.walk(temp_dirname):
+ for f in files:
+ realname = os.path.join(root, f)
+ zip_ref.write(realname, os.path.sep.join(os.path.normpath(realname).split(os.path.sep, 2)[1:]))
+
+
+if __name__ == '__main__':
+ just_do_it()
diff --git a/build/scripts/find_and_tar.py b/build/scripts/find_and_tar.py
new file mode 100644
index 0000000000..f251623c68
--- /dev/null
+++ b/build/scripts/find_and_tar.py
@@ -0,0 +1,22 @@
+import os
+import sys
+import tarfile
+
+
+def find_gcno(dirname, tail):
+ for cur, _dirs, files in os.walk(dirname):
+ for f in files:
+ if f.endswith(tail):
+ yield os.path.relpath(os.path.join(cur, f))
+
+
+def main(args):
+ output = args[0]
+ tail = args[1] if len(args) > 1 else ''
+ with tarfile.open(output, 'w:') as tf:
+ for f in find_gcno(os.getcwd(), tail):
+ tf.add(f)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/find_time_trace.py b/build/scripts/find_time_trace.py
new file mode 100644
index 0000000000..954d203caa
--- /dev/null
+++ b/build/scripts/find_time_trace.py
@@ -0,0 +1,17 @@
+import os
+import sys
+
+# /scripts/find_time_trace.py <object_file> <destination>
+# clang generates `-ftime-trace` output file path based on main output file path
+
+
+def main():
+ assert len(sys.argv) == 3
+ obj_path = sys.argv[1]
+ trace_path = sys.argv[2]
+ orig_trace_path = obj_path.rpartition('.o')[0] + '.json'
+ os.rename(orig_trace_path, trace_path)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/fix_java_command_file_cp.py b/build/scripts/fix_java_command_file_cp.py
new file mode 100644
index 0000000000..fc87048c32
--- /dev/null
+++ b/build/scripts/fix_java_command_file_cp.py
@@ -0,0 +1,34 @@
+import sys
+import os
+import argparse
+import subprocess
+import platform
+
+
+def fix_files(args):
+ args = args[:]
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--build-root', default=None)
+ args, tail = parser.parse_known_args(args)
+ for idx, arg in list(enumerate(tail)):
+ if arg.startswith('@') and os.path.isfile(arg[1:]):
+ with open(arg[1:]) as f:
+ fixed = [i.strip() for i in f]
+ if args.build_root:
+ fixed = [os.path.join(args.build_root, i) for ln in fixed for i in ln.split(os.path.pathsep)]
+ fixed = os.pathsep.join([i.strip() for i in fixed])
+ fixed_name = list(os.path.splitext(arg))
+ fixed_name[0] += '_fixed'
+ fixed_name = ''.join(fixed_name)
+ with open(fixed_name[1:], 'w') as f:
+ f.write(fixed)
+ tail[idx:idx + 1] = [fixed_name]
+ return tail
+
+
+if __name__ == '__main__':
+ args = fix_files(sys.argv[1:])
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(args).wait())
+ else:
+ os.execv(args[0], args)
diff --git a/build/scripts/fix_msvc_output.py b/build/scripts/fix_msvc_output.py
new file mode 100644
index 0000000000..b2e7d38307
--- /dev/null
+++ b/build/scripts/fix_msvc_output.py
@@ -0,0 +1,42 @@
+import subprocess
+import sys
+
+import process_command_files as pcf
+import process_whole_archive_option as pwa
+
+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 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
+ if not line:
+ break
+ if first_line:
+ sys.stdout.write(line)
+ first_line = False
+ else:
+ sys.stderr.write(line)
+ return p.wait()
+
+
+if __name__ == '__main__':
+ mode = sys.argv[1]
+ args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(sys.argv[2:]))
+ cmd = pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(args)
+ run = out2err
+ if mode in ('cl', 'ml'):
+ # First line of cl.exe and ml64.exe stdout is useless: it prints input file
+ run = out2err_cut_first_line
+ sys.exit(run(cmd))
diff --git a/build/scripts/fs_tools.py b/build/scripts/fs_tools.py
new file mode 100644
index 0000000000..dec4c349c8
--- /dev/null
+++ b/build/scripts/fs_tools.py
@@ -0,0 +1,104 @@
+from __future__ import print_function
+
+import os
+import platform
+import sys
+import shutil
+import errno
+
+import process_command_files as pcf
+
+
+def link_or_copy(src, dst):
+ try:
+ if platform.system().lower() == 'windows':
+ shutil.copy(src, dst)
+ else:
+ os.link(src, dst)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ print('link_or_copy: destination file already exists: {}'.format(dst), file=sys.stderr)
+ if e.errno == errno.ENOENT:
+ print('link_or_copy: source file doesn\'t exists: {}'.format(src), file=sys.stderr)
+ raise
+
+
+if __name__ == '__main__':
+ mode = sys.argv[1]
+ args = pcf.get_args(sys.argv[2:])
+
+ 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_files':
+ src = args[0]
+ dst = args[1]
+ files = open(args[2]).read().strip().split()
+ for f in files:
+ s = os.path.join(src, f)
+ d = os.path.join(dst, f)
+ if os.path.exists(d):
+ continue
+ try:
+ os.makedirs(os.path.dirname(d))
+ except OSError:
+ pass
+ shutil.copy(s, d)
+ elif mode == 'copy_all_files':
+ src = args[0]
+ dst = args[1]
+ for root, _, files in os.walk(src):
+ for f in files:
+ if os.path.islink(os.path.join(root, f)):
+ continue
+ file_dst = os.path.join(dst, os.path.relpath(root, src), f)
+ if os.path.exists(file_dst):
+ continue
+ try:
+ os.makedirs(os.path.dirname(file_dst))
+ except OSError:
+ pass
+ shutil.copy(os.path.join(root, f), file_dst)
+ elif mode == 'rename_if_exists':
+ if os.path.exists(args[0]):
+ shutil.move(args[0], args[1])
+ elif mode == 'rename':
+ targetdir = os.path.dirname(args[1])
+ if targetdir and not os.path.exists(targetdir):
+ os.makedirs(os.path.dirname(args[1]))
+ shutil.move(args[0], args[1])
+ elif mode == 'remove':
+ for f in args:
+ try:
+ if os.path.isfile(f) or os.path.islink(f):
+ os.remove(f)
+ else:
+ shutil.rmtree(f)
+ except OSError:
+ pass
+ elif mode == 'link_or_copy':
+ link_or_copy(args[0], args[1])
+ elif mode == 'link_or_copy_to_dir':
+ assert len(args) > 1
+ start = 0
+ if args[0] == '--no-check':
+ if args == 2:
+ sys.exit()
+ start = 1
+ dst = args[-1]
+ for src in args[start:-1]:
+ link_or_copy(src, os.path.join(dst, os.path.basename(src)))
+ elif mode == 'cat':
+ with open(args[0], 'w') as dst:
+ for input_name in args[1:]:
+ with open(input_name) as src:
+ dst.write(src.read())
+ elif mode == 'md':
+ try:
+ os.makedirs(args[0])
+ except OSError:
+ pass
+ else:
+ raise Exception('unsupported tool %s' % mode)
diff --git a/build/scripts/gen_aar_gradle_script.py b/build/scripts/gen_aar_gradle_script.py
new file mode 100644
index 0000000000..bf99fc1251
--- /dev/null
+++ b/build/scripts/gen_aar_gradle_script.py
@@ -0,0 +1,374 @@
+import argparse
+import os
+import tarfile
+
+FLAT_DIRS_REPO_TEMPLATE='flatDir {{ dirs {dirs} }}\n'
+MAVEN_REPO_TEMPLATE='maven {{ url "{repo}" }}\n'
+KEYSTORE_TEMLATE='signingConfigs {{ debug {{ storeFile file("{keystore}") }} }}\n'
+
+ENABLE_JAVADOC = 'tasks["bundle${suffix}Aar"].dependsOn packageJavadocTask'
+DO_NOT_STRIP = '''\
+ packagingOptions {
+ doNotStrip "*/arm64-v8a/*.so"
+ doNotStrip "*/armeabi-v7a/*.so"
+ doNotStrip "*/x86_64/*.so"
+ doNotStrip "*/x86/*.so"
+ }
+'''
+
+AAR_TEMPLATE = """\
+ext.jniLibsDirs = [
+ {jni_libs_dirs}
+]
+
+ext.resDirs = [
+ {res_dirs}
+]
+
+ext.assetsDirs = [
+ {assets_dirs}
+]
+
+ext.javaDirs = [
+ {java_dirs}
+]
+
+def aidlDirs = [
+ {aidl_dirs}
+]
+
+ext.bundles = [
+ {bundles}
+]
+
+ext.androidArs = [
+ {aars}
+]
+
+ext.compileOnlyAndroidArs = [
+ {compile_only_aars}
+]
+
+def minVersion = 18
+def compileVersion = 30
+def targetVersion = 30
+def buildVersion = '30.0.3'
+
+import com.android.build.gradle.LibraryPlugin
+import java.nio.file.Files
+import java.nio.file.Paths
+import java.util.regex.Matcher
+import java.util.regex.Pattern
+import java.util.zip.ZipFile
+
+
+apply plugin: 'com.github.dcendents.android-maven'
+
+buildDir = "$projectDir/build"
+
+if (!ext.has("packageSuffix"))
+ ext.packageSuffix = ""
+
+buildscript {{
+// repositories {{
+// jcenter()
+// mavenCentral()
+// }}
+
+ repositories {{
+ {maven_repos}
+ }}
+
+ dependencies {{
+ classpath 'com.android.tools.build:gradle:4.0.2'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+ }}
+}}
+
+apply plugin: LibraryPlugin
+
+repositories {{
+// flatDir {{
+// dirs System.env.PKG_ROOT + '/bundle'
+// }}
+// maven {{
+// url "http://maven.google.com/"
+// }}
+// maven {{
+// url "http://artifactory.yandex.net/artifactory/public/"
+// }}
+
+ {flat_dirs_repo}
+
+ {maven_repos}
+}}
+
+android {{
+ {keystore}
+
+ compileSdkVersion compileVersion
+ buildToolsVersion buildVersion
+
+ defaultConfig {{
+ minSdkVersion minVersion
+ targetSdkVersion targetVersion
+ consumerProguardFiles '{proguard_rules}'
+ }}
+
+ sourceSets {{
+ main {{
+ manifest.srcFile '{manifest}'
+ jniLibs.srcDirs = jniLibsDirs
+ res.srcDirs = resDirs
+ assets.srcDirs = assetsDirs
+ java.srcDirs = javaDirs
+ aidl.srcDirs = aidlDirs
+ }}
+ // We don't use this feature, so we set it to nonexisting directory
+ androidTest.setRoot('bundle/tests')
+ }}
+
+ {do_not_strip}
+
+ dependencies {{
+ for (bundle in bundles)
+ compile("$bundle") {{
+ transitive = true
+ }}
+ for (bundle in androidArs)
+ compile(bundle) {{
+ transitive = true
+ }}
+ for (bundle in compileOnlyAndroidArs)
+ compileOnly(bundle)
+ }}
+
+ android.libraryVariants.all {{ variant ->
+ def suffix = variant.buildType.name.capitalize()
+
+ def sourcesJarTask = project.tasks.create(name: "sourcesJar${{suffix}}", type: Jar) {{
+ classifier = 'sources'
+ from android.sourceSets.main.java.srcDirs
+ include '**/*.java'
+ eachFile {{ fcd ->
+ def segments = fcd.relativePath.segments
+ if (segments[0] == 'impl') {{
+ fcd.relativePath = new RelativePath(true, segments.drop(1))
+ }}
+ }}
+ includeEmptyDirs = false
+ }}
+
+ def manifestFile = android.sourceSets.main.manifest.srcFile
+ def manifestXml = new XmlParser().parse(manifestFile)
+
+ def packageName = manifestXml['@package']
+ def groupName = packageName.tokenize('.')[0..-2].join('.')
+
+ def androidNs = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android")
+ def packageVersion = manifestXml.attributes()[androidNs.versionName]
+
+ def writePomTask = project.tasks.create(name: "writePom${{suffix}}") {{
+ pom {{
+ project {{
+ groupId groupName
+ version packageVersion
+ packaging 'aar'
+ }}
+ }}.writeTo("$buildDir/${{rootProject.name}}$packageSuffix-pom.xml")
+ }}
+
+ tasks["bundle${{suffix}}Aar"].dependsOn sourcesJarTask
+ tasks["bundle${{suffix}}Aar"].dependsOn writePomTask
+ }}
+
+ android.libraryVariants.all {{ variant ->
+ def capitalizedVariantName = variant.name.capitalize()
+ def suffix = variant.buildType.name.capitalize()
+
+ def javadocTask = project.tasks.create(name: "generate${{capitalizedVariantName}}Javadoc", type: Javadoc) {{
+ group = "Javadoc"
+ description "Generates Javadoc for $capitalizedVariantName"
+
+ title = "Yandex documentation"
+
+ source = android.sourceSets.main.java.srcDirs
+ include "**/*/yandex/*/**"
+ // TODO: remove this when we support internal doc exclusion in IDL
+ // https://st.yandex-team.ru/MAPSMOBCORE-11364
+ exclude "**/internal/**"
+
+ ext.androidJar = "${{android.sdkDirectory.path}}/platforms/${{android.compileSdkVersion}}/android.jar"
+ classpath =
+ files(android.getBootClasspath().join(File.pathSeparator)) +
+ configurations.compile +
+ files(ext.androidJar) +
+ files(variant.javaCompile.outputs.files)
+
+ destinationDir = file("$buildDir/${{rootProject.name}}-javadoc/$capitalizedVariantName/")
+
+ options.doclet("ExcludeDoclet")
+ options.docletpath(
+ files(repositories.maven.url).getAsFileTree()
+ .matching{{include "**/exclude-doclet-1.0.0.jar"}}
+ .getSingleFile())
+
+ options.charSet = "UTF-8"
+ options.encoding = "UTF-8"
+
+ failOnError false
+
+ afterEvaluate {{
+ def dependencyTree = project.configurations.compile.getAsFileTree()
+ def aar_set = dependencyTree.matching{{include "**/*.aar"}}.getFiles()
+ def jar_tree = dependencyTree.matching{{include "**/*.jar"}}
+
+ aar_set.each{{ aar ->
+ def outputPath = "$buildDir/tmp/aarJar/${{aar.name.replace('.aar', '.jar')}}"
+ classpath += files(outputPath)
+
+ dependsOn task(name: "extract_${{aar.getAbsolutePath().replace(File.separatorChar, '_' as char)}}-${{capitalizedVariantName}}").doLast {{
+ extractClassesJar(aar, outputPath)
+ }}
+ }}
+ }}
+ }}
+
+ def packageJavadocTask = project.tasks.create(name: "package${{capitalizedVariantName}}Javadoc", type: Tar) {{
+ description "Makes an archive from Javadoc output"
+ from "${{buildDir}}/${{rootProject.name}}-javadoc/$capitalizedVariantName/"
+ archiveFileName = "${{rootProject.name}}-javadoc.tar.gz"
+ destinationDirectory = new File("${{buildDir}}")
+ dependsOn javadocTask
+ }}
+
+ {enable_javadoc}
+ }}
+
+}}
+
+private def extractClassesJar(aarPath, outputPath) {{
+ if (!aarPath.exists()) {{
+ throw new GradleException("AAR $aarPath not found")
+ }}
+
+ def zip = new ZipFile(aarPath)
+ zip.entries().each {{
+ if (it.name == "classes.jar") {{
+ def path = Paths.get(outputPath)
+ if (!Files.exists(path)) {{
+ Files.createDirectories(path.getParent())
+ Files.copy(zip.getInputStream(it), path)
+ }}
+ }}
+ }}
+ zip.close()
+}}
+
+"""
+
+
+def gen_build_script(args):
+
+ def wrap(items):
+ return ',\n '.join('"{}"'.format(x) for x in items)
+
+ bundles = []
+ bundles_dirs = set(args.flat_repos)
+ for bundle in args.bundles:
+ dir_name, base_name = os.path.split(bundle)
+ assert(len(dir_name) > 0 and len(base_name) > 0)
+ name, ext = os.path.splitext(base_name)
+ assert(len(name) > 0 and ext == '.aar')
+ bundles_dirs.add(dir_name)
+ bundles.append('com.yandex:{}@aar'.format(name))
+
+ if len(bundles_dirs) > 0:
+ flat_dirs_repo = FLAT_DIRS_REPO_TEMPLATE.format(dirs=wrap(bundles_dirs))
+ else:
+ flat_dirs_repo = ''
+
+ maven_repos = ''.join(MAVEN_REPO_TEMPLATE.format(repo=repo) for repo in args.maven_repos)
+
+ if args.keystore:
+ keystore = KEYSTORE_TEMLATE.format(keystore=args.keystore)
+ else:
+ keystore = ''
+
+ if args.generate_doc:
+ enable_javadoc = ENABLE_JAVADOC
+ else:
+ enable_javadoc = ''
+
+ if args.do_not_strip:
+ do_not_strip = DO_NOT_STRIP
+ else:
+ do_not_strip = ''
+
+ return AAR_TEMPLATE.format(
+ aars=wrap(args.aars),
+ compile_only_aars=wrap(args.compile_only_aars),
+ aidl_dirs=wrap(args.aidl_dirs),
+ assets_dirs=wrap(args.assets_dirs),
+ bundles=wrap(bundles),
+ do_not_strip=do_not_strip,
+ enable_javadoc=enable_javadoc,
+ flat_dirs_repo=flat_dirs_repo,
+ java_dirs=wrap(args.java_dirs),
+ jni_libs_dirs=wrap(args.jni_libs_dirs),
+ keystore=keystore,
+ manifest=args.manifest,
+ maven_repos=maven_repos,
+ proguard_rules=args.proguard_rules,
+ res_dirs=wrap(args.res_dirs),
+ )
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--aars', nargs='*', default=[])
+ parser.add_argument('--compile-only-aars', nargs='*', default=[])
+ parser.add_argument('--aidl-dirs', nargs='*', default=[])
+ parser.add_argument('--assets-dirs', nargs='*', default=[])
+ parser.add_argument('--bundle-name', nargs='?', default='default-bundle-name')
+ parser.add_argument('--bundles', nargs='*', default=[])
+ parser.add_argument('--do-not-strip', action='store_true')
+ parser.add_argument('--flat-repos', nargs='*', default=[])
+ parser.add_argument('--generate-doc', action='store_true')
+ parser.add_argument('--java-dirs', nargs='*', default=[])
+ parser.add_argument('--jni-libs-dirs', nargs='*', default=[])
+ parser.add_argument('--keystore', default=None)
+ parser.add_argument('--manifest', required=True)
+ parser.add_argument('--maven-repos', nargs='*', default=[])
+ parser.add_argument('--output-dir', required=True)
+ parser.add_argument('--peers', nargs='*', default=[])
+ parser.add_argument('--proguard-rules', nargs='?', default=None)
+ parser.add_argument('--res-dirs', nargs='*', default=[])
+ args = parser.parse_args()
+
+ if args.proguard_rules is None:
+ args.proguard_rules = os.path.join(args.output_dir, 'proguard-rules.txt')
+ with open(args.proguard_rules, 'w') as f:
+ pass
+
+ for index, jsrc in enumerate(filter(lambda x: x.endswith('.jsrc'), args.peers)):
+ jsrc_dir = os.path.join(args.output_dir, 'jsrc_{}'.format(str(index)))
+ os.makedirs(jsrc_dir)
+ with tarfile.open(jsrc, 'r') as tar:
+ tar.extractall(path=jsrc_dir)
+ args.java_dirs.append(jsrc_dir)
+
+ args.build_gradle = os.path.join(args.output_dir, 'build.gradle')
+ args.settings_gradle = os.path.join(args.output_dir, 'settings.gradle')
+ args.gradle_properties = os.path.join(args.output_dir, 'gradle.properties')
+
+ content = gen_build_script(args)
+ with open(args.build_gradle, 'w') as f:
+ f.write(content)
+
+ with open(args.gradle_properties, 'w') as f:
+ f.write('android.useAndroidX=true')
+
+ if args.bundle_name:
+ with open(args.settings_gradle, 'w') as f:
+ f.write('rootProject.name = "{}"'.format(args.bundle_name))
diff --git a/build/scripts/gen_java_codenav_entry.py b/build/scripts/gen_java_codenav_entry.py
new file mode 100644
index 0000000000..ff0a5c737d
--- /dev/null
+++ b/build/scripts/gen_java_codenav_entry.py
@@ -0,0 +1,57 @@
+import argparse
+import datetime
+import os
+import subprocess
+import sys
+import tarfile
+
+
+def extract_kindexes(kindexes):
+ for kindex in kindexes:
+ with tarfile.TarFile(kindex) as tf:
+ for fname in [i for i in tf.getnames() if i.endswith('.kzip')]:
+ tf.extract(fname)
+ yield fname
+
+
+def just_do_it(java, kythe, kythe_to_proto, out_name, binding_only, kindexes):
+ temp_out_name = out_name + '.temp'
+ kindex_inputs = list(extract_kindexes(kindexes))
+ open(temp_out_name, 'w').close()
+ start = datetime.datetime.now()
+ for kindex in kindex_inputs:
+ print >> sys.stderr, '[INFO] Processing:', kindex
+ indexer_start = datetime.datetime.now()
+ p = subprocess.Popen([java, '-jar', os.path.join(kythe, 'indexers/java_indexer.jar'), kindex], stdout=subprocess.PIPE)
+ indexer_out, _ = p.communicate()
+ print >> sys.stderr, '[INFO] Indexer execution time:', (datetime.datetime.now() - indexer_start).total_seconds(), 'seconds'
+ if p.returncode:
+ raise Exception('java_indexer failed with exit code {}'.format(p.returncode))
+ dedup_start = datetime.datetime.now()
+ p = subprocess.Popen([os.path.join(kythe, 'tools/dedup_stream')], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ dedup_out, _ = p.communicate(indexer_out)
+ print >> sys.stderr, '[INFO] Dedup execution time:', (datetime.datetime.now() - dedup_start).total_seconds(), 'seconds'
+ if p.returncode:
+ raise Exception('dedup_stream failed with exit code {}'.format(p.returncode))
+ entrystream_start = datetime.datetime.now()
+ p = subprocess.Popen([os.path.join(kythe, 'tools/entrystream'), '--write_json'], stdin=subprocess.PIPE, stdout=open(temp_out_name, 'a'))
+ p.communicate(dedup_out)
+ if p.returncode:
+ raise Exception('entrystream failed with exit code {}'.format(p.returncode))
+ print >> sys.stderr, '[INFO] Entrystream execution time:', (datetime.datetime.now() - entrystream_start).total_seconds(), 'seconds'
+ preprocess_start = datetime.datetime.now()
+ subprocess.check_call([kythe_to_proto, '--preprocess-entry', '--entries', temp_out_name, '--out', out_name] + (['--only-binding-data'] if binding_only else []))
+ print >> sys.stderr, '[INFO] Preprocessing execution time:', (datetime.datetime.now() - preprocess_start).total_seconds(), 'seconds'
+ print >> sys.stderr, '[INFO] Total execution time:', (datetime.datetime.now() - start).total_seconds(), 'seconds'
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--java", help="java path")
+ parser.add_argument("--kythe", help="kythe path")
+ parser.add_argument("--kythe-to-proto", help="kythe_to_proto tool path")
+ parser.add_argument("--out-name", help="entries json out name")
+ parser.add_argument("--binding-only", action="store_true", default=False, help="filter only binding data")
+ parser.add_argument("kindexes", nargs='*')
+ args = parser.parse_args()
+ just_do_it(args.java, args.kythe, args.kythe_to_proto, args.out_name, args.binding_only, args.kindexes)
diff --git a/build/scripts/gen_java_codenav_protobuf.py b/build/scripts/gen_java_codenav_protobuf.py
new file mode 100644
index 0000000000..aee8cfe6c3
--- /dev/null
+++ b/build/scripts/gen_java_codenav_protobuf.py
@@ -0,0 +1,22 @@
+import argparse
+import os
+
+
+def just_do_it(kythe_to_proto, entries, out_name, build_file, source_root):
+ with open(build_file) as f:
+ classpath = os.pathsep.join([line.strip() for line in f])
+ os.execv(
+ kythe_to_proto,
+ [kythe_to_proto, '--sources-rel-root', 'fake_arcadia_root', '--entries', entries, '--out', out_name, '--classpath', classpath, '--arcadia-root', source_root]
+ )
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--kythe-to-proto", help="kythe_to_proto tool path")
+ parser.add_argument("--entries", help="entries json path")
+ parser.add_argument("--out-name", help="protbuf out name")
+ parser.add_argument("--build-file", help="build file( containing classpath )")
+ parser.add_argument("--source-root", help="source root")
+ args = parser.parse_args()
+ just_do_it(args.kythe_to_proto, args.entries, args.out_name, args.build_file, args.source_root)
diff --git a/build/scripts/gen_join_srcs.py b/build/scripts/gen_join_srcs.py
new file mode 100644
index 0000000000..e0c2df161a
--- /dev/null
+++ b/build/scripts/gen_join_srcs.py
@@ -0,0 +1,16 @@
+import sys
+
+import process_command_files as pcf
+
+
+with open(sys.argv[1], 'w') as f:
+ f.write('#if defined(__GNUC__)\n')
+ f.write('#pragma GCC diagnostic ignored "-Wunknown-pragmas"\n')
+ f.write('#if defined(__clang__)\n')
+ f.write('#pragma GCC diagnostic ignored "-Wunknown-warning-option"\n')
+ f.write('#endif\n')
+ f.write('#pragma GCC diagnostic ignored "-Wsubobject-linkage"\n')
+ f.write('#endif\n\n')
+
+ for arg in pcf.iter_args(sys.argv[2:]):
+ f.write('#include "' + arg + '"\n')
diff --git a/build/scripts/gen_mx_table.py b/build/scripts/gen_mx_table.py
new file mode 100644
index 0000000000..187c21c539
--- /dev/null
+++ b/build/scripts/gen_mx_table.py
@@ -0,0 +1,75 @@
+import sys
+
+tmpl = """
+#include "yabs_mx_calc_table.h"
+
+#include <kernel/matrixnet/mn_sse.h>
+
+#include <library/cpp/archive/yarchive.h>
+
+#include <util/memory/blob.h>
+#include <util/generic/hash.h>
+#include <util/generic/ptr.h>
+#include <util/generic/singleton.h>
+
+using namespace NMatrixnet;
+
+extern "C" {
+ extern const unsigned char MxFormulas[];
+ extern const ui32 MxFormulasSize;
+}
+
+namespace {
+ struct TFml: public TBlob, public TMnSseInfo {
+ inline TFml(const TBlob& b)
+ : TBlob(b)
+ , TMnSseInfo(Data(), Size())
+ {
+ }
+ };
+
+ struct TFormulas: public THashMap<size_t, TAutoPtr<TFml>> {
+ inline TFormulas() {
+ TBlob b = TBlob::NoCopy(MxFormulas, MxFormulasSize);
+ TArchiveReader ar(b);
+ %s
+ }
+
+ inline const TMnSseInfo& at(size_t n) const noexcept {
+ return *find(n)->second;
+ }
+ };
+
+ %s
+
+ static func_descr_t yabs_funcs[] = {
+ %s
+ };
+}
+
+yabs_mx_calc_table_t yabs_mx_calc_table = {YABS_MX_CALC_VERSION, 10000, 0, yabs_funcs};
+"""
+
+if __name__ == '__main__':
+ init = []
+ body = []
+ defs = {}
+
+ for i in sys.argv[1:]:
+ name = i.replace('.', '_')
+ num = long(name.split('_')[1])
+
+ init.append('(*this)[%s] = new TFml(ar.ObjectBlobByKey("%s"));' % (num, '/' + i))
+
+ f1 = 'static void yabs_%s(size_t count, const float** args, double* res) {Singleton<TFormulas>()->at(%s).DoCalcRelevs(args, res, count);}' % (name, num)
+ f2 = 'static size_t yabs_%s_factor_count() {return Singleton<TFormulas>()->at(%s).MaxFactorIndex() + 1;}' % (name, num)
+
+ body.append(f1)
+ body.append(f2)
+
+ d1 = 'yabs_%s' % name
+ d2 = 'yabs_%s_factor_count' % name
+
+ defs[num] = '{%s, %s}' % (d1, d2)
+
+ print tmpl % ('\n'.join(init), '\n\n'.join(body), ',\n'.join((defs.get(i, '{nullptr, nullptr}') for i in range(0, 10000))))
diff --git a/build/scripts/gen_py3_reg.py b/build/scripts/gen_py3_reg.py
new file mode 100644
index 0000000000..149c094898
--- /dev/null
+++ b/build/scripts/gen_py3_reg.py
@@ -0,0 +1,34 @@
+import sys
+
+template = '''
+struct PyObject;
+extern "C" int PyImport_AppendInittab(const char* name, PyObject* (*initfunc)());
+extern "C" PyObject* {1}();
+
+namespace {
+ struct TRegistrar {
+ inline TRegistrar() {
+ // TODO Collect all modules and call PyImport_ExtendInittab once
+ PyImport_AppendInittab("{0}", {1});
+ }
+ } REG;
+}
+'''
+
+
+def mangle(name):
+ if '.' not in name:
+ return name
+ return ''.join('{}{}'.format(len(s), s) for s in name.split('.'))
+
+if __name__ == '__main__':
+ if len(sys.argv) != 3:
+ print >>sys.stderr, 'Usage: <path/to/gen_py_reg.py> <python_module_name> <output_file>'
+ print >>sys.stderr, 'Passed: ' + ' '.join(sys.argv)
+ sys.exit(1)
+
+ with open(sys.argv[2], 'w') as f:
+ modname = sys.argv[1]
+ initname = 'PyInit_' + mangle(modname)
+ code = template.replace('{0}', modname).replace('{1}', initname)
+ f.write(code)
diff --git a/build/scripts/gen_py_protos.py b/build/scripts/gen_py_protos.py
new file mode 100644
index 0000000000..08397472f9
--- /dev/null
+++ b/build/scripts/gen_py_protos.py
@@ -0,0 +1,67 @@
+import os
+from os import path
+import shutil
+import subprocess
+import sys
+import tempfile
+import argparse
+import re
+
+
+OUT_DIR_ARG = '--python_out='
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--suffixes", nargs="*", default=[])
+ parser.add_argument("protoc_args", nargs=argparse.REMAINDER)
+ script_args = parser.parse_args()
+
+ args = script_args.protoc_args
+
+ if args[0] == "--":
+ args = args[1:]
+
+ out_dir_orig = None
+ out_dir_temp = None
+ plugin_out_dirs_orig = {}
+ for i in range(len(args)):
+ if args[i].startswith(OUT_DIR_ARG):
+ assert not out_dir_orig, 'Duplicate "{0}" param'.format(OUT_DIR_ARG)
+ out_dir_orig = args[i][len(OUT_DIR_ARG):]
+ out_dir_temp = tempfile.mkdtemp(dir=out_dir_orig)
+ args[i] = OUT_DIR_ARG + out_dir_temp
+ continue
+
+ match = re.match(r"^(--(\w+)_out=).*", args[i])
+ if match:
+ plugin_out_dir_arg = match.group(1)
+ plugin = match.group(2)
+ assert plugin not in plugin_out_dirs_orig, 'Duplicate "{0}" param'.format(plugin_out_dir_arg)
+ plugin_out_dirs_orig[plugin] = args[i][len(plugin_out_dir_arg):]
+ assert plugin_out_dirs_orig[plugin] == out_dir_orig, 'Params "{0}" and "{1}" expected to have the same value'.format(OUT_DIR_ARG, plugin_out_dir_arg)
+ args[i] = plugin_out_dir_arg + out_dir_temp
+
+ assert out_dir_temp, 'Param "{0}" not found'.format(OUT_DIR_ARG)
+
+ retcode = subprocess.call(args)
+ assert not retcode, 'Protoc failed for command {}'.format(' '.join(args))
+
+ for root_temp, dirs, files in os.walk(out_dir_temp):
+ sub_dir = path.relpath(root_temp, out_dir_temp)
+ root_orig = path.join(out_dir_orig, sub_dir)
+ for d in dirs:
+ d_orig = path.join(root_orig, d)
+ if not path.exists(d_orig):
+ os.mkdir(d_orig)
+ for f in files:
+ f_orig = f
+ for suf in script_args.suffixes:
+ if f.endswith(suf):
+ f_orig = f[:-len(suf)] + "__int__" + suf
+ break
+ os.rename(path.join(root_temp, f), path.join(root_orig, f_orig))
+ shutil.rmtree(out_dir_temp)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/gen_py_reg.py b/build/scripts/gen_py_reg.py
new file mode 100644
index 0000000000..1560135ae8
--- /dev/null
+++ b/build/scripts/gen_py_reg.py
@@ -0,0 +1,32 @@
+import sys
+
+template = '''
+extern "C" void PyImport_AppendInittab(const char* name, void (*fn)(void));
+extern "C" void {1}();
+
+namespace {
+ struct TRegistrar {
+ inline TRegistrar() {
+ PyImport_AppendInittab("{0}", {1});
+ }
+ } REG;
+}
+'''
+
+
+def mangle(name):
+ if '.' not in name:
+ return name
+ return ''.join('{}{}'.format(len(s), s) for s in name.split('.'))
+
+if __name__ == '__main__':
+ if len(sys.argv) != 3:
+ print >>sys.stderr, 'Usage: <path/to/gen_py_reg.py> <python_module_name> <output_file>'
+ print >>sys.stderr, 'Passed: ' + ' '.join(sys.argv)
+ sys.exit(1)
+
+ with open(sys.argv[2], 'w') as f:
+ modname = sys.argv[1]
+ initname = 'init' + mangle(modname)
+ code = template.replace('{0}', modname).replace('{1}', initname)
+ f.write(code)
diff --git a/build/scripts/gen_swiftc_output_map.py b/build/scripts/gen_swiftc_output_map.py
new file mode 100644
index 0000000000..01ce85f256
--- /dev/null
+++ b/build/scripts/gen_swiftc_output_map.py
@@ -0,0 +1,15 @@
+import json
+import sys
+
+
+def just_do_it(args):
+ source_root, build_root, out_file, srcs = args[0], args[1], args[2], args[3:]
+ assert(len(srcs))
+ result_obj = {}
+ for src in srcs:
+ result_obj[src] = {'object': src.replace(source_root, build_root) + '.o'}
+ with open(out_file, 'w') as of:
+ of.write(json.dumps(result_obj))
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/gen_tasklet_reg.py b/build/scripts/gen_tasklet_reg.py
new file mode 100644
index 0000000000..5b747c2eca
--- /dev/null
+++ b/build/scripts/gen_tasklet_reg.py
@@ -0,0 +1,51 @@
+import argparse
+
+TEMPLATE = '''\
+{includes}\
+#include <tasklet/runtime/lib/{language}_wrapper.h>
+#include <tasklet/runtime/lib/registry.h>
+
+static const NTasklet::TRegHelper REG(
+ "{name}",
+ new NTasklet::{wrapper}
+);
+'''
+
+WRAPPER = {
+ 'cpp': 'TCppWrapper<{impl}>()',
+ 'js': 'TJsWrapper("{impl}")',
+ 'go': 'TGoWrapper("{impl}")',
+ 'py': 'TPythonWrapper("{impl}")',
+ 'java': 'TJavaWrapper("{impl}", "{py_wrapper}")',
+}
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('name')
+ parser.add_argument('output')
+ parser.add_argument('-l', '--lang', choices=WRAPPER, required=True)
+ parser.add_argument('-i', '--impl', required=True)
+ parser.add_argument('-w', '--wrapper', required=False)
+ parser.add_argument('includes', nargs='*')
+
+ return parser.parse_args()
+
+
+if __name__ == '__main__':
+ args = parse_args()
+
+ includes = ''.join(
+ '#include <{}>\n'.format(include)
+ for include in args.includes
+ )
+
+ code = TEMPLATE.format(
+ includes=includes,
+ language=args.lang,
+ name=args.name,
+ wrapper=WRAPPER[args.lang].format(impl=args.impl, py_wrapper=args.wrapper),
+ )
+
+ with open(args.output, 'w') as f:
+ f.write(code)
diff --git a/build/scripts/gen_test_apk_gradle_script.py b/build/scripts/gen_test_apk_gradle_script.py
new file mode 100644
index 0000000000..16f59531a2
--- /dev/null
+++ b/build/scripts/gen_test_apk_gradle_script.py
@@ -0,0 +1,193 @@
+import argparse
+import os
+import tarfile
+import xml.etree.ElementTree as etree
+
+FLAT_DIRS_REPO_TEMPLATE='flatDir {{ dirs {dirs} }}\n'
+MAVEN_REPO_TEMPLATE='maven {{ url "{repo}" }}\n'
+KEYSTORE_TEMLATE='signingConfigs {{ debug {{ storeFile file("{keystore}") }} }}\n'
+
+TEST_APK_TEMPLATE = """\
+ext.jniLibsDirs = [
+ {jni_libs_dirs}
+]
+ext.resDirs = [
+ {res_dirs}
+]
+ext.javaDirs = [
+ {java_dirs}
+]
+ext.bundles = [
+ {bundles}
+]
+
+buildscript {{
+// repositories {{
+// jcenter()
+// }}
+
+ repositories {{
+ {maven_repos}
+ }}
+
+ dependencies {{
+ classpath 'com.android.tools.build:gradle:3.5.3'
+ }}
+}}
+
+apply plugin: 'com.android.application'
+
+repositories {{
+// maven {{
+// url "http://maven.google.com/"
+// }}
+// maven {{
+// url "http://artifactory.yandex.net/artifactory/public/"
+// }}
+// flatDir {{
+// dirs System.env.PKG_ROOT + '/bundle'
+// }}
+
+ {flat_dirs_repo}
+
+ {maven_repos}
+}}
+
+dependencies {{
+ for (bundle in bundles) {{
+ compile("$bundle")
+ }}
+}}
+
+android {{
+ {keystore}
+
+ compileSdkVersion 30
+ buildToolsVersion "30.0.3"
+
+
+ defaultConfig {{
+ minSdkVersion 18
+ targetSdkVersion 30
+ applicationId "{app_id}"
+ }}
+
+ sourceSets {{
+ main {{
+ manifest.srcFile 'Manifest.xml'
+ jniLibs.srcDirs = jniLibsDirs
+ res.srcDirs = resDirs
+ java.srcDirs = javaDirs
+ }}
+ }}
+
+ applicationVariants.all {{ variant ->
+ variant.outputs.each {{ output ->
+ def fileName = "$projectDir/output/{app_id}.apk"
+ output.outputFileName = new File(output.outputFile.parent, fileName).getName()
+ }}
+ }}
+
+ dependencies {{
+ implementation 'com.google.android.gms:play-services-location:16.0.0'
+ implementation 'com.google.android.gms:play-services-gcm:16.0.0'
+ implementation 'com.evernote:android-job:1.2.6'
+ implementation 'androidx.annotation:annotation:1.1.0'
+ implementation 'androidx.core:core:1.1.0'
+ }}
+}}
+"""
+
+
+def create_native_properties(output_dir, library_name):
+ native_properties_file = os.path.join(output_dir, 'native_library_name.xml')
+ resources = etree.Element('resources')
+ name = etree.SubElement(resources, 'item', dict(name='native_library_name', type='string'))
+ name.text = library_name
+ etree.ElementTree(resources).write(native_properties_file, xml_declaration=True, encoding='utf-8')
+
+
+def gen_build_script(args):
+ def wrap(items):
+ return ',\n '.join('"{}"'.format(x) for x in items)
+
+ bundles = []
+ bundles_dirs = set(args.flat_repos)
+ for bundle in args.bundles:
+ dir_name, base_name = os.path.split(bundle)
+ assert(len(dir_name) > 0 and len(base_name) > 0)
+ name, ext = os.path.splitext(base_name)
+ assert(len(name) > 0 and ext == '.aar')
+ bundles_dirs.add(dir_name)
+ bundles.append('com.yandex:{}@aar'.format(name))
+
+ if len(bundles_dirs) > 0:
+ flat_dirs_repo = FLAT_DIRS_REPO_TEMPLATE.format(dirs=wrap(bundles_dirs))
+ else:
+ flat_dirs_repo = ''
+
+ maven_repos = ''.join(MAVEN_REPO_TEMPLATE.format(repo=repo) for repo in args.maven_repos)
+
+ if args.keystore:
+ keystore = KEYSTORE_TEMLATE.format(keystore=args.keystore)
+ else:
+ keystore = ''
+
+ return TEST_APK_TEMPLATE.format(
+ app_id=args.app_id,
+ jni_libs_dirs=wrap(args.jni_libs_dirs),
+ res_dirs=wrap(args.res_dirs),
+ java_dirs=wrap(args.java_dirs),
+ maven_repos=maven_repos,
+ bundles=wrap(bundles),
+ flat_dirs_repo=flat_dirs_repo,
+ keystore=keystore,
+ )
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--aars', nargs='*', default=[])
+ parser.add_argument('--app-id', required=True)
+ parser.add_argument('--assets-dirs', nargs='*', default=[])
+ parser.add_argument('--bundles', nargs='*', default=[])
+ parser.add_argument('--bundle-name', nargs='?', default=None)
+ parser.add_argument('--java-dirs', nargs='*', default=[])
+ parser.add_argument('--jni-libs-dirs', nargs='*', default=[])
+ parser.add_argument('--library-name', required=True)
+ parser.add_argument('--manifest', required=True)
+ parser.add_argument('--flat-repos', nargs='*', default=[])
+ parser.add_argument('--maven-repos', nargs='*', default=[])
+ parser.add_argument('--output-dir', required=True)
+ parser.add_argument('--peers', nargs='*', default=[])
+ parser.add_argument('--keystore', default=None)
+ parser.add_argument('--res-dirs', nargs='*', default=[])
+ args = parser.parse_args()
+
+ for index, jsrc in enumerate(filter(lambda x: x.endswith('.jsrc'), args.peers)):
+ jsrc_dir = os.path.join(args.output_dir, 'jsrc_{}'.format(str(index)))
+ os.makedirs(jsrc_dir)
+ with tarfile.open(jsrc, 'r') as tar:
+ tar.extractall(path=jsrc_dir)
+ args.java_dirs.append(jsrc_dir)
+
+ args.build_gradle = os.path.join(args.output_dir, 'build.gradle')
+ args.settings_gradle = os.path.join(args.output_dir, 'settings.gradle')
+ args.gradle_properties = os.path.join(args.output_dir, 'gradle.properties')
+
+ content = gen_build_script(args)
+ with open(args.build_gradle, 'w') as f:
+ f.write(content)
+
+ with open(args.gradle_properties, 'w') as f:
+ f.write('''android.enableJetifier=true
+ android.useAndroidX=true
+ org.gradle.jvmargs=-Xmx8192m -XX:MaxPermSize=512m''')
+
+ if args.bundle_name:
+ with open(args.settings_gradle, 'w') as f:
+ f.write('rootProject.name = "{}"'.format(args.bundle_name))
+
+ values_dir = os.path.join(args.output_dir, 'res', 'values')
+ os.makedirs(values_dir)
+ create_native_properties(values_dir, args.library_name)
diff --git a/build/scripts/gen_ub.py b/build/scripts/gen_ub.py
new file mode 100644
index 0000000000..ad79cda926
--- /dev/null
+++ b/build/scripts/gen_ub.py
@@ -0,0 +1,86 @@
+import argparse
+import os
+import tarfile
+import contextlib
+import hashlib
+import base64
+import io
+
+
+stub = """#!/usr/bin/env python
+
+info = {info}
+data = "{data}"
+
+import platform
+import os
+import sys
+import tarfile
+import contextlib
+import io
+import base64
+
+
+def current_platform():
+ arch = platform.machine().upper()
+
+ if arch == 'AMD64':
+ arch = 'X86_64'
+
+ platf = platform.system().upper()
+
+ if platf.startswith('WIN'):
+ platf = 'WIN'
+
+ return (platf + '-' + arch).lower()
+
+
+def extract_file(fname):
+ with contextlib.closing(tarfile.open(fileobj=io.BytesIO(base64.b64decode(data)))) as f:
+ return f.extractfile(fname).read()
+
+
+fname = info[current_platform()]
+my_path = os.path.realpath(os.path.abspath(__file__))
+tmp_path = my_path + '.tmp'
+
+with open(tmp_path, 'wb') as f:
+ f.write(extract_file(fname))
+
+os.rename(tmp_path, my_path)
+os.chmod(my_path, 0775)
+os.execv(sys.argv[0], sys.argv)
+"""
+
+
+def gen_ub(output, data):
+ info = {}
+ binary = io.BytesIO()
+
+ with contextlib.closing(tarfile.open(mode='w:bz2', fileobj=binary, dereference=True)) as f:
+ for pl, path in data:
+ fname = os.path.basename(path)
+ pl = pl.split('-')
+ pl = pl[1] + '-' + pl[2]
+ info[pl] = fname
+ f.add(path, arcname=fname)
+
+ binary = binary.getvalue()
+ info['md5'] = hashlib.md5(binary).hexdigest()
+
+ with open(output, 'w') as f:
+ f.write(stub.format(info=info, data=base64.b64encode(binary)))
+
+ os.chmod(output, 0775)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument('--path', action='append')
+ parser.add_argument('--platform', action='append')
+ parser.add_argument('--output', action='store')
+
+ args = parser.parse_args()
+
+ gen_ub(args.output, zip(args.platform, args.path))
diff --git a/build/scripts/gen_yql_python_udf.py b/build/scripts/gen_yql_python_udf.py
new file mode 100644
index 0000000000..13b5898117
--- /dev/null
+++ b/build/scripts/gen_yql_python_udf.py
@@ -0,0 +1,55 @@
+import sys
+
+TEMPLATE="""
+#include <yql/udfs/common/python/python_udf/python_udf.h>
+
+#include <ydb/library/yql/public/udf/udf_registrator.h>
+
+#if @WITH_LIBRA@
+#include <yql/udfs/quality/libra/module/module.h>
+#endif
+
+using namespace NKikimr::NUdf;
+
+#ifdef BUILD_UDF
+
+#if @WITH_LIBRA@
+LIBRA_MODULE(TLibraModule, "Libra@MODULE_NAME@");
+#endif
+
+extern "C" UDF_API void Register(IRegistrator& registrator, ui32 flags) {
+ RegisterYqlPythonUdf(registrator, flags, TStringBuf("@MODULE_NAME@"), TStringBuf("@PACKAGE_NAME@"), EPythonFlavor::@FLAVOR@);
+#if @WITH_LIBRA@
+ RegisterHelper<TLibraModule>(registrator);
+#endif
+}
+
+extern "C" UDF_API ui32 AbiVersion() {
+ return CurrentAbiVersion();
+}
+
+extern "C" UDF_API void SetBackTraceCallback(TBackTraceCallback callback) {
+ SetBackTraceCallbackImpl(callback);
+}
+
+#endif
+"""
+
+
+def main():
+ assert len(sys.argv) == 6
+ flavor, module_name, package_name, path, libra_flag = sys.argv[1:]
+ with open(path, 'w') as f:
+ f.write(
+ TEMPLATE
+ .strip()
+ .replace('@MODULE_NAME@', module_name)
+ .replace('@PACKAGE_NAME@', package_name)
+ .replace('@FLAVOR@', flavor)
+ .replace('@WITH_LIBRA@', libra_flag)
+ )
+ f.write('\n')
+
+
+if __name__ == "__main__":
+ main()
diff --git a/build/scripts/generate_mf.py b/build/scripts/generate_mf.py
new file mode 100644
index 0000000000..a44a969980
--- /dev/null
+++ b/build/scripts/generate_mf.py
@@ -0,0 +1,113 @@
+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
+
+
+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 = [], [], [], []
+ 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')
+ parser.add_option('-c', '--credits-output')
+ 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():
+ lics, peers, credits, options = parse_args()
+
+ meta = {
+ 'module_name': options.module_name,
+ 'path': os.path.dirname(options.output),
+ 'licenses': lics,
+ 'dependencies': [],
+ 'license_texts': ''
+ }
+
+ 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:
+ with open(process_quotes(texts_file)) as f:
+ union_texts.append(f.read())
+ meta['license_texts'] = '\n\n'.join(union_texts)
+
+ if options.credits_output:
+ final_credits = []
+ if meta['license_texts']:
+ final_credits.append(generate_header(meta) + '\n' + meta['license_texts'])
+ for peer in peers:
+ candidate = os.path.join(build_root, peer + '.mf')
+ with open(candidate) as src:
+ data = json.loads(src.read())
+ texts = data.get('license_texts')
+ if texts:
+ candidate_text = generate_header(data) + '\n' + texts
+ if isinstance(candidate_text, unicode):
+ candidate_text = candidate_text.encode('utf-8')
+ final_credits.append(candidate_text)
+
+ with io.open(options.credits_output, 'w', encoding='utf-8') as f:
+ data = '\n\n'.join(final_credits)
+ if isinstance(data, str):
+ 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__':
+ try:
+ generate_mf()
+ except Exception as e:
+ sys.stderr.write(str(e) + '\n')
+ sys.exit(1)
diff --git a/build/scripts/generate_pom.py b/build/scripts/generate_pom.py
new file mode 100644
index 0000000000..200caebc0b
--- /dev/null
+++ b/build/scripts/generate_pom.py
@@ -0,0 +1,275 @@
+import sys
+import xml.etree.ElementTree as et
+import argparse
+import os
+import json
+import base64
+import re
+
+
+DEFAULT_YANDEX_GROUP_ID = 'ru.yandex'
+DEFAULT_NAMESPACE = 'http://maven.apache.org/POM/4.0.0'
+XSI_NAMESPACE = 'http://www.w3.org/2001/XMLSchema-instance'
+SCHEMA_LOCATION = 'http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd'
+MODEL_VERSION = '4.0.0'
+
+MAVEN_PLUGIN_GROUP_ID = 'org.apache.maven.plugins'
+MAVEN_PLUGIN_ARTIFACT_ID = 'maven-compiler-plugin'
+MAVEN_PLUGIN_VERSION = '3.3'
+JAVA_LANGUAGE_LEVEL = '1.8'
+
+MAVEN_BUILD_HELPER_GROUP_ID = 'org.codehaus.mojo'
+MAVEN_BUILD_HELPER_ARTIFACT_ID = 'build-helper-maven-plugin'
+MAVEN_BUILD_HELPER_VERSION = '1.9.1'
+
+MAVEN_EXEC_GROUP_ID = 'org.codehaus.mojo'
+MAVEN_EXEC_ARTIFACT_ID = 'exec-maven-plugin'
+MAVEN_EXEC_VERSION = '1.5.0'
+
+MAVEN_SUREFIRE_GROUP_ID = 'org.apache.maven.plugins'
+MAVEN_SUREFIRE_ARTIFACT_ID = 'maven-surefire-plugin'
+MAVEN_SUREFIRE_VERSION = '2.12.2'
+
+
+def target_from_contrib(target_path):
+ return target_path.startswith('contrib')
+
+
+def split_artifacts(s):
+ m = re.match('^([^:]*:[^:]*:[^:]*:[^:]*)(.*)$', s)
+ if not m or not m.groups():
+ return []
+ if not m.groups()[1].startswith('::'):
+ return [m.groups()[0]]
+ return [m.groups()[0]] + m.groups()[1].split('::')[1:]
+
+
+def build_pom_and_export_to_maven(**kwargs):
+ target_path = kwargs.get('target_path')
+ target = kwargs.get('target')
+ pom_path = kwargs.get('pom_path')
+ source_dirs = kwargs.get('source_dirs')
+ output_dir = kwargs.get('output_dir')
+ final_name = kwargs.get('final_name')
+ packaging = kwargs.get('packaging')
+ target_dependencies = kwargs.get('target_dependencies')
+ test_target_dependencies = kwargs.get('test_target_dependencies')
+ test_target_dependencies_exclude = kwargs.get('test_target_dependencies_exclude')
+ modules_path = kwargs.get('modules_path')
+ prop_vars = kwargs.get('properties')
+ external_jars = kwargs.get('external_jars')
+ resources = kwargs.get('resources')
+ run_java_programs = [json.loads(base64.b64decode(i)) for i in kwargs.get('run_java_programs')]
+ test_source_dirs = kwargs.get('test_source_dirs')
+ test_resource_dirs = kwargs.get('test_resource_dirs')
+
+ modules = []
+
+ def _indent(elem, level=0):
+ ind = "\n" + level * " "
+ if len(elem):
+ if not elem.text or not elem.text.strip():
+ elem.text = ind + " "
+ if not elem.tail or not elem.tail.strip():
+ elem.tail = ind
+ for elem in elem:
+ _indent(elem, level + 1)
+ if not elem.tail or not elem.tail.strip():
+ elem.tail = ind
+ else:
+ if level and (not elem.tail or not elem.tail.strip()):
+ elem.tail = ind
+
+ project = et.Element(
+ '{}{}{}project'.format('{', DEFAULT_NAMESPACE, '}'),
+ attrib={'{}{}{}schemaLocation'.format('{', XSI_NAMESPACE, '}'): SCHEMA_LOCATION}
+ )
+
+ group_id, artifact_id, version = target.split(':')
+
+ et.SubElement(project, 'modelVersion').text = MODEL_VERSION
+ et.SubElement(project, 'groupId').text = group_id
+ et.SubElement(project, 'artifactId').text = artifact_id
+ et.SubElement(project, 'version').text = version
+ et.SubElement(project, 'packaging').text = packaging
+
+ properties = et.SubElement(project, 'properties')
+ et.SubElement(properties, 'project.build.sourceEncoding').text = 'UTF-8'
+
+ if prop_vars:
+ for property, value in json.loads(base64.b64decode(prop_vars)).items():
+ et.SubElement(properties, property).text = value
+
+ if modules_path:
+ with open(modules_path) as f:
+ modules = [i.strip() for i in f if i.strip()]
+
+ if modules:
+ modules_el = et.SubElement(project, 'modules')
+ for module in modules:
+ et.SubElement(modules_el, 'module').text = module
+
+ build = et.SubElement(project, 'build')
+ if source_dirs:
+ et.SubElement(build, 'sourceDirectory').text = source_dirs[0]
+ source_dirs = source_dirs[1:]
+ if test_source_dirs:
+ et.SubElement(build, 'testSourceDirectory').text = test_source_dirs[0]
+ test_source_dirs = test_source_dirs[1:]
+ if output_dir:
+ et.SubElement(build, 'outputDirectory').text = output_dir
+ if final_name:
+ et.SubElement(build, 'finalName').text = final_name
+ if resources:
+ resource_element = et.SubElement(et.SubElement(build, 'resources'), 'resource')
+ et.SubElement(resource_element, 'directory').text = '${basedir}'
+ includes = et.SubElement(resource_element, 'includes')
+ for resource in resources:
+ et.SubElement(includes, 'include').text = resource
+ if test_resource_dirs:
+ test_resource_element = et.SubElement(build, 'testResources')
+ for test_resource_dir in test_resource_dirs:
+ et.SubElement(et.SubElement(test_resource_element, 'testResource'), 'directory').text = '${basedir}' + (('/' + test_resource_dir) if test_resource_dir != '.' else '')
+
+ plugins = et.SubElement(build, 'plugins')
+
+ if packaging != 'pom':
+ maven_plugin = et.SubElement(plugins, 'plugin')
+ et.SubElement(maven_plugin, 'groupId').text = MAVEN_PLUGIN_GROUP_ID
+ et.SubElement(maven_plugin, 'artifactId').text = MAVEN_PLUGIN_ARTIFACT_ID
+ et.SubElement(maven_plugin, 'version').text = MAVEN_PLUGIN_VERSION
+ configuration = et.SubElement(maven_plugin, 'configuration')
+ et.SubElement(configuration, 'source').text = JAVA_LANGUAGE_LEVEL
+ et.SubElement(configuration, 'target').text = JAVA_LANGUAGE_LEVEL
+
+ if source_dirs or external_jars or test_source_dirs:
+ build_helper_plugin = et.SubElement(plugins, 'plugin')
+ et.SubElement(build_helper_plugin, 'groupId').text = MAVEN_BUILD_HELPER_GROUP_ID
+ et.SubElement(build_helper_plugin, 'artifactId').text = MAVEN_BUILD_HELPER_ARTIFACT_ID
+ et.SubElement(build_helper_plugin, 'version').text = MAVEN_BUILD_HELPER_VERSION
+ executions = et.SubElement(build_helper_plugin, 'executions')
+ if source_dirs:
+ execution = et.SubElement(executions, 'execution')
+ et.SubElement(execution, 'id').text = 'add-source'
+ et.SubElement(execution, 'phase').text = 'generate-sources'
+ et.SubElement(et.SubElement(execution, 'goals'), 'goal').text = 'add-source'
+ sources = et.SubElement(et.SubElement(execution, 'configuration'), 'sources')
+ for source_dir in source_dirs:
+ et.SubElement(sources, 'source').text = source_dir
+ if external_jars:
+ execution = et.SubElement(executions, 'execution')
+ et.SubElement(execution, 'id').text = 'attach-artifacts'
+ et.SubElement(execution, 'phase').text = 'generate-sources'
+ et.SubElement(et.SubElement(execution, 'goals'), 'goal').text = 'attach-artifact'
+ artifacts = et.SubElement(et.SubElement(execution, 'configuration'), 'artifacts')
+ for external_jar in external_jars:
+ external_artifact = et.SubElement(artifacts, 'artifact')
+ et.SubElement(external_artifact, 'file').text = '${basedir}/' + external_jar
+ et.SubElement(external_artifact, 'type').text = 'jar'
+ if test_source_dirs:
+ execution = et.SubElement(executions, 'execution')
+ et.SubElement(execution, 'id').text = 'add-test-source'
+ et.SubElement(execution, 'phase').text = 'generate-test-sources'
+ et.SubElement(et.SubElement(execution, 'goals'), 'goal').text = 'add-test-source'
+ sources = et.SubElement(et.SubElement(execution, 'configuration'), 'sources')
+ for source_dir in source_dirs:
+ et.SubElement(sources, 'source').text = source_dir
+
+ if run_java_programs:
+ exec_plugin = et.SubElement(plugins, 'plugin')
+ et.SubElement(exec_plugin, 'groupId').text = MAVEN_EXEC_GROUP_ID
+ et.SubElement(exec_plugin, 'artifactId').text = MAVEN_EXEC_ARTIFACT_ID
+ et.SubElement(exec_plugin, 'version').text = MAVEN_EXEC_VERSION
+ jp_dependencies = et.SubElement(exec_plugin, 'dependencies')
+ executions = et.SubElement(exec_plugin, 'executions')
+ for java_program in run_java_programs:
+ execution = et.SubElement(executions, 'execution')
+ et.SubElement(execution, 'phase').text = 'generate-sources'
+ et.SubElement(et.SubElement(execution, 'goals'), 'goal').text = 'java'
+ jp_configuration = et.SubElement(execution, 'configuration')
+ main_cls, args = None, []
+ for word in java_program['cmd']:
+ if not main_cls and not word.startswith('-'):
+ main_cls = word
+ else:
+ args.append(word)
+ et.SubElement(jp_configuration, 'mainClass').text = main_cls
+ et.SubElement(jp_configuration, 'includePluginDependencies').text = 'true'
+ et.SubElement(jp_configuration, 'includeProjectDependencies').text = 'false'
+ if args:
+ jp_arguments = et.SubElement(jp_configuration, 'arguments')
+ for arg in args:
+ et.SubElement(jp_arguments, 'argument').text = arg
+ if java_program['deps']:
+ for jp_dep in java_program['deps']:
+ jp_dependency = et.SubElement(jp_dependencies, 'dependency')
+ jp_g, jp_a, jp_v = jp_dep.split(':')
+ et.SubElement(jp_dependency, 'groupId').text = jp_g
+ et.SubElement(jp_dependency, 'artifactId').text = jp_a
+ et.SubElement(jp_dependency, 'version').text = jp_v
+ et.SubElement(jp_dependency, 'type').text = 'jar'
+
+ if target_dependencies + test_target_dependencies:
+ dependencies = et.SubElement(project, 'dependencies')
+ for target_dependency in target_dependencies + test_target_dependencies:
+ dependency = et.SubElement(dependencies, 'dependency')
+ dependency_info = split_artifacts(target_dependency)
+
+ group_id, artifact_id, version, classifier = dependency_info[0].split(':')
+
+ et.SubElement(dependency, 'groupId').text = group_id
+ et.SubElement(dependency, 'artifactId').text = artifact_id
+ et.SubElement(dependency, 'version').text = version
+ if classifier:
+ et.SubElement(dependency, 'classifier').text = classifier
+ if target_dependency in test_target_dependencies:
+ et.SubElement(dependency, 'scope').text = 'test'
+
+ if len(dependency_info) > 1:
+ exclusions = et.SubElement(dependency, 'exclusions')
+ for exclude in dependency_info[1:]:
+ group_id, artifact_id = exclude.split(':')
+ exclusion_el = et.SubElement(exclusions, 'exclusion')
+ et.SubElement(exclusion_el, 'groupId').text = group_id
+ et.SubElement(exclusion_el, 'artifactId').text = artifact_id
+
+ if test_target_dependencies_exclude:
+ surefire_plugin = et.SubElement(plugins, 'plugin')
+ et.SubElement(surefire_plugin, 'groupId').text = MAVEN_SUREFIRE_GROUP_ID
+ et.SubElement(surefire_plugin, 'artifactId').text = MAVEN_SUREFIRE_ARTIFACT_ID
+ et.SubElement(surefire_plugin, 'version').text = MAVEN_SUREFIRE_VERSION
+ classpath_excludes = et.SubElement(et.SubElement(surefire_plugin, 'configuration'), 'classpathDependencyExcludes')
+ for classpath_exclude in test_target_dependencies_exclude:
+ et.SubElement(classpath_excludes, 'classpathDependencyExclude').text = classpath_exclude
+
+ et.register_namespace('', DEFAULT_NAMESPACE)
+ et.register_namespace('xsi', XSI_NAMESPACE)
+
+ _indent(project)
+
+ et.ElementTree(project).write(pom_path)
+ sys.stderr.write("[MAVEN EXPORT] Generated {} file for target {}\n".format(os.path.basename(pom_path), target_path))
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--target-path', action='store', default='')
+ parser.add_argument('--target', action='store')
+ parser.add_argument('--pom-path', action='store')
+ parser.add_argument('--source-dirs', action='append', default=[])
+ parser.add_argument('--external-jars', action='append', default=[])
+ parser.add_argument('--resources', action='append', default=[])
+ parser.add_argument('--run-java-programs', action='append', default=[])
+ parser.add_argument('--output-dir')
+ parser.add_argument('--final-name')
+ parser.add_argument('--packaging', default='jar')
+ parser.add_argument('--target-dependencies', action='append', default=[])
+ parser.add_argument('--test-target-dependencies', action='append', default=[])
+ parser.add_argument('--test-target-dependencies-exclude', action='append', default=[])
+ parser.add_argument('--modules-path', action='store')
+ parser.add_argument('--properties')
+ parser.add_argument('--test-source-dirs', action='append', default=[])
+ parser.add_argument('--test-resource-dirs', action='append', default=[])
+ args = parser.parse_args()
+
+ build_pom_and_export_to_maven(**vars(args))
diff --git a/build/scripts/go_fake_include/go_asm.h b/build/scripts/go_fake_include/go_asm.h
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build/scripts/go_fake_include/go_asm.h
diff --git a/build/scripts/go_proto_wrapper.py b/build/scripts/go_proto_wrapper.py
new file mode 100644
index 0000000000..065120b6eb
--- /dev/null
+++ b/build/scripts/go_proto_wrapper.py
@@ -0,0 +1,82 @@
+from __future__ import absolute_import
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tempfile
+from six.moves import range
+
+
+OUT_DIR_FLAG_PATTERN = re.compile(r'^(--go(([-_]\w+))*_out=)')
+
+
+def move_tree(src_root, dst_root):
+ for root, _, files in os.walk(src_root):
+ rel_dir = os.path.relpath(root, src_root)
+ dst_dir = os.path.join(dst_root, rel_dir)
+ if not os.path.exists(dst_dir):
+ os.mkdir(dst_dir)
+ for file in files:
+ os.rename(os.path.join(root, file), os.path.join(dst_dir, file))
+
+
+def main(arcadia_prefix, contrib_prefix, proto_namespace, args):
+ out_dir_orig = None
+ out_dir_temp = None
+ for i in range(len(args)):
+ m = re.match(OUT_DIR_FLAG_PATTERN, args[i])
+ if m:
+ out_dir_flag = m.group(1)
+ index = max(len(out_dir_flag), args[i].rfind(':')+1)
+ out_dir = args[i][index:]
+ if out_dir_orig:
+ assert out_dir_orig == out_dir, 'Output directories do not match: [{}] and [{}]'.format(out_dir_orig, out_dir)
+ else:
+ out_dir_orig = out_dir
+ out_dir_temp = tempfile.mkdtemp(dir=out_dir_orig)
+ args[i] = (args[i][:index] + out_dir_temp).replace('|', ',')
+ assert out_dir_temp is not None, 'Output directory is not specified'
+
+ try:
+ subprocess.check_output(args, stdin=None, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ sys.stderr.write('{} returned non-zero exit code {}.\n{}\n'.format(' '.join(e.cmd), e.returncode, e.output))
+ return e.returncode
+
+ # All Arcadia GO projects should have 'a.yandex-team.ru/' namespace prefix.
+ # If the namespace doesn't start with 'a.yandex-team.ru/' prefix then this
+ # project is from vendor directory under the root of Arcadia.
+ out_dir_src = os.path.normpath(os.path.join(out_dir_temp, arcadia_prefix, proto_namespace))
+ out_dir_dst = out_dir_orig
+ is_from_contrib = False
+ if not os.path.isdir(out_dir_src):
+ is_from_contrib = True
+ out_dir_src = out_dir_temp
+ out_dir_dst = os.path.join(out_dir_orig, contrib_prefix)
+
+ if not os.path.exists(out_dir_src) or is_from_contrib:
+ protos = [x for x in args if x.endswith('.proto')]
+ if not is_from_contrib or not all(x.startswith(contrib_prefix) for x in protos):
+ proto_list = []
+ option_re = re.compile(r'^\s*option\s+go_package\s*=\s*')
+ for arg in protos:
+ with open(arg, 'r') as f:
+ if not any([re.match(option_re, line) for line in f]):
+ proto_list.append(arg)
+ if proto_list:
+ sys.stderr.write(
+ '\nError: Option go_package is not specified in the following proto files: {}\n'
+ '\nNOTE! You can find detailed description of how to properly set go_package '
+ 'option here https://wiki.yandex-team.ru/devrules/Go/#protobufigrpc'.format(', '.join(proto_list)))
+ return 1
+
+ move_tree(out_dir_src, out_dir_dst)
+
+ shutil.rmtree(out_dir_temp)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(os.path.normpath(sys.argv[1]), os.path.normpath(sys.argv[2]), os.path.normpath(sys.argv[3]), sys.argv[4:]))
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py
new file mode 100644
index 0000000000..c1e98b20c0
--- /dev/null
+++ b/build/scripts/go_tool.py
@@ -0,0 +1,864 @@
+from __future__ import absolute_import, unicode_literals
+import argparse
+import copy
+import json
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tarfile
+import tempfile
+import threading
+import six
+from functools import reduce
+
+import process_command_files as pcf
+import process_whole_archive_option as pwa
+
+arc_project_prefix = 'a.yandex-team.ru/'
+std_lib_prefix = 'contrib/go/_std/src/'
+vendor_prefix = 'vendor/'
+vet_info_ext = '.vet.out'
+vet_report_ext = '.vet.txt'
+
+FIXED_CGO1_SUFFIX='.fixed.cgo1.go'
+
+COMPILE_OPTIMIZATION_FLAGS=('-N',)
+
+
+def get_trimpath_args(args):
+ return ['-trimpath', args.trimpath] if args.trimpath else []
+
+
+def preprocess_cgo1(src_path, dst_path, source_root):
+ with open(src_path, 'r') as f:
+ content = f.read()
+ content = content.replace('__ARCADIA_SOURCE_ROOT_PREFIX__', source_root)
+ with open(dst_path, 'w') as f:
+ f.write(content)
+
+
+def preprocess_args(args):
+ # Temporary work around for noauto
+ if args.cgo_srcs and len(args.cgo_srcs) > 0:
+ cgo_srcs_set = set(args.cgo_srcs)
+ args.srcs = [x for x in args.srcs if x not in cgo_srcs_set]
+
+ args.pkg_root = os.path.join(args.toolchain_root, 'pkg')
+ toolchain_tool_root = os.path.join(args.pkg_root, 'tool', '{}_{}'.format(args.host_os, args.host_arch))
+ args.go_compile = os.path.join(toolchain_tool_root, 'compile')
+ args.go_cgo = os.path.join(toolchain_tool_root, 'cgo')
+ args.go_link = os.path.join(toolchain_tool_root, 'link')
+ args.go_asm = os.path.join(toolchain_tool_root, 'asm')
+ args.go_pack = os.path.join(toolchain_tool_root, 'pack')
+ args.go_vet = os.path.join(toolchain_tool_root, 'vet') if args.vet is True else args.vet
+ args.output = os.path.normpath(args.output)
+ args.vet_report_output = vet_report_output_name(args.output, args.vet_report_ext)
+ args.trimpath = None
+ if args.debug_root_map:
+ roots = {'build': args.build_root, 'source': args.source_root, 'tools': args.tools_root}
+ replaces = []
+ for root in args.debug_root_map.split(';'):
+ src, dst = root.split('=', 1)
+ assert src in roots
+ replaces.append('{}=>{}'.format(roots[src], dst))
+ del roots[src]
+ assert len(replaces) > 0
+ args.trimpath = ';'.join(replaces)
+ args.build_root = os.path.normpath(args.build_root)
+ args.build_root_dir = args.build_root + os.path.sep
+ args.source_root = os.path.normpath(args.source_root)
+ args.source_root_dir = args.source_root + os.path.sep
+ args.output_root = os.path.normpath(args.output_root)
+ args.import_map = {}
+ args.module_map = {}
+ if args.cgo_peers:
+ args.cgo_peers = [x for x in args.cgo_peers if not x.endswith('.fake.pkg')]
+
+ srcs = []
+ for f in args.srcs:
+ if f.endswith('.gosrc'):
+ with tarfile.open(f, 'r') as tar:
+ srcs.extend(os.path.join(args.output_root, src) for src in tar.getnames())
+ tar.extractall(path=args.output_root)
+ else:
+ srcs.append(f)
+ args.srcs = srcs
+
+ assert args.mode == 'test' or args.test_srcs is None and args.xtest_srcs is None
+ # add lexical oreder by basename for go sources
+ args.srcs.sort(key=lambda x: os.path.basename(x))
+ if args.test_srcs:
+ args.srcs += sorted(args.test_srcs, key=lambda x: os.path.basename(x))
+ del args.test_srcs
+ if args.xtest_srcs:
+ args.xtest_srcs.sort(key=lambda x: os.path.basename(x))
+
+ # compute root relative module dir path
+ assert args.output is None or args.output_root == os.path.dirname(args.output)
+ assert args.output_root.startswith(args.build_root_dir)
+ args.module_path = args.output_root[len(args.build_root_dir):]
+ args.source_module_dir = os.path.join(args.source_root, args.test_import_path or args.module_path) + os.path.sep
+ assert len(args.module_path) > 0
+ args.import_path, args.is_std = get_import_path(args.module_path)
+
+ assert args.asmhdr is None or args.word == 'go'
+
+ srcs = []
+ for f in args.srcs:
+ if f.endswith(FIXED_CGO1_SUFFIX) and f.startswith(args.build_root_dir):
+ path = os.path.join(args.output_root, '{}.cgo1.go'.format(os.path.basename(f[:-len(FIXED_CGO1_SUFFIX)])))
+ srcs.append(path)
+ preprocess_cgo1(f, path, args.source_root)
+ else:
+ srcs.append(f)
+ args.srcs = srcs
+
+ if args.extldflags:
+ args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(args.extldflags)
+
+ classify_srcs(args.srcs, args)
+
+
+def compare_versions(version1, version2):
+ def last_index(version):
+ index = version.find('beta')
+ return len(version) if index < 0 else index
+
+ v1 = tuple(x.zfill(8) for x in version1[:last_index(version1)].split('.'))
+ v2 = tuple(x.zfill(8) for x in version2[:last_index(version2)].split('.'))
+ if v1 == v2:
+ return 0
+ return 1 if v1 < v2 else -1
+
+
+def get_symlink_or_copyfile():
+ os_symlink = getattr(os, 'symlink', None)
+ if os_symlink is None:
+ os_symlink = shutil.copyfile
+ return os_symlink
+
+
+def copy_args(args):
+ return copy.copy(args)
+
+
+def get_vendor_index(import_path):
+ index = import_path.rfind('/' + vendor_prefix)
+ if index < 0:
+ index = 0 if import_path.startswith(vendor_prefix) else index
+ else:
+ index = index + 1
+ return index
+
+
+def get_import_path(module_path):
+ assert len(module_path) > 0
+ import_path = module_path.replace('\\', '/')
+ is_std_module = import_path.startswith(std_lib_prefix)
+ if is_std_module:
+ import_path = import_path[len(std_lib_prefix):]
+ elif import_path.startswith(vendor_prefix):
+ import_path = import_path[len(vendor_prefix):]
+ else:
+ import_path = arc_project_prefix + import_path
+ assert len(import_path) > 0
+ return import_path, is_std_module
+
+
+def call(cmd, cwd, env=None):
+ # sys.stderr.write('{}\n'.format(' '.join(cmd)))
+ return subprocess.check_output(cmd, stdin=None, stderr=subprocess.STDOUT, cwd=cwd, env=env)
+
+
+def classify_srcs(srcs, args):
+ args.go_srcs = [x for x in srcs if x.endswith('.go')]
+ args.asm_srcs = [x for x in srcs if x.endswith('.s')]
+ args.objects = [x for x in srcs if x.endswith('.o') or x.endswith('.obj')]
+ args.symabis = [x for x in srcs if x.endswith('.symabis')]
+ args.sysos = [x for x in srcs if x.endswith('.syso')]
+
+
+def get_import_config_info(peers, gen_importmap, import_map={}, module_map={}):
+ info = {'importmap': [], 'packagefile': [], 'standard': {}}
+ if gen_importmap:
+ for key, value in six.iteritems(import_map):
+ info['importmap'].append((key, value))
+ for peer in peers:
+ peer_import_path, is_std = get_import_path(os.path.dirname(peer))
+ if gen_importmap:
+ index = get_vendor_index(peer_import_path)
+ if index >= 0:
+ index += len(vendor_prefix)
+ info['importmap'].append((peer_import_path[index:], peer_import_path))
+ info['packagefile'].append((peer_import_path, os.path.join(args.build_root, peer)))
+ if is_std:
+ info['standard'][peer_import_path] = True
+ for key, value in six.iteritems(module_map):
+ info['packagefile'].append((key, value))
+ return info
+
+
+def create_import_config(peers, gen_importmap, import_map={}, module_map={}):
+ lines = []
+ info = get_import_config_info(peers, gen_importmap, import_map, module_map)
+ for key in ('importmap', 'packagefile'):
+ for item in info[key]:
+ lines.append('{} {}={}'.format(key, *item))
+ if len(lines) > 0:
+ lines.append('')
+ content = '\n'.join(lines)
+ # sys.stderr.writelines('{}\n'.format(l) for l in lines)
+ with tempfile.NamedTemporaryFile(delete=False) as f:
+ f.write(content.encode('UTF-8'))
+ return f.name
+ return None
+
+
+def create_embed_config(args):
+ data = {
+ 'Patterns': {},
+ 'Files': {},
+ }
+ for info in args.embed:
+ pattern = info[0]
+ if pattern.endswith('/**/*'):
+ pattern = pattern[:-3]
+ files = {os.path.relpath(f, args.source_module_dir).replace('\\', '/'): f for f in info[1:]}
+ data['Patterns'][pattern] = list(files.keys())
+ data['Files'].update(files)
+ # sys.stderr.write('{}\n'.format(json.dumps(data, indent=4)))
+ with tempfile.NamedTemporaryFile(delete=False, suffix='.embedcfg') as f:
+ f.write(json.dumps(data).encode('UTF-8'))
+ return f.name
+
+
+def vet_info_output_name(path, ext=None):
+ return '{}{}'.format(path, ext or vet_info_ext)
+
+
+def vet_report_output_name(path, ext=None):
+ return '{}{}'.format(path, ext or vet_report_ext)
+
+
+def get_source_path(args):
+ return args.test_import_path or args.module_path
+
+
+def gen_vet_info(args):
+ import_path = args.real_import_path if hasattr(args, 'real_import_path') else args.import_path
+ info = get_import_config_info(args.peers, True, args.import_map, args.module_map)
+
+ import_map = dict(info['importmap'])
+ # FIXME(snermolaev): it seems that adding import map for 'fake' package
+ # does't make any harm (it needs to be revised later)
+ import_map['unsafe'] = 'unsafe'
+
+ for (key, _) in info['packagefile']:
+ if key not in import_map:
+ import_map[key] = key
+
+ data = {
+ 'ID': import_path,
+ 'Compiler': 'gc',
+ 'Dir': os.path.join(args.source_root, get_source_path(args)),
+ 'ImportPath': import_path,
+ 'GoFiles': [x for x in args.go_srcs if x.endswith('.go')],
+ 'NonGoFiles': [x for x in args.go_srcs if not x.endswith('.go')],
+ 'ImportMap': import_map,
+ 'PackageFile': dict(info['packagefile']),
+ 'Standard': dict(info['standard']),
+ 'PackageVetx': dict((key, vet_info_output_name(value)) for key, value in info['packagefile']),
+ 'VetxOnly': False,
+ 'VetxOutput': vet_info_output_name(args.output),
+ 'SucceedOnTypecheckFailure': False
+ }
+ # sys.stderr.write('{}\n'.format(json.dumps(data, indent=4)))
+ return data
+
+
+def create_vet_config(args, info):
+ with tempfile.NamedTemporaryFile(delete=False, suffix='.cfg') as f:
+ f.write(json.dumps(info).encode('UTF-8'))
+ return f.name
+
+
+def decode_vet_report(json_report):
+ report = ''
+ if json_report:
+ try:
+ full_diags = json.JSONDecoder().decode(json_report.decode('UTF-8'))
+ except ValueError:
+ report = json_report
+ else:
+ messages = []
+ for _, module_diags in six.iteritems(full_diags):
+ for _, type_diags in six.iteritems(module_diags):
+ for diag in type_diags:
+ messages.append('{}: {}'.format(diag['posn'], json.dumps(diag['message'])))
+ report = '\n'.join(messages)
+
+ return report
+
+
+def dump_vet_report(args, report):
+ if report:
+ report = report.replace(args.build_root, '$B')
+ report = report.replace(args.source_root, '$S')
+ with open(args.vet_report_output, 'w') as f:
+ f.write(report)
+
+
+def read_vet_report(args):
+ assert args
+ report = ''
+ if os.path.exists(args.vet_report_output):
+ with open(args.vet_report_output, 'r') as f:
+ report += f.read()
+ return report
+
+
+def dump_vet_report_for_tests(args, *test_args_list):
+ dump_vet_report(args, reduce(lambda x, y: x + read_vet_report(y), [_f for _f in test_args_list if _f], ''))
+
+
+def do_vet(args):
+ assert args.vet
+ info = gen_vet_info(args)
+ vet_config = create_vet_config(args, info)
+ cmd = [args.go_vet, '-json']
+ if args.vet_flags:
+ cmd.extend(args.vet_flags)
+ cmd.append(vet_config)
+ # sys.stderr.write('>>>> [{}]\n'.format(' '.join(cmd)))
+ p_vet = subprocess.Popen(cmd, stdin=None, stderr=subprocess.PIPE, stdout=subprocess.PIPE, cwd=args.source_root)
+ vet_out, vet_err = p_vet.communicate()
+ report = decode_vet_report(vet_out) if vet_out else ''
+ dump_vet_report(args, report)
+ if p_vet.returncode:
+ raise subprocess.CalledProcessError(returncode=p_vet.returncode, cmd=cmd, output=vet_err)
+
+
+def _do_compile_go(args):
+ import_path, is_std_module = args.import_path, args.is_std
+ cmd = [
+ args.go_compile,
+ '-o',
+ args.output,
+ '-p',
+ import_path,
+ '-D',
+ '""',
+ '-goversion',
+ 'go{}'.format(args.goversion)
+ ]
+ cmd.extend(get_trimpath_args(args))
+ compiling_runtime = False
+ if is_std_module:
+ cmd.append('-std')
+ if import_path in ('runtime', 'internal/abi', 'internal/bytealg', 'internal/cpu') or import_path.startswith('runtime/internal/'):
+ cmd.append('-+')
+ compiling_runtime = True
+ import_config_name = create_import_config(args.peers, True, args.import_map, args.module_map)
+ if import_config_name:
+ cmd += ['-importcfg', import_config_name]
+ else:
+ if import_path == 'unsafe' or len(args.objects) > 0 or args.asmhdr:
+ pass
+ else:
+ cmd.append('-complete')
+ # if compare_versions('1.16', args.goversion) >= 0:
+ if args.embed:
+ embed_config_name = create_embed_config(args)
+ cmd.extend(['-embedcfg', embed_config_name])
+ if args.asmhdr:
+ cmd += ['-asmhdr', args.asmhdr]
+ # Use .symabis (starting from 1.12 version)
+ if args.symabis:
+ cmd += ['-symabis'] + args.symabis
+ # If 1.12 <= version < 1.13 we have to pass -allabis for 'runtime' and 'runtime/internal/atomic'
+ # if compare_versions('1.13', args.goversion) >= 0:
+ # pass
+ # elif import_path in ('runtime', 'runtime/internal/atomic'):
+ # cmd.append('-allabis')
+ compile_workers = '4'
+ if args.compile_flags:
+ if compiling_runtime:
+ cmd.extend(x for x in args.compile_flags if x not in COMPILE_OPTIMIZATION_FLAGS)
+ else:
+ cmd.extend(args.compile_flags)
+ if any([x in ('-race', '-shared') for x in args.compile_flags]):
+ compile_workers = '1'
+ cmd += ['-pack', '-c={}'.format(compile_workers)]
+ cmd += args.go_srcs
+ call(cmd, args.build_root)
+
+
+class VetThread(threading.Thread):
+
+ def __init__(self, target, args):
+ super(VetThread, self).__init__(target=target, args=args)
+ self.exc_info = None
+
+ def run(self):
+ try:
+ super(VetThread, self).run()
+ except:
+ self.exc_info = sys.exc_info()
+
+ def join_with_exception(self, reraise_exception):
+ self.join()
+ if reraise_exception and self.exc_info:
+ six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
+
+
+def do_compile_go(args):
+ raise_exception_from_vet = False
+ if args.vet:
+ run_vet = VetThread(target=do_vet, args=(args,))
+ run_vet.start()
+ try:
+ _do_compile_go(args)
+ raise_exception_from_vet = True
+ finally:
+ if args.vet:
+ run_vet.join_with_exception(raise_exception_from_vet)
+
+
+def do_compile_asm(args):
+ def need_compiling_runtime(import_path):
+ return import_path in ('runtime', 'reflect', 'syscall') or \
+ import_path.startswith('runtime/internal/') or \
+ compare_versions('1.17', args.goversion) >= 0 and import_path == 'internal/bytealg'
+
+ assert(len(args.srcs) == 1 and len(args.asm_srcs) == 1)
+ cmd = [args.go_asm]
+ cmd += get_trimpath_args(args)
+ cmd += ['-I', args.output_root, '-I', os.path.join(args.pkg_root, 'include')]
+ cmd += ['-D', 'GOOS_' + args.targ_os, '-D', 'GOARCH_' + args.targ_arch, '-o', args.output]
+
+ # if compare_versions('1.16', args.goversion) >= 0:
+ cmd += ['-p', args.import_path]
+ if need_compiling_runtime(args.import_path):
+ cmd += ['-compiling-runtime']
+
+ if args.asm_flags:
+ cmd += args.asm_flags
+ cmd += args.asm_srcs
+ call(cmd, args.build_root)
+
+
+def do_link_lib(args):
+ if len(args.asm_srcs) > 0:
+ asmargs = copy_args(args)
+ asmargs.asmhdr = os.path.join(asmargs.output_root, 'go_asm.h')
+ do_compile_go(asmargs)
+ for src in asmargs.asm_srcs:
+ asmargs.srcs = [src]
+ asmargs.asm_srcs = [src]
+ asmargs.output = os.path.join(asmargs.output_root, os.path.basename(src) + '.o')
+ do_compile_asm(asmargs)
+ args.objects.append(asmargs.output)
+ else:
+ do_compile_go(args)
+ if args.objects or args.sysos:
+ cmd = [args.go_pack, 'r', args.output] + args.objects + args.sysos
+ call(cmd, args.build_root)
+
+
+def do_link_exe(args):
+ assert args.extld is not None
+ assert args.non_local_peers is not None
+ compile_args = copy_args(args)
+ compile_args.output = os.path.join(args.output_root, 'main.a')
+ compile_args.real_import_path = compile_args.import_path
+ compile_args.import_path = 'main'
+
+ if args.vcs and os.path.isfile(compile_args.vcs):
+ build_info = os.path.join('library', 'go', 'core', 'buildinfo')
+ if any([x.startswith(build_info) for x in compile_args.peers]):
+ compile_args.go_srcs.append(compile_args.vcs)
+
+ do_link_lib(compile_args)
+ cmd = [args.go_link, '-o', args.output]
+ import_config_name = create_import_config(args.peers + args.non_local_peers, False, args.import_map, args.module_map)
+ if import_config_name:
+ cmd += ['-importcfg', import_config_name]
+ if args.link_flags:
+ cmd += args.link_flags
+
+ if args.mode in ('exe', 'test'):
+ cmd.append('-buildmode=exe')
+ elif args.mode == 'dll':
+ cmd.append('-buildmode=c-shared')
+ else:
+ assert False, 'Unexpected mode: {}'.format(args.mode)
+ cmd.append('-extld={}'.format(args.extld))
+
+ extldflags = []
+ if args.extldflags is not None:
+ filter_musl = bool
+ if args.musl:
+ cmd.append('-linkmode=external')
+ extldflags.append('-static')
+ filter_musl = lambda x: x not in ('-lc', '-ldl', '-lm', '-lpthread', '-lrt')
+ extldflags += [x for x in args.extldflags if filter_musl(x)]
+ cgo_peers = []
+ if args.cgo_peers is not None and len(args.cgo_peers) > 0:
+ is_group = args.targ_os == 'linux'
+ if is_group:
+ cgo_peers.append('-Wl,--start-group')
+ cgo_peers.extend(args.cgo_peers)
+ if is_group:
+ cgo_peers.append('-Wl,--end-group')
+ try:
+ index = extldflags.index('--cgo-peers')
+ extldflags = extldflags[:index] + cgo_peers + extldflags[index+1:]
+ except ValueError:
+ extldflags.extend(cgo_peers)
+ if len(extldflags) > 0:
+ cmd.append('-extldflags={}'.format(' '.join(extldflags)))
+ cmd.append(compile_args.output)
+ call(cmd, args.build_root)
+
+
+def gen_cover_info(args):
+ lines = []
+ lines.extend([
+ """
+var (
+ coverCounters = make(map[string][]uint32)
+ coverBlocks = make(map[string][]testing.CoverBlock)
+)
+ """,
+ 'func init() {',
+ ])
+ for var, file in (x.split(':') for x in args.cover_info):
+ lines.append(' coverRegisterFile("{file}", _cover0.{var}.Count[:], _cover0.{var}.Pos[:], _cover0.{var}.NumStmt[:])'.format(file=file, var=var))
+ lines.extend([
+ '}',
+ """
+func coverRegisterFile(fileName string, counter []uint32, pos []uint32, numStmts []uint16) {
+ if 3*len(counter) != len(pos) || len(counter) != len(numStmts) {
+ panic("coverage: mismatched sizes")
+ }
+ if coverCounters[fileName] != nil {
+ // Already registered.
+ return
+ }
+ coverCounters[fileName] = counter
+ block := make([]testing.CoverBlock, len(counter))
+ for i := range counter {
+ block[i] = testing.CoverBlock{
+ Line0: pos[3*i+0],
+ Col0: uint16(pos[3*i+2]),
+ Line1: pos[3*i+1],
+ Col1: uint16(pos[3*i+2]>>16),
+ Stmts: numStmts[i],
+ }
+ }
+ coverBlocks[fileName] = block
+}
+ """,
+ ])
+ return lines
+
+
+def filter_out_skip_tests(tests, skip_tests):
+ skip_set = set()
+ star_skip_set = set()
+ for t in skip_tests:
+ work_set = star_skip_set if '*' in t else skip_set
+ work_set.add(t)
+
+ re_star_tests = None
+ if len(star_skip_set) > 0:
+ re_star_tests = re.compile(re.sub(r'(\*)+', r'.\1', '^({})$'.format('|'.join(star_skip_set))))
+
+ return [x for x in tests if not (x in skip_tests or re_star_tests and re_star_tests.match(x))]
+
+
+def gen_test_main(args, test_lib_args, xtest_lib_args):
+ assert args and (test_lib_args or xtest_lib_args)
+ test_miner = args.test_miner
+ test_module_path = test_lib_args.import_path if test_lib_args else xtest_lib_args.import_path
+ is_cover = args.cover_info and len(args.cover_info) > 0
+
+ # Prepare GOPATH
+ # $BINDIR
+ # |- __go__
+ # |- src
+ # |- pkg
+ # |- ${TARGET_OS}_${TARGET_ARCH}
+ go_path_root = os.path.join(args.output_root, '__go__')
+ test_src_dir = os.path.join(go_path_root, 'src')
+ target_os_arch = '_'.join([args.targ_os, args.targ_arch])
+ test_pkg_dir = os.path.join(go_path_root, 'pkg', target_os_arch, os.path.dirname(test_module_path))
+ os.makedirs(test_pkg_dir)
+
+ my_env = os.environ.copy()
+ my_env['GOROOT'] = ''
+ my_env['GOPATH'] = go_path_root
+ my_env['GOARCH'] = args.targ_arch
+ my_env['GOOS'] = args.targ_os
+
+ tests = []
+ xtests = []
+ os_symlink = get_symlink_or_copyfile()
+
+ # Get the list of "internal" tests
+ if test_lib_args:
+ os.makedirs(os.path.join(test_src_dir, test_module_path))
+ os_symlink(test_lib_args.output, os.path.join(test_pkg_dir, os.path.basename(test_module_path) + '.a'))
+ cmd = [test_miner, '-benchmarks', '-tests', test_module_path]
+ tests = [x for x in (call(cmd, test_lib_args.output_root, my_env).decode('UTF-8') or '').strip().split('\n') if len(x) > 0]
+ if args.skip_tests:
+ tests = filter_out_skip_tests(tests, args.skip_tests)
+ test_main_found = '#TestMain' in tests
+
+ # Get the list of "external" tests
+ if xtest_lib_args:
+ xtest_module_path = xtest_lib_args.import_path
+ os.makedirs(os.path.join(test_src_dir, xtest_module_path))
+ os_symlink(xtest_lib_args.output, os.path.join(test_pkg_dir, os.path.basename(xtest_module_path) + '.a'))
+ cmd = [test_miner, '-benchmarks', '-tests', xtest_module_path]
+ xtests = [x for x in (call(cmd, xtest_lib_args.output_root, my_env).decode('UTF-8') or '').strip().split('\n') if len(x) > 0]
+ if args.skip_tests:
+ xtests = filter_out_skip_tests(xtests, args.skip_tests)
+ xtest_main_found = '#TestMain' in xtests
+
+ test_main_package = None
+ if test_main_found and xtest_main_found:
+ assert False, 'multiple definition of TestMain'
+ elif test_main_found:
+ test_main_package = '_test'
+ elif xtest_main_found:
+ test_main_package = '_xtest'
+
+ shutil.rmtree(go_path_root)
+
+ lines = ['package main', '', 'import (']
+ if test_main_package is None:
+ lines.append(' "os"')
+ lines.extend([' "testing"', ' "testing/internal/testdeps"'])
+
+ if len(tests) > 0:
+ lines.append(' _test "{}"'.format(test_module_path))
+ elif test_lib_args:
+ lines.append(' _ "{}"'.format(test_module_path))
+
+ if len(xtests) > 0:
+ lines.append(' _xtest "{}"'.format(xtest_module_path))
+ elif xtest_lib_args:
+ lines.append(' _ "{}"'.format(xtest_module_path))
+
+ if is_cover:
+ lines.append(' _cover0 "{}"'.format(test_module_path))
+ lines.extend([')', ''])
+
+ if compare_versions('1.18', args.goversion) < 0:
+ kinds = ['Test', 'Benchmark', 'Example']
+ else:
+ kinds = ['Test', 'Benchmark', 'FuzzTarget', 'Example']
+
+ var_names = []
+ for kind in kinds:
+ var_name = '{}s'.format(kind.lower())
+ var_names.append(var_name)
+ lines.append('var {} = []testing.Internal{}{{'.format(var_name, kind))
+ for test in [x for x in tests if x.startswith(kind)]:
+ lines.append(' {{"{test}", _test.{test}}},'.format(test=test))
+ for test in [x for x in xtests if x.startswith(kind)]:
+ lines.append(' {{"{test}", _xtest.{test}}},'.format(test=test))
+ lines.extend(['}', ''])
+
+ if is_cover:
+ lines.extend(gen_cover_info(args))
+
+ lines.append('func main() {')
+ if is_cover:
+ lines.extend([
+ ' testing.RegisterCover(testing.Cover{',
+ ' Mode: "set",',
+ ' Counters: coverCounters,',
+ ' Blocks: coverBlocks,',
+ ' CoveredPackages: "",',
+ ' })',
+ ])
+ lines.extend([
+ ' m := testing.MainStart(testdeps.TestDeps{{}}, {})'.format(', '.join(var_names)),
+ '',
+ ])
+
+ if test_main_package:
+ lines.append(' {}.TestMain(m)'.format(test_main_package))
+ else:
+ lines.append(' os.Exit(m.Run())')
+ lines.extend(['}', ''])
+
+ content = '\n'.join(lines)
+ # sys.stderr.write('{}\n'.format(content))
+ return content
+
+
+def do_link_test(args):
+ assert args.srcs or args.xtest_srcs
+ assert args.test_miner is not None
+
+ test_module_path = get_source_path(args)
+ test_import_path, _ = get_import_path(test_module_path)
+
+ test_lib_args = copy_args(args) if args.srcs else None
+ xtest_lib_args = copy_args(args) if args.xtest_srcs else None
+ if xtest_lib_args is not None:
+ xtest_lib_args.embed = args.embed_xtest if args.embed_xtest else None
+
+ ydx_file_name = None
+ xtest_ydx_file_name = None
+ need_append_ydx = test_lib_args and xtest_lib_args and args.ydx_file and args.vet_flags
+ if need_append_ydx:
+ def find_ydx_file_name(name, flags):
+ for i, elem in enumerate(flags):
+ if elem.endswith(name):
+ return (i, elem)
+ assert False, 'Unreachable code'
+
+ idx, ydx_file_name = find_ydx_file_name(xtest_lib_args.ydx_file, xtest_lib_args.vet_flags)
+ xtest_ydx_file_name = '{}_xtest'.format(ydx_file_name)
+ xtest_lib_args.vet_flags = copy.copy(xtest_lib_args.vet_flags)
+ xtest_lib_args.vet_flags[idx] = xtest_ydx_file_name
+
+ if test_lib_args:
+ test_lib_args.output = os.path.join(args.output_root, 'test.a')
+ test_lib_args.vet_report_output = vet_report_output_name(test_lib_args.output)
+ test_lib_args.module_path = test_module_path
+ test_lib_args.import_path = test_import_path
+ do_link_lib(test_lib_args)
+
+ if xtest_lib_args:
+ xtest_lib_args.srcs = xtest_lib_args.xtest_srcs
+ classify_srcs(xtest_lib_args.srcs, xtest_lib_args)
+ xtest_lib_args.output = os.path.join(args.output_root, 'xtest.a')
+ xtest_lib_args.vet_report_output = vet_report_output_name(xtest_lib_args.output)
+ xtest_lib_args.module_path = test_module_path + '_test'
+ xtest_lib_args.import_path = test_import_path + '_test'
+ if test_lib_args:
+ xtest_lib_args.module_map[test_import_path] = test_lib_args.output
+ need_append_ydx = args.ydx_file and args.srcs and args.vet_flags
+ do_link_lib(xtest_lib_args)
+
+ if need_append_ydx:
+ with open(os.path.join(args.build_root, ydx_file_name), 'ab') as dst_file:
+ with open(os.path.join(args.build_root, xtest_ydx_file_name), 'rb') as src_file:
+ dst_file.write(src_file.read())
+
+ test_main_content = gen_test_main(args, test_lib_args, xtest_lib_args)
+ test_main_name = os.path.join(args.output_root, '_test_main.go')
+ with open(test_main_name, "w") as f:
+ f.write(test_main_content)
+ test_args = copy_args(args)
+ test_args.embed = None
+ test_args.srcs = [test_main_name]
+ if test_args.test_import_path is None:
+ # it seems that we can do it unconditionally, but this kind
+ # of mangling doesn't really looks good to me and we leave it
+ # for pure GO_TEST module
+ test_args.module_path = test_args.module_path + '___test_main__'
+ test_args.import_path = test_args.import_path + '___test_main__'
+ classify_srcs(test_args.srcs, test_args)
+ if test_lib_args:
+ test_args.module_map[test_lib_args.import_path] = test_lib_args.output
+ if xtest_lib_args:
+ test_args.module_map[xtest_lib_args.import_path] = xtest_lib_args.output
+
+ if args.vet:
+ dump_vet_report_for_tests(test_args, test_lib_args, xtest_lib_args)
+ test_args.vet = False
+
+ do_link_exe(test_args)
+
+
+if __name__ == '__main__':
+ args = pcf.get_args(sys.argv[1:])
+
+ parser = argparse.ArgumentParser(prefix_chars='+')
+ parser.add_argument('++mode', choices=['dll', 'exe', 'lib', 'test'], required=True)
+ parser.add_argument('++srcs', nargs='*', required=True)
+ parser.add_argument('++cgo-srcs', nargs='*')
+ parser.add_argument('++test_srcs', nargs='*')
+ parser.add_argument('++xtest_srcs', nargs='*')
+ parser.add_argument('++cover_info', nargs='*')
+ parser.add_argument('++output', nargs='?', default=None)
+ parser.add_argument('++source-root', default=None)
+ parser.add_argument('++build-root', required=True)
+ parser.add_argument('++tools-root', default=None)
+ parser.add_argument('++output-root', required=True)
+ parser.add_argument('++toolchain-root', required=True)
+ parser.add_argument('++host-os', choices=['linux', 'darwin', 'windows'], required=True)
+ parser.add_argument('++host-arch', choices=['amd64', 'arm64'], required=True)
+ parser.add_argument('++targ-os', choices=['linux', 'darwin', 'windows'], required=True)
+ parser.add_argument('++targ-arch', choices=['amd64', 'x86', 'arm64'], required=True)
+ parser.add_argument('++peers', nargs='*')
+ parser.add_argument('++non-local-peers', nargs='*')
+ parser.add_argument('++cgo-peers', nargs='*')
+ parser.add_argument('++asmhdr', nargs='?', default=None)
+ parser.add_argument('++test-import-path', nargs='?')
+ parser.add_argument('++test-miner', nargs='?')
+ parser.add_argument('++arc-project-prefix', nargs='?', default=arc_project_prefix)
+ parser.add_argument('++std-lib-prefix', nargs='?', default=std_lib_prefix)
+ parser.add_argument('++vendor-prefix', nargs='?', default=vendor_prefix)
+ parser.add_argument('++extld', nargs='?', default=None)
+ parser.add_argument('++extldflags', nargs='+', default=None)
+ parser.add_argument('++goversion', required=True)
+ parser.add_argument('++asm-flags', nargs='*')
+ parser.add_argument('++compile-flags', nargs='*')
+ parser.add_argument('++link-flags', nargs='*')
+ parser.add_argument('++vcs', nargs='?', default=None)
+ parser.add_argument('++vet', nargs='?', const=True, default=False)
+ parser.add_argument('++vet-flags', nargs='*', default=None)
+ parser.add_argument('++vet-info-ext', default=vet_info_ext)
+ parser.add_argument('++vet-report-ext', default=vet_report_ext)
+ parser.add_argument('++musl', action='store_true')
+ parser.add_argument('++skip-tests', nargs='*', default=None)
+ parser.add_argument('++ydx-file', default='')
+ parser.add_argument('++debug-root-map', default=None)
+ parser.add_argument('++embed', action='append', nargs='*')
+ parser.add_argument('++embed_xtest', action='append', nargs='*')
+ args = parser.parse_args(args)
+
+ arc_project_prefix = args.arc_project_prefix
+ std_lib_prefix = args.std_lib_prefix
+ vendor_prefix = args.vendor_prefix
+ vet_info_ext = args.vet_info_ext
+ vet_report_ext = args.vet_report_ext
+
+ preprocess_args(args)
+
+ try:
+ os.unlink(args.output)
+ except OSError:
+ pass
+
+ # We are going to support only 'lib', 'exe' and 'cgo' build modes currently
+ # and as a result we are going to generate only one build node per module
+ # (or program)
+ dispatch = {
+ 'exe': do_link_exe,
+ 'dll': do_link_exe,
+ 'lib': do_link_lib,
+ 'test': do_link_test
+ }
+
+ exit_code = 1
+ try:
+ dispatch[args.mode](args)
+ exit_code = 0
+ except KeyError:
+ sys.stderr.write('Unknown build mode [{}]...\n'.format(args.mode))
+ except subprocess.CalledProcessError as e:
+ sys.stderr.write('{} returned non-zero exit code {}.\n{}\n'.format(' '.join(e.cmd), e.returncode, e.output))
+ exit_code = e.returncode
+ except Exception as e:
+ sys.stderr.write('Unhandled exception [{}]...\n'.format(str(e)))
+ sys.exit(exit_code)
diff --git a/build/scripts/ios_wrapper.py b/build/scripts/ios_wrapper.py
new file mode 100644
index 0000000000..d3aa48387a
--- /dev/null
+++ b/build/scripts/ios_wrapper.py
@@ -0,0 +1,180 @@
+import errno
+import json
+import os
+import shutil
+import subprocess
+import sys
+import tarfile
+import plistlib
+
+
+def ensure_dir(path):
+ try:
+ os.makedirs(path)
+ except OSError as e:
+ if e.errno != errno.EEXIST or not os.path.isdir(path):
+ raise
+
+
+def just_do_it(args):
+ if not args:
+ raise Exception('Not enough args!')
+ parts = [[]]
+ for arg in args:
+ if arg == '__DELIM__':
+ parts.append([])
+ else:
+ parts[-1].append(arg)
+ if len(parts) != 3 or len(parts[0]) != 5:
+ raise Exception('Bad call')
+ bin_name, ibtool_path, main_out, app_name, module_dir = parts[0]
+ bin_name = os.path.basename(bin_name)
+ inputs, storyboard_user_flags = parts[1:]
+ plists, storyboards, signs, nibs, resources, signed_resources, plist_jsons, strings = [], [], [], [], [], [], [], []
+ for i in inputs:
+ if i.endswith('.plist') or i.endswith('.partial_plist'):
+ plists.append(i)
+ elif i.endswith('.compiled_storyboard_tar'):
+ storyboards.append(i)
+ elif i.endswith('.xcent'):
+ signs.append(i)
+ elif i.endswith('.nib'):
+ nibs.append(i)
+ elif i.endswith('.resource_tar'):
+ resources.append(i)
+ elif i.endswith('.signed_resource_tar'):
+ signed_resources.append(i)
+ elif i.endswith('.plist_json'):
+ plist_jsons.append(i)
+ elif i.endswith('.strings_tar'):
+ strings.append(i)
+ else:
+ print >> sys.stderr, 'Unknown input:', i, 'ignoring'
+ if not plists:
+ raise Exception("Can't find plist files")
+ if not plists[0].endswith('.plist'):
+ print >> sys.stderr, "Main plist file can be defined incorretly"
+ if not storyboards:
+ print >> sys.stderr, "Storyboards list are empty"
+ if len(signs) > 1:
+ raise Exception("Too many .xcent files")
+ app_dir = os.path.join(module_dir, app_name + '.app')
+ ensure_dir(app_dir)
+ copy_nibs(nibs, module_dir, app_dir)
+ replaced_parameters = {
+ 'DEVELOPMENT_LANGUAGE': 'en',
+ 'EXECUTABLE_NAME': bin_name,
+ 'PRODUCT_BUNDLE_IDENTIFIER': 'Yandex.' + app_name,
+ 'PRODUCT_NAME': app_name,
+ }
+ replaced_templates = {}
+ for plist_json in plist_jsons:
+ with open(plist_json) as jsonfile:
+ for k, v in json.loads(jsonfile.read()).items():
+ replaced_parameters[k] = v
+ for k, v in replaced_parameters.items():
+ replaced_templates['$(' + k + ')'] = v
+ replaced_templates['${' + k + '}'] = v
+ make_main_plist(plists, os.path.join(app_dir, 'Info.plist'), replaced_templates)
+ link_storyboards(ibtool_path, storyboards, app_name, app_dir, storyboard_user_flags)
+ if resources:
+ extract_resources(resources, app_dir)
+ if signed_resources:
+ extract_resources(signed_resources, app_dir, sign=True)
+ if strings:
+ extract_resources(strings, app_dir, strings=True)
+ if not signs:
+ sign_file = os.path.join(module_dir, app_name + '.xcent')
+ with open(sign_file, 'w') as f:
+ f.write('''<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.get-task-allow</key>
+ <true/>
+</dict>
+</plist>
+ ''')
+ else:
+ sign_file = signs[0]
+ sign_application(sign_file, app_dir)
+ make_archive(app_dir, main_out)
+
+
+def is_exe(fpath):
+ return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+
+
+def copy_nibs(nibs, module_dir, app_dir):
+ for nib in nibs:
+ dst = os.path.join(app_dir, os.path.relpath(nib, module_dir))
+ ensure_dir(os.path.dirname(dst))
+ shutil.copyfile(nib, dst)
+
+
+def make_main_plist(inputs, out, replaced_parameters):
+ united_data = {}
+ for i in inputs:
+ united_data.update(plistlib.readPlist(i))
+
+ def scan_n_replace(root):
+ if not isinstance(root, dict):
+ raise Exception('Invalid state')
+ for k in root:
+ if isinstance(root[k], list):
+ for i in xrange(len(root[k])):
+ if isinstance(root[k][i], dict):
+ scan_n_replace(root[k][i])
+ elif root[k][i] in replaced_parameters:
+ root[k][i] = replaced_parameters[root[k][i]]
+ elif isinstance(root[k], dict):
+ scan_n_replace(root[k])
+ else:
+ if root[k] in replaced_parameters:
+ root[k] = replaced_parameters[root[k]]
+ scan_n_replace(united_data)
+ plistlib.writePlist(united_data, out)
+ subprocess.check_call(['/usr/bin/plutil', '-convert', 'binary1', out])
+
+
+def link_storyboards(ibtool, archives, app_name, app_dir, flags):
+ unpacked = []
+ for arc in archives:
+ unpacked.append(os.path.splitext(arc)[0] + 'c')
+ ensure_dir(unpacked[-1])
+ with tarfile.open(arc) as a:
+ a.extractall(path=unpacked[-1])
+ flags += [
+ '--module', app_name,
+ '--link', app_dir,
+ ]
+ subprocess.check_call([ibtool] + flags +
+ ['--errors', '--warnings', '--notices', '--output-format', 'human-readable-text'] +
+ unpacked)
+
+
+def sign_application(xcent, app_dir):
+ subprocess.check_call(['/usr/bin/codesign', '--force', '--sign', '-', '--entitlements', xcent, '--timestamp=none', app_dir])
+
+
+def extract_resources(resources, app_dir, strings=False, sign=False):
+ for res in resources:
+ with tarfile.open(res) as tf:
+ for tfinfo in tf:
+ tf.extract(tfinfo.name, app_dir)
+ if strings:
+ subprocess.check_call(['/usr/bin/plutil', '-convert', 'binary1', os.path.join(app_dir, tfinfo.name)])
+ if sign:
+ subprocess.check_call(['/usr/bin/codesign', '--force', '--sign', '-', os.path.join(app_dir, tfinfo.name)])
+
+
+def make_archive(app_dir, output):
+ with tarfile.open(output, "w") as tar_handle:
+ for root, _, files in os.walk(app_dir):
+ for f in files:
+ tar_handle.add(os.path.join(root, f), arcname=os.path.join(os.path.basename(app_dir),
+ os.path.relpath(os.path.join(root, f), app_dir)))
+
+
+if __name__ == '__main__':
+ just_do_it(sys.argv[1:])
diff --git a/build/scripts/java_pack_to_file.py b/build/scripts/java_pack_to_file.py
new file mode 100644
index 0000000000..8d2aeb93fd
--- /dev/null
+++ b/build/scripts/java_pack_to_file.py
@@ -0,0 +1,36 @@
+import os
+import re
+import optparse
+
+PACKAGE_REGEX = re.compile(r'^\s*package\s+(.*?);', flags=re.MULTILINE | re.DOTALL)
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.add_option('-o', '--output')
+ parser.add_option('-a', '--source-root', dest='source_root')
+ return parser.parse_args()
+
+
+def get_package_name(filename):
+ with open(filename) as afile:
+ match = PACKAGE_REGEX.search(afile.read())
+ if match:
+ return match.group(1).replace('\n\t ', '').replace('.', '/')
+ return ''
+
+
+def write_coverage_sources(output, srcroot, files):
+ with open(output, 'w') as afile:
+ for filename in files:
+ pname = get_package_name(os.path.join(srcroot, filename))
+ afile.write(os.path.join(pname, os.path.basename(filename)) + ':' + filename + '\n')
+
+
+def main():
+ opts, files = parse_args()
+ write_coverage_sources(opts.output, opts.source_root, files)
+
+
+if __name__ == '__main__':
+ exit(main())
diff --git a/build/scripts/link_asrc.py b/build/scripts/link_asrc.py
new file mode 100644
index 0000000000..eec5fe09a8
--- /dev/null
+++ b/build/scripts/link_asrc.py
@@ -0,0 +1,84 @@
+import argparse
+import itertools
+import os
+import tarfile
+
+
+DELIM_JAVA = '__DELIM_JAVA__'
+DELIM_RES = '__DELIM_RES__'
+DELIM_ASSETS = '__DELIM_ASSETS__'
+DELIM_AIDL = '__DELIM_AIDL__'
+
+DELIMS = (
+ DELIM_JAVA,
+ DELIM_RES,
+ DELIM_ASSETS,
+ DELIM_AIDL,
+)
+
+DESTS = {
+ DELIM_JAVA: 'src',
+ DELIM_RES: 'res',
+ DELIM_ASSETS: 'assets',
+ DELIM_AIDL: 'aidl',
+}
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--asrcs', nargs='*')
+ parser.add_argument('--input', nargs='*')
+ parser.add_argument('--jsrcs', nargs='*')
+ parser.add_argument('--output', required=True)
+ parser.add_argument('--work', required=True)
+
+ return parser.parse_args()
+
+
+def main():
+ args = parse_args()
+
+ files = []
+ parts = []
+
+ if args.input and len(args.input) > 0:
+ for x in args.input:
+ if x in DELIMS:
+ assert(len(parts) == 0 or len(parts[-1]) > 1)
+ parts.append([x])
+ else:
+ assert(len(parts) > 0)
+ parts[-1].append(x)
+ assert(len(parts[-1]) > 1)
+
+ if args.jsrcs and len(args.jsrcs):
+ src_dir = os.path.join(args.work, DESTS[DELIM_JAVA])
+ os.makedirs(src_dir)
+
+ for jsrc in filter(lambda x: x.endswith('.jsrc'), args.jsrcs):
+ with tarfile.open(jsrc, 'r') as tar:
+ names = tar.getnames()
+ if names and len(names) > 0:
+ parts.append([DELIM_JAVA, src_dir])
+ parts[-1].extend(itertools.imap(lambda x: os.path.join(src_dir, x), names))
+ tar.extractall(path=src_dir)
+
+ if args.asrcs and len(args.asrcs):
+ for asrc in filter(lambda x: x.endswith('.asrc') and os.path.exists(x), args.asrcs):
+ with tarfile.open(asrc, 'r') as tar:
+ files.extend(tar.getnames())
+ tar.extractall(path=args.work)
+
+ with tarfile.open(args.output, 'w') as out:
+ for part in parts:
+ dest = DESTS[part[0]]
+ prefix = part[1]
+ for f in part[2:]:
+ out.add(f, arcname=os.path.join(dest, os.path.relpath(f, prefix)))
+
+ for f in files:
+ out.add(os.path.join(args.work, f), arcname=f)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py
new file mode 100644
index 0000000000..23487f5c1e
--- /dev/null
+++ b/build/scripts/link_dyn_lib.py
@@ -0,0 +1,294 @@
+import sys
+import os
+import subprocess
+import tempfile
+import collections
+import optparse
+import pipes
+
+from process_whole_archive_option import ProcessWholeArchiveOption
+
+
+def shlex_join(cmd):
+ # equivalent to shlex.join() in python 3
+ return ' '.join(
+ pipes.quote(part)
+ for part in cmd
+ )
+
+
+def parse_export_file(p):
+ with open(p, 'r') as f:
+ for l in f:
+ l = l.strip()
+
+ if l and '#' not in l:
+ words = l.split()
+ if len(words) == 2 and words[0] == 'linux_version':
+ yield {'linux_version': words[1]}
+ elif len(words) == 2:
+ yield {'lang': words[0], 'sym': words[1]}
+ elif len(words) == 1:
+ yield {'lang': 'C', 'sym': words[0]}
+ else:
+ raise Exception('unsupported exports line: ' + l)
+
+
+def to_c(sym):
+ symbols = collections.deque(sym.split('::'))
+ c_prefixes = [ # demangle prefixes for c++ symbols
+ '_ZN', # namespace
+ '_ZTIN', # typeinfo for
+ '_ZTSN', # typeinfo name for
+ '_ZTTN', # VTT for
+ '_ZTVN', # vtable for
+ '_ZNK', # const methods
+ ]
+ c_sym = ''
+ while symbols:
+ s = symbols.popleft()
+ if s == '*':
+ c_sym += '*'
+ break
+ if '*' in s and len(s) > 1:
+ raise Exception('Unsupported format, cannot guess length of symbol: ' + s)
+ c_sym += str(len(s)) + s
+ if symbols:
+ raise Exception('Unsupported format: ' + sym)
+ if c_sym[-1] != '*':
+ c_sym += 'E*'
+ return ['{prefix}{sym}'.format(prefix=prefix, sym=c_sym) for prefix in c_prefixes]
+
+
+def fix_darwin_param(ex):
+ for item in ex:
+ if item.get('linux_version'):
+ continue
+
+ if item['lang'] == 'C':
+ yield '-Wl,-exported_symbol,_' + item['sym']
+ elif item['lang'] == 'C++':
+ for sym in to_c(item['sym']):
+ yield '-Wl,-exported_symbol,_' + sym
+ else:
+ raise Exception('unsupported lang: ' + item['lang'])
+
+
+def fix_gnu_param(arch, ex):
+ d = collections.defaultdict(list)
+ version = None
+ for item in ex:
+ if item.get('linux_version'):
+ if not version:
+ version = item.get('linux_version')
+ else:
+ raise Exception('More than one linux_version defined')
+ elif item['lang'] == 'C++':
+ d['C'].extend(to_c(item['sym']))
+ else:
+ d[item['lang']].append(item['sym'])
+
+ with tempfile.NamedTemporaryFile(mode='wt', delete=False) as f:
+ if version:
+ f.write('{} {{\nglobal:\n'.format(version))
+ else:
+ f.write('{\nglobal:\n')
+
+ for k, v in d.items():
+ f.write(' extern "' + k + '" {\n')
+
+ for x in v:
+ f.write(' ' + x + ';\n')
+
+ f.write(' };\n')
+
+ f.write('local: *;\n};\n')
+
+ ret = ['-Wl,--version-script=' + f.name]
+
+ if arch == 'ANDROID':
+ ret += ['-Wl,--export-dynamic']
+
+ return ret
+
+
+def fix_windows_param(ex):
+ with tempfile.NamedTemporaryFile(delete=False) as def_file:
+ exports = []
+ for item in ex:
+ if item.get('lang') == 'C':
+ exports.append(item.get('sym'))
+ def_file.write('EXPORTS\n')
+ for export in exports:
+ def_file.write(' {}\n'.format(export))
+ return ['/DEF:{}'.format(def_file.name)]
+
+
+musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
+
+
+def fix_cmd(arch, musl, c):
+ if arch == 'WINDOWS':
+ prefix = '/DEF:'
+ f = fix_windows_param
+ else:
+ prefix = '-Wl,--version-script='
+ if arch in ('DARWIN', 'IOS'):
+ f = fix_darwin_param
+ else:
+ f = lambda x: fix_gnu_param(arch, x)
+
+ def do_fix(p):
+ if musl and p in musl_libs:
+ return []
+
+ if p.startswith(prefix) and p.endswith('.exports'):
+ fname = p[len(prefix):]
+
+ return list(f(list(parse_export_file(fname))))
+
+ if p.endswith('.supp'):
+ return []
+
+ if p.endswith('.pkg.fake'):
+ return []
+
+ return [p]
+
+ return sum((do_fix(x) for x in c), [])
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--arch')
+ parser.add_option('--target')
+ parser.add_option('--soname')
+ parser.add_option('--fix-elf')
+ parser.add_option('--linker-output')
+ parser.add_option('--musl', action='store_true')
+ parser.add_option('--whole-archive-peers', action='append')
+ parser.add_option('--whole-archive-libs', action='append')
+ return parser.parse_args()
+
+
+if __name__ == '__main__':
+ opts, args = parse_args()
+
+ assert opts.arch
+ assert opts.target
+
+ cmd = fix_cmd(opts.arch, opts.musl, args)
+ cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
+
+ if opts.linker_output:
+ stdout = open(opts.linker_output, 'w')
+ else:
+ stdout = sys.stdout
+
+ proc = subprocess.Popen(cmd, shell=False, stderr=sys.stderr, stdout=stdout)
+ proc.communicate()
+
+ if proc.returncode:
+ print >>sys.stderr, 'linker has failed with retcode:', proc.returncode
+ print >>sys.stderr, 'linker command:', shlex_join(cmd)
+ sys.exit(proc.returncode)
+
+ if opts.fix_elf:
+ cmd = [opts.fix_elf, opts.target]
+ proc = subprocess.Popen(cmd, shell=False, stderr=sys.stderr, stdout=sys.stdout)
+ proc.communicate()
+
+ if proc.returncode:
+ print >>sys.stderr, 'fix_elf has failed with retcode:', proc.returncode
+ print >>sys.stderr, 'fix_elf command:', shlex_join(cmd)
+ sys.exit(proc.returncode)
+
+ if opts.soname and opts.soname != opts.target:
+ if os.path.exists(opts.soname):
+ os.unlink(opts.soname)
+ os.link(opts.target, opts.soname)
+
+
+# -----------------Test---------------- #
+def write_temp_file(content):
+ import yatest.common as yc
+ filename = yc.output_path('test.exports')
+ with open(filename, 'w') as f:
+ f.write(content)
+ return filename
+
+
+def test_fix_cmd_darwin():
+ export_file_content = """
+C++ geobase5::details::lookup_impl::*
+C++ geobase5::hardcoded_service
+"""
+ filename = write_temp_file(export_file_content)
+ args = ['-Wl,--version-script={}'.format(filename)]
+ assert fix_cmd('DARWIN', False, args) == [
+ '-Wl,-exported_symbol,__ZN8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZTIN8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZTSN8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZTTN8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZTVN8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZNK8geobase57details11lookup_impl*',
+ '-Wl,-exported_symbol,__ZN8geobase517hardcoded_serviceE*',
+ '-Wl,-exported_symbol,__ZTIN8geobase517hardcoded_serviceE*',
+ '-Wl,-exported_symbol,__ZTSN8geobase517hardcoded_serviceE*',
+ '-Wl,-exported_symbol,__ZTTN8geobase517hardcoded_serviceE*',
+ '-Wl,-exported_symbol,__ZTVN8geobase517hardcoded_serviceE*',
+ '-Wl,-exported_symbol,__ZNK8geobase517hardcoded_serviceE*',
+ ]
+
+
+def run_fix_gnu_param(export_file_content):
+ filename = write_temp_file(export_file_content)
+ result = fix_gnu_param('LINUX', list(parse_export_file(filename)))[0]
+ version_script_path = result[len('-Wl,--version-script='):]
+ with open(version_script_path) as f:
+ content = f.read()
+ return content
+
+
+def test_fix_gnu_param():
+ export_file_content = """
+C++ geobase5::details::lookup_impl::*
+C getFactoryMap
+"""
+ assert run_fix_gnu_param(export_file_content) == """{
+global:
+ extern "C" {
+ _ZN8geobase57details11lookup_impl*;
+ _ZTIN8geobase57details11lookup_impl*;
+ _ZTSN8geobase57details11lookup_impl*;
+ _ZTTN8geobase57details11lookup_impl*;
+ _ZTVN8geobase57details11lookup_impl*;
+ _ZNK8geobase57details11lookup_impl*;
+ getFactoryMap;
+ };
+local: *;
+};
+"""
+
+
+def test_fix_gnu_param_with_linux_version():
+ export_file_content = """
+C++ geobase5::details::lookup_impl::*
+linux_version ver1.0
+C getFactoryMap
+"""
+ assert run_fix_gnu_param(export_file_content) == """ver1.0 {
+global:
+ extern "C" {
+ _ZN8geobase57details11lookup_impl*;
+ _ZTIN8geobase57details11lookup_impl*;
+ _ZTSN8geobase57details11lookup_impl*;
+ _ZTTN8geobase57details11lookup_impl*;
+ _ZTVN8geobase57details11lookup_impl*;
+ _ZNK8geobase57details11lookup_impl*;
+ getFactoryMap;
+ };
+local: *;
+};
+"""
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
new file mode 100644
index 0000000000..f469e3b442
--- /dev/null
+++ b/build/scripts/link_exe.py
@@ -0,0 +1,82 @@
+import sys
+import subprocess
+import optparse
+
+from process_whole_archive_option import ProcessWholeArchiveOption
+
+
+def get_leaks_suppressions(cmd):
+ supp, newcmd = [], []
+ for arg in cmd:
+ if arg.endswith(".supp"):
+ supp.append(arg)
+ else:
+ newcmd.append(arg)
+ return supp, newcmd
+
+
+musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
+
+
+def fix_cmd(musl, c):
+ return [i for i in c if (not musl or i not in musl_libs) and not i.endswith('.ios.interface') and not i.endswith('.pkg.fake')]
+
+
+def gen_default_suppressions(inputs, output, source_root):
+ import collections
+ import os
+
+ supp_map = collections.defaultdict(set)
+ for filename in inputs:
+ sanitizer = os.path.basename(filename).split('.', 1)[0]
+ with open(os.path.join(source_root, filename)) as src:
+ for line in src:
+ line = line.strip()
+ if not line or line.startswith('#'):
+ continue
+ supp_map[sanitizer].add(line)
+
+ with open(output, "wb") as dst:
+ for supp_type, supps in supp_map.items():
+ dst.write('extern "C" const char *__%s_default_suppressions() {\n' % supp_type)
+ dst.write(' return "{}";\n'.format('\\n'.join(sorted(supps))))
+ dst.write('}\n')
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--musl', action='store_true')
+ parser.add_option('--custom-step')
+ parser.add_option('--python')
+ parser.add_option('--source-root')
+ parser.add_option('--arch')
+ parser.add_option('--linker-output')
+ parser.add_option('--whole-archive-peers', action='append')
+ parser.add_option('--whole-archive-libs', action='append')
+ return parser.parse_args()
+
+
+if __name__ == '__main__':
+ opts, args = parse_args()
+
+ cmd = fix_cmd(opts.musl, args)
+ cmd = ProcessWholeArchiveOption(opts.arch, opts.whole_archive_peers, opts.whole_archive_libs).construct_cmd(cmd)
+
+ if opts.custom_step:
+ assert opts.python
+ subprocess.check_call([opts.python] + [opts.custom_step] + args)
+
+ supp, cmd = get_leaks_suppressions(cmd)
+ if supp:
+ src_file = "default_suppressions.cpp"
+ gen_default_suppressions(supp, src_file, opts.source_root)
+ cmd += [src_file]
+
+ if opts.linker_output:
+ stdout = open(opts.linker_output, 'w')
+ else:
+ stdout = sys.stdout
+
+ rc = subprocess.call(cmd, shell=False, stderr=sys.stderr, stdout=stdout)
+ sys.exit(rc)
diff --git a/build/scripts/link_fat_obj.py b/build/scripts/link_fat_obj.py
new file mode 100644
index 0000000000..c189668b9e
--- /dev/null
+++ b/build/scripts/link_fat_obj.py
@@ -0,0 +1,91 @@
+import argparse
+import subprocess
+import sys
+
+from process_whole_archive_option import ProcessWholeArchiveOption
+
+YA_ARG_PREFIX = '-Ya,'
+
+
+def get_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--obj')
+ parser.add_argument('--globals-lib')
+ parser.add_argument('--lib', required=True)
+ parser.add_argument('--arch', required=True)
+ parser.add_argument('--build-root', default=None)
+ parser.add_argument('--with-own-obj', action='store_true', default=False)
+ parser.add_argument('--with-global-srcs', action='store_true', default=False)
+
+ groups = {}
+ args_list = groups.setdefault('default', [])
+ for arg in sys.argv[1:]:
+ if arg == '--with-own-obj':
+ groups['default'].append(arg)
+ elif arg == '--globals-lib':
+ groups['default'].append(arg)
+ elif arg == '--with-global-srcs':
+ groups['default'].append(arg)
+ elif arg.startswith(YA_ARG_PREFIX):
+ group_name = arg[len(YA_ARG_PREFIX):]
+ args_list = groups.setdefault(group_name, [])
+ else:
+ args_list.append(arg)
+
+ return parser.parse_args(groups['default']), groups
+
+
+def strip_suppression_files(srcs):
+ return [s for s in srcs if not s.endswith('.supp')]
+
+
+def main():
+ args, groups = get_args()
+
+ # Inputs
+ auto_input = groups['input']
+
+ # Outputs
+ lib_output = args.lib
+ obj_output = args.obj
+
+ # Dependencies
+ global_srcs = groups['global_srcs']
+ global_srcs = strip_suppression_files(global_srcs)
+ global_srcs = ProcessWholeArchiveOption(args.arch).construct_cmd(global_srcs)
+ peers = groups['peers']
+
+ # Tools
+ linker = groups['linker']
+ archiver = groups['archiver']
+
+ do_link = linker + ['-o', obj_output, '-Wl,-r', '-nodefaultlibs', '-nostartfiles'] + global_srcs + auto_input
+ do_archive = archiver + [lib_output] + peers
+ do_globals = None
+ if args.globals_lib:
+ do_globals = archiver + [args.globals_lib] + auto_input + global_srcs
+ if args.with_own_obj:
+ do_archive += auto_input
+ if args.with_global_srcs:
+ do_archive += global_srcs
+
+ def call(c):
+ proc = subprocess.Popen(c, shell=False, stderr=sys.stderr, stdout=sys.stdout, cwd=args.build_root)
+ proc.communicate()
+ return proc.returncode
+
+ if obj_output:
+ link_res = call(do_link)
+ if link_res:
+ sys.exit(link_res)
+
+ if do_globals:
+ glob_res = call(do_globals)
+ if glob_res:
+ sys.exit(glob_res)
+
+ sys.exit(call(do_archive))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/link_lib.py b/build/scripts/link_lib.py
new file mode 100644
index 0000000000..344d50d4eb
--- /dev/null
+++ b/build/scripts/link_lib.py
@@ -0,0 +1,85 @@
+import sys
+import subprocess
+import tempfile
+import os
+
+
+class Opts(object):
+ def __init__(self, args):
+ self.archiver = args[0]
+ self.arch_type = args[1]
+ self.llvm_ar_format = args[2]
+ self.build_root = args[3]
+ self.plugin = args[4]
+ self.output = args[5]
+ auto_input = args[6:]
+
+ if self.arch_type == 'GNU_AR':
+ self.create_flags = ['rcs']
+ self.modify_flags = ['-M']
+ elif self.arch_type == 'LLVM_AR':
+ self.create_flags = ['rcs', '-format=%s' % self.llvm_ar_format]
+ self.modify_flags = ['-M']
+ elif self.arch_type == 'LIBTOOL':
+ self.create_flags = ['-static', '-o']
+ self.modify_flags = []
+
+ need_modify = self.arch_type != 'LIBTOOL' and any(item.endswith('.a') for item in auto_input)
+ if need_modify:
+ self.objs = filter(lambda x: x.endswith('.o'), auto_input)
+ self.libs = filter(lambda x: x.endswith('.a'), auto_input)
+ else:
+ self.objs = auto_input
+ self.libs = []
+
+ self.plugin_flags = ['--plugin', self.plugin] if self.plugin != 'None' else []
+
+
+def get_opts(args):
+ return Opts(args)
+
+
+if __name__ == "__main__":
+ opts = get_opts(sys.argv[1:])
+
+ # There is a bug in llvm-ar. Some files with size slightly greater 2^32
+ # still have GNU format instead of GNU64 and cause link problems.
+ # Workaround just lowers llvm-ar's GNU64 threshold to 2^31.
+ if opts.arch_type == 'LLVM_AR':
+ os.environ['SYM64_THRESHOLD'] = '31'
+
+ def call():
+ try:
+ p = subprocess.Popen(cmd, stdin=stdin, cwd=opts.build_root)
+ rc = p.wait()
+ return rc
+ except OSError as e:
+ raise Exception('while running %s: %s' % (' '.join(cmd), e))
+
+ try:
+ os.unlink(opts.output)
+ except OSError:
+ pass
+
+ if not opts.libs:
+ cmd = [opts.archiver] + opts.create_flags + opts.plugin_flags + [opts.output] + opts.objs
+ stdin = None
+ exit_code = call()
+ else:
+ temp = tempfile.NamedTemporaryFile(dir=os.path.dirname(opts.output), delete=False)
+
+ with open(temp.name, 'w') as tmp:
+ tmp.write('CREATE {0}\n'.format(opts.output))
+ for lib in opts.libs:
+ tmp.write('ADDLIB {0}\n'.format(lib))
+ for obj in opts.objs:
+ tmp.write('ADDMOD {0}\n'.format(obj))
+ tmp.write('SAVE\n')
+ tmp.write('END\n')
+ cmd = [opts.archiver] + opts.modify_flags + opts.plugin_flags
+ stdin = open(temp.name)
+ exit_code = call()
+ os.remove(temp.name)
+
+ if exit_code != 0:
+ raise Exception('{0} returned non-zero exit code {1}. Stop.'.format(' '.join(cmd), exit_code))
diff --git a/build/scripts/llvm_opt_wrapper.py b/build/scripts/llvm_opt_wrapper.py
new file mode 100644
index 0000000000..38ca3004af
--- /dev/null
+++ b/build/scripts/llvm_opt_wrapper.py
@@ -0,0 +1,18 @@
+import subprocess
+import sys
+
+
+def fix(s):
+ # we use '#' instead of ',' because ymake always splits args by comma
+ if 'internalize' in s:
+ return s.replace('#', ',')
+
+ return s
+
+
+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)
diff --git a/build/scripts/make_java_classpath_file.py b/build/scripts/make_java_classpath_file.py
new file mode 100644
index 0000000000..c70a7876d7
--- /dev/null
+++ b/build/scripts/make_java_classpath_file.py
@@ -0,0 +1,26 @@
+import os
+import sys
+
+import process_command_files as pcf
+
+
+def make_cp_file(args):
+ source = args[0]
+ destination = args[1]
+ with open(source) as src:
+ lines = [l.strip() for l in src if l.strip()]
+ with open(destination, 'w') as dst:
+ dst.write(os.pathsep.join(lines))
+
+def make_cp_file_from_args(args):
+ destination = args[0]
+ with open(destination, 'w') as dst:
+ dst.write(os.pathsep.join(args[1:]))
+
+
+if __name__ == '__main__':
+ args = pcf.get_args(sys.argv[1:])
+ if sys.argv[1] != '--from-args':
+ make_cp_file(args)
+ else:
+ make_cp_file_from_args(args[1:])
diff --git a/build/scripts/make_java_srclists.py b/build/scripts/make_java_srclists.py
new file mode 100644
index 0000000000..f1dc807f7d
--- /dev/null
+++ b/build/scripts/make_java_srclists.py
@@ -0,0 +1,122 @@
+import os
+import sys
+import argparse
+
+import process_command_files as pcf
+import java_pack_to_file as jcov
+
+
+def writelines(f, rng):
+ f.writelines(item + '\n' for item in rng)
+
+
+def main():
+ args = pcf.get_args(sys.argv[1:])
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--moddir')
+ parser.add_argument('--java')
+ parser.add_argument('--groovy')
+ parser.add_argument('--kotlin')
+ parser.add_argument('--coverage')
+ parser.add_argument('--source-root')
+ args, remaining_args = parser.parse_known_args(args)
+
+ java = []
+ kotlin = []
+ groovy = []
+ coverage = []
+
+ cur_resources_list_file = None
+ cur_jsources_list_file = None
+ cur_srcdir = None
+ cur_resources = []
+ cur_jsources = []
+
+ FILE_ARG = 1
+ RESOURCES_DIR_ARG = 2
+ SRCDIR_ARG = 3
+ JSOURCES_DIR_ARG = 4
+
+ next_arg=FILE_ARG
+
+ for src in remaining_args:
+ if next_arg == RESOURCES_DIR_ARG:
+ assert cur_resources_list_file is None
+ cur_resources_list_file = src
+ next_arg = FILE_ARG
+ continue
+ elif next_arg == JSOURCES_DIR_ARG:
+ assert cur_jsources_list_file is None
+ cur_jsources_list_file = src
+ next_arg = FILE_ARG
+ continue
+ elif next_arg == SRCDIR_ARG:
+ assert cur_srcdir is None
+ cur_srcdir = src if os.path.isabs(src) else os.path.join(args.moddir, src)
+ next_arg = FILE_ARG
+ continue
+
+ if src.endswith(".java"):
+ java.append(src)
+ kotlin.append(src)
+ if args.coverage and args.source_root:
+ rel = os.path.relpath(src, args.source_root)
+ if not rel.startswith('..' + os.path.sep):
+ coverage.append(rel)
+ elif args.kotlin and src.endswith(".kt"):
+ kotlin.append(src)
+ elif args.groovy and src.endswith(".groovy"):
+ groovy.append(src)
+ else:
+ if src == '--resources':
+ if cur_resources_list_file is not None:
+ with open(cur_resources_list_file, 'w') as f:
+ writelines(f, cur_resources)
+ cur_resources_list_file = None
+ cur_srcdir = None
+ cur_resources = []
+ next_arg = RESOURCES_DIR_ARG
+ continue
+ if src == '--jsources':
+ if cur_jsources_list_file is not None:
+ with open(cur_jsources_list_file, 'w') as f:
+ writelines(f, cur_jsources)
+ cur_jsources_list_file = None
+ cur_jsources = []
+ next_arg = JSOURCES_DIR_ARG
+ continue
+ elif src == '--srcdir':
+ next_arg = SRCDIR_ARG
+ continue
+ else:
+ assert cur_srcdir is not None and cur_resources_list_file is not None
+ cur_resources.append(os.path.relpath(src, cur_srcdir))
+
+ if cur_jsources_list_file is not None:
+ assert cur_srcdir is not None
+ cur_jsources.append(os.path.relpath(src, cur_srcdir))
+
+ if cur_resources_list_file is not None:
+ with open(cur_resources_list_file, 'w') as f:
+ writelines(f, cur_resources)
+ if cur_jsources_list_file is not None:
+ with open(cur_jsources_list_file, 'w') as f:
+ writelines(f, cur_jsources)
+
+ if args.java:
+ with open(args.java, 'w') as f:
+ writelines(f, java)
+ if args.kotlin:
+ with open(args.kotlin, 'w') as f:
+ writelines(f, kotlin)
+ if args.groovy:
+ with open(args.groovy, 'w') as f:
+ writelines(f, groovy)
+ if args.coverage:
+ jcov.write_coverage_sources(args.coverage, args.source_root, coverage)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main()) \ No newline at end of file
diff --git a/build/scripts/make_manifest_from_bf.py b/build/scripts/make_manifest_from_bf.py
new file mode 100644
index 0000000000..bfea3ba3de
--- /dev/null
+++ b/build/scripts/make_manifest_from_bf.py
@@ -0,0 +1,28 @@
+import sys
+import zipfile
+import os
+import re
+
+
+def prepare_path(path):
+ return ('file:/' + path.lstrip('/')) if os.path.isabs(path) else path
+
+
+def main(args):
+ bf, mf = args[0], args[1]
+ if not os.path.exists(os.path.dirname(mf)):
+ os.makedirs(os.path.dirname(mf))
+ with open(bf) as f:
+ class_path = f.read().strip()
+ class_path = ' '.join(map(prepare_path, class_path.split('\n')))
+ with zipfile.ZipFile(mf, 'w') as zf:
+ lines = []
+ while class_path:
+ lines.append(class_path[:60])
+ class_path = class_path[60:]
+ if lines:
+ zf.writestr('META-INF/MANIFEST.MF', 'Manifest-Version: 1.0\nClass-Path: \n ' + '\n '.join(lines) + ' \n\n')
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/merge_coverage_data.py b/build/scripts/merge_coverage_data.py
new file mode 100644
index 0000000000..b7fa3c6a86
--- /dev/null
+++ b/build/scripts/merge_coverage_data.py
@@ -0,0 +1,32 @@
+import sys
+import tarfile
+import copy
+import os
+import uuid
+
+
+def main(args):
+ output_file, args = args[0], args[1:]
+ # heretic@: Splits files on which could be merged( files ) and which should not be merged( expendables )
+ # expendables will be in output_file in form {name}{ordinal number of archive in args[]}.{extension}
+ try:
+ split_i = args.index('-no-merge')
+ except ValueError:
+ split_i = len(args)
+ files, expendables = args[:split_i], args[split_i + 1:]
+
+ with tarfile.open(output_file, 'w') as outf:
+ for x in files:
+ with tarfile.open(x) as tf:
+ for tarinfo in tf:
+ new_tarinfo = copy.deepcopy(tarinfo)
+ if new_tarinfo.name in expendables:
+ dirname, basename = os.path.split(new_tarinfo.name)
+ basename_parts = basename.split('.', 1)
+ new_basename = '.'.join([basename_parts[0] + str(uuid.uuid4())] + basename_parts[1:])
+ new_tarinfo.name = os.path.join(dirname, new_basename)
+ outf.addfile(new_tarinfo, tf.extractfile(tarinfo))
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/merge_files.py b/build/scripts/merge_files.py
new file mode 100644
index 0000000000..d42d6a2139
--- /dev/null
+++ b/build/scripts/merge_files.py
@@ -0,0 +1,8 @@
+import sys
+
+
+if __name__ == "__main__":
+ with open(sys.argv[1], "w") as f:
+ for appended in sys.argv[2:]:
+ with open(appended) as a:
+ f.write(a.read())
diff --git a/build/scripts/mkdir.py b/build/scripts/mkdir.py
new file mode 100755
index 0000000000..a326b29300
--- /dev/null
+++ b/build/scripts/mkdir.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+import os
+import sys
+
+
+def mkdir_p(directory):
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+if __name__ == "__main__":
+ for directory in sys.argv[1:]:
+ mkdir_p(directory)
diff --git a/build/scripts/mkdocs_builder_wrapper.py b/build/scripts/mkdocs_builder_wrapper.py
new file mode 100644
index 0000000000..7e10dfac07
--- /dev/null
+++ b/build/scripts/mkdocs_builder_wrapper.py
@@ -0,0 +1,35 @@
+import os
+import subprocess
+import sys
+
+
+def main():
+ cmd = []
+ build_root = sys.argv[1]
+ length = len(build_root)
+ is_dep = False
+ for arg in sys.argv[2:]:
+ if is_dep:
+ is_dep = False
+ if not arg.endswith('.tar.gz'):
+ continue
+ basename = os.path.basename(arg)
+ assert arg.startswith(build_root) and len(arg) > length + len(basename) and arg[length] in ('/', '\\')
+ cmd.extend(['--dep', '{}:{}:{}'.format(build_root, os.path.dirname(arg[length+1:]), basename)])
+ elif arg == '--dep':
+ is_dep = True
+ else:
+ cmd.append(arg)
+ assert not is_dep
+ p = subprocess.Popen(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if p.returncode:
+ if out:
+ sys.stderr.write('stdout:\n{}\n'.format(out))
+ if err:
+ sys.stderr.write('stderr:\n{}\n'.format(err))
+ sys.exit(p.returncode)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/mkver.py b/build/scripts/mkver.py
new file mode 100755
index 0000000000..321cdaade1
--- /dev/null
+++ b/build/scripts/mkver.py
@@ -0,0 +1,12 @@
+import sys
+
+if __name__ == '__main__':
+ with open(sys.argv[1], 'r') as f:
+ data = f.readline()
+
+ beg = data.find('(') + 1
+ end = data.find(')')
+ version = data[beg:end]
+
+ print '#pragma once'
+ print '#define DEBIAN_VERSION "%s"' % version
diff --git a/build/scripts/move.py b/build/scripts/move.py
new file mode 100644
index 0000000000..3f611fbc2e
--- /dev/null
+++ b/build/scripts/move.py
@@ -0,0 +1,15 @@
+import os
+import sys
+
+# /script/move.py <src-1> <tgt-1> <src-2> <tgt-2> ... <src-n> <tgt-n>
+# renames src-1 to tgt-1, src-2 to tgt-2, ..., src-n to tgt-n.
+
+
+def main():
+ assert len(sys.argv) % 2 == 1
+ for index in range(1, len(sys.argv), 2):
+ os.rename(sys.argv[index], sys.argv[index + 1])
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/pack_ios.py b/build/scripts/pack_ios.py
new file mode 100644
index 0000000000..37c36d1f95
--- /dev/null
+++ b/build/scripts/pack_ios.py
@@ -0,0 +1,48 @@
+import argparse
+import os
+import shutil
+import subprocess
+import sys
+import tarfile
+
+
+def just_do_it():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--binary", required=True, help="executable file")
+ parser.add_argument("--target", required=True, help="target archive path")
+ parser.add_argument("--temp-dir", required=True, help="temp dir")
+ parser.add_argument("peers", nargs='*')
+ args = parser.parse_args()
+ app_tar = [p for p in args.peers if p.endswith('.ios.interface')]
+ if not app_tar:
+ print >> sys.stderr, 'No one IOS_INTERFACE module found'
+ shutil.copyfile(args.binary, os.path.join(args.temp_dir, 'bin'))
+ if os.path.exists(args.target):
+ os.remove(args.target)
+ with tarfile.open(args.target, 'w') as tf:
+ tf.add(os.path.join(args.temp_dir, 'bin'), arcname=os.path.join(os.path.basename(args.binary) + '.app', 'bin'))
+ return
+ if len(app_tar) > 1:
+ app_tar = [p for p in args.peers if not p.endswith('.default.ios.interface')]
+ if len(app_tar) > 1:
+ print >> sys.stderr, 'Many IOS_INTERFACE modules found, {} will be used'.format(app_tar[-1])
+ app_tar = app_tar[-1]
+ with tarfile.open(app_tar) as tf:
+ tf.extractall(args.temp_dir)
+ tar_suffix = '.default.ios.interface' if app_tar.endswith('.default.ios.interface') else '.ios.interface'
+ app_unpacked_path = os.path.join(args.temp_dir, os.path.basename(app_tar)[:-len(tar_suffix)] + '.app')
+ if not os.path.exists(app_unpacked_path):
+ raise Exception('Bad IOS_INTERFACE resource: {}'.format(app_tar))
+ shutil.copyfile(args.binary, os.path.join(app_unpacked_path, 'bin'))
+ subprocess.check_call(['/usr/bin/codesign', '--force', '--sign', '-', app_unpacked_path])
+ if os.path.exists(args.target):
+ os.remove(args.target)
+ binary_origin_name = os.path.basename(args.binary)
+ while os.path.splitext(binary_origin_name)[1]:
+ binary_origin_name = os.path.splitext(binary_origin_name)[0]
+ with tarfile.open(args.target, 'w') as tf:
+ tf.add(app_unpacked_path, arcname=binary_origin_name + '.app', recursive=True)
+
+
+if __name__ == '__main__':
+ just_do_it()
diff --git a/build/scripts/pack_jcoverage_resources.py b/build/scripts/pack_jcoverage_resources.py
new file mode 100644
index 0000000000..f6e181067a
--- /dev/null
+++ b/build/scripts/pack_jcoverage_resources.py
@@ -0,0 +1,24 @@
+import sys
+import tarfile
+import os
+import subprocess
+
+
+def main(args):
+ output_file = args[0]
+ report_file = args[1]
+
+ res = subprocess.call(args[args.index('-end') + 1:])
+
+ if not os.path.exists(report_file):
+ print>>sys.stderr, 'Can\'t find jacoco exec file'
+ return res
+
+ with tarfile.open(output_file, 'w') as outf:
+ outf.add(report_file, arcname=os.path.basename(report_file))
+
+ return res
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/build/scripts/perl_wrapper.py b/build/scripts/perl_wrapper.py
new file mode 100644
index 0000000000..cb4027f1d3
--- /dev/null
+++ b/build/scripts/perl_wrapper.py
@@ -0,0 +1,24 @@
+import os
+import sys
+import shutil
+
+if __name__ == '__main__':
+ path = sys.argv[1]
+ to = sys.argv[-1]
+ fr = sys.argv[-2]
+ to_dir = os.path.dirname(to)
+
+ os.chdir(to_dir)
+
+ f1 = os.path.basename(fr)
+ fr_ = os.path.dirname(fr)
+ f2 = os.path.basename(fr_)
+ fr_ = os.path.dirname(fr_)
+
+ os.makedirs(f2)
+ shutil.copyfile(fr, os.path.join(f2, f1))
+
+ if path[0] != '/':
+ path = os.path.join(os.path.dirname(__file__), path)
+
+ os.execv(path, [path] + sys.argv[2:])
diff --git a/build/scripts/postprocess_go_fbs.py b/build/scripts/postprocess_go_fbs.py
new file mode 100644
index 0000000000..325fa07ea6
--- /dev/null
+++ b/build/scripts/postprocess_go_fbs.py
@@ -0,0 +1,72 @@
+import argparse
+import re
+import os
+
+
+# very simple regexp to find go import statement in the source code
+# NOTE! only one-line comments are somehow considered
+IMPORT_DECL=re.compile(r'''
+ \bimport
+ (
+ \s+((\.|\w+)\s+)?"[^"]+" ( \s+//[^\n]* )?
+ | \s* \( \s* ( ( \s+ ((\.|\w+)\s+)? "[^"]+" )? ( \s* //[^\n]* )? )* \s* \)
+ )''', re.MULTILINE | re.DOTALL | re.VERBOSE)
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--input-dir', required=True)
+ parser.add_argument('--map', nargs='*', default=None)
+
+ return parser.parse_args()
+
+
+def process_go_file(file_name, import_map):
+ content = ''
+ with open(file_name, 'r') as f:
+ content = f.read()
+
+ start = -1
+ end = -1
+ for it in IMPORT_DECL.finditer(content):
+ if start < 0:
+ start = it.start()
+ end = it.end()
+
+ if start < 0:
+ return
+
+ imports = content[start:end]
+ for namespace, path in import_map.iteritems():
+ ns = namespace.split('.')
+ name = '__'.join(ns)
+ import_path = '/'.join(ns)
+ imports = imports.replace('{} "{}"'.format(name, import_path), '{} "a.yandex-team.ru/{}"'.format(name, path))
+
+ if imports != content[start:end]:
+ with open(file_name, 'w') as f:
+ f.write(content[:start])
+ f.write(imports)
+ f.write(content[end:])
+
+
+def main():
+ args = parse_args()
+
+ if not args.map:
+ return
+
+ raw_import_map = sorted(set(args.map))
+ import_map = dict(z.split('=', 1) for z in raw_import_map)
+ if len(raw_import_map) != len(import_map):
+ for k, v in (z.split('=', 1) for z in raw_import_map):
+ if v != import_map[k]:
+ raise Exception('import map [{}] contains different values for key [{}]: [{}] and [{}].'.format(args.map, k, v, import_map[k]))
+
+ for root, _, files in os.walk(args.input_dir):
+ for src in (f for f in files if f.endswith('.go')):
+ process_go_file(os.path.join(root, src), import_map)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/preprocess.py b/build/scripts/preprocess.py
new file mode 100644
index 0000000000..4657bef732
--- /dev/null
+++ b/build/scripts/preprocess.py
@@ -0,0 +1,48 @@
+import sys
+import os
+
+
+def load_file(p):
+ with open(p, 'r') as f:
+ return f.read()
+
+
+def step(base, data, hh):
+ def flt():
+ for l in data.split('\n'):
+ if l in hh:
+ pp = os.path.join(base, hh[l])
+
+ yield '\n\n' + load_file(pp) + '\n\n'
+
+ os.unlink(pp)
+ else:
+ yield l
+
+ return '\n'.join(flt())
+
+
+def subst_headers(path, headers):
+ hh = dict()
+
+ for h in headers:
+ hh['# include "' + h + '"'] = h
+
+ data = load_file(path)
+ prev = data
+
+ while True:
+ ret = step(os.path.dirname(path), prev, hh)
+
+ if ret == prev:
+ break
+
+ prev = ret
+
+ if data != prev:
+ with open(path, 'w') as f:
+ f.write(prev)
+
+
+if __name__ == '__main__':
+ subst_headers(sys.argv[1], ['stack.hh', 'position.hh', 'location.hh'])
diff --git a/build/scripts/process_command_files.py b/build/scripts/process_command_files.py
new file mode 100644
index 0000000000..e24bdf3e2b
--- /dev/null
+++ b/build/scripts/process_command_files.py
@@ -0,0 +1,33 @@
+import sys
+
+
+def is_cmdfile_arg(arg):
+ return arg.startswith('@')
+
+def cmdfile_path(arg):
+ return arg[1:]
+
+def read_from_command_file(arg):
+ with open(arg) as afile:
+ return afile.read().splitlines()
+
+def skip_markers(args):
+ res = []
+ for arg in args:
+ if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
+ continue
+ res.append(arg)
+ return res
+
+def iter_args(args):
+ for arg in args:
+ if not is_cmdfile_arg(arg):
+ if arg == '--ya-start-command-file' or arg == '--ya-end-command-file':
+ continue
+ yield arg
+ else:
+ for cmdfile_arg in read_from_command_file(cmdfile_path(arg)):
+ yield cmdfile_arg
+
+def get_args(args):
+ return list(iter_args(args))
diff --git a/build/scripts/process_whole_archive_option.py b/build/scripts/process_whole_archive_option.py
new file mode 100644
index 0000000000..85605074a5
--- /dev/null
+++ b/build/scripts/process_whole_archive_option.py
@@ -0,0 +1,176 @@
+import os
+import sys
+
+import process_command_files as pcf
+
+
+class ProcessWholeArchiveOption():
+ def __init__(self, arch, peers=None, libs=None):
+ self.arch = arch.upper()
+ self.peers = { x : 0 for x in peers } if peers else None
+ self.libs = { x : 0 for x in libs } if libs else None
+ self.start_wa_marker = '--start-wa'
+ self.end_wa_marker = '--end-wa'
+
+ def _match_peer_lib(self, arg, ext):
+ key = None
+ if arg.endswith(ext):
+ key = os.path.dirname(arg)
+ return key if key and self.peers and key in self.peers else None
+
+ def _match_lib(self, arg):
+ return arg if self.libs and arg in self.libs else None
+
+ def _process_arg(self, arg, ext='.a'):
+ peer_key = self._match_peer_lib(arg, ext)
+ lib_key = self._match_lib(arg)
+ if peer_key:
+ self.peers[peer_key] += 1
+ if lib_key:
+ self.libs[lib_key] += 1
+ return peer_key if peer_key else lib_key
+
+ def _check_peers(self):
+ if self.peers:
+ for key, value in self.peers.items():
+ assert value > 0, '"{}" specified in WHOLE_ARCHIVE() macro is not used on link command'.format(key)
+
+ def _construct_cmd_apple(self, args):
+ force_load_flag = '-Wl,-force_load,'
+ is_inside_wa_markers = False
+
+ cmd = []
+ for arg in args:
+ if arg.startswith(force_load_flag):
+ cmd.append(arg)
+ elif arg == self.start_wa_marker:
+ is_inside_wa_markers = True
+ elif arg == self.end_wa_marker:
+ is_inside_wa_markers = False
+ elif is_inside_wa_markers:
+ cmd.append(force_load_flag + arg)
+ else:
+ key = self._process_arg(arg)
+ cmd.append(force_load_flag + arg if key else arg)
+
+ self._check_peers()
+
+ return cmd
+
+ def _construct_cmd_win(self, args):
+ whole_archive_prefix = '/WHOLEARCHIVE:'
+ is_inside_wa_markers = False
+
+ def add_prefix(arg, need_check_peers_and_libs):
+ key = self._process_arg(arg, '.lib') if need_check_peers_and_libs else arg
+ return whole_archive_prefix + arg if key else arg
+
+ def add_whole_archive_prefix(arg, need_check_peers_and_libs):
+ if not pcf.is_cmdfile_arg(arg):
+ return add_prefix(arg, need_check_peers_and_libs)
+
+ cmd_file_path = pcf.cmdfile_path(arg)
+ cf_args = pcf.read_from_command_file(cmd_file_path)
+ with open(cmd_file_path, 'w') as afile:
+ for cf_arg in cf_args:
+ afile.write(add_prefix(cf_arg, need_check_peers_and_libs) + "\n")
+ return arg
+
+ cmd = []
+ for arg in args:
+ if arg == self.start_wa_marker:
+ is_inside_wa_markers = True
+ elif arg == self.end_wa_marker:
+ is_inside_wa_markers = False
+ elif is_inside_wa_markers:
+ cmd.append(add_whole_archive_prefix(arg, False))
+ continue
+ elif self.peers or self.libs:
+ cmd.append(add_whole_archive_prefix(arg, True))
+ else:
+ cmd.append(arg)
+
+ self._check_peers()
+
+ return cmd
+
+ def _construct_cmd_linux(self, args):
+ whole_archive_flag = '-Wl,--whole-archive'
+ no_whole_archive_flag = '-Wl,--no-whole-archive'
+
+ def replace_markers(arg):
+ if arg == self.start_wa_marker:
+ return whole_archive_flag
+ if arg == self.end_wa_marker:
+ return no_whole_archive_flag
+ return arg
+
+ args = [replace_markers(arg) for arg in args]
+
+ cmd = []
+ is_inside_whole_archive = False
+ is_whole_archive = False
+ # We are trying not to create excessive sequences of consecutive flags
+ # -Wl,--no-whole-archive -Wl,--whole-archive ('externally' specified
+ # flags -Wl,--[no-]whole-archive are not taken for consideration in this
+ # optimization intentionally)
+ for arg in args:
+ if arg == whole_archive_flag:
+ is_inside_whole_archive = True
+ is_whole_archive = False
+ elif arg == no_whole_archive_flag:
+ is_inside_whole_archive = False
+ is_whole_archive = False
+ else:
+ key = self._process_arg(arg)
+ if not is_inside_whole_archive:
+ if key:
+ if not is_whole_archive:
+ cmd.append(whole_archive_flag)
+ is_whole_archive = True
+ elif is_whole_archive:
+ cmd.append(no_whole_archive_flag)
+ is_whole_archive = False
+
+ cmd.append(arg)
+
+ if is_whole_archive:
+ cmd.append(no_whole_archive_flag)
+
+ self._check_peers()
+
+ return cmd
+
+ def construct_cmd(self, args):
+ if self.arch in ('DARWIN', 'IOS'):
+ return self._construct_cmd_apple(args)
+
+ if self.arch == 'WINDOWS':
+ return self._construct_cmd_win(args)
+
+ return self._construct_cmd_linux(args)
+
+
+def get_whole_archive_peers_and_libs(args):
+ remaining_args = []
+ peers = []
+ libs = []
+ peers_flag = '--whole-archive-peers'
+ libs_flag = '--whole-archive-libs'
+
+ next_is_peer = False
+ next_is_lib = False
+ for arg in args:
+ if arg == peers_flag:
+ next_is_peer = True
+ elif arg == libs_flag:
+ next_is_lib = True
+ elif next_is_peer:
+ peers.append(arg)
+ next_is_peer = False
+ elif next_is_lib:
+ libs.append(arg)
+ next_is_lib = False
+ else:
+ remaining_args.append(arg)
+ return remaining_args, peers, libs
diff --git a/build/scripts/py_compile.py b/build/scripts/py_compile.py
new file mode 100755
index 0000000000..936dbe8816
--- /dev/null
+++ b/build/scripts/py_compile.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from __future__ import print_function, absolute_import, division
+
+import marshal
+import sys
+
+
+def main():
+ srcpathx, in_fname, out_fname = sys.argv[1:]
+ srcpath = srcpathx[:-1]
+
+ with open(in_fname, 'r') as in_file:
+ source = in_file.read()
+
+ code = compile(source, srcpath, 'exec', dont_inherit=True)
+
+ with open(out_fname, 'wb') as out_file:
+ marshal.dump(code, out_file)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/build/scripts/python_yndexer.py b/build/scripts/python_yndexer.py
new file mode 100644
index 0000000000..3180665387
--- /dev/null
+++ b/build/scripts/python_yndexer.py
@@ -0,0 +1,53 @@
+import os
+import sys
+import threading
+import subprocess
+
+
+def _try_to_kill(process):
+ try:
+ process.kill()
+ except Exception:
+ pass
+
+
+def touch(path):
+ if not os.path.exists(path):
+ with open(path, 'w') as _:
+ pass
+
+
+class Process(object):
+ def __init__(self, args):
+ self._process = subprocess.Popen(args)
+ self._event = threading.Event()
+ self._result = None
+ thread = threading.Thread(target=self._run)
+ thread.setDaemon(True)
+ thread.start()
+
+ def _run(self):
+ self._process.communicate()
+ self._result = self._process.returncode
+ self._event.set()
+
+ def wait(self, timeout):
+ self._event.wait(timeout=timeout)
+ _try_to_kill(self._process)
+ return self._result
+
+
+if __name__ == '__main__':
+ yndexer = sys.argv[1]
+ timeout = int(sys.argv[2])
+ output_file = sys.argv[3]
+ input_file = sys.argv[4]
+ partition_count = sys.argv[5]
+ partition_index = sys.argv[6]
+
+ process = Process([yndexer, '-f', input_file, '-y', output_file, '-c', partition_count, '-i', partition_index])
+ result = process.wait(timeout=timeout)
+
+ if result != 0:
+ print >> sys.stderr, 'Yndexing process finished with code', result
+ touch(output_file)
diff --git a/build/scripts/resolve_java_srcs.py b/build/scripts/resolve_java_srcs.py
new file mode 100644
index 0000000000..a2e6c20012
--- /dev/null
+++ b/build/scripts/resolve_java_srcs.py
@@ -0,0 +1,106 @@
+import os
+import argparse
+import re
+import sys
+
+
+def list_all_files(directory, prefix='/', hidden_files=False):
+ result = []
+ if os.path.exists(directory):
+ for i in os.listdir(directory):
+ abs_path = os.path.join(directory, i)
+ result += list_all_files(os.path.join(directory, abs_path), prefix + i + '/', hidden_files) \
+ if os.path.isdir(abs_path) else ([prefix + i] if (hidden_files or not i.startswith('.')) else [])
+ return result
+
+
+def pattern_to_regexp(p):
+ return '^' + \
+ ('/' if not p.startswith('**') else '') + \
+ re.escape(p).replace(
+ r'\*\*\/', '[_DIR_]'
+ ).replace(
+ r'\*', '[_FILE_]'
+ ).replace(
+ '[_DIR_]', '(.*/)?'
+ ).replace(
+ '[_FILE_]', '([^/]*)'
+ ) + '$'
+
+
+def resolve_java_srcs(srcdir, include_patterns, exclude_patterns, all_resources, resolve_kotlin=False, resolve_groovy=False):
+ result = {'java': [], 'not_java': [], 'kotlin': [], 'groovy': []}
+ include_patterns_normal, include_patterns_hidden, exclude_patterns_normal, exclude_patterns_hidden = [], [], [], []
+ for vis, hid, patterns in ((include_patterns_normal, include_patterns_hidden, include_patterns), (exclude_patterns_normal, exclude_patterns_hidden, exclude_patterns),):
+ for pattern in patterns:
+ if (pattern if pattern.find('/') == -1 else pattern.rsplit('/', 1)[1]).startswith('.'):
+ hid.append(pattern)
+ else:
+ vis.append(pattern)
+ re_patterns = map(pattern_to_regexp, vis + hid)
+ if sys.platform in ('win32', 'darwin'):
+ re_patterns = [re.compile(i, re.IGNORECASE) for i in re_patterns]
+ else:
+ re_patterns = [re.compile(i) for i in re_patterns]
+ vis[:], hid[:] = re_patterns[:len(vis)], re_patterns[len(vis):]
+
+ for inc_patterns, exc_patterns, with_hidden_files in (
+ (include_patterns_normal, exclude_patterns_normal, False),
+ (include_patterns_hidden, exclude_patterns_hidden, True),
+ ):
+ for f in list_all_files(srcdir, hidden_files=with_hidden_files):
+ excluded = False
+
+ for exc_re in exc_patterns:
+ if exc_re.match(f):
+ excluded = True
+ break
+
+ if excluded:
+ continue
+
+ for inc_re in inc_patterns:
+ if inc_re.match(f):
+ s = os.path.normpath(f[1:])
+ if all_resources or not (f.endswith('.java') or f.endswith('.kt') or f.endswith('.groovy')):
+ result['not_java'].append(s)
+ elif f.endswith('.java'):
+ result['java'].append(os.path.join(srcdir, s))
+ elif f.endswith('.kt') and resolve_kotlin:
+ result['kotlin'].append(os.path.join(srcdir, s))
+ elif f.endswith('.groovy') and resolve_groovy:
+ result['groovy'].append(os.path.join(srcdir, s))
+ else:
+ result['not_java'].append(s)
+ break
+
+ return sorted(result['java']), sorted(result['not_java']), sorted(result['kotlin']), sorted(result['groovy'])
+
+
+def do_it(directory, sources_file, resources_file, kotlin_sources_file, groovy_sources_file, include_patterns, exclude_patterns, resolve_kotlin, resolve_groovy, append, all_resources):
+ j, r, k, g = resolve_java_srcs(directory, include_patterns, exclude_patterns, all_resources, resolve_kotlin, resolve_groovy)
+ mode = 'a' if append else 'w'
+ open(sources_file, mode).writelines(i + '\n' for i in j)
+ open(resources_file, mode).writelines(i + '\n' for i in r)
+ if kotlin_sources_file:
+ open(kotlin_sources_file, mode).writelines(i + '\n' for i in k + j)
+ if groovy_sources_file:
+ open(groovy_sources_file, mode).writelines(i + '\n' for i in g + j)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-d', '--directory', required=True)
+ parser.add_argument('-s', '--sources-file', required=True)
+ parser.add_argument('-r', '--resources-file', required=True)
+ parser.add_argument('-k', '--kotlin-sources-file', default=None)
+ parser.add_argument('-g', '--groovy-sources-file', default=None)
+ parser.add_argument('--append', action='store_true', default=False)
+ parser.add_argument('--all-resources', action='store_true', default=False)
+ parser.add_argument('--resolve-kotlin', action='store_true', default=False)
+ parser.add_argument('--resolve-groovy', action='store_true', default=False)
+ parser.add_argument('--include-patterns', nargs='*', default=[])
+ parser.add_argument('--exclude-patterns', nargs='*', default=[])
+ args = parser.parse_args()
+
+ do_it(**vars(args))
diff --git a/build/scripts/retry.py b/build/scripts/retry.py
new file mode 100644
index 0000000000..d14170bfec
--- /dev/null
+++ b/build/scripts/retry.py
@@ -0,0 +1,29 @@
+import time
+import functools
+
+
+# Partly copy-pasted from contrib/python/retry
+def retry_func(f, exceptions=Exception, tries=-1, delay=1, max_delay=None, backoff=1):
+ _tries, _delay = tries, delay
+ while _tries:
+ try:
+ return f()
+ except exceptions as e:
+ _tries -= 1
+ if not _tries:
+ raise
+
+ time.sleep(_delay)
+ _delay *= backoff
+
+ if max_delay is not None:
+ _delay = min(_delay, max_delay)
+
+
+def retry(**retry_kwargs):
+ def decorator(func):
+ @functools.wraps(func)
+ def wrapper(*args, **kwargs):
+ return retry_func(lambda: func(*args, **kwargs), **retry_kwargs)
+ return wrapper
+ return decorator
diff --git a/build/scripts/run_ios_simulator.py b/build/scripts/run_ios_simulator.py
new file mode 100644
index 0000000000..052c855b77
--- /dev/null
+++ b/build/scripts/run_ios_simulator.py
@@ -0,0 +1,79 @@
+import argparse
+import json
+import os
+import subprocess
+import sys
+
+
+def just_do_it():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--action", choices=["create", "spawn", "kill"])
+ parser.add_argument("--simctl", help="simctl binary path")
+ parser.add_argument("--profiles", help="profiles path")
+ parser.add_argument("--device-dir", help="devices directory")
+ parser.add_argument("--device-name", help="temp device name")
+ args, tail = parser.parse_known_args()
+ if args.action == 'create':
+ action_create(args.simctl, args.profiles, args.device_dir, args.device_name, tail)
+ elif args.action == "spawn":
+ action_spawn(args.simctl, args.profiles, args.device_dir, args.device_name, tail)
+ elif args.action == "kill":
+ action_kill(args.simctl, args.profiles, args.device_dir, args.device_name)
+
+
+def action_create(simctl, profiles, device_dir, name, args):
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--device-type", default="com.apple.CoreSimulator.SimDeviceType.iPhone-X")
+ parser.add_argument("--device-runtime", default="com.apple.CoreSimulator.SimRuntime.iOS-12-1")
+ args = parser.parse_args(args)
+ all_devices = list(get_all_devices(simctl, profiles, device_dir))
+ if filter(lambda x: x["name"] == name, all_devices):
+ raise Exception("Device named {} already exists".format(name))
+ subprocess.check_call([simctl, "--profiles", profiles, "--set", device_dir, "create", name, args.device_type, args.device_runtime])
+ created = filter(lambda x: x["name"] == name, get_all_devices(simctl, profiles, device_dir))
+ if not created:
+ raise Exception("Creation error: temp device named {} not found".format(name))
+ created = created[0]
+ if created["availability"] != "(available)":
+ raise Exception("Creation error: temp device {} status is {} ((available) expected)".format(name, created["availability"]))
+
+
+def action_spawn(simctl, profiles, device_dir, name, args):
+ device = filter(lambda x: x["name"] == name, get_all_devices(simctl, profiles, device_dir))
+ if not device:
+ raise Exception("Can't spawn process: device named {} not found".format(name))
+ if len(device) > 1:
+ raise Exception("Can't spawn process: too many devices named {} found".format(name))
+ device = device[0]
+ os.execv(simctl, [simctl, "--profiles", profiles, "--set", device_dir, "spawn", device["udid"]] + args)
+
+
+def action_kill(simctl, profiles, device_dir, name):
+ device = filter(lambda x: x["name"] == name, get_all_devices(simctl, profiles, device_dir))
+ if not device:
+ print >> sys.stderr, "Device named {} not found; do nothing".format(name)
+ return
+ if len(device) > 1:
+ raise Exception("Can't remove: too many devices named {}:\n{}".format(name, '\n'.join(i for i in device)))
+ device = device[0]
+ os.execv(simctl, [simctl, "--profiles", profiles, "--set", device_dir, "delete", device["udid"]])
+
+
+def get_all_devices(simctl, profiles, device_dir):
+ p = subprocess.Popen([simctl, "--profiles", profiles, "--set", device_dir, "list", "--json", "devices"], stdout=subprocess.PIPE)
+ out, _ = p.communicate()
+ rc = p.wait()
+ if rc:
+ raise Exception("Devices list command return code is {}\nstdout:\n{}".format(rc, out))
+ raw_object = json.loads(out)
+ if "devices" not in raw_object:
+ raise Exception("Devices not found in\n{}".format(json.dumps(raw_object)))
+ raw_object = raw_object["devices"]
+ for os_name, devices in raw_object.items():
+ for device in devices:
+ device["os_name"] = os_name
+ yield device
+
+
+if __name__ == '__main__':
+ just_do_it()
diff --git a/build/scripts/run_javac.py b/build/scripts/run_javac.py
new file mode 100644
index 0000000000..c35546e0fe
--- /dev/null
+++ b/build/scripts/run_javac.py
@@ -0,0 +1,122 @@
+import sys
+import subprocess
+import optparse
+import re
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--sources-list')
+ parser.add_option('--verbose', default=False, action='store_true')
+ parser.add_option('--remove-notes', default=False, action='store_true')
+ parser.add_option('--ignore-errors', default=False, action='store_true')
+ parser.add_option('--kotlin', default=False, action='store_true')
+ return parser.parse_args()
+
+
+COLORING = {
+ r'^(?P<path>.*):(?P<line>\d*): error: (?P<msg>.*)': lambda m: '[[unimp]]{path}[[rst]]:[[alt2]]{line}[[rst]]: [[c:light-red]]error[[rst]]: [[bad]]{msg}[[rst]]'.format(
+ path=m.group('path'),
+ line=m.group('line'),
+ msg=m.group('msg'),
+ ),
+ r'^(?P<path>.*):(?P<line>\d*): warning: (?P<msg>.*)': lambda m: '[[unimp]]{path}[[rst]]:[[alt2]]{line}[[rst]]: [[c:light-yellow]]warning[[rst]]: {msg}'.format(
+ path=m.group('path'),
+ line=m.group('line'),
+ msg=m.group('msg'),
+ ),
+ r'^warning: ': lambda m: '[[c:light-yellow]]warning[[rst]]: ',
+ r'^error: (?P<msg>.*)': lambda m: '[[c:light-red]]error[[rst]]: [[bad]]{msg}[[rst]]'.format(msg=m.group('msg')),
+ r'^Note: ': lambda m: '[[c:light-cyan]]Note[[rst]]: ',
+}
+
+
+def colorize(err):
+ for regex, sub in COLORING.iteritems():
+ err = re.sub(regex, sub, err, flags=re.MULTILINE)
+ return err
+
+
+def remove_notes(err):
+ return '\n'.join([line for line in err.split('\n') if not line.startswith('Note:')])
+
+
+def find_javac(cmd):
+ if not cmd:
+ return None
+ if cmd[0].endswith('javac') or cmd[0].endswith('javac.exe'):
+ return cmd[0]
+ if len(cmd) > 2 and cmd[1].endswith('build_java_with_error_prone.py'):
+ for javas in ('java', 'javac'):
+ if cmd[2].endswith(javas) or cmd[2].endswith(javas + '.exe'):
+ return cmd[2]
+ return None
+
+
+# temporary, for jdk8/jdk9+ compatibility
+def fix_cmd(cmd):
+ if not cmd:
+ return cmd
+ javac = find_javac(cmd)
+ if not javac:
+ return cmd
+ p = subprocess.Popen([javac, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ out, err = out.strip(), err.strip()
+ for prefix in ('javac 1.8', 'java version "1.8'):
+ for raw_out in ((out or ''), (err or '')):
+ for line in raw_out.split('\n'):
+ if line.startswith(prefix):
+ res = []
+ i = 0
+ while i < len(cmd):
+ for option in ('--add-exports', '--add-modules'):
+ if cmd[i] == option:
+ i += 1
+ break
+ elif cmd[i].startswith(option + '='):
+ break
+ else:
+ res.append(cmd[i])
+ i += 1
+ return res
+ return cmd
+
+
+def main():
+ opts, cmd = parse_args()
+
+ with open(opts.sources_list) as f:
+ input_files = f.read().strip().split()
+
+ if opts.kotlin:
+ input_files = [i for i in input_files if i.endswith('.kt')]
+
+ if not input_files:
+ if opts.verbose:
+ sys.stderr.write('No files to compile, javac is not launched.\n')
+
+ else:
+ p = subprocess.Popen(fix_cmd(cmd), stderr=subprocess.PIPE)
+ _, err = p.communicate()
+ rc = p.wait()
+
+ if opts.remove_notes:
+ err = remove_notes(err)
+
+ try:
+ err = colorize(err)
+
+ except Exception:
+ pass
+
+ if opts.ignore_errors and rc:
+ sys.stderr.write('error: javac actually failed with exit code {}\n'.format(rc))
+ rc = 0
+ sys.stderr.write(err)
+ sys.exit(rc)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/run_junit.py b/build/scripts/run_junit.py
new file mode 100644
index 0000000000..5f56403bed
--- /dev/null
+++ b/build/scripts/run_junit.py
@@ -0,0 +1,125 @@
+import collections
+import json
+import time
+import os
+import sys
+
+SHUTDOWN_SIGNAL = 'SIGUSR1'
+
+PROVIDES = {
+ "devtools/junit-runner/devtools-junit-runner.jar": "junit-runner",
+ "devtools/junit5-runner/devtools-junit5-runner.jar": "junit-runner",
+}
+
+
+class SignalInterruptionError(Exception):
+ pass
+
+
+def on_shutdown(s, f):
+ raise SignalInterruptionError()
+
+
+def get_tracefile_path(args):
+ return args[args.index('--output') + 1]
+
+
+def dump_chunk_error(tracefile, name, imps):
+ with open(tracefile, 'a') as afile:
+ msg = {
+ "timestamp": time.time(),
+ "name": "chunk-event",
+ "value": {
+ "errors": [
+ [
+ "fail",
+ "[[bad]]Test contains conflicting dependencies for [[imp]]{}[[bad]]: {}[[rst]]".format(
+ name, ', '.join(imps)
+ ),
+ ],
+ ],
+ },
+ }
+ json.dump(msg, afile)
+ afile.write("\n")
+
+
+def verify_classpath(args):
+ cpfile = args[args.index('-classpath') + 1]
+ assert cpfile.startswith('@'), cpfile
+
+ cpfile = cpfile[1:]
+ assert os.path.exists(cpfile)
+
+ with open(cpfile) as afile:
+ data = afile.read().splitlines()
+
+ collisions = collections.defaultdict(set)
+ for cp in data:
+ if cp in PROVIDES:
+ collisions[PROVIDES[cp]].add(cp)
+
+ for name, imps in collisions.items():
+ if len(imps) > 1:
+ tracefile = get_tracefile_path(args)
+ dump_chunk_error(tracefile, name, imps)
+ return False
+ return True
+
+
+def main():
+ args = sys.argv[1:]
+
+ # Emulates PROVIDES(X) for junit-runner and junit5-runner.
+ # For more info see DEVTOOLSSUPPORT-7454
+ if not verify_classpath(args):
+ return 1
+
+ def execve():
+ os.execve(args[0], args, os.environ)
+
+ jar_binary = args[args.index('--jar-binary') + 1]
+ java_bin_dir = os.path.dirname(jar_binary)
+ jstack_binary = os.path.join(java_bin_dir, 'jstack')
+
+ if not os.path.exists(jstack_binary):
+ sys.stderr.write("jstack is missing: {}\n".format(jstack_binary))
+ execve()
+
+ import signal
+
+ signum = getattr(signal, SHUTDOWN_SIGNAL, None)
+
+ if signum is None:
+ execve()
+
+ import subprocess
+
+ proc = subprocess.Popen(args)
+ signal.signal(signum, on_shutdown)
+ timeout = False
+
+ try:
+ proc.wait()
+ except SignalInterruptionError:
+ sys.stderr.write("\nGot {} signal: going to shutdown junit\n".format(signum))
+ # Dump stack traces
+ subprocess.call([jstack_binary, str(proc.pid)], stdout=sys.stderr)
+ # Kill junit - for more info see DEVTOOLS-7636
+ os.kill(proc.pid, signal.SIGKILL)
+ proc.wait()
+ timeout = True
+
+ if proc.returncode:
+ sys.stderr.write('java exit code: {}\n'.format(proc.returncode))
+ if timeout:
+ # In case of timeout return specific exit code
+ # https://a.yandex-team.ru/arc/trunk/arcadia/devtools/ya/test/const/__init__.py?rev=r8578188#L301
+ proc.returncode = 10
+ sys.stderr.write('java exit code changed to {}\n'.format(proc.returncode))
+
+ return proc.returncode
+
+
+if __name__ == '__main__':
+ exit(main())
diff --git a/build/scripts/run_llvm_dsymutil.py b/build/scripts/run_llvm_dsymutil.py
new file mode 100644
index 0000000000..4f43362ad9
--- /dev/null
+++ b/build/scripts/run_llvm_dsymutil.py
@@ -0,0 +1,11 @@
+import os
+import sys
+import subprocess
+
+
+if __name__ == '__main__':
+ with open(os.devnull, 'w') as fnull:
+ p = subprocess.Popen(sys.argv[1:], shell=False, stderr=fnull, stdout=sys.stdout)
+
+ p.communicate()
+ sys.exit(p.returncode)
diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py
new file mode 100644
index 0000000000..439d1f8831
--- /dev/null
+++ b/build/scripts/run_msvc_wine.py
@@ -0,0 +1,556 @@
+import sys
+import os
+import re
+import subprocess
+import signal
+import time
+import json
+import argparse
+import errno
+
+import process_command_files as pcf
+import process_whole_archive_option as pwa
+
+
+procs = []
+build_kekeke = 45
+
+
+def stringize(s):
+ return s.encode('utf-8') if isinstance(s, unicode) else s
+
+
+def run_subprocess(*args, **kwargs):
+ if 'env' in kwargs:
+ kwargs['env'] = {stringize(k): stringize(v) for k, v in kwargs['env'].iteritems()}
+
+ p = subprocess.Popen(*args, **kwargs)
+
+ procs.append(p)
+
+ return p
+
+
+def terminate_slaves():
+ for p in procs:
+ try:
+ p.terminate()
+ except Exception:
+ pass
+
+
+def sig_term(sig, fr):
+ terminate_slaves()
+ sys.exit(sig)
+
+
+def subst_path(l):
+ if len(l) > 3:
+ if l[:3].lower() in ('z:\\', 'z:/'):
+ return l[2:].replace('\\', '/')
+
+ return l
+
+
+def call_wine_cmd_once(wine, cmd, env, mode):
+ p = run_subprocess(wine + cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, close_fds=True, shell=False)
+
+ output = find_cmd_out(cmd)
+ error = None
+ if output is not None and os.path.exists(output):
+ try:
+ os.remove(output)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ error = e
+ except Exception as e:
+ error = e
+
+ if error is not None:
+ print >> sys.stderr, 'Output {} already exists and we have failed to remove it: {}'.format(output, error)
+
+ # print >>sys.stderr, cmd, env, wine
+
+ stdout_and_stderr, _ = p.communicate()
+
+ return_code = p.returncode
+ if not stdout_and_stderr:
+ if return_code != 0:
+ raise Exception('wine did something strange')
+
+ return return_code
+ elif ' : fatal error ' in stdout_and_stderr:
+ return_code = 1
+ elif ' : error ' in stdout_and_stderr:
+ return_code = 2
+
+ lines = [x.strip() for x in stdout_and_stderr.split('\n')]
+
+ prefixes = [
+ 'Microsoft (R)',
+ 'Copyright (C)',
+ 'Application tried to create a window',
+ 'The graphics driver is missing',
+ 'Could not load wine-gecko',
+ 'wine: configuration in',
+ 'wine: created the configuration directory',
+ 'libpng warning:'
+ ]
+
+ suffixes = [
+ '.c',
+ '.cxx',
+ '.cc',
+ '.cpp',
+ '.masm',
+ ]
+
+ substrs = [
+ 'Creating library Z:',
+ 'err:heap',
+ 'err:menubuilder:',
+ 'err:msvcrt',
+ 'err:ole:',
+ 'err:wincodecs:',
+ 'err:winediag:',
+ ]
+
+ def good_line(l):
+ for x in prefixes:
+ if l.startswith(x):
+ return False
+
+ for x in suffixes:
+ if l.endswith(x):
+ return False
+
+ for x in substrs:
+ if x in l:
+ return False
+
+ return True
+
+ def filter_lines():
+ for l in lines:
+ if good_line(l):
+ yield subst_path(l.strip())
+
+ stdout_and_stderr = '\n'.join(filter_lines()).strip()
+
+ if stdout_and_stderr:
+ print >>sys.stderr, stdout_and_stderr
+
+ return return_code
+
+
+def prepare_vc(fr, to):
+ for p in os.listdir(fr):
+ fr_p = os.path.join(fr, p)
+ to_p = os.path.join(to, p)
+
+ if not os.path.exists(to_p):
+ print >>sys.stderr, 'install %s -> %s' % (fr_p, to_p)
+
+ os.link(fr_p, to_p)
+
+
+def run_slave():
+ args = json.loads(sys.argv[3])
+ wine = sys.argv[1]
+
+ signal.signal(signal.SIGTERM, sig_term)
+
+ if args.get('tout', None):
+ signal.signal(signal.SIGALRM, sig_term)
+ signal.alarm(args['tout'])
+
+ tout = 0.1
+
+ while True:
+ try:
+ return call_wine_cmd_once([wine], args['cmd'], args['env'], args['mode'])
+ except Exception as e:
+ print >>sys.stderr, '%s, will retry in %s' % (str(e), tout)
+
+ time.sleep(tout)
+ tout = min(2 * tout, 4)
+
+
+def find_cmd_out(args):
+ for arg in args:
+ if arg.startswith('/Fo'):
+ return arg[3:]
+
+ if arg.startswith('/OUT:'):
+ return arg[5:]
+
+
+def calc_zero_cnt(data):
+ zero_cnt = 0
+
+ for ch in data:
+ if ch == chr(0):
+ zero_cnt += 1
+
+ return zero_cnt
+
+
+def is_good_file(p):
+ if not os.path.isfile(p):
+ return False
+
+ if os.path.getsize(p) < 300:
+ return False
+
+ asm_pattern = re.compile('asm(\.\w+)?\.obj$')
+ if asm_pattern.search(p):
+ pass
+ elif p.endswith('.obj'):
+ with open(p, 'rb') as f:
+ prefix = f.read(200)
+
+ if ord(prefix[0]) != 0:
+ return False
+
+ if ord(prefix[1]) != 0:
+ return False
+
+ if ord(prefix[2]) != 0xFF:
+ return False
+
+ if ord(prefix[3]) != 0xFF:
+ return False
+
+ if calc_zero_cnt(prefix) > 195:
+ return False
+
+ f.seek(-100, os.SEEK_END)
+ last = f.read(100)
+
+ if calc_zero_cnt(last) > 95:
+ return False
+
+ if last[-1] != chr(0):
+ return False
+ elif p.endswith('.lib'):
+ with open(p, 'rb') as f:
+ if f.read(7) != '!<arch>':
+ return False
+
+ return True
+
+
+RED = '\x1b[31;1m'
+GRAY = '\x1b[30;1m'
+RST = '\x1b[0m'
+MGT = '\x1b[35m'
+YEL = '\x1b[33m'
+GRN = '\x1b[32m'
+CYA = '\x1b[36m'
+
+
+def colorize_strings(l):
+ p = l.find("'")
+
+ if p >= 0:
+ yield l[:p]
+
+ l = l[p + 1:]
+
+ p = l.find("'")
+
+ if p >= 0:
+ yield CYA + "'" + subst_path(l[:p]) + "'" + RST
+
+ for x in colorize_strings(l[p + 1:]):
+ yield x
+ else:
+ yield "'" + l
+ else:
+ yield l
+
+
+def colorize_line(l):
+ lll = l
+
+ try:
+ parts = []
+
+ if l.startswith('(compiler file'):
+ return ''.join(colorize_strings(l))
+
+ if l.startswith('/'):
+ p = l.find('(')
+ parts.append(GRAY + l[:p] + RST)
+ l = l[p:]
+
+ if l and l.startswith('('):
+ p = l.find(')')
+ parts.append(':' + MGT + l[1:p] + RST)
+ l = l[p + 1:]
+
+ if l:
+ if l.startswith(' : '):
+ l = l[1:]
+
+ if l.startswith(': error'):
+ parts.append(': ' + RED + 'error' + RST)
+ l = l[7:]
+ elif l.startswith(': warning'):
+ parts.append(': ' + YEL + 'warning' + RST)
+ l = l[9:]
+ elif l.startswith(': note'):
+ parts.append(': ' + GRN + 'note' + RST)
+ l = l[6:]
+ elif l.startswith('fatal error'):
+ parts.append(RED + 'fatal error' + RST)
+ l = l[11:]
+
+ if l:
+ parts.extend(colorize_strings(l))
+
+ return ''.join(parts)
+ except Exception:
+ return lll
+
+
+def colorize(out):
+ return '\n'.join(colorize_line(l) for l in out.split('\n'))
+
+
+def trim_path(path, winepath):
+ p1 = run_subprocess([winepath, '-w', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ p1_stdout, p1_stderr = p1.communicate()
+ win_path = p1_stdout.strip()
+
+ if p1.returncode != 0 or not win_path:
+ # Fall back to only winepath -s
+ win_path = path
+
+ p2 = run_subprocess([winepath, '-s', win_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ p2_stdout, p2_stderr = p2.communicate()
+ short_path = p2_stdout.strip()
+
+ check_path = short_path
+ if check_path.startswith(('Z:', 'z:')):
+ check_path = check_path[2:]
+
+ if not check_path[1:].startswith((path[1:4], path[1:4].upper())):
+ raise Exception('Cannot trim path {}; 1st winepath exit code: {}, stdout:\n{}\n stderr:\n{}\n 2nd winepath exit code: {}, stdout:\n{}\n stderr:\n{}'.format(path, p1.returncode, p1_stdout, p1_stderr, p2.returncode, p2_stdout, p2_stderr))
+
+ return short_path
+
+
+def downsize_path(path, short_names):
+ flag = ''
+ if path.startswith('/Fo'):
+ flag = '/Fo'
+ path = path[3:]
+
+ for full_name, short_name in short_names.items():
+ if path.startswith(full_name):
+ path = path.replace(full_name, short_name)
+
+ return flag + path
+
+
+def make_full_path_arg(arg, bld_root, short_root):
+ if arg[0] != '/' and len(os.path.join(bld_root, arg)) > 250:
+ return os.path.join(short_root, arg)
+ return arg
+
+def fix_path(p):
+ topdirs = ['/%s/' % d for d in os.listdir('/')]
+ def abs_path_start(path, pos):
+ if pos < 0:
+ return False
+ return pos == 0 or path[pos - 1] == ':'
+
+ pp = None
+ for pr in topdirs:
+ pp2 = p.find(pr)
+ if abs_path_start(p, pp2) and (pp is None or pp > pp2):
+ pp = pp2
+ if pp is not None:
+ return p[:pp] + 'Z:' + p[pp:].replace('/', '\\')
+ if p.startswith('/Fo'):
+ return '/Fo' + p[3:].replace('/', '\\')
+ return p
+
+def process_free_args(args, wine, bld_root, mode):
+ whole_archive_prefix = '/WHOLEARCHIVE:'
+ short_names = {}
+ winepath = os.path.join(os.path.dirname(wine), 'winepath')
+ short_names[bld_root] = trim_path(bld_root, winepath)
+ # Slow for no benefit.
+ # arc_root = args.arcadia_root
+ # short_names[arc_root] = trim_path(arc_root, winepath)
+
+ free_args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(args))
+
+ process_link = lambda x: make_full_path_arg(x, bld_root, short_names[bld_root]) if mode in ('link', 'lib') else x
+ def process_arg(arg):
+ with_wa_prefix = arg.startswith(whole_archive_prefix)
+ prefix = whole_archive_prefix if with_wa_prefix else ''
+ without_prefix_arg = arg[len(prefix):]
+ return prefix + fix_path(process_link(downsize_path(without_prefix_arg, short_names)))
+
+ result = []
+ for arg in free_args:
+ if pcf.is_cmdfile_arg(arg):
+ cmd_file_path = pcf.cmdfile_path(arg)
+ cf_args = pcf.read_from_command_file(cmd_file_path)
+ with open(cmd_file_path, 'w') as afile:
+ for cf_arg in cf_args:
+ afile.write(process_arg(cf_arg) + "\n")
+ result.append(arg)
+ else:
+ result.append(process_arg(arg))
+ return pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(result)
+
+def run_main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('wine', action='store')
+ parser.add_argument('-v', action='store', dest='version', default='120')
+ parser.add_argument('-I', action='append', dest='incl_paths')
+ parser.add_argument('mode', action='store')
+ parser.add_argument('arcadia_root', action='store')
+ parser.add_argument('arcadia_build_root', action='store')
+ parser.add_argument('binary', action='store')
+ parser.add_argument('free_args', nargs=argparse.REMAINDER)
+ # By now just unpack. Ideally we should fix path and pack arguments back into command file
+ args = parser.parse_args()
+
+ wine = args.wine
+ mode = args.mode
+ binary = args.binary
+ version = args.version
+ incl_paths = args.incl_paths
+ bld_root = args.arcadia_build_root
+ free_args = args.free_args
+
+ wine_dir = os.path.dirname(os.path.dirname(wine))
+ bin_dir = os.path.dirname(binary)
+ tc_dir = os.path.dirname(os.path.dirname(os.path.dirname(bin_dir)))
+ if not incl_paths:
+ incl_paths = [tc_dir + '/VC/include', tc_dir + '/include']
+
+ cmd_out = find_cmd_out(free_args)
+
+ env = os.environ.copy()
+
+ env.pop('DISPLAY', None)
+
+ env['WINEDLLOVERRIDES'] = 'msvcr{}=n'.format(version)
+ env['WINEDEBUG'] = 'fixme-all'
+ env['INCLUDE'] = ';'.join(fix_path(p) for p in incl_paths)
+ env['VSINSTALLDIR'] = fix_path(tc_dir)
+ env['VCINSTALLDIR'] = fix_path(tc_dir + '/VC')
+ env['WindowsSdkDir'] = fix_path(tc_dir)
+ env['LIBPATH'] = fix_path(tc_dir + '/VC/lib/amd64')
+ env['LIB'] = fix_path(tc_dir + '/VC/lib/amd64')
+ env['LD_LIBRARY_PATH'] = ':'.join(wine_dir + d for d in ['/lib', '/lib64', '/lib64/wine'])
+
+ cmd = [binary] + process_free_args(free_args, wine, bld_root, mode)
+
+ for x in ('/NOLOGO', '/nologo', '/FD'):
+ try:
+ cmd.remove(x)
+ except ValueError:
+ pass
+
+ def run_process(sleep, tout):
+ if sleep:
+ time.sleep(sleep)
+
+ args = {
+ 'cmd': cmd,
+ 'env': env,
+ 'mode': mode,
+ 'tout': tout
+ }
+
+ slave_cmd = [sys.executable, sys.argv[0], wine, 'slave', json.dumps(args)]
+ p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False)
+ out, _ = p.communicate()
+ return p.wait(), out
+
+ def print_err_log(log):
+ if not log:
+ return
+ if mode == 'cxx':
+ log = colorize(log)
+ print >>sys.stderr, log
+
+ tout = 200
+
+ while True:
+ rc, out = run_process(0, tout)
+
+ if rc in (-signal.SIGALRM, signal.SIGALRM):
+ print_err_log(out)
+ print >>sys.stderr, '##append_tag##time out'
+ elif out and ' stack overflow ' in out:
+ print >>sys.stderr, '##append_tag##stack overflow'
+ elif out and 'recvmsg: Connection reset by peer' in out:
+ print >>sys.stderr, '##append_tag##wine gone'
+ elif out and 'D8037' in out:
+ print >>sys.stderr, '##append_tag##repair wine'
+
+ try:
+ os.unlink(os.path.join(os.environ['WINEPREFIX'], '.update-timestamp'))
+ except Exception as e:
+ print >>sys.stderr, e
+
+ else:
+ print_err_log(out)
+
+ # non-zero return code - bad, return it immediately
+ if rc:
+ print >>sys.stderr, '##win_cmd##' + ' '.join(cmd)
+ print >>sys.stderr, '##args##' + ' '.join(free_args)
+ return rc
+
+ # check for output existence(if we expect it!) and real length
+ if cmd_out:
+ if is_good_file(cmd_out):
+ return 0
+ else:
+ # retry!
+ print >>sys.stderr, '##append_tag##no output'
+ else:
+ return 0
+
+ tout *= 3
+
+
+def main():
+ prefix_suffix = os.environ.pop('WINEPREFIX_SUFFIX', None)
+ if prefix_suffix is not None:
+ prefix = os.environ.pop('WINEPREFIX', None)
+ if prefix is not None:
+ os.environ['WINEPREFIX'] = os.path.join(prefix, prefix_suffix)
+
+ # just in case
+ signal.alarm(2000)
+
+ if sys.argv[2] == 'slave':
+ func = run_slave
+ else:
+ func = run_main
+
+ try:
+ try:
+ sys.exit(func())
+ finally:
+ terminate_slaves()
+ except KeyboardInterrupt:
+ sys.exit(4)
+ except Exception as e:
+ print >>sys.stderr, str(e)
+
+ sys.exit(3)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/run_sonar.py b/build/scripts/run_sonar.py
new file mode 100644
index 0000000000..761cc34b78
--- /dev/null
+++ b/build/scripts/run_sonar.py
@@ -0,0 +1,121 @@
+import os
+import sys
+import zipfile
+import tarfile
+import subprocess as sp
+import optparse
+import shutil
+import xml.etree.ElementTree as et
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.add_option(
+ '--classes-jar-path',
+ dest='classes_jar_paths',
+ action='append',
+ default=[],
+ )
+ parser.add_option('--sources-jar-path')
+ parser.add_option('--sonar-scanner-jar-path')
+ parser.add_option('--sonar-scanner-main-class')
+ parser.add_option('--java-coverage-merged-tar')
+ parser.add_option('--java-binary-path')
+ parser.add_option('--log-path')
+ parser.add_option('--gcov-report-path')
+ parser.add_option('--source-root')
+ parser.add_option('--java-args', action='append', default=[])
+ return parser.parse_args()
+
+
+def extract_zip_file(zip_file_path, dest_dir):
+ with zipfile.ZipFile(zip_file_path) as arch:
+ arch.extractall(dest_dir)
+
+
+def get_source_real_path(source_root, path):
+ parts = os.path.normpath(path).split(os.path.sep)
+ for i in xrange(len(parts)):
+ if os.path.exists(os.path.join(source_root, *parts[i:])):
+ return os.path.join(*parts[i:])
+ return None
+
+
+def collect_cpp_sources(report, source_root, destination):
+ sources = set()
+ with open(report) as f:
+ root = et.fromstring(f.read())
+ for f in root.findall('.//class[@filename]'):
+ real_filename = get_source_real_path(source_root, f.attrib['filename'])
+ if real_filename:
+ f.attrib['filename'] = real_filename
+ sources.add(real_filename)
+ with open(report, 'w') as f:
+ pref = '''<?xml version="1.0" ?>
+<!DOCTYPE coverage
+ SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-03.dtd'>\n'''
+ f.write(pref + et.tostring(root, encoding='utf-8') + '\n\n')
+ for src in sources:
+ dst = os.path.join(destination, src)
+ src = os.path.join(source_root, src)
+ if os.path.isfile(src):
+ if not os.path.exists(os.path.dirname(dst)):
+ os.makedirs(os.path.dirname(dst))
+ os.link(src, dst)
+
+
+def main(opts, props_args):
+ sources_dir = os.path.abspath('src')
+ base_props_args = ['-Dsonar.sources=' + sources_dir]
+ os.mkdir(sources_dir)
+ if opts.sources_jar_path:
+ extract_zip_file(opts.sources_jar_path, sources_dir)
+ if opts.gcov_report_path:
+ collect_cpp_sources(opts.gcov_report_path, opts.source_root, sources_dir)
+ base_props_args += ['-Dsonar.projectBaseDir=' + sources_dir, '-Dsonar.cxx.coverage.reportPath=' + opts.gcov_report_path]
+
+ if opts.classes_jar_paths:
+ classes_dir = os.path.abspath('cls')
+ os.mkdir(classes_dir)
+
+ for classes_jar_path in opts.classes_jar_paths:
+ extract_zip_file(classes_jar_path, classes_dir)
+
+ base_props_args.append('-Dsonar.java.binaries=' + classes_dir)
+
+ if opts.java_coverage_merged_tar:
+ jacoco_report_path = os.path.abspath('jacoco.exec')
+ with open(jacoco_report_path, 'w') as dest:
+ with tarfile.open(opts.java_coverage_merged_tar) as tar:
+ for src in tar:
+ extracted = tar.extractfile(src)
+ if extracted is not None:
+ shutil.copyfileobj(extracted, dest)
+
+ base_props_args += [
+ '-Dsonar.core.codeCoveragePlugin=jacoco',
+ '-Dsonar.jacoco.reportPath=' + jacoco_report_path
+ ]
+ java_args = ['-{}'.format(i) for i in opts.java_args] + ['-Djava.net.preferIPv6Addresses=true', '-Djava.net.preferIPv4Addresses=false']
+
+ sonar_cmd = [
+ opts.java_binary_path,
+ ] + java_args + [
+ '-classpath',
+ opts.sonar_scanner_jar_path,
+ ] + base_props_args + props_args + [opts.sonar_scanner_main_class, '-X']
+
+ p = sp.Popen(sonar_cmd, stdout=sp.PIPE, stderr=sp.STDOUT)
+ out, _ = p.communicate()
+
+ sys.stderr.write(out)
+ with open(opts.log_path, 'a') as f:
+ f.write(out)
+
+ sys.exit(p.returncode)
+
+
+if __name__ == '__main__':
+ opts, args = parse_args()
+ props_args = ['-D' + arg for arg in args]
+ main(opts, props_args)
diff --git a/build/scripts/run_tool.py b/build/scripts/run_tool.py
new file mode 100755
index 0000000000..00e3ff6f1e
--- /dev/null
+++ b/build/scripts/run_tool.py
@@ -0,0 +1,9 @@
+import sys
+import subprocess
+import os
+
+
+if __name__ == '__main__':
+ env = os.environ.copy()
+ env['ASAN_OPTIONS'] = 'detect_leaks=0'
+ subprocess.check_call(sys.argv[sys.argv.index('--') + 1:], env=env)
diff --git a/build/scripts/setup_java_tmpdir.py b/build/scripts/setup_java_tmpdir.py
new file mode 100644
index 0000000000..e478d4aa96
--- /dev/null
+++ b/build/scripts/setup_java_tmpdir.py
@@ -0,0 +1,40 @@
+import os
+import sys
+import platform
+import subprocess
+
+
+def fix_tmpdir(cmd):
+ if not cmd:
+ return cmd
+ java_id, option_name = None, None
+ for i, java in enumerate(cmd):
+ if java.endswith('java') or java.endswith('java.exe'):
+ java_id = i
+ option_name = '-Djava.io.tmpdir='
+ break
+ if java.endswith('javac') or java.endswith('javac.exe'):
+ java_id = i
+ option_name = '-J-Djava.io.tmpdir='
+ break
+ if java_id is None:
+ return cmd
+ for arg in cmd[java_id:]:
+ if arg.startswith(option_name):
+ return cmd
+ tmpdir = os.environ.get('TMPDIR') or os.environ.get('TEMPDIR')
+ if not tmpdir:
+ return cmd
+ return cmd[:java_id + 1] + ['{}{}'.format(option_name, tmpdir)] + cmd[java_id + 1:]
+
+
+def just_do_it():
+ args = fix_tmpdir(sys.argv[1:])
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(args).wait())
+ else:
+ os.execv(args[0], args)
+
+
+if __name__ == '__main__':
+ just_do_it()
diff --git a/build/scripts/sky.py b/build/scripts/sky.py
new file mode 100644
index 0000000000..b703af7ed1
--- /dev/null
+++ b/build/scripts/sky.py
@@ -0,0 +1,43 @@
+import logging
+import os
+import subprocess
+
+import fetch_from
+
+
+class UnsupportedProtocolException(Exception):
+ pass
+
+
+def executable_path():
+ return "/usr/local/bin/sky"
+
+
+def is_avaliable():
+ if not os.path.exists(executable_path()):
+ return False
+ try:
+ subprocess.check_output([executable_path(), "--version"])
+ return True
+ except subprocess.CalledProcessError:
+ return False
+ except OSError:
+ return False
+
+
+def fetch(skynet_id, file_name, timeout=None):
+ if not is_avaliable():
+ raise UnsupportedProtocolException("Skynet is not available")
+
+ target_dir = os.path.abspath(fetch_from.uniq_string_generator())
+ os.mkdir(target_dir)
+
+ cmd_args = [executable_path(), "get", "-N", "Backbone", "--user", "--wait", "--dir", target_dir, skynet_id]
+ if timeout is not None:
+ cmd_args += ["--timeout", str(timeout)]
+
+ logging.info("Call skynet with args: %s", cmd_args)
+ stdout = subprocess.check_output(cmd_args).strip()
+ logging.debug("Skynet call with args %s is finished, result is %s", cmd_args, stdout)
+
+ return os.path.join(target_dir, file_name)
diff --git a/build/scripts/stderr2stdout.py b/build/scripts/stderr2stdout.py
new file mode 100644
index 0000000000..0e510da373
--- /dev/null
+++ b/build/scripts/stderr2stdout.py
@@ -0,0 +1,6 @@
+import subprocess
+import sys
+
+if __name__ == '__main__':
+ assert len(sys.argv) > 1
+ sys.exit(subprocess.Popen(sys.argv[1:], stderr=sys.stdout).wait())
diff --git a/build/scripts/stdout2stderr.py b/build/scripts/stdout2stderr.py
new file mode 100644
index 0000000000..d7861fdda3
--- /dev/null
+++ b/build/scripts/stdout2stderr.py
@@ -0,0 +1,6 @@
+import subprocess
+import sys
+
+if __name__ == '__main__':
+ assert len(sys.argv) > 1
+ sys.exit(subprocess.Popen(sys.argv[1:], stdout=sys.stderr).wait())
diff --git a/build/scripts/symlink.py b/build/scripts/symlink.py
new file mode 100755
index 0000000000..17bc8447f1
--- /dev/null
+++ b/build/scripts/symlink.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import platform
+from subprocess import call
+
+
+def symlink():
+ if len(sys.argv) < 3:
+ print >>sys.stderr, "Usage: symlink.py <source> <target>"
+ sys.exit(1)
+
+ source = sys.argv[1]
+ target = sys.argv[2]
+
+ print "Making a symbolic link from {0} to {1}".format(source, target)
+
+ sysName = platform.system()
+ if sysName == "Windows": # and not os.path.exists(target)
+ if os.path.isdir(source):
+ call(["mklink", "/D", target, source], shell=True)
+ else:
+ call(["mklink", target, source], shell=True)
+ else:
+ call(["ln", "-f", "-s", "-n", source, target])
+
+if __name__ == '__main__':
+ symlink()
diff --git a/build/scripts/tar_directory.py b/build/scripts/tar_directory.py
new file mode 100644
index 0000000000..a91889fa22
--- /dev/null
+++ b/build/scripts/tar_directory.py
@@ -0,0 +1,45 @@
+import os
+import sys
+import tarfile
+
+
+def is_exe(fpath):
+ return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+
+
+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
+ if len(args) == 3:
+ 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
+ os.execv(tar_exe, [tar_exe, '-cf', tar] + (['-C', prefix] if prefix else []) + [source])
+ 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:
+ source = directory
+ with tarfile.open(tar, 'w') as out:
+ out.add(os.path.abspath(source), arcname=os.path.relpath(source, prefix) if prefix else source)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/tar_sources.py b/build/scripts/tar_sources.py
new file mode 100644
index 0000000000..54e2839a69
--- /dev/null
+++ b/build/scripts/tar_sources.py
@@ -0,0 +1,41 @@
+import argparse
+import os
+import tarfile
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--exts', nargs='*', default=None)
+ parser.add_argument('--flat', action='store_true')
+ parser.add_argument('--input', required=True)
+ parser.add_argument('--output', required=True)
+ parser.add_argument('--prefix', default=None)
+
+ return parser.parse_args()
+
+
+def main():
+ args = parse_args()
+
+ py_srcs = []
+ for root, _, files in os.walk(args.input):
+ for f in files:
+ if not args.exts or f.endswith(tuple(args.exts)):
+ py_srcs.append(os.path.join(root, f))
+
+ compression_mode = ''
+ if args.output.endswith(('.tar.gz', '.tgz')):
+ compression_mode = 'gz'
+ elif args.output.endswith('.bzip2'):
+ compression_mode = 'bz2'
+
+ with tarfile.open(args.output, 'w:{}'.format(compression_mode)) as out:
+ for f in py_srcs:
+ arcname = os.path.basename(f) if args.flat else os.path.relpath(f, args.input)
+ if args.prefix:
+ arcname = os.path.join(args.prefix, arcname)
+ out.add(f, arcname=arcname)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/tared_protoc.py b/build/scripts/tared_protoc.py
new file mode 100644
index 0000000000..7643e1dbfe
--- /dev/null
+++ b/build/scripts/tared_protoc.py
@@ -0,0 +1,31 @@
+import os
+import optparse
+import tarfile
+import contextlib
+import subprocess as sp
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--tar-output')
+ parser.add_option('--protoc-out-dir')
+ return parser.parse_args()
+
+
+def main():
+ opts, args = parse_args()
+ assert opts.tar_output
+ assert opts.protoc_out_dir
+
+ if not os.path.exists(opts.protoc_out_dir):
+ os.makedirs(opts.protoc_out_dir)
+
+ sp.check_call(args)
+
+ with contextlib.closing(tarfile.open(opts.tar_output, 'w')) as tf:
+ tf.add(opts.protoc_out_dir, arcname='')
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/touch.py b/build/scripts/touch.py
new file mode 100755
index 0000000000..e01ba7f86b
--- /dev/null
+++ b/build/scripts/touch.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+
+import optparse
+import os
+import sys
+import time
+
+
+def main(argv):
+ parser = optparse.OptionParser(add_help_option=False)
+ parser.disable_interspersed_args()
+
+ parser.add_option('-?', '--help', dest='help',
+ action='store_true', default=None, help='print help')
+ parser.add_option('-t', dest='t', action='store', default=None)
+
+ opts, argv_rest = parser.parse_args(argv)
+ if getattr(opts, 'help', False):
+ parser.print_help()
+ return 0
+
+ tspec = opts.t
+ if tspec is None:
+ times = None
+ else:
+ head, sep, tail = tspec.partition('.')
+ if 8 > len(head):
+ raise Exception("time spec must follow format [[CC]YY]MMDDhhmm[.SS]: " + tspec + '; ' + head)
+ tfmt = ''
+ if 12 == len(head):
+ tfmt += '%Y'
+ elif 10 == len(head):
+ tfmt += '%y'
+ tfmt += '%m%d%H%M'
+ if 2 == len(tail):
+ tfmt += '.%S'
+ mtime = time.mktime(time.strptime(tspec, tfmt))
+ times = (mtime, mtime)
+
+ for file in argv_rest:
+ try:
+ os.utime(file, times)
+ except:
+ open(file, 'w').close()
+ if times is not None:
+ os.utime(file, times)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/build/scripts/unpacking_jtest_runner.py b/build/scripts/unpacking_jtest_runner.py
new file mode 100644
index 0000000000..9730dcd711
--- /dev/null
+++ b/build/scripts/unpacking_jtest_runner.py
@@ -0,0 +1,148 @@
+import io
+import json
+import optparse
+import os
+import sys
+import subprocess
+import time
+import zipfile
+import platform
+
+# This script changes test run classpath by unpacking tests.jar -> tests-dir. The goal
+# is to launch tests with the same classpath as maven does.
+
+
+def parse_args():
+ parser = optparse.OptionParser()
+ parser.disable_interspersed_args()
+ parser.add_option('--trace-file')
+ parser.add_option('--jar-binary')
+ parser.add_option('--tests-jar-path')
+ parser.add_option('--classpath-option-type', choices=('manifest', 'command_file', 'list'), default='manifest')
+ return parser.parse_args()
+
+
+# temporary, for jdk8/jdk9+ compatibility
+def fix_cmd(cmd):
+ if not cmd:
+ return cmd
+ java = cmd[0]
+ if not java.endswith('java') and not java.endswith('java.exe'):
+ return cmd
+ p = subprocess.Popen([java, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ out, err = out.strip(), err.strip()
+ if ((out or '').strip().startswith('java version "1.8') or (err or '').strip().startswith('java version "1.8')):
+ res = []
+ i = 0
+ while i < len(cmd):
+ for option in ('--add-exports', '--add-modules'):
+ if cmd[i] == option:
+ i += 1
+ break
+ elif cmd[i].startswith(option + '='):
+ break
+ else:
+ res.append(cmd[i])
+ i += 1
+ return res
+ return cmd
+
+
+def dump_event(etype, data, filename):
+ event = {
+ 'timestamp': time.time(),
+ 'value': data,
+ 'name': etype,
+ }
+
+ with io.open(filename, 'a', encoding='utf8') as afile:
+ afile.write(unicode(json.dumps(event) + '\n'))
+
+
+def dump_chunk_event(data, filename):
+ return dump_event('chunk-event', data, filename)
+
+
+def extract_jars(dest, archive):
+ os.makedirs(dest)
+ with zipfile.ZipFile(archive) as zf:
+ zf.extractall(dest)
+
+
+def make_bfg_from_cp(class_path, out):
+ class_path = ' '.join(
+ map(lambda path: ('file:/' + path.lstrip('/')) if os.path.isabs(path) else path, class_path)
+ )
+ with zipfile.ZipFile(out, 'w') as zf:
+ lines = []
+ while class_path:
+ lines.append(class_path[:60])
+ class_path = class_path[60:]
+ if lines:
+ zf.writestr('META-INF/MANIFEST.MF', 'Manifest-Version: 1.0\nClass-Path: \n ' + '\n '.join(lines) + ' \n\n')
+
+
+def make_command_file_from_cp(class_path, out):
+ with open(out, 'w') as cp_file:
+ cp_file.write(os.pathsep.join(class_path))
+
+
+def main():
+ s = time.time()
+ opts, args = parse_args()
+
+ # unpack tests jar
+ try:
+ build_root = args[args.index('--build-root') + 1]
+ dest = os.path.join(build_root, 'test-classes')
+ except Exception:
+ build_root = ''
+ dest = os.path.abspath('test-classes')
+
+ extract_jars(dest, opts.tests_jar_path)
+
+ metrics = {
+ 'suite_jtest_extract_jars_(seconds)': time.time() - s,
+ }
+
+ s = time.time()
+ # fix java classpath
+ cp_idx = args.index('-classpath')
+ if args[cp_idx + 1].startswith('@'):
+ real_name = args[cp_idx + 1][1:]
+ mf = os.path.join(os.path.dirname(real_name), 'fixed.bfg.jar')
+ with open(real_name) as origin:
+ class_path = [os.path.join(build_root, i.strip()) for i in origin]
+ if opts.tests_jar_path in class_path:
+ class_path.remove(opts.tests_jar_path)
+ if opts.classpath_option_type == 'manifest':
+ make_bfg_from_cp(class_path, mf)
+ mf = os.pathsep.join([dest, mf])
+ elif opts.classpath_option_type == 'command_file':
+ mf = os.path.splitext(mf)[0] + '.txt'
+ make_command_file_from_cp([dest] + class_path, mf)
+ mf = "@" + mf
+ elif opts.classpath_option_type == 'list':
+ mf = os.pathsep.join([dest] + class_path)
+ else:
+ raise Exception("Unexpected classpath option type: " + opts.classpath_option_type)
+ args = fix_cmd(args[:cp_idx + 1]) + [mf] + args[cp_idx + 2:]
+ else:
+ args[cp_idx + 1] = args[cp_idx + 1].replace(opts.tests_jar_path, dest)
+ args = fix_cmd(args[:cp_idx]) + args[cp_idx:]
+
+ metrics['suite_jtest_fix_classpath_(seconds)'] = time.time() - s
+
+ if opts.trace_file:
+ dump_chunk_event({'metrics': metrics}, opts.trace_file)
+
+ # run java cmd
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(args).wait())
+ else:
+ os.execv(args[0], args)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/scripts/vcs_info.py b/build/scripts/vcs_info.py
new file mode 100644
index 0000000000..319d1b4631
--- /dev/null
+++ b/build/scripts/vcs_info.py
@@ -0,0 +1,290 @@
+import base64
+import json
+import os
+import re
+import sys
+import shutil
+import tempfile
+import textwrap
+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 escape_special_symbols(strval):
+ 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 c in ("\\", "\""):
+ retval += "\\" + c
+ elif ord(c) < ord(' '):
+ retval += c.decode('latin-1').encode('unicode_escape')
+ else:
+ retval += c
+ return retval.decode('utf-8') if encoding_needed else retval
+
+ @staticmethod
+ def escape_line_feed(strval, indent=' '):
+ return strval.replace(r'\n', '\\n"\\\n' + indent + '"')
+
+ @staticmethod
+ def escape_trigraphs(strval):
+ return strval.replace(r'?', '\\?')
+
+ @staticmethod
+ def escaped_define(strkey, val):
+ name = "#define " + strkey + " "
+ if _Formatting.is_str(val):
+ define = "\"" + _Formatting.escape_line_feed(
+ _Formatting.escape_trigraphs(_Formatting.escape_special_symbols(val))) + "\""
+ else:
+ define = str(val)
+ return name + define
+
+ @staticmethod
+ def escaped_go_map_key(strkey, strval):
+ if _Formatting.is_str(strval):
+ return ' ' + '"' + strkey + '": "' + _Formatting.escape_special_symbols(strval) + '",'
+ else:
+ return ' ' + '"' + strkey + '": "' + str(strval) + '",'
+
+
+def get_default_json():
+ return json.loads('''{
+ "ARCADIA_SOURCE_HG_HASH": "0000000000000000000000000000000000000000",
+ "ARCADIA_SOURCE_LAST_AUTHOR": "<UNKNOWN>",
+ "ARCADIA_SOURCE_LAST_CHANGE": -1,
+ "ARCADIA_SOURCE_PATH": "/",
+ "ARCADIA_SOURCE_REVISION": -1,
+ "ARCADIA_SOURCE_URL": "",
+ "BRANCH": "unknown-vcs-branch",
+ "BUILD_DATE": "",
+ "BUILD_TIMESTAMP": 0,
+ "BUILD_HOST": "localhost",
+ "BUILD_USER": "nobody",
+ "PROGRAM_VERSION": "Arc info:\\n Branch: unknown-vcs-branch\\n Commit: 0000000000000000000000000000000000000000\\n Author: <UNKNOWN>\\n Summary: No VCS\\n\\n",
+ "SCM_DATA": "Arc info:\\n Branch: unknown-vcs-branch\\n Commit: 0000000000000000000000000000000000000000\\n Author: <UNKNOWN>\\n Summary: No VCS\\n",
+ "VCS": "arc",
+ "ARCADIA_PATCH_NUMBER": 0,
+ "ARCADIA_TAG": ""
+}''')
+
+
+def get_json(file_name):
+ try:
+ with open(file_name, 'r') as f:
+ out = json.load(f)
+
+ # 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]):
+ try:
+ out[i] = int(out[i])
+ except:
+ out[i] = -1
+ return out
+ except:
+ return get_default_json()
+
+
+def print_c(json_file, output_file, argv):
+ """ params:
+ json file
+ output file
+ $(SOURCE_ROOT)/build/scripts/c_templates/svn_interface.c"""
+ def gen_header(info):
+ lines = []
+ for k, v in info.items():
+ lines.append(_Formatting.escaped_define(k, v))
+ return lines
+
+ interface = argv[0]
+
+ 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)
+
+
+def merge_java_content(old_content, json_file):
+ new_content, names = print_java_mf(json_file)
+
+ def split_to_sections(content):
+ sections = []
+ cur_section = []
+ for l in content:
+ if l.rstrip():
+ cur_section.append(l)
+ else:
+ sections.append(cur_section)
+ cur_section = []
+
+ if cur_section: # should not be needed according to format specification
+ sections.append(cur_section)
+
+ return sections
+
+ def drop_duplicate_entries(main_section, names):
+ header = re.compile('^([A-Za-z0-9][A-Za-z0-9_-]*): .*$')
+ new_main_section = []
+ for l in main_section:
+ match = header.match(l)
+ # duplicate entry
+ if match:
+ skip = match.group(1) in names
+
+ if not skip:
+ new_main_section.append(l)
+ return new_main_section
+
+ if old_content:
+ sections = split_to_sections(old_content)
+ sections[0] = drop_duplicate_entries(sections[0], names)
+ else:
+ sections = [['Manifest-Version: 1.0\n']]
+
+ sections[0].extend(map(lambda x: x + '\n', new_content))
+
+ return ''.join(map(lambda x: ''.join(x), sections)) + '\n'
+
+
+def merge_java_mf_jar(json_file, out_manifest, jar_file):
+ try:
+ temp_dir = tempfile.mkdtemp()
+ try:
+ with zipfile.ZipFile(jar_file, 'r') as jar:
+ jar.extract(os.path.join('META-INF', 'MANIFEST.MF'), path=temp_dir)
+ except KeyError:
+ pass
+
+ merge_java_mf_dir(json_file, out_manifest, temp_dir)
+ finally:
+ shutil.rmtree(temp_dir)
+
+
+def merge_java_mf_dir(json_file, out_manifest, input_dir):
+ manifest = os.path.join(input_dir, 'META-INF', 'MANIFEST.MF')
+
+ old_lines = []
+ if os.path.isfile(manifest):
+ with open(manifest, 'r') as f:
+ old_lines = f.readlines()
+
+ with open(out_manifest, 'w') as f:
+ f.write(merge_java_content(old_lines, json_file))
+
+
+def merge_java_mf(json_file, out_manifest, input):
+ if zipfile.is_zipfile(input):
+ merge_java_mf_jar(json_file, out_manifest, input)
+ elif os.path.isdir(input):
+ merge_java_mf_dir(json_file, out_manifest, input)
+
+
+def print_java_mf(info):
+ wrapper = textwrap.TextWrapper(subsequent_indent=' ',
+ break_long_words=True,
+ replace_whitespace=False,
+ drop_whitespace=False)
+ names = set()
+
+ def wrap(key, val):
+ names.add(key[:-2])
+ if not val:
+ return []
+ return wrapper.wrap(key + val)
+
+ lines = wrap('Program-Version-String: ', base64.b64encode(info['PROGRAM_VERSION'].encode('utf-8')))
+ lines += wrap('SCM-String: ', base64.b64encode(info['SCM_DATA'].encode('utf-8')))
+ lines += wrap('Arcadia-Source-Path: ', info['ARCADIA_SOURCE_PATH'])
+ lines += wrap('Arcadia-Source-URL: ', info['ARCADIA_SOURCE_URL'])
+ lines += wrap('Arcadia-Source-Revision: ', str(info['ARCADIA_SOURCE_REVISION']))
+ lines += wrap('Arcadia-Source-Hash: ', info['ARCADIA_SOURCE_HG_HASH'].rstrip())
+ lines += wrap('Arcadia-Source-Last-Change: ', str(info['ARCADIA_SOURCE_LAST_CHANGE']))
+ lines += wrap('Arcadia-Source-Last-Author: ', info['ARCADIA_SOURCE_LAST_AUTHOR'])
+ lines += wrap('Build-User: ', info['BUILD_USER'])
+ lines += wrap('Build-Host: ', info['BUILD_HOST'])
+ lines += wrap('Version-Control-System: ', info['VCS'])
+ lines += wrap('Branch: ', info['BRANCH'])
+ lines += wrap('Arcadia-Tag: ', info.get('ARCADIA_TAG', ''))
+ lines += wrap('Arcadia-Patch-Number: ', str(info.get('ARCADIA_PATCH_NUMBER', 42)))
+ if 'SVN_REVISION' in info:
+ lines += wrap('SVN-Revision: ', str(info['SVN_REVISION']))
+ lines += wrap('SVN-Arcroot: ', info['SVN_ARCROOT'])
+ lines += wrap('SVN-Time: ', info['SVN_TIME'])
+ lines += wrap('Build-Date: ', info['BUILD_DATE'])
+ if 'BUILD_TIMESTAMP' in info:
+ lines += wrap('Build-Timestamp: ', str(info['BUILD_TIMESTAMP']))
+ return lines, names
+
+
+def print_java(json_file, output_file, argv):
+ """ params:
+ json file
+ output file
+ file"""
+ input = argv[0] if argv else os.curdir
+ merge_java_mf(json_file, output_file, input)
+
+
+def print_go(json_file, output_file):
+ def gen_map(info):
+ lines = []
+ for k, v in info.items():
+ lines.append(_Formatting.escaped_go_map_key(k, v))
+ return lines
+
+ with open(output_file, 'w') as f:
+ f.write('\n'.join([
+ 'package main',
+ 'import ("a.yandex-team.ru/library/go/core/buildinfo")',
+ 'var buildinfomap = map[string]string {'] + gen_map(json_file) + ['}'] +
+ ['func init() {',
+ ' buildinfo.InitBuildInfo(buildinfomap)',
+ '}']
+ ).encode('utf-8') + '\n')
+
+
+if __name__ == '__main__':
+ if 'output-go' in sys.argv:
+ lang = 'Go'
+ sys.argv.remove('output-go')
+ elif 'output-java' in sys.argv:
+ lang = 'Java'
+ sys.argv.remove('output-java')
+ else:
+ lang = 'C'
+
+ if 'no-vcs' in sys.argv:
+ sys.argv.remove('no-vcs')
+ json_file = get_default_json()
+ else:
+ json_name = sys.argv[1]
+ json_file = get_json(json_name)
+
+ if lang == 'Go':
+ print_go(json_file, sys.argv[2])
+ elif lang == 'Java':
+ print_java(json_file, sys.argv[2], sys.argv[3:])
+ else:
+ print_c(json_file, sys.argv[2], sys.argv[3:])
diff --git a/build/scripts/with_coverage.py b/build/scripts/with_coverage.py
new file mode 100644
index 0000000000..d62435c3b8
--- /dev/null
+++ b/build/scripts/with_coverage.py
@@ -0,0 +1,40 @@
+# TODO prettyboy remove after ya-bin release
+
+import os
+import sys
+import subprocess
+import tarfile
+import random
+import shutil
+
+
+def mkdir_p(path):
+ try:
+ os.makedirs(path)
+ except OSError:
+ pass
+
+
+def main(args):
+ coverage_path = os.path.abspath(args[0])
+ coverage_dir = coverage_path + '.' + str(random.getrandbits(64))
+
+ mkdir_p(coverage_dir)
+
+ env = os.environ.copy()
+ env['GCOV_PREFIX'] = coverage_dir
+
+ subprocess.check_call(args[1:], env=env)
+
+ arch_path = coverage_dir + '.archive'
+
+ with tarfile.open(arch_path, 'w:') as tar:
+ tar.add(coverage_dir, arcname='.')
+
+ os.rename(arch_path, coverage_path)
+
+ shutil.rmtree(coverage_dir)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/with_crash_on_timeout.py b/build/scripts/with_crash_on_timeout.py
new file mode 100644
index 0000000000..bde864ed29
--- /dev/null
+++ b/build/scripts/with_crash_on_timeout.py
@@ -0,0 +1,22 @@
+# TODO prettyboy remove after ya-bin release
+
+import os
+import sys
+import subprocess
+import json
+
+
+def main(args):
+ meta_path = os.path.abspath(args[0])
+ timeout_code = int(args[1])
+ subprocess.check_call(args[2:])
+ with open(meta_path) as f:
+ meta_info = json.loads(f.read())
+ if meta_info["exit_code"] == timeout_code:
+ print >> sys.stderr, meta_info["project"], 'crashed by timeout, use --test-disable-timeout option'
+ return 1
+ return 0
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/build/scripts/with_pathsep_resolve.py b/build/scripts/with_pathsep_resolve.py
new file mode 100644
index 0000000000..37c8c598ae
--- /dev/null
+++ b/build/scripts/with_pathsep_resolve.py
@@ -0,0 +1,23 @@
+import sys
+import os
+import subprocess
+import platform
+
+
+def fix_args(args):
+ just_replace_it = False
+ for arg in args:
+ if arg == '--fix-path-sep':
+ just_replace_it = True
+ continue
+ if just_replace_it:
+ arg = arg.replace('::', os.pathsep)
+ just_replace_it = False
+ yield arg
+
+if __name__ == '__main__':
+ res = list(fix_args(sys.argv[1:]))
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(res).wait())
+ else:
+ os.execv(res[0], res)
diff --git a/build/scripts/wrap_groovyc.py b/build/scripts/wrap_groovyc.py
new file mode 100644
index 0000000000..068b73fd87
--- /dev/null
+++ b/build/scripts/wrap_groovyc.py
@@ -0,0 +1,23 @@
+import platform
+import sys
+import os
+import subprocess
+
+
+def fix_windows(args):
+ for arg in args:
+ if os.path.basename(arg) == 'groovyc' and os.path.basename(os.path.dirname(arg)) == 'bin':
+ yield arg + '.bat'
+ else:
+ yield arg
+
+
+if __name__ == '__main__':
+ env = os.environ.copy()
+ jdk = sys.argv[1]
+ env['JAVA_HOME'] = jdk
+ args = sys.argv[2:]
+ if platform.system() == 'Windows':
+ sys.exit(subprocess.Popen(list(fix_windows(args)), env=env).wait())
+ else:
+ os.execve(args[0], args, env)
diff --git a/build/scripts/wrapper.py b/build/scripts/wrapper.py
new file mode 100644
index 0000000000..1e9d7955a5
--- /dev/null
+++ b/build/scripts/wrapper.py
@@ -0,0 +1,11 @@
+import os
+import sys
+
+
+if __name__ == '__main__':
+ path = sys.argv[1]
+
+ if path[0] != '/':
+ path = os.path.join(os.path.dirname(__file__), path)
+
+ os.execv(path, [path] + sys.argv[2:])
diff --git a/build/scripts/writer.py b/build/scripts/writer.py
new file mode 100644
index 0000000000..21bb3006e5
--- /dev/null
+++ b/build/scripts/writer.py
@@ -0,0 +1,40 @@
+import sys
+import argparse
+
+import process_command_files as pcf
+
+
+def parse_args():
+ args = pcf.get_args(sys.argv[1:])
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-f', '--file', dest='file_path')
+ parser.add_argument('-a', '--append', action='store_true', default=False)
+ parser.add_argument('-Q', '--quote', action='store_true', default=False)
+ parser.add_argument('-s', '--addspace', action='store_true', default=False)
+ parser.add_argument('-c', '--content', action='append', dest='content')
+ parser.add_argument('-m', '--content-multiple', nargs='*', dest='content')
+ parser.add_argument('-P', '--path-list', action='store_true', default=False)
+ return parser.parse_args(args)
+
+
+def smart_shell_quote(v):
+ if v is None:
+ return None
+ if ' ' in v or '"' in v or "'" in v:
+ return "\"{0}\"".format(v.replace('"', '\\"'))
+ return v
+
+if __name__ == '__main__':
+ args = parse_args()
+ open_type = 'a' if args.append else 'w'
+
+ content = args.content
+ if args.quote:
+ content = [smart_shell_quote(ln) for ln in content] if content is not None else None
+ content = '\n'.join(content)
+
+ with open(args.file_path, open_type) as f:
+ if args.addspace:
+ f.write(' ')
+ if content is not None:
+ f.write(content)
diff --git a/build/scripts/xargs.py b/build/scripts/xargs.py
new file mode 100644
index 0000000000..5d68929ecc
--- /dev/null
+++ b/build/scripts/xargs.py
@@ -0,0 +1,18 @@
+import sys
+import os
+import subprocess
+
+if __name__ == '__main__':
+ pos = sys.argv.index('--')
+ fname = sys.argv[pos + 1]
+ cmd = sys.argv[pos + 2:]
+
+ with open(fname, 'r') as f:
+ args = [x.strip() for x in f]
+
+ os.remove(fname)
+
+ p = subprocess.Popen(cmd + args, shell=False, stderr=sys.stderr, stdout=sys.stdout)
+ p.communicate()
+
+ sys.exit(p.returncode)
diff --git a/build/scripts/ya.make b/build/scripts/ya.make
new file mode 100644
index 0000000000..710165e40d
--- /dev/null
+++ b/build/scripts/ya.make
@@ -0,0 +1,102 @@
+OWNER(g:ymake)
+
+PY2TEST()
+
+TEST_SRCS(
+ build_dll_and_java.py
+ build_info_gen.py
+ build_java_codenav_index.py
+ build_java_with_error_prone.py
+ build_java_with_error_prone2.py
+ build_mn.py
+ build_pln_header.py
+ cat.py
+ cgo1_wrapper.py
+ check_config_h.py
+ collect_java_srcs.py
+ compile_cuda.py
+ compile_java.py
+ compile_jsrc.py
+ compile_pysrc.py
+ configure_file.py
+ copy_files_to_dir.py
+ copy_to_dir.py
+ coverage-info.py
+ cpp_flatc_wrapper.py
+ create_jcoverage_report.py
+ extract_asrc.py
+ extract_docs.py
+ extract_jacoco_report.py
+ f2c.py
+ fail_module_cmd.py
+ fetch_from.py
+ fetch_from_external.py
+ fetch_from_mds.py
+ fetch_from_npm.py
+ fetch_from_sandbox.py
+ fetch_resource.py
+ filter_zip.py
+ find_and_tar.py
+ fix_msvc_output.py
+ fs_tools.py
+ gen_aar_gradle_script.py
+ gen_java_codenav_entry.py
+ gen_java_codenav_protobuf.py
+ gen_mx_table.py
+ gen_py3_reg.py
+ gen_py_reg.py
+ gen_test_apk_gradle_script.py
+ gen_ub.py
+ generate_pom.py
+ go_proto_wrapper.py
+ go_tool.py
+ ios_wrapper.py
+ java_pack_to_file.py
+ link_asrc.py
+ link_dyn_lib.py
+ link_exe.py
+ link_fat_obj.py
+ link_lib.py
+ llvm_opt_wrapper.py
+ merge_coverage_data.py
+ merge_files.py
+ mkdir.py
+ mkdocs_builder_wrapper.py
+ mkver.py
+ pack_ios.py
+ pack_jcoverage_resources.py
+ perl_wrapper.py
+ postprocess_go_fbs.py
+ preprocess.py
+ py_compile.py
+ run_ios_simulator.py
+ run_javac.py
+ run_junit.py
+ run_llvm_dsymutil.py
+ run_msvc_wine.py
+ run_tool.py
+ sky.py
+ stdout2stderr.py
+ symlink.py
+ tar_directory.py
+ tar_sources.py
+ tared_protoc.py
+ touch.py
+ unpacking_jtest_runner.py
+ vcs_info.py
+ with_coverage.py
+ with_crash_on_timeout.py
+ with_pathsep_resolve.py
+ wrap_groovyc.py
+ wrapper.py
+ writer.py
+ xargs.py
+ yield_line.py
+ yndexer.py
+)
+
+PEERDIR(
+ ydb/library/yql/public/udf
+)
+
+END()
diff --git a/build/scripts/yield_line.py b/build/scripts/yield_line.py
new file mode 100644
index 0000000000..9c1c539146
--- /dev/null
+++ b/build/scripts/yield_line.py
@@ -0,0 +1,7 @@
+import sys
+
+if __name__ == '__main__':
+ pos = sys.argv.index('--')
+
+ with open(sys.argv[pos + 1], 'a') as f:
+ f.write(' '.join(sys.argv[pos + 2:]) + '\n')
diff --git a/build/scripts/yndexer.py b/build/scripts/yndexer.py
new file mode 100644
index 0000000000..a38e28ba99
--- /dev/null
+++ b/build/scripts/yndexer.py
@@ -0,0 +1,79 @@
+import sys
+import subprocess
+import threading
+import os
+import re
+
+
+rx_resource_dir = re.compile(r'libraries: =([^:]*)')
+
+
+def _try_to_kill(process):
+ try:
+ process.kill()
+ except Exception:
+ pass
+
+
+def touch(path):
+ if not os.path.exists(path):
+ with open(path, 'w'):
+ pass
+
+
+class Process(object):
+ def __init__(self, args):
+ self._process = subprocess.Popen(args)
+ self._event = threading.Event()
+ self._result = None
+ thread = threading.Thread(target=self._run)
+ thread.setDaemon(True)
+ thread.start()
+
+ def _run(self):
+ self._process.communicate()
+ self._result = self._process.returncode
+ self._event.set()
+
+ def wait(self, timeout):
+ self._event.wait(timeout=timeout)
+ _try_to_kill(self._process)
+ return self._result
+
+
+if __name__ == '__main__':
+ args = sys.argv
+
+ yndexer = args[1]
+ timeout = int(args[2])
+ arc_root = args[3]
+ build_root = args[4]
+ input_file = args[5]
+ output_file = args[-1]
+ tail_args = args[6:-1]
+
+ subprocess.check_call(tail_args)
+
+ clang = tail_args[0]
+ out = subprocess.check_output([clang, '-print-search-dirs'])
+ resource_dir = rx_resource_dir.search(out).group(1)
+
+ yndexer_args = [
+ yndexer, input_file,
+ '-pb2',
+ '-i', 'arc::{}'.format(arc_root),
+ '-i', 'build::{}'.format(build_root),
+ '-i', '.IGNORE::/',
+ '-o', os.path.dirname(output_file),
+ '-n', os.path.basename(output_file).rsplit('.ydx.pb2', 1)[0],
+ '--'
+ ] + tail_args + [
+ '-resource-dir', resource_dir,
+ ]
+
+ process = Process(yndexer_args)
+ result = process.wait(timeout=timeout)
+
+ if result != 0:
+ print >> sys.stderr, 'Yndexing process finished with code', result
+ touch(output_file)
diff --git a/build/stdafx.hpp b/build/stdafx.hpp
new file mode 100644
index 0000000000..98b15adda0
--- /dev/null
+++ b/build/stdafx.hpp
@@ -0,0 +1,332 @@
+#if !defined(LIBCXXRT)
+#include <algorithm>
+#include <array>
+#include <atomic>
+#include <bitset>
+#include <cassert>
+#include <ccomplex>
+#include <cctype>
+#include <cerrno>
+#include <cfenv>
+#include <cfloat>
+#include <chrono>
+#include <cinttypes>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <codecvt>
+#include <complex>
+#include <condition_variable>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstdbool>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctgmath>
+#include <ctime>
+#include <cwchar>
+#include <cwctype>
+#include <deque>
+#include <exception>
+//#include <experimental>
+//#include <ext>
+#include <forward_list>
+#include <fstream>
+#include <functional>
+#include <future>
+//#include <incs>
+#include <initializer_list>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <mutex>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <scoped_allocator>
+#include <set>
+#include <shared_mutex>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <stlfwd>
+#include <streambuf>
+#include <string>
+#include <strstream>
+//#include <support>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <typeindex>
+#include <typeinfo>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#include <utility>
+#include <valarray>
+#include <vector>
+//#include <wrappers>
+
+#include <util/network/hostip.h>
+#include <util/network/address.h>
+#include <util/network/poller.h>
+#include <util/network/socket.h>
+#include <util/network/iovec.h>
+#include <util/network/ip.h>
+#include <util/network/endpoint.h>
+#include <util/network/nonblock.h>
+#include <util/network/sock.h>
+#include <util/network/pair.h>
+#include <util/network/interface.h>
+#include <util/network/init.h>
+#include <util/network/pollerimpl.h>
+#include <util/system/tls.h>
+#include <util/system/direct_io.h>
+#include <util/system/flock.h>
+#include <util/system/fhandle.h>
+#include <util/system/pipe.h>
+#include <util/system/dynlib.h>
+#include <util/system/condvar.h>
+#include <util/system/atomic_ops.h>
+#include <util/system/guard.h>
+#include <util/system/execpath.h>
+#include <util/system/spinlock.h>
+#include <util/system/progname.h>
+#include <util/system/types.h>
+#include <util/system/fs.h>
+#include <util/system/compat.h>
+#include <util/system/error.h>
+#include <util/system/cpu_id.h>
+//#include <util/system/fs_win.h>
+//#include <util/system/context_i686.h>
+#include <util/system/rwlock.h>
+#include <util/system/info.h>
+#include <util/system/getpid.h>
+#include <util/system/file_lock.h>
+#include <util/system/nice.h>
+//#include <util/system/context_aarch64.h>
+#include <util/system/src_root.h>
+#include <util/system/daemon.h>
+#include <util/system/align.h>
+#include <util/system/sem.h>
+#include <util/system/hostname.h>
+#include <util/system/compiler.h>
+#include <util/system/thread.h>
+#include <util/system/fstat.h>
+#include <util/system/madvise.h>
+#include <util/system/valgrind.h>
+#include <util/system/shmat.h>
+#include <util/system/rusage.h>
+#include <util/system/yassert.h>
+#include <util/system/tempfile.h>
+#include <util/system/atomic.h>
+#include <util/system/yield.h>
+#include <util/system/filemap.h>
+#include <library/cpp/deprecated/mapped_file/mapped_file.h>
+#include <util/system/sys_alloc.h>
+#include <util/system/sysstat.h>
+#include <util/system/env.h>
+#include <util/system/shellcommand.h>
+//#include <util/system/winint.h>
+#include <util/system/defaults.h>
+#include <util/system/context_x86_64.h>
+#include <util/system/protect.h>
+#include <util/system/mutex.h>
+#include <util/system/sigset.h>
+#include <util/system/event.h>
+#include <util/system/byteorder.h>
+#include <util/system/maxlen.h>
+#include <util/system/hp_timer.h>
+#include <util/system/unaligned_mem.h>
+#include <util/system/src_location.h>
+#include <util/system/fasttime.h>
+#include <util/system/atomic_gcc.h>
+#include <util/system/user.h>
+#include <util/system/mem_info.h>
+#include <util/system/datetime.h>
+#include <util/system/utime.h>
+#include <util/system/mlock.h>
+#include <util/system/type_name.h>
+#include <util/system/file.h>
+#include <util/system/atexit.h>
+#include <util/system/context_x86.h>
+#include <util/system/backtrace.h>
+#include <util/system/platform.h>
+//#include <util/system/atomic_win.h>
+#include <util/system/context.h>
+#include <util/memory/segpool_alloc.h>
+#include <util/memory/tempbuf.h>
+#include <util/memory/pool.h>
+#include <util/memory/addstorage.h>
+#include <util/memory/alloc.h>
+#include <util/memory/blob.h>
+#include <util/memory/smallobj.h>
+#include <util/memory/segmented_string_pool.h>
+#include <util/memory/mmapalloc.h>
+#include <library/cpp/deprecated/split/delim_string_iter.h>
+#include <util/draft/ip.h>
+#include <util/draft/matrix.h>
+#include <util/draft/date.h>
+#include <util/draft/enum.h>
+#include <util/draft/memory.h>
+#include <util/draft/holder_vector.h>
+#include <util/generic/object_counter.h>
+#include <util/draft/datetime.h>
+#include <library/cpp/deprecated/estimators/estimators.h>
+#include <library/cpp/deprecated/enum_codegen/enum_codegen.h>
+#include <util/generic/array_size.h>
+#include <util/generic/bitmap.h>
+#include <util/generic/intrlist.h>
+#include <util/generic/deque.h>
+#include <util/generic/bt_exception.h>
+#include <util/generic/yexception_ut.h>
+#include <util/generic/singleton.h>
+#include <util/generic/set.h>
+#include <util/generic/iterator.h>
+#include <util/generic/ptr.h>
+#include <util/generic/mapfindptr.h>
+#include <util/generic/vector.h>
+#include <util/generic/va_args.h>
+#include <util/generic/refcount.h>
+#include <util/generic/list.h>
+#include <util/generic/array_ref.h>
+#include <util/generic/noncopyable.h>
+#include <util/generic/strbuf.h>
+#include <util/generic/lazy_value.h>
+#include <util/generic/variant.h>
+#include <util/generic/store_policy.h>
+#include <util/generic/ymath.h>
+#include <util/generic/stack.h>
+#include <util/generic/xrange.h>
+#include <util/generic/fwd.h>
+#include <util/generic/is_in.h>
+#include <util/generic/buffer.h>
+#include <util/generic/yexception.h>
+#include <util/generic/typelist.h>
+#include <util/generic/utility.h>
+#include <util/generic/bitops.h>
+#include <util/generic/typetraits.h>
+#include <util/generic/algorithm.h>
+#include <util/generic/hash_set.h>
+#include <util/generic/cast.h>
+#include <util/generic/ylimits.h>
+#include <util/generic/hash.h>
+#include <util/generic/mem_copy.h>
+#include <util/generic/guid.h>
+#include <util/generic/hash_primes.h>
+#include <util/generic/map.h>
+#include <util/generic/maybe.h>
+#include <util/generic/function.h>
+#include <util/generic/flags.h>
+#include <util/generic/strfcpy.h>
+#include <util/generic/string.h>
+#include <util/generic/fastqueue.h>
+#include <util/generic/explicit_type.h>
+#include <util/generic/queue.h>
+#include <util/generic/adaptor.h>
+#include <util/string/escape.h>
+#include <library/cpp/string_utils/scan/scan.h>
+#include <util/string/type.h>
+#include <util/string/join.h>
+#include <util/string/vector.h>
+#include <util/string/split.h>
+#include <util/string/cstriter.h>
+#include <util/string/strspn.h>
+#include <util/string/subst.h>
+#include <util/string/hex.h>
+#include <util/string/printf.h>
+#include <util/string/ascii.h>
+#include <util/string/cast.h>
+#include <library/cpp/deprecated/split/split_iterator.h>
+#include <util/string/util.h>
+#include <util/string/strip.h>
+#include <util/string/builder.h>
+#include <util/digest/city.h>
+#include <util/digest/multi.h>
+#include <util/digest/numeric.h>
+#include <util/digest/fnv.h>
+#include <util/digest/murmur.h>
+#include <util/ysaveload.h>
+#include <util/thread/factory.h>
+#include <util/thread/lfstack.h>
+#include <util/thread/singleton.h>
+#include <util/thread/lfqueue.h>
+#include <util/thread/pool.h>
+#include <util/str_stl.h>
+#include <util/folder/path.h>
+#include <util/folder/dirut.h>
+#include <util/folder/iterator.h>
+//#include <util/folder/dirent_win.h>
+//#include <util/folder/lstat_win.h>
+#include <util/folder/pathsplit.h>
+#include <util/folder/tempdir.h>
+#include <util/folder/filelist.h>
+#include <util/folder/fts.h>
+#include <util/stream/null.h>
+#include <util/stream/holder.h>
+#include <util/stream/direct_io.h>
+#include <util/stream/tempbuf.h>
+#include <util/stream/pipe.h>
+#include <util/stream/tokenizer.h>
+#include <util/stream/buffered.h>
+#include <util/stream/input.h>
+#include <util/stream/trace.h>
+#include <util/stream/output.h>
+#include <util/stream/output.h>
+#include <util/stream/format.h>
+#include <util/stream/tee.h>
+#include <util/stream/multi.h>
+#include <util/stream/aligned.h>
+#include <util/stream/labeled.h>
+#include <util/stream/buffer.h>
+#include <util/stream/hex.h>
+#include <util/stream/printf.h>
+#include <util/stream/walk.h>
+#include <util/stream/zlib.h>
+#include <util/stream/debug.h>
+#include <util/stream/mem.h>
+#include <util/stream/length.h>
+#include <util/stream/str.h>
+#include <util/stream/file.h>
+#include <util/stream/zerocopy.h>
+#include <util/stream/output.h>
+#include <util/random/common_ops.h>
+#include <util/random/shuffle.h>
+#include <util/random/lcg_engine.h>
+#include <util/random/random.h>
+#include <util/random/normal.h>
+#include <util/random/mersenne32.h>
+#include <util/random/entropy.h>
+#include <util/random/mersenne.h>
+//#include <util/random/easy.h>
+#include <util/random/mersenne64.h>
+#include <util/random/fast.h>
+#include <util/ysafeptr.h>
+#include <util/charset/utf8.h>
+#include <util/charset/unidata.h>
+#include <util/charset/unicode_table.h>
+#include <util/charset/wide.h>
+#include <util/charset/recode_result.h>
+#include <util/datetime/constants.h>
+#include <util/datetime/base.h>
+#include <util/datetime/parser.h>
+#include <util/datetime/cputimer.h>
+#include <util/datetime/systime.h>
+#endif
diff --git a/build/sysincl.lst b/build/sysincl.lst
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build/sysincl.lst
diff --git a/build/sysincl/android.yml b/build/sysincl/android.yml
new file mode 100644
index 0000000000..97cfbf38d2
--- /dev/null
+++ b/build/sysincl/android.yml
@@ -0,0 +1,31 @@
+- includes:
+ - android/asset_manager.h
+ - android/asset_manager_jni.h
+ - android/dlext.h
+ - android/log.h
+ - android/native_window_jni.h
+ - cpu-features.h: contrib/libs/android_cpufeatures/cpu-features.h
+ - ifaddrs.h: contrib/libs/libc_compat/include/ifaddrs/ifaddrs.h
+ - jni.h: contrib/libs/jdk/include/jni.h
+ - vulkan/vulkan.h
+ - vulkan/vk_sdk_platform.h
+ - EGL/egl.h
+ - EGL/eglext.h
+ - GLES2/gl2.h
+ - GLES2/gl2ext.h
+ - GLES3/gl31.h
+ - SLES/OpenSLES.h
+ - SLES/OpenSLES_Android.h
+ - SLES/OpenSLES_AndroidConfiguration.h
+ - SLES/OpenSLES_AndroidMetadata.h
+ - SLES/OpenSLES_Platform.h
+ - linux/ashmem.h
+
+- source_filter: "^contrib/libs/breakpad/src"
+ includes:
+ - elf.h: contrib/libs/breakpad/src/common/android/include/elf.h
+ - link.h: contrib/libs/breakpad/src/common/android/include/link.h
+ - sys/procfs.h: contrib/libs/breakpad/src/common/android/include/sys/procfs.h
+ - sys/signal.h: contrib/libs/breakpad/src/common/android/include/sys/signal.h
+ - sys/user.h: contrib/libs/breakpad/src/common/android/include/sys/user.h
+ - ucontext.h: contrib/libs/breakpad/src/common/android/include/ucontext.h
diff --git a/build/sysincl/darwin.yml b/build/sysincl/darwin.yml
new file mode 100644
index 0000000000..582c7e1202
--- /dev/null
+++ b/build/sysincl/darwin.yml
@@ -0,0 +1,235 @@
+- includes:
+ # These headers actually exist in arcadia, so we either should use them and
+ # add proper PEERDIR, or should #error them if they are not really used:
+ # - bzlib.h
+ # - db.h
+ # - expat.h
+ # - expat_external.h
+ # - libunwind.h
+ # - libxslt/documents.h
+ # - libxslt/extensions.h
+ # - libxslt/transform.h
+ # - libxslt/xsltutils.h
+ # - pcap-bpf.h
+ # - pcap-namedb.h
+ # - pcap.h
+ # - pcap/bpf.h
+ # - pcap/namedb.h
+ # - pcap/pcap.h
+ # - sasl/sasl.h
+ # - sasl/saslutil.h
+ # - uuid/uuid.h
+ # - zconf.h
+
+ - Availability.h
+ - AvailabilityMacros.h
+ - Block.h
+ - CommonCrypto/CommonCrypto.h
+ - CommonCrypto/CommonCryptor.h
+ - CommonCrypto/CommonDigest.h
+ - CommonCrypto/CommonHMAC.h
+ - CommonCrypto/CommonKeyDerivation.h
+ - ConditionalMacros.h
+ - DiskArbitration/DiskArbitration.h
+ - Endian.h
+ - MacTypes.h
+ - TargetConditionals.h
+ - architecture/byte_order.h
+ - asl.h
+ - copyfile.h
+ - crt_externs.h
+ - curses.h
+ - dispatch/dispatch.h
+ - editline/readline.h
+ - ffi/ffi.h
+ - form.h
+ - gssapi.h
+ - gssapi/gssapi.h
+ - gssapi/gssapi_generic.h
+ - gssapi/gssapi_krb5.h
+ - histedit.h
+ - krb5.h
+ - launch.h
+ - libkern/OSAtomic.h
+ - libkern/OSByteOrder.h
+ - libkern/OSCacheControl.h
+ - libproc.h
+ - mach-o/dyld.h
+ - mach-o/getsect.h
+ - mach-o/loader.h
+ - mach/clock.h
+ - mach/clock_types.h
+ - mach/error.h
+ - mach/host_info.h
+ - mach/kern_return.h
+ - mach/mach.h
+ - mach/mach_error.h
+ - mach/mach_host.h
+ - mach/mach_init.h
+ - mach/mach_port.h
+ - mach/mach_time.h
+ - mach/mach_traps.h
+ - mach/mach_types.h
+ - mach/mach_vm.h
+ - mach/machine.h
+ - mach/machine/vm_param.h
+ - mach/processor_info.h
+ - mach/semaphore.h
+ - mach/shared_memory_server.h
+ - mach/shared_region.h
+ - mach/task.h
+ - mach/thread_act.h
+ - mach/thread_info.h
+ - mach/thread_policy.h
+ - mach/vm_map.h
+ - mach/vm_param.h
+ - mach/vm_statistics.h
+ - machine/_limits.h
+ - machine/_types.h
+ - machine/byte_order.h
+ - machine/endian.h
+ - machine/limits.h
+ - machine/param.h
+ - machine/signal.h
+ - machine/vmparam.h
+ - malloc/malloc.h
+ - menu.h
+ - ndbm.h
+ - net/bpf.h
+ - net/if_dl.h
+ - net/if_media.h
+ - net/if_types.h
+ - net/if_var.h
+ - netinet/in_pcb.h
+ - netinet/ip_var.h
+ - netinet/tcp_fsm.h
+ - netinet/tcp_timer.h
+ - netinet/tcp_var.h
+ - netinet/tcpip.h
+ - netinet/udp_var.h
+ - netinet6/in6.h
+ - nlist.h
+ - objc/objc-sync.h
+ - objc/runtime.h
+ - os/lock.h
+ - os/proc.h
+ - os/trace.h
+ - panel.h
+ - pthread_spis.h
+ - readline/history.h
+ - readline/readline.h
+ - readpassphrase.h
+ - runetype.h
+ - simd/simd.h
+ - strhash.h
+ - sys/_types.h
+ - sys/acl.h
+ - sys/aio.h
+ - sys/attr.h
+ - sys/clonefile.h
+ - sys/dirent.h
+ - sys/disk.h
+ - sys/domain.h
+ - sys/event.h
+ - sys/filio.h
+ - sys/ioccom.h
+ - sys/kauth.h
+ - sys/kern_control.h
+ - sys/lock.h
+ - sys/malloc.h
+ - sys/mbuf.h
+ - sys/msgbuf.h
+ - sys/posix_shm.h
+ - sys/proc.h
+ - sys/proc_info.h
+ - sys/protosw.h
+ - sys/sdt.h
+ - sys/sockio.h
+ - sys/sys_domain.h
+ - sys/syslimits.h
+ - sys/ttycom.h
+ - sys/ucred.h
+ - sys/unpcb.h
+ - sys/vmmeter.h
+ - sys/vnode.h
+ - tcl.h
+ - term.h
+ - termcap.h
+ - timeconv.h
+ - tzfile.h
+ - util.h
+ - vis.h
+ - xpc/xpc.h
+
+ # OSX frameworks
+ - Accelerate/Accelerate.h
+ - AppKit/AppKit.h
+ - AppKit/NSView.h
+ - ApplicationServices/ApplicationServices.h
+ - AudioToolbox/AudioToolbox.h
+ - AVFoundation/AVFoundation.h
+ - CFNetwork/CFNetwork.h
+ - Cocoa/Cocoa.h
+ - CoreFoundation/CFBase.h
+ - CoreFoundation/CFBundle.h
+ - CoreFoundation/CFData.h
+ - CoreFoundation/CFDictionary.h
+ - CoreFoundation/CFLocale.h
+ - CoreFoundation/CFNumber.h
+ - CoreFoundation/CFPreferences.h
+ - CoreFoundation/CFRunLoop.h
+ - CoreFoundation/CFString.h
+ - CoreFoundation/CFTimeZone.h
+ - CoreFoundation/CFUUID.h
+ - CoreFoundation/CoreFoundation.h
+ - CoreGraphics/CoreGraphics.h
+ - CoreLocation/CoreLocation.h
+ - CoreMedia/CoreMedia.h
+ - CoreMotion/CoreMotion.h
+ - CoreServices/CoreServices.h
+ - CoreTelephony/CTCarrier.h
+ - CoreTelephony/CTTelephonyNetworkInfo.h
+ - CoreText/CoreText.h
+ - CoreVideo/CoreVideo.h
+ - Foundation/Foundation.h
+ - Foundation/NSException.h
+ - Foundation/NSString.h
+ - Foundation/NSKeyValueObserving.h
+ - Foundation/NSObject.h
+ - GLKit/GLKit.h
+ - IOKit/IOBSD.h
+ - IOKit/IOKitLib.h
+ - IOKit/kext/KextManager.h
+ - IOKit/ps/IOPSKeys.h
+ - IOKit/ps/IOPSKeys.h
+ - IOKit/ps/IOPowerSources.h
+ - IOKit/ps/IOPowerSources.h
+ - IOKit/ps/IOPowerSources.h
+ - IOKit/storage/IOBlockStorageDriver.h
+ - IOKit/storage/IOMedia.h
+ - IOSurface/IOSurfaceRef.h
+ - Metal/Metal.h
+ - metal_stdlib
+ - OpenCL/cl.h
+ - OpenCL/cl_gl.h
+ - OpenCL/opencl.h
+ - OpenGLES/ES2/gl.h
+ - Speech/Speech.h
+ - QuartzCore/QuartzCore.h
+ - QuartzCore/CAEAGLLayer.h
+ - QuartzCore/CAMetalLayer.h
+ - Security/SecCertificate.h
+ - Security/SecKey.h
+ - Security/SecRandom.h
+ - Security/SecureTransport.h
+ - Security/Security.h
+ - SystemConfiguration/SystemConfiguration.h
+ - UIKit/UIImage.h
+ - UIKit/UIKit.h
+ - UIKit/UIScreen.h
+ - UIKit/UIWebView.h
+ - UIKit/UIView.h
+ - VideoDecodeAcceleration/VDADecoder.h
+ - VideoToolbox/VideoToolbox.h
+ - XCTest/XCTest.h
+ - CoreFoundation/CFByteOrder.h
diff --git a/build/sysincl/ibdrv.yml b/build/sysincl/ibdrv.yml
new file mode 100644
index 0000000000..5cf2c36078
--- /dev/null
+++ b/build/sysincl/ibdrv.yml
@@ -0,0 +1,12 @@
+# This file is conditionally included from ymake.core.conf to ensure
+# that contrib/libs/ibdrv/include/{infiniband/verbs.h,rdma/rdma_cma.h}
+# are the only ibdrv headers needed for opensource catboost
+# (transitively from library/cpp/netliba). They are replaced by empty
+# files in put_arcadia_to_git.sh.
+
+- source_filter: "^contrib/libs/ibdrv"
+ includes:
+ - infiniband/sa.h
+ - infiniband/verbs.h
+ - infiniband/verbs_api.h
+ - rdma/rdma_cma.h
diff --git a/build/sysincl/intrinsic.yml b/build/sysincl/intrinsic.yml
new file mode 100644
index 0000000000..9355b61c13
--- /dev/null
+++ b/build/sysincl/intrinsic.yml
@@ -0,0 +1,47 @@
+- includes:
+ - Intrin.h
+ - ammintrin.h
+ - arm_acle.h
+ - arm_neon.h
+ - arm64_neon.h
+ - armintr.h
+ - avx2intrin.h
+ - avxintrin.h
+ - bmi2intrin.h
+ - bmiintrin.h
+ - cmnintrin.h
+ - e2kbuiltin.h
+ - emmintrin.h
+ - f16cintrin.h
+ - fma4intrin.h
+ - fmaintrin.h
+ - ia32intrin.h
+ - ia64intrin.h
+ - immintrin.h
+ - intrin.h
+ - intrinsics.h
+ - lzcntintrin.h
+ - mm3dnow.h
+ - mmintrin.h
+ - msa.h
+ - nmmintrin.h
+ - pmmintrin.h
+ - popcntintrin.h
+ - prfchwintrin.h
+ - rdseedintrin.h
+ - rtmintrin.h
+ - s390intrin.h
+ - sanitizer/asan_interface.h
+ - sanitizer/common_interface_defs.h
+ - sanitizer/coverage_interface.h
+ - sanitizer/lsan_interface.h
+ - sanitizer/msan_interface.h
+ - sanitizer/tsan_interface.h
+ - sanitizer/tsan_interface_atomic.h
+ - smmintrin.h
+ - tbmintrin.h
+ - tmmintrin.h
+ - wmmintrin.h
+ - x86intrin.h
+ - xmmintrin.h
+ - xopintrin.h
diff --git a/build/sysincl/libc-musl-libcxx.yml b/build/sysincl/libc-musl-libcxx.yml
new file mode 100644
index 0000000000..539ce8e9aa
--- /dev/null
+++ b/build/sysincl/libc-musl-libcxx.yml
@@ -0,0 +1,6 @@
+- source_filter: "^contrib/libs/musl"
+ includes:
+ - inttypes.h: contrib/libs/cxxsupp/libcxx/include/inttypes.h
+ - string.h: contrib/libs/cxxsupp/libcxx/include/string.h
+ - stddef.h: contrib/libs/cxxsupp/libcxx/include/stddef.h
+ - stdint.h: contrib/libs/cxxsupp/libcxx/include/stdint.h
diff --git a/build/sysincl/libc-to-compat.yml b/build/sysincl/libc-to-compat.yml
new file mode 100644
index 0000000000..02bd7508dc
--- /dev/null
+++ b/build/sysincl/libc-to-compat.yml
@@ -0,0 +1,6 @@
+# We want musl to resolve itself without these sysincls, but its test must have them
+- source_filter: "^(?!contrib/libs/musl).*|^contrib/libs/musl/tests"
+ includes:
+ # sys/random.h was added in glibc=2.25 / Ubuntu 16.04
+ - sys/random.h: "contrib/libs/libc_compat/include/random/sys/random.h"
+ - readpassphrase.h: "contrib/libs/libc_compat/include/readpassphrase/readpassphrase.h"
diff --git a/build/sysincl/libc-to-musl.yml b/build/sysincl/libc-to-musl.yml
new file mode 100644
index 0000000000..810dd8d697
--- /dev/null
+++ b/build/sysincl/libc-to-musl.yml
@@ -0,0 +1,254 @@
+# libc & stl common headers should be resolved to either
+# * system libc (e.g. nothing in our repo)
+# * system libc++ (e.g. nothing in our repo)
+# * libcxx
+# * musl
+# or some combination of them depending on the build flags.
+
+# Musl has some internal header replacements. We will just resolve to both.
+- source_filter: "^(contrib/libs/musl|contrib/libs/cxxsupp/libcxx/include/__config)"
+ includes:
+ - arpa/inet.h:
+ - contrib/libs/musl/include/arpa/inet.h
+ - contrib/libs/musl/src/include/arpa/inet.h
+ - crypt.h:
+ - contrib/libs/musl/include/crypt.h
+ - contrib/libs/musl/src/include/crypt.h
+ - errno.h:
+ - contrib/libs/musl/include/errno.h
+ - contrib/libs/musl/src/include/errno.h
+ - features.h:
+ - contrib/libs/musl/include/features.h
+ - contrib/libs/musl/src/include/features.h
+ - langinfo.h:
+ - contrib/libs/musl/include/langinfo.h
+ - contrib/libs/musl/src/include/langinfo.h
+ - pthread.h:
+ - contrib/libs/musl/include/pthread.h
+ - contrib/libs/musl/src/include/pthread.h
+ - resolv.h:
+ - contrib/libs/musl/include/resolv.h
+ - contrib/libs/musl/src/include/resolv.h
+ - signal.h:
+ - contrib/libs/musl/include/signal.h
+ - contrib/libs/musl/src/include/signal.h
+ - stdio.h:
+ - contrib/libs/musl/include/stdio.h
+ - contrib/libs/musl/src/include/stdio.h
+ - stdlib.h:
+ - contrib/libs/musl/include/stdlib.h
+ - contrib/libs/musl/src/include/stdlib.h
+ - string.h:
+ - contrib/libs/musl/include/string.h
+ - contrib/libs/musl/src/include/string.h
+ - sys/auxv.h:
+ - contrib/libs/musl/include/sys/auxv.h
+ - contrib/libs/musl/src/include/sys/auxv.h
+ - sys/membarrier.h:
+ - contrib/libs/musl/include/sys/membarrier.h
+ - contrib/libs/musl/src/include/sys/membarrier.h
+ - sys/mman.h:
+ - contrib/libs/musl/include/sys/mman.h
+ - contrib/libs/musl/src/include/sys/mman.h
+ - sys/sysinfo.h:
+ - contrib/libs/musl/include/sys/sysinfo.h
+ - contrib/libs/musl/src/include/sys/sysinfo.h
+ - sys/time.h:
+ - contrib/libs/musl/include/sys/time.h
+ - contrib/libs/musl/src/include/sys/time.h
+ - time.h:
+ - contrib/libs/musl/include/time.h
+ - contrib/libs/musl/src/include/time.h
+ - unistd.h:
+ - contrib/libs/musl/include/unistd.h
+ - contrib/libs/musl/src/include/unistd.h
+ - wchar.h:
+ - contrib/libs/musl/include/wchar.h
+ - contrib/libs/musl/src/include/wchar.h
+
+ - inttypes.h: contrib/libs/musl/include/inttypes.h
+ - stddef.h: contrib/libs/musl/include/stddef.h
+ - stdint.h: contrib/libs/musl/include/stdint.h
+
+
+# We want musl to resolve itself without these sysincls, but its test must have them
+- source_filter: "^(?!contrib/libs/musl)|^contrib/libs/musl/tests"
+ includes:
+ # libc & stl common headers
+ - complex.h: contrib/libs/musl/include/complex.h
+ - ctype.h: contrib/libs/musl/include/ctype.h
+ - errno.h: contrib/libs/musl/include/errno.h
+ - float.h: contrib/libs/musl/include/float.h
+ - inttypes.h: contrib/libs/musl/include/inttypes.h
+ - limits.h: contrib/libs/musl/include/limits.h
+ - locale.h: contrib/libs/musl/include/locale.h
+ - math.h: contrib/libs/musl/include/math.h
+ - setjmp.h: contrib/libs/musl/include/setjmp.h
+ - stdbool.h: contrib/libs/musl/include/stdbool.h
+ - stddef.h: contrib/libs/musl/include/stddef.h
+ - stdint.h: contrib/libs/musl/include/stdint.h
+ - stdio.h: contrib/libs/musl/include/stdio.h
+ - stdlib.h: contrib/libs/musl/include/stdlib.h
+ - string.h: contrib/libs/musl/include/string.h
+ - tgmath.h: contrib/libs/musl/include/tgmath.h
+ - threads.h: contrib/libs/musl/include/threads.h
+ - wchar.h: contrib/libs/musl/include/wchar.h
+ - wctype.h: contrib/libs/musl/include/wctype.h
+
+ # Rest of libc headers
+ - aio.h: contrib/libs/musl/include/aio.h
+ - alloca.h: contrib/libs/musl/include/alloca.h
+ - ar.h: contrib/libs/musl/include/ar.h
+ - arpa/inet.h: contrib/libs/musl/include/arpa/inet.h
+ - arpa/nameser_compat.h: contrib/libs/musl/include/arpa/nameser_compat.h
+ - arpa/nameser.h: contrib/libs/musl/include/arpa/nameser.h
+ - arpa/telnet.h: contrib/libs/musl/include/arpa/telnet.h
+ - arpa/tftp.h: contrib/libs/musl/include/arpa/tftp.h
+ - assert.h: contrib/libs/musl/include/assert.h
+ - byteswap.h: contrib/libs/musl/include/byteswap.h
+ - cpio.h: contrib/libs/musl/include/cpio.h
+ - crypt.h: contrib/libs/musl/include/crypt.h
+ - dirent.h: contrib/libs/musl/include/dirent.h
+ - dlfcn.h: contrib/libs/musl/include/dlfcn.h
+ - elf.h: contrib/libs/musl/include/elf.h
+ - endian.h: contrib/libs/musl/include/endian.h
+ - err.h: contrib/libs/musl/include/err.h
+ - fcntl.h: contrib/libs/musl/include/fcntl.h
+ - features.h: contrib/libs/musl/include/features.h
+ - fenv.h: contrib/libs/musl/include/fenv.h
+ - fmtmsg.h: contrib/libs/musl/include/fmtmsg.h
+ - fnmatch.h: contrib/libs/musl/include/fnmatch.h
+ - ftw.h: contrib/libs/musl/include/ftw.h
+ - getopt.h: contrib/libs/musl/include/getopt.h
+ - glob.h: contrib/libs/musl/include/glob.h
+ - grp.h: contrib/libs/musl/include/grp.h
+ - iconv.h: contrib/libs/musl/include/iconv.h
+ - ifaddrs.h: contrib/libs/musl/include/ifaddrs.h
+ - iso646.h: contrib/libs/musl/include/iso646.h
+ - langinfo.h: contrib/libs/musl/include/langinfo.h
+ - lastlog.h: contrib/libs/musl/include/lastlog.h
+ - libgen.h: contrib/libs/musl/include/libgen.h
+ - libintl.h: contrib/libs/musl/include/libintl.h
+ - link.h: contrib/libs/musl/include/link.h
+ - malloc.h: contrib/libs/musl/include/malloc.h
+ - memory.h: contrib/libs/musl/include/memory.h
+ - mntent.h: contrib/libs/musl/include/mntent.h
+ - monetary.h: contrib/libs/musl/include/monetary.h
+ - mqueue.h: contrib/libs/musl/include/mqueue.h
+ - netdb.h: contrib/libs/musl/include/netdb.h
+ - net/ethernet.h: contrib/libs/musl/include/net/ethernet.h
+ - net/if_arp.h: contrib/libs/musl/include/net/if_arp.h
+ - net/if.h: contrib/libs/musl/include/net/if.h
+ - netinet/ether.h: contrib/libs/musl/include/netinet/ether.h
+ - netinet/icmp6.h: contrib/libs/musl/include/netinet/icmp6.h
+ - netinet/if_ether.h: contrib/libs/musl/include/netinet/if_ether.h
+ - netinet/igmp.h: contrib/libs/musl/include/netinet/igmp.h
+ - netinet/in.h: contrib/libs/musl/include/netinet/in.h
+ - netinet/in_systm.h: contrib/libs/musl/include/netinet/in_systm.h
+ - netinet/ip6.h: contrib/libs/musl/include/netinet/ip6.h
+ - netinet/ip.h: contrib/libs/musl/include/netinet/ip.h
+ - netinet/ip_icmp.h: contrib/libs/musl/include/netinet/ip_icmp.h
+ - netinet/tcp.h: contrib/libs/musl/include/netinet/tcp.h
+ - netinet/udp.h: contrib/libs/musl/include/netinet/udp.h
+ - netpacket/packet.h: contrib/libs/musl/include/netpacket/packet.h
+ - net/route.h: contrib/libs/musl/include/net/route.h
+ - nl_types.h: contrib/libs/musl/include/nl_types.h
+ - paths.h: contrib/libs/musl/include/paths.h
+ - poll.h: contrib/libs/musl/include/poll.h
+ - pthread.h: contrib/libs/musl/include/pthread.h
+ - pty.h: contrib/libs/musl/include/pty.h
+ - pwd.h: contrib/libs/musl/include/pwd.h
+ - regex.h: contrib/libs/musl/include/regex.h
+ - resolv.h: contrib/libs/musl/include/resolv.h
+ - sched.h: contrib/libs/musl/include/sched.h
+ - scsi/scsi.h: contrib/libs/musl/include/scsi/scsi.h
+ - search.h: contrib/libs/musl/include/search.h
+ - semaphore.h: contrib/libs/musl/include/semaphore.h
+ - shadow.h: contrib/libs/musl/include/shadow.h
+ - signal.h: contrib/libs/musl/include/signal.h
+ - spawn.h: contrib/libs/musl/include/spawn.h
+ - stdalign.h: contrib/libs/musl/include/stdalign.h
+ - stdarg.h: contrib/libs/musl/include/stdarg.h
+ - stdio_ext.h: contrib/libs/musl/include/stdio_ext.h
+ - stdnoreturn.h: contrib/libs/musl/include/stdnoreturn.h
+ - strings.h: contrib/libs/musl/include/strings.h
+ - stropts.h: contrib/libs/musl/include/stropts.h
+ - sys/acct.h: contrib/libs/musl/include/sys/acct.h
+ - sys/auxv.h: contrib/libs/musl/include/sys/auxv.h
+ - sys/cachectl.h: contrib/libs/musl/include/sys/cachectl.h
+ - syscall.h: contrib/libs/musl/include/syscall.h
+ - sys/dir.h: contrib/libs/musl/include/sys/dir.h
+ - sys/epoll.h: contrib/libs/musl/include/sys/epoll.h
+ - sys/errno.h: contrib/libs/musl/include/sys/errno.h
+ - sys/eventfd.h: contrib/libs/musl/include/sys/eventfd.h
+ - sysexits.h: contrib/libs/musl/include/sysexits.h
+ - sys/fcntl.h: contrib/libs/musl/include/sys/fcntl.h
+ - sys/file.h: contrib/libs/musl/include/sys/file.h
+ - sys/fsuid.h: contrib/libs/musl/include/sys/fsuid.h
+ - sys/inotify.h: contrib/libs/musl/include/sys/inotify.h
+ - sys/ioctl.h: contrib/libs/musl/include/sys/ioctl.h
+ - sys/io.h: contrib/libs/musl/include/sys/io.h
+ - sys/ipc.h: contrib/libs/musl/include/sys/ipc.h
+ - sys/kd.h: contrib/libs/musl/include/sys/kd.h
+ - syslog.h: contrib/libs/musl/include/syslog.h
+ - sys/mman.h: contrib/libs/musl/include/sys/mman.h
+ - sys/mount.h: contrib/libs/musl/include/sys/mount.h
+ - sys/msg.h: contrib/libs/musl/include/sys/msg.h
+ - sys/mtio.h: contrib/libs/musl/include/sys/mtio.h
+ - sys/param.h: contrib/libs/musl/include/sys/param.h
+ - sys/personality.h: contrib/libs/musl/include/sys/personality.h
+ - sys/poll.h: contrib/libs/musl/include/sys/poll.h
+ - sys/prctl.h: contrib/libs/musl/include/sys/prctl.h
+ - sys/procfs.h: contrib/libs/musl/include/sys/procfs.h
+ - sys/ptrace.h: contrib/libs/musl/include/sys/ptrace.h
+ - sys/quota.h: contrib/libs/musl/include/sys/quota.h
+ - sys/random.h: contrib/libs/musl/include/sys/random.h
+ - sys/reboot.h: contrib/libs/musl/include/sys/reboot.h
+ - sys/resource.h: contrib/libs/musl/include/sys/resource.h
+ - sys/select.h: contrib/libs/musl/include/sys/select.h
+ - sys/sem.h: contrib/libs/musl/include/sys/sem.h
+ - sys/sendfile.h: contrib/libs/musl/include/sys/sendfile.h
+ - sys/shm.h: contrib/libs/musl/include/sys/shm.h
+ - sys/signalfd.h: contrib/libs/musl/include/sys/signalfd.h
+ - sys/signal.h: contrib/libs/musl/include/sys/signal.h
+ - sys/socket.h: contrib/libs/musl/include/sys/socket.h
+ - sys/soundcard.h: contrib/libs/musl/include/sys/soundcard.h
+ - sys/statfs.h: contrib/libs/musl/include/sys/statfs.h
+ - sys/stat.h: contrib/libs/musl/include/sys/stat.h
+ - sys/statvfs.h: contrib/libs/musl/include/sys/statvfs.h
+ - sys/stropts.h: contrib/libs/musl/include/sys/stropts.h
+ - sys/syscall.h: contrib/libs/musl/include/sys/syscall.h
+ - sys/sysinfo.h: contrib/libs/musl/include/sys/sysinfo.h
+ - sys/syslog.h: contrib/libs/musl/include/sys/syslog.h
+ - sys/sysmacros.h: contrib/libs/musl/include/sys/sysmacros.h
+ - sys/termios.h: contrib/libs/musl/include/sys/termios.h
+ - sys/timeb.h: contrib/libs/musl/include/sys/timeb.h
+ - sys/time.h: contrib/libs/musl/include/sys/time.h
+ - sys/timerfd.h: contrib/libs/musl/include/sys/timerfd.h
+ - sys/times.h: contrib/libs/musl/include/sys/times.h
+ - sys/timex.h: contrib/libs/musl/include/sys/timex.h
+ - sys/ttydefaults.h: contrib/libs/musl/include/sys/ttydefaults.h
+ - sys/types.h: contrib/libs/musl/include/sys/types.h
+ - sys/ucontext.h: contrib/libs/musl/include/sys/ucontext.h
+ - sys/uio.h: contrib/libs/musl/include/sys/uio.h
+ - sys/un.h: contrib/libs/musl/include/sys/un.h
+ - sys/user.h: contrib/libs/musl/include/sys/user.h
+ - sys/utsname.h: contrib/libs/musl/include/sys/utsname.h
+ - sys/vfs.h: contrib/libs/musl/include/sys/vfs.h
+ - sys/vt.h: contrib/libs/musl/include/sys/vt.h
+ - sys/wait.h: contrib/libs/musl/include/sys/wait.h
+ - sys/xattr.h: contrib/libs/musl/include/sys/xattr.h
+ - tar.h: contrib/libs/musl/include/tar.h
+ - termios.h: contrib/libs/musl/include/termios.h
+ - threads.h: contrib/libs/musl/include/threads.h
+ - time.h: contrib/libs/musl/include/time.h
+ - uchar.h: contrib/libs/musl/include/uchar.h
+ - ucontext.h: contrib/libs/musl/include/ucontext.h
+ - ulimit.h: contrib/libs/musl/include/ulimit.h
+ - unistd.h: contrib/libs/musl/include/unistd.h
+ - utime.h: contrib/libs/musl/include/utime.h
+ - utmp.h: contrib/libs/musl/include/utmp.h
+ - utmpx.h: contrib/libs/musl/include/utmpx.h
+ - values.h: contrib/libs/musl/include/values.h
+ - wait.h: contrib/libs/musl/include/wait.h
+ - wordexp.h: contrib/libs/musl/include/wordexp.h
diff --git a/build/sysincl/libc-to-nothing.yml b/build/sysincl/libc-to-nothing.yml
new file mode 100644
index 0000000000..15a413cdbd
--- /dev/null
+++ b/build/sysincl/libc-to-nothing.yml
@@ -0,0 +1,160 @@
+# We want musl to resolve itself without these sysincls, but its test must have them
+- source_filter: "^(?!contrib/libs/musl).*|^contrib/libs/musl/tests"
+ includes:
+ - aio.h
+ - alloca.h
+ - ar.h
+ - arpa/inet.h
+ - arpa/nameser_compat.h
+ - arpa/nameser.h
+ - arpa/telnet.h
+ - arpa/tftp.h
+ - assert.h
+ - byteswap.h
+ - cpio.h
+ - crypt.h
+ - dirent.h
+ - dlfcn.h
+ - elf.h
+ - endian.h
+ - err.h
+ - fcntl.h
+ - features.h
+ - fenv.h
+ - fmtmsg.h
+ - fnmatch.h
+ - ftw.h
+ - getopt.h
+ - glob.h
+ - grp.h
+ - iconv.h
+ - ifaddrs.h
+ - iso646.h
+ - langinfo.h
+ - lastlog.h
+ - libgen.h
+ - libintl.h
+ - link.h
+ - malloc.h
+ - memory.h
+ - mntent.h
+ - monetary.h
+ - mqueue.h
+ - netdb.h
+ - net/ethernet.h
+ - net/if_arp.h
+ - net/if_ppp.h
+ - net/if.h
+ - netinet/ether.h
+ - netinet/icmp6.h
+ - netinet/if_ether.h
+ - netinet/igmp.h
+ - netinet/in.h
+ - netinet/in_systm.h
+ - netinet/ip6.h
+ - netinet/ip.h
+ - netinet/ip_icmp.h
+ - netinet/tcp.h
+ - netinet/udp.h
+ - netpacket/packet.h
+ - netrom/netrom.h
+ - net/route.h
+ - nl_types.h
+ - paths.h
+ - poll.h
+ - pthread.h
+ - pty.h
+ - pwd.h
+ - regex.h
+ - resolv.h
+ - sched.h
+ - scsi/scsi.h
+ - search.h
+ - semaphore.h
+ - shadow.h
+ - signal.h
+ - spawn.h
+ - stdalign.h
+ - stdarg.h
+ - stdio_ext.h
+ - stdnoreturn.h
+ - strings.h
+ - stropts.h
+ - sys/acct.h
+ - sys/auxv.h
+ - sys/cachectl.h
+ - syscall.h
+ - sys/dir.h
+ - sys/epoll.h
+ - sys/errno.h
+ - sys/eventfd.h
+ - sysexits.h
+ - sys/fcntl.h
+ - sys/file.h
+ - sys/fsuid.h
+ - sys/inotify.h
+ - sys/ioctl.h
+ - sys/io.h
+ - sys/ipc.h
+ - sys/kd.h
+ - syslog.h
+ - sys/mman.h
+ - sys/mount.h
+ - sys/msg.h
+ - sys/mtio.h
+ - sys/param.h
+ - sys/personality.h
+ - sys/poll.h
+ - sys/prctl.h
+ - sys/procfs.h
+ - sys/ptrace.h
+ - sys/quota.h
+ - sys/reboot.h
+ - sys/resource.h
+ - sys/select.h
+ - sys/sem.h
+ - sys/sendfile.h
+ - sys/shm.h
+ - sys/signalfd.h
+ - sys/signal.h
+ - sys/socket.h
+ - sys/soundcard.h
+ - sys/statfs.h
+ - sys/stat.h
+ - sys/statvfs.h
+ - sys/stropts.h
+ - sys/syscall.h
+ - sys/sysinfo.h
+ - sys/syslog.h
+ - sys/sysmacros.h
+ - sys/termios.h
+ - sys/timeb.h
+ - sys/time.h
+ - sys/timerfd.h
+ - sys/times.h
+ - sys/timex.h
+ - sys/ttydefaults.h
+ - sys/types.h
+ - sys/ucontext.h
+ - sys/uio.h
+ - sys/un.h
+ - sys/user.h
+ - sys/utsname.h
+ - sys/vfs.h
+ - sys/vt.h
+ - sys/wait.h
+ - sys/xattr.h
+ - tar.h
+ - termios.h
+ - threads.h
+ - time.h
+ - uchar.h
+ - ucontext.h
+ - ulimit.h
+ - unistd.h
+ - utime.h
+ - utmp.h
+ - utmpx.h
+ - values.h
+ - wait.h
+ - wordexp.h
diff --git a/build/sysincl/linux-headers.yml b/build/sysincl/linux-headers.yml
new file mode 100644
index 0000000000..2b1d548175
--- /dev/null
+++ b/build/sysincl/linux-headers.yml
@@ -0,0 +1,1122 @@
+# Generated by devtools/yamaker.
+- includes:
+ - asm-generic/auxvec.h
+ - asm-generic/bitsperlong.h
+ - asm-generic/bpf_perf_event.h
+ - asm-generic/errno-base.h
+ - asm-generic/errno.h
+ - asm-generic/fcntl.h
+ - asm-generic/hugetlb_encode.h
+ - asm-generic/int-l64.h
+ - asm-generic/int-ll64.h
+ - asm-generic/ioctl.h
+ - asm-generic/ioctls.h
+ - asm-generic/ipcbuf.h
+ - asm-generic/kvm_para.h
+ - asm-generic/mman-common.h
+ - asm-generic/mman.h
+ - asm-generic/msgbuf.h
+ - asm-generic/param.h
+ - asm-generic/poll.h
+ - asm-generic/posix_types.h
+ - asm-generic/resource.h
+ - asm-generic/sembuf.h
+ - asm-generic/setup.h
+ - asm-generic/shmbuf.h
+ - asm-generic/siginfo.h
+ - asm-generic/signal-defs.h
+ - asm-generic/signal.h
+ - asm-generic/socket.h
+ - asm-generic/sockios.h
+ - asm-generic/stat.h
+ - asm-generic/statfs.h
+ - asm-generic/swab.h
+ - asm-generic/termbits.h
+ - asm-generic/termios.h
+ - asm-generic/types.h
+ - asm-generic/ucontext.h
+ - asm-generic/unistd.h
+ - asm/a.out.h
+ - asm/a.out_x86.h
+ - asm/auxvec.h
+ - asm/auxvec_arm.h
+ - asm/auxvec_arm64.h
+ - asm/auxvec_powerpc.h
+ - asm/auxvec_x86.h
+ - asm/bitsperlong.h
+ - asm/bitsperlong_arm.h
+ - asm/bitsperlong_arm64.h
+ - asm/bitsperlong_powerpc.h
+ - asm/bitsperlong_x86.h
+ - asm/boot.h
+ - asm/boot_x86.h
+ - asm/bootparam.h
+ - asm/bootparam_x86.h
+ - asm/bootx.h
+ - asm/bootx_powerpc.h
+ - asm/bpf_perf_event.h
+ - asm/bpf_perf_event_arm.h
+ - asm/bpf_perf_event_arm64.h
+ - asm/bpf_perf_event_powerpc.h
+ - asm/bpf_perf_event_x86.h
+ - asm/byteorder.h
+ - asm/byteorder_arm.h
+ - asm/byteorder_arm64.h
+ - asm/byteorder_powerpc.h
+ - asm/byteorder_x86.h
+ - asm/cputable.h
+ - asm/cputable_powerpc.h
+ - asm/debugreg.h
+ - asm/debugreg_x86.h
+ - asm/e820.h
+ - asm/e820_x86.h
+ - asm/eeh.h
+ - asm/eeh_powerpc.h
+ - asm/elf.h
+ - asm/elf_powerpc.h
+ - asm/epapr_hcalls.h
+ - asm/epapr_hcalls_powerpc.h
+ - asm/errno.h
+ - asm/errno_arm.h
+ - asm/errno_arm64.h
+ - asm/errno_powerpc.h
+ - asm/errno_x86.h
+ - asm/fcntl.h
+ - asm/fcntl_arm.h
+ - asm/fcntl_arm64.h
+ - asm/fcntl_powerpc.h
+ - asm/fcntl_x86.h
+ - asm/hw_breakpoint.h
+ - asm/hw_breakpoint_x86.h
+ - asm/hwcap.h
+ - asm/hwcap2.h
+ - asm/hwcap2_x86.h
+ - asm/hwcap_arm.h
+ - asm/hwcap_arm64.h
+ - asm/ioctl.h
+ - asm/ioctl_arm.h
+ - asm/ioctl_arm64.h
+ - asm/ioctl_powerpc.h
+ - asm/ioctl_x86.h
+ - asm/ioctls.h
+ - asm/ioctls_arm.h
+ - asm/ioctls_arm64.h
+ - asm/ioctls_powerpc.h
+ - asm/ioctls_x86.h
+ - asm/ipcbuf.h
+ - asm/ipcbuf_arm.h
+ - asm/ipcbuf_arm64.h
+ - asm/ipcbuf_powerpc.h
+ - asm/ipcbuf_x86.h
+ - asm/ist.h
+ - asm/ist_x86.h
+ - asm/kvm.h
+ - asm/kvm_arm64.h
+ - asm/kvm_para.h
+ - asm/kvm_para_arm.h
+ - asm/kvm_para_arm64.h
+ - asm/kvm_para_powerpc.h
+ - asm/kvm_para_x86.h
+ - asm/kvm_perf.h
+ - asm/kvm_perf_x86.h
+ - asm/kvm_powerpc.h
+ - asm/kvm_x86.h
+ - asm/ldt.h
+ - asm/ldt_x86.h
+ - asm/mce.h
+ - asm/mce_x86.h
+ - asm/mman.h
+ - asm/mman_arm.h
+ - asm/mman_arm64.h
+ - asm/mman_powerpc.h
+ - asm/mman_x86.h
+ - asm/msgbuf.h
+ - asm/msgbuf_arm.h
+ - asm/msgbuf_arm64.h
+ - asm/msgbuf_powerpc.h
+ - asm/msgbuf_x86.h
+ - asm/msr.h
+ - asm/msr_x86.h
+ - asm/mtrr.h
+ - asm/mtrr_x86.h
+ - asm/nvram.h
+ - asm/nvram_powerpc.h
+ - asm/opal-prd.h
+ - asm/opal-prd_powerpc.h
+ - asm/param.h
+ - asm/param_arm.h
+ - asm/param_arm64.h
+ - asm/param_powerpc.h
+ - asm/param_x86.h
+ - asm/perf_event.h
+ - asm/perf_event_powerpc.h
+ - asm/perf_regs.h
+ - asm/perf_regs_arm.h
+ - asm/perf_regs_arm64.h
+ - asm/perf_regs_powerpc.h
+ - asm/perf_regs_x86.h
+ - asm/poll.h
+ - asm/posix_types.h
+ - asm/posix_types_32.h
+ - asm/posix_types_32_x86.h
+ - asm/posix_types_64.h
+ - asm/posix_types_64_x86.h
+ - asm/posix_types_arm.h
+ - asm/posix_types_arm64.h
+ - asm/posix_types_powerpc.h
+ - asm/posix_types_x32.h
+ - asm/posix_types_x32_x86.h
+ - asm/posix_types_x86.h
+ - asm/prctl.h
+ - asm/prctl_x86.h
+ - asm/processor-flags.h
+ - asm/processor-flags_x86.h
+ - asm/ps3fb.h
+ - asm/ps3fb_powerpc.h
+ - asm/ptrace-abi.h
+ - asm/ptrace-abi_x86.h
+ - asm/ptrace.h
+ - asm/ptrace_arm.h
+ - asm/ptrace_arm64.h
+ - asm/ptrace_powerpc.h
+ - asm/ptrace_x86.h
+ - asm/resource.h
+ - asm/sembuf.h
+ - asm/sembuf_arm.h
+ - asm/sembuf_arm64.h
+ - asm/sembuf_powerpc.h
+ - asm/sembuf_x86.h
+ - asm/setup.h
+ - asm/setup_arm.h
+ - asm/setup_arm64.h
+ - asm/setup_powerpc.h
+ - asm/setup_x86.h
+ - asm/shmbuf.h
+ - asm/shmbuf_arm.h
+ - asm/shmbuf_arm64.h
+ - asm/shmbuf_powerpc.h
+ - asm/shmbuf_x86.h
+ - asm/sigcontext.h
+ - asm/sigcontext32.h
+ - asm/sigcontext32_x86.h
+ - asm/sigcontext_arm.h
+ - asm/sigcontext_arm64.h
+ - asm/sigcontext_powerpc.h
+ - asm/sigcontext_x86.h
+ - asm/siginfo.h
+ - asm/siginfo_arm.h
+ - asm/siginfo_arm64.h
+ - asm/siginfo_powerpc.h
+ - asm/siginfo_x86.h
+ - asm/signal.h
+ - asm/signal_arm.h
+ - asm/signal_arm64.h
+ - asm/signal_powerpc.h
+ - asm/signal_x86.h
+ - asm/socket.h
+ - asm/socket_arm.h
+ - asm/socket_arm64.h
+ - asm/socket_powerpc.h
+ - asm/socket_x86.h
+ - asm/sockios.h
+ - asm/spu_info.h
+ - asm/spu_info_powerpc.h
+ - asm/stat.h
+ - asm/stat_arm.h
+ - asm/stat_arm64.h
+ - asm/stat_powerpc.h
+ - asm/stat_x86.h
+ - asm/statfs.h
+ - asm/statfs_arm.h
+ - asm/statfs_arm64.h
+ - asm/statfs_powerpc.h
+ - asm/statfs_x86.h
+ - asm/sve_context.h
+ - asm/sve_context_arm64.h
+ - asm/svm.h
+ - asm/svm_x86.h
+ - asm/swab.h
+ - asm/swab_arm.h
+ - asm/swab_arm64.h
+ - asm/swab_powerpc.h
+ - asm/swab_x86.h
+ - asm/termbits.h
+ - asm/termbits_arm.h
+ - asm/termbits_arm64.h
+ - asm/termbits_powerpc.h
+ - asm/termbits_x86.h
+ - asm/termios.h
+ - asm/termios_arm.h
+ - asm/termios_arm64.h
+ - asm/termios_powerpc.h
+ - asm/termios_x86.h
+ - asm/tm.h
+ - asm/tm_powerpc.h
+ - asm/types.h
+ - asm/types_arm.h
+ - asm/types_arm64.h
+ - asm/types_powerpc.h
+ - asm/types_x86.h
+ - asm/ucontext.h
+ - asm/ucontext_arm64.h
+ - asm/ucontext_powerpc.h
+ - asm/ucontext_x86.h
+ - asm/unistd-common.h
+ - asm/unistd-common_arm.h
+ - asm/unistd-eabi.h
+ - asm/unistd-eabi_arm.h
+ - asm/unistd-oabi.h
+ - asm/unistd-oabi_arm.h
+ - asm/unistd.h
+ - asm/unistd_32.h
+ - asm/unistd_32_powerpc.h
+ - asm/unistd_32_x86.h
+ - asm/unistd_64.h
+ - asm/unistd_64_powerpc.h
+ - asm/unistd_64_x86.h
+ - asm/unistd_arm.h
+ - asm/unistd_arm64.h
+ - asm/unistd_powerpc.h
+ - asm/unistd_x32.h
+ - asm/unistd_x32_x86.h
+ - asm/unistd_x86.h
+ - asm/vm86.h
+ - asm/vm86_x86.h
+ - asm/vmx.h
+ - asm/vmx_x86.h
+ - asm/vsyscall.h
+ - asm/vsyscall_x86.h
+ - drm/amdgpu_drm.h
+ - drm/armada_drm.h
+ - drm/drm.h
+ - drm/drm_fourcc.h
+ - drm/drm_mode.h
+ - drm/drm_sarea.h
+ - drm/etnaviv_drm.h
+ - drm/exynos_drm.h
+ - drm/i810_drm.h
+ - drm/i915_drm.h
+ - drm/lima_drm.h
+ - drm/mga_drm.h
+ - drm/msm_drm.h
+ - drm/nouveau_drm.h
+ - drm/omap_drm.h
+ - drm/panfrost_drm.h
+ - drm/qxl_drm.h
+ - drm/r128_drm.h
+ - drm/radeon_drm.h
+ - drm/savage_drm.h
+ - drm/sis_drm.h
+ - drm/tegra_drm.h
+ - drm/v3d_drm.h
+ - drm/vc4_drm.h
+ - drm/vgem_drm.h
+ - drm/via_drm.h
+ - drm/virtgpu_drm.h
+ - drm/vmwgfx_drm.h
+ - linux/a.out.h
+ - linux/a.out_x86.h
+ - linux/acct.h
+ - linux/adb.h
+ - linux/adfs_fs.h
+ - linux/affs_hardblocks.h
+ - linux/agpgart.h
+ - linux/aio_abi.h
+ - linux/am437x-vpfe.h
+ - linux/android/binder.h
+ - linux/android/binderfs.h
+ - linux/apm_bios.h
+ - linux/arcfb.h
+ - linux/arm_sdei.h
+ - linux/aspeed-lpc-ctrl.h
+ - linux/aspeed-p2a-ctrl.h
+ - linux/atalk.h
+ - linux/atm.h
+ - linux/atm_eni.h
+ - linux/atm_he.h
+ - linux/atm_idt77105.h
+ - linux/atm_nicstar.h
+ - linux/atm_tcp.h
+ - linux/atm_zatm.h
+ - linux/atmapi.h
+ - linux/atmarp.h
+ - linux/atmbr2684.h
+ - linux/atmclip.h
+ - linux/atmdev.h
+ - linux/atmioc.h
+ - linux/atmlec.h
+ - linux/atmmpc.h
+ - linux/atmppp.h
+ - linux/atmsap.h
+ - linux/atmsvc.h
+ - linux/audit.h
+ - linux/auto_dev-ioctl.h
+ - linux/auto_fs.h
+ - linux/auto_fs4.h
+ - linux/auxvec.h
+ - linux/ax25.h
+ - linux/batadv_packet.h
+ - linux/batman_adv.h
+ - linux/baycom.h
+ - linux/bcache.h
+ - linux/bcm933xx_hcs.h
+ - linux/bfs_fs.h
+ - linux/binfmts.h
+ - linux/blkpg.h
+ - linux/blktrace_api.h
+ - linux/blkzoned.h
+ - linux/bpf.h
+ - linux/bpf_common.h
+ - linux/bpf_perf_event.h
+ - linux/bpfilter.h
+ - linux/bpqether.h
+ - linux/bsg.h
+ - linux/bt-bmc.h
+ - linux/btf.h
+ - linux/btrfs.h
+ - linux/btrfs_tree.h
+ - linux/byteorder/big_endian.h
+ - linux/byteorder/little_endian.h
+ - linux/caif/caif_socket.h
+ - linux/caif/if_caif.h
+ - linux/can.h
+ - linux/can/bcm.h
+ - linux/can/error.h
+ - linux/can/gw.h
+ - linux/can/j1939.h
+ - linux/can/netlink.h
+ - linux/can/raw.h
+ - linux/can/vxcan.h
+ - linux/capability.h
+ - linux/capi.h
+ - linux/cciss_defs.h
+ - linux/cciss_ioctl.h
+ - linux/cdrom.h
+ - linux/cec-funcs.h
+ - linux/cec.h
+ - linux/cgroupstats.h
+ - linux/chio.h
+ - linux/cifs/cifs_mount.h
+ - linux/cm4000_cs.h
+ - linux/cn_proc.h
+ - linux/coda.h
+ - linux/coff.h
+ - linux/connector.h
+ - linux/const.h
+ - linux/coresight-stm.h
+ - linux/cramfs_fs.h
+ - linux/cryptouser.h
+ - linux/cuda.h
+ - linux/cyclades.h
+ - linux/cycx_cfm.h
+ - linux/dcbnl.h
+ - linux/dccp.h
+ - linux/devlink.h
+ - linux/dlm.h
+ - linux/dlm_device.h
+ - linux/dlm_netlink.h
+ - linux/dlm_plock.h
+ - linux/dlmconstants.h
+ - linux/dm-ioctl.h
+ - linux/dm-log-userspace.h
+ - linux/dma-buf.h
+ - linux/dma-heap.h
+ - linux/dn.h
+ - linux/dns_resolver.h
+ - linux/dqblk_xfs.h
+ - linux/dvb/audio.h
+ - linux/dvb/ca.h
+ - linux/dvb/dmx.h
+ - linux/dvb/frontend.h
+ - linux/dvb/net.h
+ - linux/dvb/osd.h
+ - linux/dvb/version.h
+ - linux/dvb/video.h
+ - linux/edd.h
+ - linux/efs_fs_sb.h
+ - linux/elf-em.h
+ - linux/elf-fdpic.h
+ - linux/elf.h
+ - linux/elfcore.h
+ - linux/errno.h
+ - linux/errqueue.h
+ - linux/erspan.h
+ - linux/ethtool.h
+ - linux/ethtool_netlink.h
+ - linux/eventpoll.h
+ - linux/fadvise.h
+ - linux/falloc.h
+ - linux/fanotify.h
+ - linux/fb.h
+ - linux/fcntl.h
+ - linux/fd.h
+ - linux/fdreg.h
+ - linux/fib_rules.h
+ - linux/fiemap.h
+ - linux/filter.h
+ - linux/firewire-cdev.h
+ - linux/firewire-constants.h
+ - linux/fou.h
+ - linux/fpga-dfl.h
+ - linux/fs.h
+ - linux/fscrypt.h
+ - linux/fsi.h
+ - linux/fsl_hypervisor.h
+ - linux/fsmap.h
+ - linux/fsverity.h
+ - linux/fuse.h
+ - linux/futex.h
+ - linux/gameport.h
+ - linux/gen_stats.h
+ - linux/genetlink.h
+ - linux/genwqe/genwqe_card.h
+ - linux/gfs2_ondisk.h
+ - linux/gpio.h
+ - linux/gsmmux.h
+ - linux/gtp.h
+ - linux/hash_info.h
+ - linux/hdlc.h
+ - linux/hdlc/ioctl.h
+ - linux/hdlcdrv.h
+ - linux/hdreg.h
+ - linux/hid.h
+ - linux/hiddev.h
+ - linux/hidraw.h
+ - linux/hpet.h
+ - linux/hsi/cs-protocol.h
+ - linux/hsi/hsi_char.h
+ - linux/hsr_netlink.h
+ - linux/hw_breakpoint.h
+ - linux/hyperv.h
+ - linux/i2c-dev.h
+ - linux/i2c.h
+ - linux/i2o-dev.h
+ - linux/i8k.h
+ - linux/icmp.h
+ - linux/icmpv6.h
+ - linux/idxd.h
+ - linux/if.h
+ - linux/if_addr.h
+ - linux/if_addrlabel.h
+ - linux/if_alg.h
+ - linux/if_arcnet.h
+ - linux/if_arp.h
+ - linux/if_bonding.h
+ - linux/if_bridge.h
+ - linux/if_cablemodem.h
+ - linux/if_eql.h
+ - linux/if_ether.h
+ - linux/if_fc.h
+ - linux/if_fddi.h
+ - linux/if_frad.h
+ - linux/if_hippi.h
+ - linux/if_infiniband.h
+ - linux/if_link.h
+ - linux/if_ltalk.h
+ - linux/if_macsec.h
+ - linux/if_packet.h
+ - linux/if_phonet.h
+ - linux/if_plip.h
+ - linux/if_ppp.h
+ - linux/if_pppol2tp.h
+ - linux/if_pppox.h
+ - linux/if_slip.h
+ - linux/if_team.h
+ - linux/if_tun.h
+ - linux/if_tunnel.h
+ - linux/if_vlan.h
+ - linux/if_x25.h
+ - linux/if_xdp.h
+ - linux/ife.h
+ - linux/igmp.h
+ - linux/iio/events.h
+ - linux/iio/types.h
+ - linux/ila.h
+ - linux/in.h
+ - linux/in6.h
+ - linux/in_route.h
+ - linux/inet_diag.h
+ - linux/inotify.h
+ - linux/input-event-codes.h
+ - linux/input.h
+ - linux/io_uring.h
+ - linux/ioctl.h
+ - linux/iommu.h
+ - linux/ip.h
+ - linux/ip6_tunnel.h
+ - linux/ip_vs.h
+ - linux/ipc.h
+ - linux/ipmi.h
+ - linux/ipmi_bmc.h
+ - linux/ipmi_msgdefs.h
+ - linux/ipsec.h
+ - linux/ipv6.h
+ - linux/ipv6_route.h
+ - linux/ipx.h
+ - linux/irqnr.h
+ - linux/isdn/capicmd.h
+ - linux/iso_fs.h
+ - linux/isst_if.h
+ - linux/ivtv.h
+ - linux/ivtvfb.h
+ - linux/jffs2.h
+ - linux/joystick.h
+ - linux/kcm.h
+ - linux/kcmp.h
+ - linux/kcov.h
+ - linux/kd.h
+ - linux/kdev_t.h
+ - linux/kernel-page-flags.h
+ - linux/kernel.h
+ - linux/kernelcapi.h
+ - linux/kexec.h
+ - linux/keyboard.h
+ - linux/keyctl.h
+ - linux/kfd_ioctl.h
+ - linux/kvm.h
+ - linux/kvm_arm64.h
+ - linux/kvm_para.h
+ - linux/kvm_powerpc.h
+ - linux/kvm_x86.h
+ - linux/l2tp.h
+ - linux/libc-compat.h
+ - linux/lightnvm.h
+ - linux/limits.h
+ - linux/lirc.h
+ - linux/llc.h
+ - linux/loop.h
+ - linux/lp.h
+ - linux/lwtunnel.h
+ - linux/magic.h
+ - linux/major.h
+ - linux/map_to_7segment.h
+ - linux/matroxfb.h
+ - linux/max2175.h
+ - linux/mdio.h
+ - linux/media-bus-format.h
+ - linux/media.h
+ - linux/mei.h
+ - linux/membarrier.h
+ - linux/memfd.h
+ - linux/mempolicy.h
+ - linux/meye.h
+ - linux/mic_common.h
+ - linux/mic_ioctl.h
+ - linux/mii.h
+ - linux/minix_fs.h
+ - linux/mman.h
+ - linux/mmc/ioctl.h
+ - linux/mmtimer.h
+ - linux/module.h
+ - linux/mount.h
+ - linux/mpls.h
+ - linux/mpls_iptunnel.h
+ - linux/mptcp.h
+ - linux/mqueue.h
+ - linux/mroute.h
+ - linux/mroute6.h
+ - linux/msdos_fs.h
+ - linux/msg.h
+ - linux/mtio.h
+ - linux/n_r3964.h
+ - linux/nbd-netlink.h
+ - linux/nbd.h
+ - linux/ncsi.h
+ - linux/ndctl.h
+ - linux/neighbour.h
+ - linux/net.h
+ - linux/net_dropmon.h
+ - linux/net_namespace.h
+ - linux/net_tstamp.h
+ - linux/netconf.h
+ - linux/netdevice.h
+ - linux/netfilter.h
+ - linux/netfilter/ipset/ip_set.h
+ - linux/netfilter/ipset/ip_set_bitmap.h
+ - linux/netfilter/ipset/ip_set_hash.h
+ - linux/netfilter/ipset/ip_set_list.h
+ - linux/netfilter/nf_conntrack_common.h
+ - linux/netfilter/nf_conntrack_ftp.h
+ - linux/netfilter/nf_conntrack_sctp.h
+ - linux/netfilter/nf_conntrack_tcp.h
+ - linux/netfilter/nf_conntrack_tuple_common.h
+ - linux/netfilter/nf_log.h
+ - linux/netfilter/nf_nat.h
+ - linux/netfilter/nf_synproxy.h
+ - linux/netfilter/nf_tables.h
+ - linux/netfilter/nf_tables_compat.h
+ - linux/netfilter/nfnetlink.h
+ - linux/netfilter/nfnetlink_acct.h
+ - linux/netfilter/nfnetlink_compat.h
+ - linux/netfilter/nfnetlink_conntrack.h
+ - linux/netfilter/nfnetlink_cthelper.h
+ - linux/netfilter/nfnetlink_cttimeout.h
+ - linux/netfilter/nfnetlink_log.h
+ - linux/netfilter/nfnetlink_osf.h
+ - linux/netfilter/nfnetlink_queue.h
+ - linux/netfilter/x_tables.h
+ - linux/netfilter/xt_AUDIT.h
+ - linux/netfilter/xt_CHECKSUM.h
+ - linux/netfilter/xt_CLASSIFY.h
+ - linux/netfilter/xt_CONNMARK.h
+ - linux/netfilter/xt_CONNSECMARK.h
+ - linux/netfilter/xt_CT.h
+ - linux/netfilter/xt_DSCP.h
+ - linux/netfilter/xt_HMARK.h
+ - linux/netfilter/xt_IDLETIMER.h
+ - linux/netfilter/xt_LED.h
+ - linux/netfilter/xt_LOG.h
+ - linux/netfilter/xt_MARK.h
+ - linux/netfilter/xt_NFLOG.h
+ - linux/netfilter/xt_NFQUEUE.h
+ - linux/netfilter/xt_RATEEST.h
+ - linux/netfilter/xt_SECMARK.h
+ - linux/netfilter/xt_SYNPROXY.h
+ - linux/netfilter/xt_TCPMSS.h
+ - linux/netfilter/xt_TCPOPTSTRIP.h
+ - linux/netfilter/xt_TEE.h
+ - linux/netfilter/xt_TPROXY.h
+ - linux/netfilter/xt_addrtype.h
+ - linux/netfilter/xt_bpf.h
+ - linux/netfilter/xt_cgroup.h
+ - linux/netfilter/xt_cluster.h
+ - linux/netfilter/xt_comment.h
+ - linux/netfilter/xt_connbytes.h
+ - linux/netfilter/xt_connlabel.h
+ - linux/netfilter/xt_connlimit.h
+ - linux/netfilter/xt_connmark.h
+ - linux/netfilter/xt_conntrack.h
+ - linux/netfilter/xt_cpu.h
+ - linux/netfilter/xt_dccp.h
+ - linux/netfilter/xt_devgroup.h
+ - linux/netfilter/xt_dscp.h
+ - linux/netfilter/xt_ecn.h
+ - linux/netfilter/xt_esp.h
+ - linux/netfilter/xt_hashlimit.h
+ - linux/netfilter/xt_helper.h
+ - linux/netfilter/xt_ipcomp.h
+ - linux/netfilter/xt_iprange.h
+ - linux/netfilter/xt_ipvs.h
+ - linux/netfilter/xt_l2tp.h
+ - linux/netfilter/xt_length.h
+ - linux/netfilter/xt_limit.h
+ - linux/netfilter/xt_mac.h
+ - linux/netfilter/xt_mark.h
+ - linux/netfilter/xt_multiport.h
+ - linux/netfilter/xt_nfacct.h
+ - linux/netfilter/xt_osf.h
+ - linux/netfilter/xt_owner.h
+ - linux/netfilter/xt_physdev.h
+ - linux/netfilter/xt_pkttype.h
+ - linux/netfilter/xt_policy.h
+ - linux/netfilter/xt_quota.h
+ - linux/netfilter/xt_rateest.h
+ - linux/netfilter/xt_realm.h
+ - linux/netfilter/xt_recent.h
+ - linux/netfilter/xt_rpfilter.h
+ - linux/netfilter/xt_sctp.h
+ - linux/netfilter/xt_set.h
+ - linux/netfilter/xt_socket.h
+ - linux/netfilter/xt_state.h
+ - linux/netfilter/xt_statistic.h
+ - linux/netfilter/xt_string.h
+ - linux/netfilter/xt_tcpmss.h
+ - linux/netfilter/xt_tcpudp.h
+ - linux/netfilter/xt_time.h
+ - linux/netfilter/xt_u32.h
+ - linux/netfilter_arp.h
+ - linux/netfilter_arp/arp_tables.h
+ - linux/netfilter_arp/arpt_mangle.h
+ - linux/netfilter_bridge.h
+ - linux/netfilter_bridge/ebt_802_3.h
+ - linux/netfilter_bridge/ebt_among.h
+ - linux/netfilter_bridge/ebt_arp.h
+ - linux/netfilter_bridge/ebt_arpreply.h
+ - linux/netfilter_bridge/ebt_ip.h
+ - linux/netfilter_bridge/ebt_ip6.h
+ - linux/netfilter_bridge/ebt_limit.h
+ - linux/netfilter_bridge/ebt_log.h
+ - linux/netfilter_bridge/ebt_mark_m.h
+ - linux/netfilter_bridge/ebt_mark_t.h
+ - linux/netfilter_bridge/ebt_nat.h
+ - linux/netfilter_bridge/ebt_nflog.h
+ - linux/netfilter_bridge/ebt_pkttype.h
+ - linux/netfilter_bridge/ebt_redirect.h
+ - linux/netfilter_bridge/ebt_stp.h
+ - linux/netfilter_bridge/ebt_vlan.h
+ - linux/netfilter_bridge/ebtables.h
+ - linux/netfilter_decnet.h
+ - linux/netfilter_ipv4.h
+ - linux/netfilter_ipv4/ip_tables.h
+ - linux/netfilter_ipv4/ipt_CLUSTERIP.h
+ - linux/netfilter_ipv4/ipt_ECN.h
+ - linux/netfilter_ipv4/ipt_LOG.h
+ - linux/netfilter_ipv4/ipt_REJECT.h
+ - linux/netfilter_ipv4/ipt_TTL.h
+ - linux/netfilter_ipv4/ipt_ah.h
+ - linux/netfilter_ipv4/ipt_ecn.h
+ - linux/netfilter_ipv4/ipt_ttl.h
+ - linux/netfilter_ipv6.h
+ - linux/netfilter_ipv6/ip6_tables.h
+ - linux/netfilter_ipv6/ip6t_HL.h
+ - linux/netfilter_ipv6/ip6t_LOG.h
+ - linux/netfilter_ipv6/ip6t_NPT.h
+ - linux/netfilter_ipv6/ip6t_REJECT.h
+ - linux/netfilter_ipv6/ip6t_ah.h
+ - linux/netfilter_ipv6/ip6t_frag.h
+ - linux/netfilter_ipv6/ip6t_hl.h
+ - linux/netfilter_ipv6/ip6t_ipv6header.h
+ - linux/netfilter_ipv6/ip6t_mh.h
+ - linux/netfilter_ipv6/ip6t_opts.h
+ - linux/netfilter_ipv6/ip6t_rt.h
+ - linux/netfilter_ipv6/ip6t_srh.h
+ - linux/netlink.h
+ - linux/netlink_diag.h
+ - linux/netrom.h
+ - linux/nexthop.h
+ - linux/nfc.h
+ - linux/nfs.h
+ - linux/nfs2.h
+ - linux/nfs3.h
+ - linux/nfs4.h
+ - linux/nfs4_mount.h
+ - linux/nfs_fs.h
+ - linux/nfs_idmap.h
+ - linux/nfs_mount.h
+ - linux/nfsacl.h
+ - linux/nfsd/cld.h
+ - linux/nfsd/debug.h
+ - linux/nfsd/export.h
+ - linux/nfsd/nfsfh.h
+ - linux/nfsd/stats.h
+ - linux/nilfs2_api.h
+ - linux/nilfs2_ondisk.h
+ - linux/nl80211.h
+ - linux/nsfs.h
+ - linux/nubus.h
+ - linux/nvme_ioctl.h
+ - linux/nvram.h
+ - linux/omap3isp.h
+ - linux/omapfb.h
+ - linux/oom.h
+ - linux/openat2.h
+ - linux/openvswitch.h
+ - linux/packet_diag.h
+ - linux/param.h
+ - linux/parport.h
+ - linux/patchkey.h
+ - linux/pci.h
+ - linux/pci_regs.h
+ - linux/pcitest.h
+ - linux/perf_event.h
+ - linux/personality.h
+ - linux/pfkeyv2.h
+ - linux/pg.h
+ - linux/phantom.h
+ - linux/phonet.h
+ - linux/pkt_cls.h
+ - linux/pkt_sched.h
+ - linux/pktcdvd.h
+ - linux/pmu.h
+ - linux/poll.h
+ - linux/posix_acl.h
+ - linux/posix_acl_xattr.h
+ - linux/posix_types.h
+ - linux/ppdev.h
+ - linux/ppp-comp.h
+ - linux/ppp-ioctl.h
+ - linux/ppp_defs.h
+ - linux/pps.h
+ - linux/pr.h
+ - linux/prctl.h
+ - linux/psample.h
+ - linux/psci.h
+ - linux/psp-sev.h
+ - linux/ptp_clock.h
+ - linux/ptrace.h
+ - linux/qemu_fw_cfg.h
+ - linux/qnx4_fs.h
+ - linux/qnxtypes.h
+ - linux/qrtr.h
+ - linux/quota.h
+ - linux/radeonfb.h
+ - linux/raid/md_p.h
+ - linux/raid/md_u.h
+ - linux/random.h
+ - linux/raw.h
+ - linux/rds.h
+ - linux/reboot.h
+ - linux/reiserfs_fs.h
+ - linux/reiserfs_xattr.h
+ - linux/resource.h
+ - linux/rfkill.h
+ - linux/rio_cm_cdev.h
+ - linux/rio_mport_cdev.h
+ - linux/romfs_fs.h
+ - linux/rose.h
+ - linux/route.h
+ - linux/rpl.h
+ - linux/rpl_iptunnel.h
+ - linux/rpmsg.h
+ - linux/rseq.h
+ - linux/rtc.h
+ - linux/rtnetlink.h
+ - linux/rxrpc.h
+ - linux/scc.h
+ - linux/sched.h
+ - linux/sched/types.h
+ - linux/scif_ioctl.h
+ - linux/screen_info.h
+ - linux/sctp.h
+ - linux/sdla.h
+ - linux/seccomp.h
+ - linux/securebits.h
+ - linux/sed-opal.h
+ - linux/seg6.h
+ - linux/seg6_genl.h
+ - linux/seg6_hmac.h
+ - linux/seg6_iptunnel.h
+ - linux/seg6_local.h
+ - linux/selinux_netlink.h
+ - linux/sem.h
+ - linux/serial.h
+ - linux/serial_core.h
+ - linux/serial_reg.h
+ - linux/serio.h
+ - linux/shm.h
+ - linux/signal.h
+ - linux/signalfd.h
+ - linux/smc.h
+ - linux/smc_diag.h
+ - linux/smiapp.h
+ - linux/snmp.h
+ - linux/sock_diag.h
+ - linux/socket.h
+ - linux/sockios.h
+ - linux/sonet.h
+ - linux/sonypi.h
+ - linux/sound.h
+ - linux/soundcard.h
+ - linux/spi/spidev.h
+ - linux/stat.h
+ - linux/stddef.h
+ - linux/stm.h
+ - linux/string.h
+ - linux/sunrpc/debug.h
+ - linux/suspend_ioctls.h
+ - linux/swab.h
+ - linux/switchtec_ioctl.h
+ - linux/sync_file.h
+ - linux/synclink.h
+ - linux/sysctl.h
+ - linux/sysinfo.h
+ - linux/target_core_user.h
+ - linux/taskstats.h
+ - linux/tc_act/tc_bpf.h
+ - linux/tc_act/tc_connmark.h
+ - linux/tc_act/tc_csum.h
+ - linux/tc_act/tc_ct.h
+ - linux/tc_act/tc_ctinfo.h
+ - linux/tc_act/tc_defact.h
+ - linux/tc_act/tc_gact.h
+ - linux/tc_act/tc_ife.h
+ - linux/tc_act/tc_ipt.h
+ - linux/tc_act/tc_mirred.h
+ - linux/tc_act/tc_mpls.h
+ - linux/tc_act/tc_nat.h
+ - linux/tc_act/tc_pedit.h
+ - linux/tc_act/tc_sample.h
+ - linux/tc_act/tc_skbedit.h
+ - linux/tc_act/tc_skbmod.h
+ - linux/tc_act/tc_tunnel_key.h
+ - linux/tc_act/tc_vlan.h
+ - linux/tc_ematch/tc_em_cmp.h
+ - linux/tc_ematch/tc_em_ipt.h
+ - linux/tc_ematch/tc_em_meta.h
+ - linux/tc_ematch/tc_em_nbyte.h
+ - linux/tc_ematch/tc_em_text.h
+ - linux/tcp.h
+ - linux/tcp_metrics.h
+ - linux/tee.h
+ - linux/termios.h
+ - linux/thermal.h
+ - linux/time.h
+ - linux/time_types.h
+ - linux/timerfd.h
+ - linux/times.h
+ - linux/timex.h
+ - linux/tiocl.h
+ - linux/tipc.h
+ - linux/tipc_config.h
+ - linux/tipc_netlink.h
+ - linux/tipc_sockets_diag.h
+ - linux/tls.h
+ - linux/toshiba.h
+ - linux/tty.h
+ - linux/tty_flags.h
+ - linux/types.h
+ - linux/udf_fs_i.h
+ - linux/udmabuf.h
+ - linux/udp.h
+ - linux/uhid.h
+ - linux/uinput.h
+ - linux/uio.h
+ - linux/uleds.h
+ - linux/ultrasound.h
+ - linux/um_timetravel.h
+ - linux/un.h
+ - linux/unistd.h
+ - linux/unix_diag.h
+ - linux/usb/audio.h
+ - linux/usb/cdc-wdm.h
+ - linux/usb/cdc.h
+ - linux/usb/ch11.h
+ - linux/usb/ch9.h
+ - linux/usb/charger.h
+ - linux/usb/functionfs.h
+ - linux/usb/g_printer.h
+ - linux/usb/g_uvc.h
+ - linux/usb/gadgetfs.h
+ - linux/usb/midi.h
+ - linux/usb/raw_gadget.h
+ - linux/usb/tmc.h
+ - linux/usb/video.h
+ - linux/usbdevice_fs.h
+ - linux/usbip.h
+ - linux/userfaultfd.h
+ - linux/userio.h
+ - linux/utime.h
+ - linux/utsname.h
+ - linux/uuid.h
+ - linux/uvcvideo.h
+ - linux/v4l2-common.h
+ - linux/v4l2-controls.h
+ - linux/v4l2-dv-timings.h
+ - linux/v4l2-mediabus.h
+ - linux/v4l2-subdev.h
+ - linux/vbox_err.h
+ - linux/vbox_vmmdev_types.h
+ - linux/vboxguest.h
+ - linux/version.h
+ - linux/veth.h
+ - linux/vfio.h
+ - linux/vfio_ccw.h
+ - linux/vhost.h
+ - linux/vhost_types.h
+ - linux/videodev2.h
+ - linux/virtio_9p.h
+ - linux/virtio_balloon.h
+ - linux/virtio_blk.h
+ - linux/virtio_config.h
+ - linux/virtio_console.h
+ - linux/virtio_crypto.h
+ - linux/virtio_fs.h
+ - linux/virtio_gpu.h
+ - linux/virtio_ids.h
+ - linux/virtio_input.h
+ - linux/virtio_iommu.h
+ - linux/virtio_mmio.h
+ - linux/virtio_net.h
+ - linux/virtio_pci.h
+ - linux/virtio_pmem.h
+ - linux/virtio_ring.h
+ - linux/virtio_rng.h
+ - linux/virtio_scsi.h
+ - linux/virtio_types.h
+ - linux/virtio_vsock.h
+ - linux/vm_sockets.h
+ - linux/vm_sockets_diag.h
+ - linux/vmcore.h
+ - linux/vsockmon.h
+ - linux/vt.h
+ - linux/vtpm_proxy.h
+ - linux/wait.h
+ - linux/watchdog.h
+ - linux/wimax.h
+ - linux/wimax/i2400m.h
+ - linux/wireguard.h
+ - linux/wireless.h
+ - linux/wmi.h
+ - linux/x25.h
+ - linux/xattr.h
+ - linux/xdp_diag.h
+ - linux/xfrm.h
+ - linux/xilinx-v4l2-controls.h
+ - linux/zorro.h
+ - linux/zorro_ids.h
+ - misc/cxl.h
+ - misc/fastrpc.h
+ - misc/habanalabs.h
+ - misc/ocxl.h
+ - misc/pvpanic.h
+ - misc/uacce/hisi_qm.h
+ - misc/uacce/uacce.h
+ - misc/xilinx_sdfec.h
+ - mtd/inftl-user.h
+ - mtd/mtd-abi.h
+ - mtd/mtd-user.h
+ - mtd/nftl-user.h
+ - mtd/ubi-user.h
+ - rdma/bnxt_re-abi.h
+ - rdma/cxgb4-abi.h
+ - rdma/efa-abi.h
+ - rdma/hfi/hfi1_ioctl.h
+ - rdma/hfi/hfi1_user.h
+ - rdma/hns-abi.h
+ - rdma/i40iw-abi.h
+ - rdma/ib_user_ioctl_cmds.h
+ - rdma/ib_user_ioctl_verbs.h
+ - rdma/ib_user_mad.h
+ - rdma/ib_user_sa.h
+ - rdma/ib_user_verbs.h
+ - rdma/mlx4-abi.h
+ - rdma/mlx5-abi.h
+ - rdma/mlx5_user_ioctl_cmds.h
+ - rdma/mlx5_user_ioctl_verbs.h
+ - rdma/mthca-abi.h
+ - rdma/ocrdma-abi.h
+ - rdma/qedr-abi.h
+ - rdma/rdma_netlink.h
+ - rdma/rdma_user_cm.h
+ - rdma/rdma_user_ioctl.h
+ - rdma/rdma_user_ioctl_cmds.h
+ - rdma/rdma_user_rxe.h
+ - rdma/rvt-abi.h
+ - rdma/siw-abi.h
+ - rdma/vmw_pvrdma-abi.h
+ - scsi/cxlflash_ioctl.h
+ - scsi/fc/fc_els.h
+ - scsi/fc/fc_fs.h
+ - scsi/fc/fc_gs.h
+ - scsi/fc/fc_ns.h
+ - scsi/scsi_bsg_fc.h
+ - scsi/scsi_bsg_ufs.h
+ - scsi/scsi_netlink.h
+ - scsi/scsi_netlink_fc.h
+ - sound/asequencer.h
+ - sound/asoc.h
+ - sound/asound.h
+ - sound/asound_fm.h
+ - sound/compress_offload.h
+ - sound/compress_params.h
+ - sound/emu10k1.h
+ - sound/firewire.h
+ - sound/hdsp.h
+ - sound/hdspm.h
+ - sound/sb16_csp.h
+ - sound/sfnt_info.h
+ - sound/skl-tplg-interface.h
+ - sound/snd_sst_tokens.h
+ - sound/sof/abi.h
+ - sound/sof/fw.h
+ - sound/sof/header.h
+ - sound/sof/tokens.h
+ - sound/tlv.h
+ - sound/usb_stream.h
+ - video/edid.h
+ - video/sisfb.h
+ - video/uvesafb.h
+ - xen/evtchn.h
+ - xen/gntalloc.h
+ - xen/gntdev.h
+ - xen/privcmd.h
diff --git a/build/sysincl/linux-musl.yml b/build/sysincl/linux-musl.yml
new file mode 100644
index 0000000000..2c7a11bf06
--- /dev/null
+++ b/build/sysincl/linux-musl.yml
@@ -0,0 +1,18 @@
+- includes:
+ - bits/alltypes.h: contrib/libs/musl/arch/x86_64/bits/alltypes.h
+ - bits/errno.h: contrib/libs/musl/arch/generic/bits/errno.h
+ - bits/fenv.h: contrib/libs/musl/arch/x86_64/bits/fenv.h
+ - bits/limits.h:
+ - contrib/libs/musl/arch/generic/bits/limits.h
+ - contrib/libs/musl/arch/x86_64/bits/limits.h
+ - bits/posix.h: contrib/libs/musl/arch/x86_64/bits/posix.h
+ - bits/reg.h: contrib/libs/musl/arch/x86_64/bits/reg.h
+ - bits/stat.h: contrib/libs/musl/arch/x86_64/bits/stat.h
+ - bits/stdint.h: contrib/libs/musl/arch/x86_64/bits/stdint.h
+ - sys/cdefs.h: contrib/libs/musl/extra/sys/cdefs.h
+ - sys/sysctl.h: contrib/libs/musl/extra/sys/sysctl.h
+ - xlocale.h: contrib/libs/musl/extra/xlocale.h
+
+- source_filter: "^contrib/restricted/boost"
+ includes:
+ - ../include/fenv.h: contrib/libs/musl/include/fenv.h
diff --git a/build/sysincl/linux-ubuntu-12.yml b/build/sysincl/linux-ubuntu-12.yml
new file mode 100644
index 0000000000..b310250e6b
--- /dev/null
+++ b/build/sysincl/linux-ubuntu-12.yml
@@ -0,0 +1,3 @@
+- source_filter: "^contrib/libs/systemd"
+ includes:
+ - uchar.h: contrib/libs/libc_compat/include/uchar/uchar.h
diff --git a/build/sysincl/linux.yml b/build/sysincl/linux.yml
new file mode 100644
index 0000000000..a92a09bb9c
--- /dev/null
+++ b/build/sysincl/linux.yml
@@ -0,0 +1,54 @@
+- includes:
+ - _G_config.h
+ - a.out.h
+ - aliases.h
+ - ansidecl.h
+ - argp.h
+ - argz.h
+ - bfd.h
+ - bits/endian.h
+ - bits/fenv.h
+ - bits/libc-lock.h
+ - bits/reg.h
+ - bits/types.h
+ - bits/wordsize.h
+ - error.h
+ - execinfo.h
+ - fpu_control.h
+ - fstab.h
+ - fts.h
+ - gconv.h
+ - gnu-versions.h
+ - gnu/libc-version.h
+ - gshadow.h
+ - ieee754.h
+ - libio.h
+ - linux/compiler.h
+ - linux/irda.h
+ - linux/smb.h
+ - mcheck.h
+ - netash/ash.h
+ - netatalk/at.h
+ - netax25/ax25.h
+ - neteconet/ec.h
+ - netipx/ipx.h
+ - netrose/rose.h
+ - nss.h
+ - obstack.h
+ - printf.h
+ - regexp.h
+ - rpcsvc/yp_prot.h
+ - rpcsvc/ypclnt.h
+ - sgtty.h
+ - sys/bitypes.h
+ - sys/cdefs.h
+ - sys/memfd.h
+ - sys/queue.h
+ - sys/platform/ppc.h
+ - sys/socketvar.h
+ - sys/sysctl.h
+ - sys/unistd.h
+ - termio.h
+ - ttyent.h
+ - ustat.h
+ - xlocale.h
diff --git a/build/sysincl/misc-win.yml b/build/sysincl/misc-win.yml
new file mode 100644
index 0000000000..e53d4be782
--- /dev/null
+++ b/build/sysincl/misc-win.yml
@@ -0,0 +1,66 @@
+- source_filter: "^(contrib/libs/(ImageMagick|ffmpeg-3|libraw|pthreads_win32|zookeeper))|^contrib/restricted/boost"
+ includes:
+ - pthread.h: contrib/libs/pthreads_win32/include/pthread.h
+ - sched.h: contrib/libs/pthreads_win32/include/sched.h
+
+- source_filter: "^contrib/libs/jemalloc"
+ includes:
+ - strings.h: contrib/libs/jemalloc/include/msvc_compat/strings.h
+
+- source_filter: "^contrib/libs/libgit2"
+ includes:
+ - regex.h: contrib/libs/libgit2/deps/regex/regex.h
+
+- source_filter: "^contrib/libs/libpq/src"
+ includes:
+ - arpa/inet.h: contrib/libs/libpq/src/include/port/win32/arpa/inet.h
+ - sys/file.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h
+ - sys/param.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h
+ - sys/time.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h
+ - unistd.h: contrib/libs/libpq/src/include/port/win32_msvc/unistd.h
+ - netdb.h: contrib/libs/libpq/src/include/port/win32/netdb.h
+ - netinet/in.h: contrib/libs/libpq/src/include/port/win32/netinet/in.h
+ - pwd.h: contrib/libs/libpq/src/include/port/win32/pwd.h
+ - sys/socket.h: contrib/libs/libpq/src/include/port/win32/sys/socket.h
+
+- source_filter: "^contrib/libs/libx264"
+ includes:
+ - inttypes.h: contrib/libs/libx264/extras/inttypes.h
+ - stdint.h: contrib/libs/libx264/extras/stdint.h
+
+- source_filter: "^contrib/tools/bison"
+ includes:
+ - alloca.h: contrib/tools/bison/gnulib/platform/win64/alloca.h
+ - getopt.h: contrib/tools/bison/gnulib/platform/win64/getopt.h
+ - fcntl.h: contrib/tools/bison/gnulib/platform/win64/fcntl.h
+ - langinfo.h: contrib/tools/bison/gnulib/platform/win64/langinfo.h
+ - locale.h: contrib/tools/bison/gnulib/platform/win64/locale.h
+ - math.h: contrib/tools/bison/gnulib/platform/win64/math.h
+ - sched.h: contrib/tools/bison/gnulib/platform/win64/sched.h
+ - signal.h: contrib/tools/bison/gnulib/platform/win64/signal.h
+ - spawn.h: contrib/tools/bison/gnulib/platform/win64/spawn.h
+ - stdbool.h: contrib/tools/bison/gnulib/platform/win64/stdbool.h
+ - sys/stat.h: contrib/tools/bison/gnulib/platform/win64/sys/stat.h
+ - sys/time.h: contrib/tools/bison/gnulib/platform/win64/sys/time.h
+ - sys/wait.h: contrib/tools/bison/gnulib/platform/win64/sys/wait.h
+ - unistd.h: contrib/tools/bison/gnulib/platform/win64/unistd.h
+
+- source_filter: "^contrib/tools/watchman"
+ includes:
+ - getopt.h: contrib/tools/watchman/winbuild/getopt.h
+ - spawn.h: contrib/tools/watchman/winbuild/spawn.h
+ - sys/time.h: contrib/tools/watchman/winbuild/sys/time.h
+
+- source_filter: "^contrib/libs/libpq"
+ includes:
+ - dirent.h: contrib/libs/libpq/src/include/port/win32_msvc/dirent.h
+ - sys/wait.h: contrib/libs/libpq/src/include/port/win32/sys/wait.h
+ - win32.h: contrib/libs/libpq/src/include/port/win32.h
+
+- source_filter: "^contrib/libs/curl"
+ includes:
+ - nghttp2/nghttp2.h
+
+- includes:
+ - sys/queue.h: contrib/libs/libc_compat/include/windows/sys/queue.h
+ - sys/uio.h: contrib/libs/libc_compat/include/windows/sys/uio.h
diff --git a/build/sysincl/misc.yml b/build/sysincl/misc.yml
new file mode 100644
index 0000000000..e9e6095888
--- /dev/null
+++ b/build/sysincl/misc.yml
@@ -0,0 +1,468 @@
+- includes:
+ # Valgrind PEERDIR and ADDINCL are added only in --valgrind builds,
+ # but we should resolve headers anyway.
+ - valgrind/callgrind.h
+ - valgrind/memcheck.h
+ - valgrind/valgrind.h
+ # DB2_ODBC_CLI
+ - sqlcli1.h
+
+
+- includes:
+ - gelf.h: contrib/restricted/libelf/include/libelf/gelf.h
+ - libelf.h: contrib/restricted/libelf/include/libelf/libelf.h
+ - libelf/libelf.h: contrib/restricted/libelf/include/libelf/libelf.h
+ - libelf/sys_elf.h: contrib/restricted/libelf/include/libelf/sys_elf.h
+
+# We have lots of ADDINCLs to contrib/libs/libiconv all around the repo
+# so we need to add it to sysincl for consistent resolving.
+# We can go the other way here and remove iconv.h from all sysincl configs
+# and try to fix all places where we really need iconv.h from libc
+# Btw: seems that this ADDINCL should be made global and removed from projects
+# that use this header
+- includes:
+ - iconv.h: contrib/libs/libiconv/include/iconv.h
+
+- includes:
+ - cudnn.h: contrib/libs/nvidia/cudnn/cudnn.h
+
+# _cgo_export.h is generated into build dir of go package which uses cgo
+# and we are unable to resolve it correctly to whcih build dir to resolve
+# in the case when tests are also built for this package
+- includes:
+ - _cgo_export.h
+
+# Resolve jni.h from swig/Lib/java/javahead.swg when building non-java .swg
+# since they do not peerdir contrib/libs/jdk.
+# Resolve Python.h from swig/Lib/python/pyruntime.swg when building non-python .swg
+# since they do not peerdir contrib/libs/python.
+- source_filter: "[.]swg([.](h|c(c|pp|xx)?))?$"
+ includes:
+ - jni.h: contrib/libs/jdk/include/jni.h
+ - Python.h: contrib/libs/python/Include/Python.h
+- source_filter: "^contrib/libs/jdk/include/jni[.]h$"
+ includes:
+ - jni_md.h:
+ - contrib/libs/jdk/include/darwin/jni_md.h
+ - contrib/libs/jdk/include/linux/jni_md.h
+ - contrib/libs/jdk/include/win32/jni_md.h
+
+# libunistring has its own libc header wrappers that are added to ADDINCL and
+# need to be added here for consistensy between ADDINCL and sysincl resolving.
+# Btw: we don't parse include_next, so we might lose real dependency to musl,
+# but sysincl resolving will save us here, as it will resolve to both of them.
+- source_filter: "^contrib/libs/libunistring"
+ includes:
+ - alloca.h: contrib/libs/libunistring/alloca.h
+ - langinfo.h: contrib/libs/libunistring/langinfo.h
+ - limits.h: contrib/libs/libunistring/limits.h
+ - math.h: contrib/libs/libunistring/math.h
+ - minmax.h: contrib/libs/libunistring/minmax.h
+ - stdlib.h: contrib/libs/libunistring/stdlib.h
+ - string.h: contrib/libs/libunistring/string.h
+ - sys/types.h: contrib/libs/libunistring/sys/types.h
+ - unistd.h: contrib/libs/libunistring/unistd.h
+ - wchar.h: contrib/libs/libunistring/wchar.h
+ - wctype.h: contrib/libs/libunistring/wctype.h
+
+- source_filter: "^contrib/libs/libidn2/"
+ includes:
+ - error.h: contrib/libs/libidn2/gl/error.h
+ - unistd.h: contrib/libs/libunistring/include/unistd.h
+
+# Same as libunistring - lftp has own libc header wrappers/replacements.
+# However here we have GLOBAL ADDINCL to contrib/libs/lftp{,/trio,/lib}
+# that can poison resolving in PEERDIRing projects.
+# Fortunately lftp is used only in contrib/tools/lftp.
+# Probably we should add PEERDIR restriction rule to it.
+- source_filter: "^contrib/libs/lftp"
+ includes:
+ - alloca.h: contrib/libs/lftp/alloca.h
+ - error.h: contrib/libs/lftp/lib/error.h
+ - fnmatch.h: contrib/libs/lftp/lib/fnmatch.h
+ - regex.h: contrib/libs/lftp/lib/regex.h
+ - sys/socket.h: contrib/libs/lftp/lib/sys/socket.h
+ - sys/stat.h: contrib/libs/lftp/lib/sys/stat.h
+ - sys/time.h: contrib/libs/lftp/lib/sys/time.h
+
+# Another sysincl/addincl clash. Here we also have GLOBAL ADDINCL that will
+# produce sysincl/addincl mismatch configure errors when someone writes
+# #include <math.h> and enables USE_ARCADIA_LIBM. Now we have no instances of this.
+- source_filter: "^contrib/libs/libm/.*\\.c"
+ includes:
+ - complex.h: contrib/libs/libm/include/complex.h
+ - math.h: contrib/libs/libm/include/math.h
+
+# Some more sysincl/addincl clashes.
+- source_filter: "^contrib/tools/bison/(bison|gnulib|m4)/src"
+ includes:
+ - error.h: contrib/tools/bison/gnulib/src/error.h
+ - fcntl.h: contrib/tools/bison/gnulib/platform/posix/fcntl.h
+ - getopt.h: contrib/tools/bison/gnulib/platform/posix/getopt.h
+ - obstack.h: contrib/tools/bison/gnulib/src/obstack.h
+ - regex.h: contrib/tools/bison/gnulib/src/regex.h
+ - system.h
+ - unlocked-io.h: contrib/tools/bison/gnulib/src/unlocked-io.h
+- source_filter: "^contrib/tools/make"
+ includes:
+ - fnmatch.h: contrib/tools/make/glob/fnmatch.h
+ - glob.h: contrib/tools/make/glob/glob.h
+- source_filter: "^contrib/tools/tre"
+ includes:
+ - regex.h: contrib/tools/tre/lib/regex.h
+
+- source_filter: "^contrib/libs/cppkafka"
+ includes:
+ - error.h: contrib/libs/cppkafka/include/cppkafka/error.h
+
+- source_filter: "^contrib/libs/clang11-rt"
+ includes:
+ - xray/xray_interface.h: contrib/libs/clang11-rt/include/xray/xray_interface.h
+
+- source_filter: "^contrib/libs/clang12-rt"
+ includes:
+ - xray/xray_interface.h: contrib/libs/clang12-rt/include/xray/xray_interface.h
+
+- source_filter: "^contrib/libs/llvm"
+ includes:
+ - plugin-api.h # GNU linker plugin API.
+
+- source_filter: "^contrib/libs/musl"
+ includes:
+ - atomic.h: contrib/libs/musl/src/internal/atomic.h
+ - bits/fenv.h: contrib/libs/musl/arch/x86_64/bits/fenv.h
+
+- source_filter: "^contrib/libs/zbar"
+ includes:
+ - error.h: contrib/libs/zbar/zbar/error.h
+
+- source_filter: "^contrib/libs/curl"
+ includes:
+ - http.h: contrib/libs/curl/lib/http.h
+ - inet_ntop.h: contrib/libs/curl/lib/inet_ntop.h
+ - share.h: contrib/libs/curl/lib/share.h
+
+- source_filter: "^contrib/libs/zeromq"
+ includes:
+ - atomic.h: contrib/libs/zeromq/missing_includes/atomic.h
+ - Mstcpip.h: contrib/libs/zeromq/missing_includes/Mstcpip.h
+
+- source_filter: "^contrib/restricted/openal-soft"
+ includes:
+ - atomic.h: contrib/restricted/openal-soft/common/atomic.h
+
+- source_filter: "^contrib/libs/ffmpeg-3"
+ includes:
+ - fontconfig/fontconfig.h
+ - fribidi.h
+ - stdatomic.h: contrib/libs/ffmpeg-3.4.1/compat/atomics/win32/stdatomic.h
+
+- source_filter: "^contrib/libs/glog"
+ includes:
+ - port.h: contrib/libs/glog/missing_includes/port.h
+
+- source_filter: "^contrib/(deprecated/onednn|libs/intel/onednn)"
+ includes:
+ - mkl_cblas.h: contrib/libs/intel/mkl/include/mkl_cblas.h
+ - mkl_version.h: contrib/libs/intel/mkl/include/mkl_version.h
+ - mkl_vml_defines.h: contrib/libs/intel/mkl/include/mkl_vml_defines.h
+ - mkl_vml_functions.h: contrib/libs/intel/mkl/include/mkl_vml_functions.h
+
+- source_filter: "^contrib/libs/nsync"
+ includes:
+ - atomic.h: contrib/libs/nsync/platform/c++11/atomic.h
+
+- source_filter: "^contrib/python/numpy/py3"
+ includes:
+ - numpy/random.pxd
+
+- source_filter: "^contrib/tools/python/src/Objects/exceptions.c"
+ includes:
+ - errmap.h: contrib/tools/python/src/PC/errmap.h
+
+- source_filter: "^contrib/libs/(speex|tf)"
+ includes:
+ - mkl.h: contrib/libs/intel/mkl/include/mkl.h
+
+# deprecated contrib with ADDINCL to libintl
+- source_filter: "^contrib/(deprecated/glib/glib|libs/gdk-pixbuf)"
+ includes:
+ - libintl.h: contrib/deprecated/libintl/libintl.h
+
+- source_filter: "^contrib/libs/poco/Data/ODBC"
+ includes:
+ - sql.h: contrib/libs/unixodbc/include/sql.h
+ - sqlext.h: contrib/libs/unixodbc/include/sqlext.h
+ - sqltypes.h: contrib/libs/unixodbc/include/sqltypes.h
+ - sqlucode.h: contrib/libs/unixodbc/include/sqlucode.h
+
+- source_filter: "^contrib/libs/icu"
+ includes:
+ - util.h: contrib/libs/icu/common/util.h
+
+- source_filter: "^contrib/tools/yasm"
+ includes:
+ - util.h: contrib/tools/yasm/util.h
+
+- source_filter: "^contrib/libs/libgit2"
+ includes:
+ - util.h: contrib/libs/libgit2/src/util.h
+
+- source_filter: "^contrib/libs/nodejs_12"
+ includes:
+ - util.h: contrib/libs/nodejs_12/src/util.h
+
+- source_filter: "^contrib/libs/numa"
+ includes:
+ - util.h: contrib/libs/numa/internal/util.h
+
+- source_filter: "^contrib/libs/systemd"
+ includes:
+ - util.h: contrib/libs/systemd/src/basic/util.h
+
+- source_filter: "^contrib/libs/nvidia/nccl"
+ includes:
+ - socket.h: contrib/libs/nvidia/nccl/src/include/socket.h
+
+- source_filter: "^contrib/libs/tf/tensorflow"
+ includes:
+ - cuda.h: contrib/libs/tf/tensorflow/core/platform/cuda.h
+
+# unused legacy include in boost
+- source_filter: "^contrib/restricted/boost"
+ includes:
+ - atomic.h
+ - fstream.h
+ - ../include/fenv.h
+
+- source_filter: "^contrib/restricted/boost/boost/stacktrace/detail"
+ includes:
+ - backtrace.h: contrib/libs/backtrace/backtrace.h
+
+# windows sdk includes that we do not want to apply for whole arcadia
+- source_filter: "^contrib"
+ includes:
+ - process.h
+- source_filter: "^contrib/tools/tpce-benchmark"
+ includes:
+ - sql.h
+ - sqlext.h
+ - sqltypes.h
+ - sqlucode.h
+
+- source_filter: "^contrib/libs/libmemcached"
+ includes:
+ - sasl/sasl.h
+ - sasl/saslutil.h
+
+- source_filter: "^contrib/libs/apr"
+ includes:
+ - atomic.h
+
+- source_filter: "^contrib/libs/(apr|httpd|llvm)"
+ includes:
+ - uuid.h
+ - uuid/uuid.h
+
+- source_filter: "^contrib/libs/(kenlm|libxml|re2|sqlite3)"
+ includes:
+ - unicode/ucnv.h
+ - unicode/ucol.h
+ - unicode/uniset.h
+ - unicode/unistr.h
+ - unicode/ustring.h
+ - unicode/utf16.h
+ - unicode/utypes.h
+ - unicode/uversion.h
+
+- source_filter: "^contrib/deprecated/glib"
+ includes:
+ - configmake.h
+
+- source_filter: "^contrib/libs/ImageMagick"
+ includes:
+ - ltdl.h
+
+- source_filter: "^contrib/libs/authparser"
+ includes:
+ - settings.h
+
+- source_filter: "^contrib/libs/ceres-solver"
+ includes:
+ - tbb/tbb_stddef.h
+
+- source_filter: "^contrib/libs/deprecated"
+ includes:
+ - hdf5.h
+
+- source_filter: "^contrib/libs/freetype"
+ includes:
+ - hb-ot.h
+ - hb-ft.h
+ - hb.h
+
+- source_filter: "^contrib/libs/httpd"
+ includes:
+ - nginx.h
+ - ngx_config.h
+ - ngx_core.h
+ - ngx_http.h
+ - ngx_log.h
+
+- source_filter: "^contrib/libs/leptonica-1.70"
+ includes:
+ - gif_lib.h
+ - webp/decode.h
+ - webp/encode.h
+
+- source_filter: "^contrib/libs/libpcap"
+ includes:
+ - strerror.h
+
+- source_filter: "^contrib/libs/libxml"
+ includes:
+ - lzma.h
+ - win32config.h
+
+- source_filter: "^contrib/libs/mod_perl2"
+ includes:
+ - config.h
+
+- source_filter: "^contrib/libs/(apr|httpd|openssl)"
+ includes:
+ - netinet/sctp.h
+
+- source_filter: "^contrib/libs/subversion"
+ includes:
+ - magic.h
+ - xmlparse.h
+
+- source_filter: "^contrib/python/scipy"
+ includes:
+ - matrix.h
+
+- source_filter: "^contrib/python/uwsgi"
+ includes:
+ - libxml/parser.h
+ - libxml/tree.h
+ - uuid/uuid.h
+
+- source_filter: "^contrib/tools/python"
+ includes:
+ - ioctl.h
+ - utils.h
+
+- source_filter: "^(contrib/libs/cxxsupp/openmp|catboost/cuda/cuda_lib)"
+ includes:
+ - hwloc.h
+ - hwloc/cudart.h
+
+- source_filter: "^contrib/libs/(deprecated|tf)"
+ includes:
+ - cblas.h
+
+- source_filter: "^contrib/libs/(aws-sdk-cpp|c-ares|proj)"
+ includes:
+ - jni.h
+
+- source_filter: "^contrib/(libs/(ffmpeg-3|kenlm|kyotocabinet)|tools/ag)"
+ includes:
+ - lzma.h
+
+- source_filter: "^contrib/libs/(kyotocabinet|minilzo)"
+ includes:
+ - lzo/lzo1x.h
+
+- source_filter: "^contrib/libs/(gtest|libpng|opencv)"
+ includes:
+ - mem.h
+
+- source_filter: "^contrib/libs/(authparser|libcoro-perl|libev-perl|libevent-perl|uatraits)"
+ includes:
+ - patchlevel.h
+
+- source_filter: "^contrib/tools/watchman"
+ includes:
+ - pcre.h
+
+- source_filter: "^contrib/libs/(freetype|leptonica-1.70|libtheora|zbar)"
+ includes:
+ - png.h
+
+- source_filter: "^(contrib/restricted/boost/boost/mpi|catboost/cuda/cuda_lib/mpi)"
+ includes:
+ - mpi.h
+
+- source_filter: "^contrib/libs/libf2c"
+ includes:
+ - local.h
+
+- source_filter: "^contrib/libs/libpq"
+ includes:
+ - local.h
+
+- source_filter: "^contrib/libs/breakpad"
+ includes:
+ - stab.h
+
+- source_filter: "^contrib/tools/fluent-bit"
+ includes:
+ - backtrace.h: contrib/libs/backtrace/backtrace.h
+
+- source_filter: "^contrib/restricted/libelf"
+ includes:
+ - byteswap.h: contrib/restricted/libelf/lib/byteswap.h
+ - gelf.h: contrib/restricted/libelf/lib/gelf.h
+ - libelf.h: contrib/restricted/libelf/lib/libelf.h
+ - nlist.h: contrib/restricted/libelf/lib/nlist.h
+ - sys_elf.h: contrib/restricted/libelf/lib/sys_elf.h
+
+- source_filter: "^contrib/libs/dpdk/"
+ includes:
+ - process.h: contrib/libs/dpdk/drivers/bus/dpaa/include/process.h
+
+- source_filter: "^contrib/libs/dpdk_arm64/"
+ includes:
+ - process.h: contrib/libs/dpdk_arm64/drivers/bus/dpaa/include/process.h
+
+- source_filter: "^contrib/libs/usrsctp/"
+ includes:
+ - netinet/sctp_uio.h: contrib/libs/usrsctp/usrsctplib/netinet/sctp_uio.h
+
+- source_filter: "^contrib/libs/libsrtp/"
+ includes:
+ - alloc.h: contrib/libs/libsrtp/crypto/include/alloc.h
+ - err.h: contrib/libs/libsrtp/crypto/include/err.h
+ - stat.h: contrib/libs/libsrtp/crypto/include/stat.h
+
+- source_filter: "^contrib/restricted/openal-soft"
+ includes:
+ - threads.h: contrib/restricted/openal-soft/common/threads.h
+
+- source_filter: "^contrib/python/pymqi"
+ includes:
+ # IBM MQ
+ - cmqc.h
+ - cmqxc.h
+ - cmqcfc.h
+ - cmqbc.h
+
+- source_filter: "^contrib/libs/h3"
+ includes:
+ - alloc.h: contrib/libs/h3/h3lib/include/alloc.h
+- source_filter: "^cloud/iam/token_agent/daemon"
+ includes:
+ - contrib/libs/grpc/include/grpcpp/impl/codegen/server_context_impl.h
+
+- source_filter: "^contrib/libs/libyang"
+ includes:
+ - in.h: contrib/libs/libyang/libyang/in.h
+
+- source_filter: "^contrib/restricted/noc/frr"
+ includes:
+ - assert.h: contrib/restricted/noc/frr/lib/assert/assert.h
+ - bfd.h: contrib/restricted/noc/frr/lib/bfd.h
+ - getopt.h: contrib/restricted/noc/frr/lib/getopt.h
+ - filter.h: contrib/restricted/noc/frr/lib/filter.h
+ - memory.h: contrib/restricted/noc/frr/lib/memory.h
+ - thread.h: contrib/restricted/noc/frr/lib/thread.h
diff --git a/build/sysincl/nvidia.yml b/build/sysincl/nvidia.yml
new file mode 100644
index 0000000000..3d6fac79b6
--- /dev/null
+++ b/build/sysincl/nvidia.yml
@@ -0,0 +1,48 @@
+# build/platform/cuda (include/ and extras/CUPTI/include/)
+- includes:
+ - cooperative_groups.h
+ - cuComplex.h
+ # Though cub is provided as a part of CUDA HPC SDK,
+ # we would like to be updatable independently.
+ # Hence we are using it directly from Arcadia.
+ # This sysincl enforces such usage.
+ - cub/cub.cuh: contrib/libs/nvidia/cub/cub/cub.cuh
+ - cublas.h
+ - cublasLt.h
+ - cublas_v2.h
+ - cuda.h
+ - cuda_bf16.h
+ - cuda_fp16.h
+ - cuda_gl_interop.h
+ - cuda_runtime.h
+ - cuda_runtime_api.h
+ - cufft.h
+ - cupti.h
+ - curand.h
+ - curand_kernel.h
+ - curand_mtgp32_host.h
+ - curand_mtgp32dc_p_11213.h
+ - cusolverDn.h
+ - cusparse.h
+ - driver_types.h
+ - host_defines.h
+ - library_types.h
+ - math_constants.h
+ - npp.h
+ - nppi.h
+ - nvToolsExt.h
+ # Though thrust is provided as a part of CUDA HPC SDK,
+ # we would like to be updatable independently.
+ # Hence we are using it directly from Arcadia.
+ # This sysincl enforces such usage.
+ - thrust/iterator/iterator_traits.h: contrib/libs/nvidia/thrust/thrust/iterator/iterator_traits.h
+ - thrust/iterator/iterator_facade.h: contrib/libs/nvidia/thrust/thrust/iterator/iterator_facade.h
+ - thrust/system/cuda/detail/core/triple_chevron_launch.h: contrib/libs/nvidia/thrust/thrust/system/cuda/detail/core/triple_chevron_launch.h
+ - thrust/version.h: contrib/libs/nvidia/thrust/thrust/version.h
+ - vector_types.h
+# These headers should be provided by TensorRT.
+# Proper solution must be found in DTCC-171
+- source_filter: "^contrib/libs/tf-2.4/.*"
+ includes:
+ - NvInfer.h
+ - NvInferPlugin.h
diff --git a/build/sysincl/python.yml b/build/sysincl/python.yml
new file mode 100644
index 0000000000..32e8d7ff76
--- /dev/null
+++ b/build/sysincl/python.yml
@@ -0,0 +1,104 @@
+- source_filter: "^(?!(contrib/tools/python|library/python/runtime|library/python/symbols))"
+ includes:
+ - Python-ast.h
+ - Python.h
+ - abstract.h
+ - accu.h
+ - asdl.h
+ - bltinmodule.h
+ - boolobject.h
+ - bufferobject.h
+ - bytearrayobject.h
+ - bytes_methods.h
+ - bytesobject.h
+ - cStringIO.h
+ - cellobject.h
+ - ceval.h
+ - classobject.h
+ - cobject.h
+ - codecs.h
+ - compile.h
+ - complexobject.h
+ - config_platform.h
+ - datetime.h
+ - descrobject.h
+ - dictobject.h
+ - dtoa.h
+ - dynamic_annotations.h
+ - enumobject.h
+ - errcode.h
+ - fileobject.h
+ - floatobject.h
+ - frameobject.h
+ - funcobject.h
+ - genobject.h
+ - graminit.h
+ - grammar.h
+ - import.h
+ - intobject.h
+ - intrcheck.h
+ - iterobject.h
+ - listobject.h
+ - longintrepr.h
+ - longobject.h
+ - marshal.h
+ - memoryobject.h
+ - metagrammar.h
+ - methodobject.h
+ - modsupport.h
+ - moduleobject.h
+ - namespaceobject.h
+ - object.h
+ - objimpl.h
+ - odictobject.h
+ - opcode.h
+ - osdefs.h
+ - osmodule.h
+ - parsetok.h
+ - patchlevel.h
+ - pgen.h
+ - pgenheaders.h
+ - py_curses.h
+ - pyarena.h
+ - pyatomic.h
+ - pycapsule.h
+ - pyconfig.h
+ - pyctype.h
+ - pydebug.h
+ - pydtrace.h
+ - pyerrors.h
+ - pyexpat.h
+ - pyfpe.h
+ - pygetopt.h
+ - pyhash.h
+ - pylifecycle.h
+ - pymacconfig.h
+ - pymacro.h
+ - pymactoolbox.h
+ - pymath.h
+ - pymem.h
+ - pyport.h
+ - pystate.h
+ - pystrcmp.h
+ - pystrhex.h
+ - pystrtod.h
+ - pythonrun.h
+ - pythread.h
+ - pytime.h
+ - rangeobject.h
+ - setobject.h
+ - sliceobject.h
+ - stringobject.h
+ - structmember.h
+ - structseq.h
+ - symtable.h
+ - sysmodule.h
+ - timefuncs.h
+ - token.h
+ - traceback.h
+ - tupleobject.h
+ - typeslots.h
+ - ucnhash.h
+ - unicodeobject.h
+ - warnings.h
+ - weakrefobject.h
diff --git a/build/sysincl/stl-to-libcxx.yml b/build/sysincl/stl-to-libcxx.yml
new file mode 100644
index 0000000000..7d9600f345
--- /dev/null
+++ b/build/sysincl/stl-to-libcxx.yml
@@ -0,0 +1,157 @@
+# libc & stl common headers should be resolved to either
+# * system libc (e.g. nothing in our repo)
+# * system libc++ (e.g. nothing in our repo)
+# * libcxx
+# * musl
+# or some combination of them depending on the build flags.
+
+# We want musl to resolve itself without these sysincls, but its test must have them
+- source_filter: "^(?!(contrib/libs/libunistring|contrib/libs/musl|contrib/tools/yasm)).*|^contrib/libs/musl/tests"
+ includes:
+ - complex.h: contrib/libs/cxxsupp/libcxx/include/complex.h
+ - ctype.h: contrib/libs/cxxsupp/libcxx/include/ctype.h
+ - errno.h: contrib/libs/cxxsupp/libcxx/include/errno.h
+ - float.h: contrib/libs/cxxsupp/libcxx/include/float.h
+ - inttypes.h: contrib/libs/cxxsupp/libcxx/include/inttypes.h
+ - limits.h: contrib/libs/cxxsupp/libcxx/include/limits.h
+ - locale.h: contrib/libs/cxxsupp/libcxx/include/locale.h
+ - math.h: contrib/libs/cxxsupp/libcxx/include/math.h
+ - setjmp.h: contrib/libs/cxxsupp/libcxx/include/setjmp.h
+ - stdbool.h: contrib/libs/cxxsupp/libcxx/include/stdbool.h
+ - stddef.h: contrib/libs/cxxsupp/libcxx/include/stddef.h
+ - stdint.h: contrib/libs/cxxsupp/libcxx/include/stdint.h
+ - stdio.h: contrib/libs/cxxsupp/libcxx/include/stdio.h
+ - stdlib.h: contrib/libs/cxxsupp/libcxx/include/stdlib.h
+ - string.h: contrib/libs/cxxsupp/libcxx/include/string.h
+ - tgmath.h: contrib/libs/cxxsupp/libcxx/include/tgmath.h
+ - wchar.h: contrib/libs/cxxsupp/libcxx/include/wchar.h
+ - wctype.h: contrib/libs/cxxsupp/libcxx/include/wctype.h
+
+- includes:
+ - atomic.h:
+ - contrib/libs/cxxsupp/libcxxrt/atomic.h
+ - cxxabi.h:
+ - contrib/libs/cxxsupp/libcxx/include/cxxabi.h
+ - contrib/libs/cxxsupp/libcxxrt/cxxabi.h
+ - omp.h:
+ - contrib/libs/cxxsupp/openmp/omp.h
+ - unwind.h:
+ - contrib/libs/cxxsupp/libcxx/include/unwind.h
+ - contrib/libs/cxxsupp/libcxxrt/unwind.h
+ - contrib/libs/libunwind/include/unwind.h
+
+- source_filter: "^contrib/libs/cxxsupp/libcxxabi/"
+ includes:
+ - cxxabi.h: contrib/libs/cxxsupp/libcxxabi/include/cxxabi.h
+
+- includes:
+ - __config: contrib/libs/cxxsupp/libcxx/include/__config
+ - __undef_macros: contrib/libs/cxxsupp/libcxx/include/__undef_macros
+ - algorithm: contrib/libs/cxxsupp/libcxx/include/algorithm
+ - any: contrib/libs/cxxsupp/libcxx/include/any
+ - array: contrib/libs/cxxsupp/libcxx/include/array
+ - atomic: contrib/libs/cxxsupp/libcxx/include/atomic
+ - bit: contrib/libs/cxxsupp/libcxx/include/bit
+ - bitset: contrib/libs/cxxsupp/libcxx/include/bitset
+ - cassert: contrib/libs/cxxsupp/libcxx/include/cassert
+ - ccomplex: contrib/libs/cxxsupp/libcxx/include/ccomplex
+ - cctype: contrib/libs/cxxsupp/libcxx/include/cctype
+ - cerrno: contrib/libs/cxxsupp/libcxx/include/cerrno
+ - cfenv: contrib/libs/cxxsupp/libcxx/include/cfenv
+ - cfloat: contrib/libs/cxxsupp/libcxx/include/cfloat
+ - charconv: contrib/libs/cxxsupp/libcxx/include/charconv
+ - chrono: contrib/libs/cxxsupp/libcxx/include/chrono
+ - cinttypes: contrib/libs/cxxsupp/libcxx/include/cinttypes
+ - ciso646: contrib/libs/cxxsupp/libcxx/include/ciso646
+ - climits: contrib/libs/cxxsupp/libcxx/include/climits
+ - clocale: contrib/libs/cxxsupp/libcxx/include/clocale
+ - cmath: contrib/libs/cxxsupp/libcxx/include/cmath
+ - codecvt: contrib/libs/cxxsupp/libcxx/include/codecvt
+ - compare: contrib/libs/cxxsupp/libcxx/include/compare
+ - complex: contrib/libs/cxxsupp/libcxx/include/complex
+ - concepts: contrib/libs/cxxsupp/libcxx/include/concepts
+ - condition_variable: contrib/libs/cxxsupp/libcxx/include/condition_variable
+ - csetjmp: contrib/libs/cxxsupp/libcxx/include/csetjmp
+ - csignal: contrib/libs/cxxsupp/libcxx/include/csignal
+ - cstdarg: contrib/libs/cxxsupp/libcxx/include/cstdarg
+ - cstdbool: contrib/libs/cxxsupp/libcxx/include/cstdbool
+ - cstddef: contrib/libs/cxxsupp/libcxx/include/cstddef
+ - cstdint: contrib/libs/cxxsupp/libcxx/include/cstdint
+ - cstdio: contrib/libs/cxxsupp/libcxx/include/cstdio
+ - cstdlib: contrib/libs/cxxsupp/libcxx/include/cstdlib
+ - cstring: contrib/libs/cxxsupp/libcxx/include/cstring
+ - ctgmath: contrib/libs/cxxsupp/libcxx/include/ctgmath
+ - ctime: contrib/libs/cxxsupp/libcxx/include/ctime
+ - cwchar: contrib/libs/cxxsupp/libcxx/include/cwchar
+ - cwctype: contrib/libs/cxxsupp/libcxx/include/cwctype
+ - deque: contrib/libs/cxxsupp/libcxx/include/deque
+ - exception: contrib/libs/cxxsupp/libcxx/include/exception
+ - filesystem: contrib/libs/cxxsupp/libcxx/include/filesystem
+ - forward_list: contrib/libs/cxxsupp/libcxx/include/forward_list
+ - fstream: contrib/libs/cxxsupp/libcxx/include/fstream
+ - functional: contrib/libs/cxxsupp/libcxx/include/functional
+ - future: contrib/libs/cxxsupp/libcxx/include/future
+ - initializer_list: contrib/libs/cxxsupp/libcxx/include/initializer_list
+ - iomanip: contrib/libs/cxxsupp/libcxx/include/iomanip
+ - ios: contrib/libs/cxxsupp/libcxx/include/ios
+ - iosfwd: contrib/libs/cxxsupp/libcxx/include/iosfwd
+ - iostream: contrib/libs/cxxsupp/libcxx/include/iostream
+ - istream: contrib/libs/cxxsupp/libcxx/include/istream
+ - iterator: contrib/libs/cxxsupp/libcxx/include/iterator
+ - limits: contrib/libs/cxxsupp/libcxx/include/limits
+ - list: contrib/libs/cxxsupp/libcxx/include/list
+ - locale: contrib/libs/cxxsupp/libcxx/include/locale
+ - map: contrib/libs/cxxsupp/libcxx/include/map
+ - memory: contrib/libs/cxxsupp/libcxx/include/memory
+ - mutex: contrib/libs/cxxsupp/libcxx/include/mutex
+ - new: contrib/libs/cxxsupp/libcxx/include/new
+ - numeric: contrib/libs/cxxsupp/libcxx/include/numeric
+ - optional: contrib/libs/cxxsupp/libcxx/include/optional
+ - ostream: contrib/libs/cxxsupp/libcxx/include/ostream
+ - queue: contrib/libs/cxxsupp/libcxx/include/queue
+ - random: contrib/libs/cxxsupp/libcxx/include/random
+ - ratio: contrib/libs/cxxsupp/libcxx/include/ratio
+ - regex: contrib/libs/cxxsupp/libcxx/include/regex
+ - scoped_allocator: contrib/libs/cxxsupp/libcxx/include/scoped_allocator
+ - set: contrib/libs/cxxsupp/libcxx/include/set
+ - shared_mutex: contrib/libs/cxxsupp/libcxx/include/shared_mutex
+ - span: contrib/libs/cxxsupp/libcxx/include/span
+ - sstream: contrib/libs/cxxsupp/libcxx/include/sstream
+ - stack: contrib/libs/cxxsupp/libcxx/include/stack
+ - stdexcept: contrib/libs/cxxsupp/libcxx/include/stdexcept
+ - streambuf: contrib/libs/cxxsupp/libcxx/include/streambuf
+ - string: contrib/libs/cxxsupp/libcxx/include/string
+ - string_view: contrib/libs/cxxsupp/libcxx/include/string_view
+ - strstream: contrib/libs/cxxsupp/libcxx/include/strstream
+ - system_error: contrib/libs/cxxsupp/libcxx/include/system_error
+ - thread: contrib/libs/cxxsupp/libcxx/include/thread
+ - tuple: contrib/libs/cxxsupp/libcxx/include/tuple
+ - typeindex: contrib/libs/cxxsupp/libcxx/include/typeindex
+ - typeinfo: contrib/libs/cxxsupp/libcxx/include/typeinfo
+ - type_traits: contrib/libs/cxxsupp/libcxx/include/type_traits
+ - unordered_map: contrib/libs/cxxsupp/libcxx/include/unordered_map
+ - unordered_set: contrib/libs/cxxsupp/libcxx/include/unordered_set
+ - use_ansi.h: contrib/libs/cxxsupp/libcxx/include/use_ansi.h
+ - utility: contrib/libs/cxxsupp/libcxx/include/utility
+ - valarray: contrib/libs/cxxsupp/libcxx/include/valarray
+ - variant: contrib/libs/cxxsupp/libcxx/include/variant
+ - vector: contrib/libs/cxxsupp/libcxx/include/vector
+
+
+# Though these are headers provided by libcxx, we do not want to allow them to be included.
+# We are using non-existent filename to generate error instead, as there is no specific syntax for this case.
+- includes:
+ - ext/hash_map: DO_NOT_INCLUDE_NON_STANDARD_EXT_HASH_MAP
+ - ext/hash_set: DO_NOT_INCLUDE_NON_STANDARD_EXT_HASH_SET
+ - experimental/any: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_ANY
+ - experimental/chrono: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_CHRONO
+ - experimental/numeric: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_NUMERIC
+ - experimental/optional: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_OPTIONAL
+ - experimental/ratio: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_RATIO
+ - experimental/source_location: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_SOURCE_LOCATION
+ - experimental/string_view: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_STRING_VIEW
+ - experimental/system_error: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_SYSTEM_ERROR
+ - experimental/tuple: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_TUPLE
+
+ # TODO: there is no <corouine> in libc++. Disable this include upon its appearance
+ - experimental/coroutine: contrib/libs/cxxsupp/libcxx/include/experimental/coroutine
diff --git a/build/sysincl/stl-to-nothing.yml b/build/sysincl/stl-to-nothing.yml
new file mode 100644
index 0000000000..c7e27d1411
--- /dev/null
+++ b/build/sysincl/stl-to-nothing.yml
@@ -0,0 +1,143 @@
+# libc & stl common headers should be resolved to either
+# * system libc (e.g. nothing in our repo)
+# * system libc++ (e.g. nothing in our repo)
+# * libcxx
+# * musl
+# or some combination of them depending on the build flags.
+
+# We want musl to resolve itself without these sysincls, but its test must have them
+- source_filter: "^(?!contrib/libs/musl).*|^contrib/libs/musl/tests"
+ includes:
+ - complex.h
+ - ctype.h
+ - errno.h
+ - float.h
+ - inttypes.h
+ - limits.h
+ - locale.h
+ - math.h
+ - setjmp.h
+ - stdbool.h
+ - stddef.h
+ - stdint.h
+ - stdio.h
+ - stdlib.h
+ - string.h
+ - tgmath.h
+ - wchar.h
+ - wctype.h
+
+- includes:
+ - __config
+ - __undef_macros
+ - algorithm
+ - any
+ - array
+ - atomic
+ - bit
+ - bitset
+ - cassert
+ - ccomplex
+ - cctype
+ - cerrno
+ - cfenv
+ - cfloat
+ - charconv
+ - chrono
+ - cinttypes
+ - ciso646
+ - climits
+ - clocale
+ - cmath
+ - codecvt
+ - compare
+ - complex
+ - concepts
+ - condition_variable
+ - csetjmp
+ - csignal
+ - cstdarg
+ - cstdbool
+ - cstddef
+ - cstdint
+ - cstdio
+ - cstdlib
+ - cstring
+ - ctgmath
+ - ctime
+ - cwchar
+ - cwctype
+ - cxxabi.h
+ - deque
+ - exception
+ - filesystem
+ - forward_list
+ - fstream
+ - functional
+ - future
+ - initializer_list
+ - iomanip
+ - ios
+ - iosfwd
+ - iostream
+ - istream
+ - iterator
+ - limits
+ - list
+ - locale
+ - map
+ - memory
+ - mutex
+ - new
+ - numeric
+ - optional
+ - ostream
+ - queue
+ - random
+ - ratio
+ - regex
+ - scoped_allocator
+ - set
+ - shared_mutex
+ - span
+ - sstream
+ - stack
+ - stdexcept
+ - streambuf
+ - string
+ - string_view
+ - strstream
+ - system_error
+ - thread
+ - tuple
+ - typeindex
+ - typeinfo
+ - type_traits
+ - unordered_map
+ - unordered_set
+ - use_ansi.h
+ - utility
+ - valarray
+ - variant
+ - vector
+ - unwind.h:
+ - contrib/libs/libunwind/include/unwind.h
+
+
+# Though these are headers provided by libcxx, we do not want to allow them to be included.
+# We are using non-existent filename to generate error instead, as there is no specific syntax for this case.
+- includes:
+ - ext/hash_map: DO_NOT_INCLUDE_NON_STANDARD_EXT_HASH_MAP
+ - ext/hash_set: DO_NOT_INCLUDE_NON_STANDARD_EXT_HASH_SET
+ - experimental/any: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_ANY
+ - experimental/chrono: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_CHRONO
+ - experimental/numeric: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_NUMERIC
+ - experimental/optional: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_OPTIONAL
+ - experimental/ratio: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_RATIO
+ - experimental/source_location: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_SOURCE_LOCATION
+ - experimental/string_view: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_STRING_VIEW
+ - experimental/system_error: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_SYSTEM_ERROR
+ - experimental/tuple: DO_NOT_INCLUDE_NON_STANDARD_EXPERIMENTAL_TUPLE
+
+ # TODO: there is no <corouine> in system stl. Disable this include upon its appearance
+ - experimental/coroutine
diff --git a/build/sysincl/swig-to-nothing.yml b/build/sysincl/swig-to-nothing.yml
new file mode 100644
index 0000000000..1d3f987371
--- /dev/null
+++ b/build/sysincl/swig-to-nothing.yml
@@ -0,0 +1,235 @@
+- includes:
+# (cd $S/contrib/tools/swig/Lib; find * '(' -not -path '*/*' -or -path 'typemaps/*' ')' -and '(' -name '*.i' -or -name '*.swg' ')' ) | awk '{print " - "$0}'
+ - allkw.swg
+ - attribute.i
+ - carrays.i
+ - cdata.i
+ - cmalloc.i
+ - constraints.i
+ - cpointer.i
+ - cstring.i
+ - cwstring.i
+ - director_common.swg
+ - exception.i
+ - intrusive_ptr.i
+ - inttypes.i
+ - math.i
+ - pointer.i
+ - runtime.swg
+ - shared_ptr.i
+ - std_except.i
+ - stdint.i
+ - stl.i
+ - swigarch.i
+ - swigerrors.swg
+ - swigfragments.swg
+ - swiginit.swg
+ - swiglabels.swg
+ - swigrun.i
+ - swigrun.swg
+ - swig.swg
+ - swigwarnings.swg
+ - swigwarn.swg
+ - typemaps/attribute.swg
+ - typemaps/carrays.swg
+ - typemaps/cdata.swg
+ - typemaps/cmalloc.swg
+ - typemaps/cpointer.swg
+ - typemaps/cstring.swg
+ - typemaps/cstrings.swg
+ - typemaps/cwstring.swg
+ - typemaps/enumint.swg
+ - typemaps/exception.swg
+ - typemaps/factory.swg
+ - typemaps/fragments.swg
+ - typemaps/implicit.swg
+ - typemaps/inoutlist.swg
+ - typemaps/misctypes.swg
+ - typemaps/primtypes.swg
+ - typemaps/ptrtypes.swg
+ - typemaps/std_except.swg
+ - typemaps/std_string.swg
+ - typemaps/std_strings.swg
+ - typemaps/std_wstring.swg
+ - typemaps/string.swg
+ - typemaps/strings.swg
+ - typemaps/swigmacros.swg
+ - typemaps/swigobject.swg
+ - typemaps/swigtype.swg
+ - typemaps/swigtypemaps.swg
+ - typemaps/typemaps.swg
+ - typemaps/valtypes.swg
+ - typemaps/void.swg
+ - typemaps/wstring.swg
+ - wchar.i
+ - windows.i
+# (cd $S/contrib/tools/swig/Lib/python; find * '(' -not -path '*/*' -or -path 'typemaps/*' ')' -and '(' -name '*.i' -or -name '*.swg' ')' ) | awk '{print " - "$0}'
+ - argcargv.i
+ - attribute.i
+ - boost_shared_ptr.i
+ - builtin.swg
+ - carrays.i
+ - ccomplex.i
+ - cdata.i
+ - cmalloc.i
+ - complex.i
+ - cpointer.i
+ - cstring.i
+ - cwstring.i
+ - defarg.swg
+ - director.swg
+ - embed.i
+ - exception.i
+ - factory.i
+ - file.i
+ - implicit.i
+ - pyabc.i
+ - pyapi.swg
+ - pybackward.swg
+ - pybuffer.i
+ - pyclasses.swg
+ - pycomplex.swg
+ - pycontainer.swg
+ - pydocs.swg
+ - pyerrors.swg
+ - pyfragments.swg
+ - pyhead.swg
+ - pyinit.swg
+ - pyiterators.swg
+ - pymacros.swg
+ - pyname_compat.i
+ - pyopers.swg
+ - pyprimtypes.swg
+ - pyrun.swg
+ - pyruntime.swg
+ - pystdcommon.swg
+ - pystrings.swg
+ - pythonkw.swg
+ - python.swg
+ - pythreads.swg
+ - pytuplehlp.swg
+ - pytypemaps.swg
+ - pyuserdir.swg
+ - pywstrings.swg
+ - std_alloc.i
+ - std_array.i
+ - std_auto_ptr.i
+ - std_basic_string.i
+ - std_carray.i
+ - std_char_traits.i
+ - std_common.i
+ - std_complex.i
+ - std_container.i
+ - std_deque.i
+ - std_except.i
+ - std_ios.i
+ - std_iostream.i
+ - std_list.i
+ - std_map.i
+ - std_multimap.i
+ - std_multiset.i
+ - std_pair.i
+ - std_set.i
+ - std_shared_ptr.i
+ - std_sstream.i
+ - std_streambuf.i
+ - std_string.i
+ - std_unordered_map.i
+ - std_unordered_multimap.i
+ - std_unordered_multiset.i
+ - std_unordered_set.i
+ - std_vectora.i
+ - std_vector.i
+ - std_wios.i
+ - std_wiostream.i
+ - std_wsstream.i
+ - std_wstreambuf.i
+ - std_wstring.i
+ - stl.i
+ - typemaps.i
+ - wchar.i
+# (cd $S/contrib/tools/swig/Lib/java; find * '(' -not -path '*/*' -or -path 'typemaps/*' ')' -and '(' -name '*.i' -or -name '*.swg' ')' ) | awk '{print " - "$0}'
+ - arrays_java.i
+ - boost_intrusive_ptr.i
+ - boost_shared_ptr.i
+ - director.swg
+ - enumsimple.swg
+ - enums.swg
+ - enumtypesafe.swg
+ - enumtypeunsafe.swg
+ - javahead.swg
+ - javakw.swg
+ - java.swg
+ - std_array.i
+ - std_auto_ptr.i
+ - std_common.i
+ - std_deque.i
+ - std_except.i
+ - std_list.i
+ - std_map.i
+ - std_pair.i
+ - std_set.i
+ - std_shared_ptr.i
+ - std_string.i
+ - std_unordered_map.i
+ - std_unordered_set.i
+ - std_vector.i
+ - std_wstring.i
+ - stl.i
+ - swiginterface.i
+ - typemaps.i
+ - various.i
+# (cd $S/contrib/tools/swig/Lib/go; find * '(' -not -path '*/*' -or -path 'typemaps/*' ')' -and '(' -name '*.i' -or -name '*.swg' ')' ) | awk '{print " - "$0}'
+ - cdata.i
+ - director.swg
+ - exception.i
+ - gokw.swg
+ - goruntime.swg
+ - gostring.swg
+ - go.swg
+ - std_common.i
+ - std_deque.i
+ - std_except.i
+ - std_list.i
+ - std_map.i
+ - std_pair.i
+ - std_string.i
+ - std_vector.i
+ - stl.i
+ - typemaps.i
+# (cd $S/contrib/tools/swig/Lib/perl5; find * '(' -not -path '*/*' -or -path 'typemaps/*' ')' -and '(' -name '*.i' -or -name '*.swg' ')' ) | awk '{print " - "$0}'
+ - attribute.i
+ - carrays.i
+ - cdata.i
+ - cmalloc.i
+ - cpointer.i
+ - cstring.i
+ - director.swg
+ - exception.i
+ - factory.i
+ - perl5.swg
+ - perlerrors.swg
+ - perlfragments.swg
+ - perlhead.swg
+ - perlinit.swg
+ - perlkw.swg
+ - perlmacros.swg
+ - perlmain.i
+ - perlopers.swg
+ - perlprimtypes.swg
+ - perlrun.swg
+ - perlruntime.swg
+ - perlstrings.swg
+ - perltypemaps.swg
+ - perluserdir.swg
+ - reference.i
+ - std_common.i
+ - std_deque.i
+ - std_except.i
+ - std_list.i
+ - std_map.i
+ - std_pair.i
+ - std_string.i
+ - std_vector.i
+ - stl.i
+ - typemaps.i
diff --git a/build/sysincl/swig.yml b/build/sysincl/swig.yml
new file mode 100644
index 0000000000..9931a15e3c
--- /dev/null
+++ b/build/sysincl/swig.yml
@@ -0,0 +1,292 @@
+# Generated by devtools/yamaker.
+- includes:
+ - argcargv.i:
+ - contrib/tools/swig/Lib/python/argcargv.i
+ - arrays_java.i:
+ - contrib/tools/swig/Lib/java/arrays_java.i
+ - attribute.i:
+ - contrib/tools/swig/Lib/attribute.i
+ - contrib/tools/swig/Lib/perl5/attribute.i
+ - contrib/tools/swig/Lib/python/attribute.i
+ - boost_intrusive_ptr.i:
+ - contrib/tools/swig/Lib/java/boost_intrusive_ptr.i
+ - boost_shared_ptr.i:
+ - contrib/tools/swig/Lib/java/boost_shared_ptr.i
+ - contrib/tools/swig/Lib/python/boost_shared_ptr.i
+ - builtin.swg:
+ - contrib/tools/swig/Lib/python/builtin.swg
+ - carrays.i:
+ - contrib/tools/swig/Lib/carrays.i
+ - contrib/tools/swig/Lib/perl5/carrays.i
+ - contrib/tools/swig/Lib/python/carrays.i
+ - ccomplex.i:
+ - contrib/tools/swig/Lib/python/ccomplex.i
+ - cdata.i:
+ - contrib/tools/swig/Lib/cdata.i
+ - contrib/tools/swig/Lib/go/cdata.i
+ - contrib/tools/swig/Lib/perl5/cdata.i
+ - contrib/tools/swig/Lib/python/cdata.i
+ - cmalloc.i:
+ - contrib/tools/swig/Lib/cmalloc.i
+ - contrib/tools/swig/Lib/perl5/cmalloc.i
+ - contrib/tools/swig/Lib/python/cmalloc.i
+ - complex.i:
+ - contrib/tools/swig/Lib/python/complex.i
+ - cpointer.i:
+ - contrib/tools/swig/Lib/cpointer.i
+ - contrib/tools/swig/Lib/perl5/cpointer.i
+ - contrib/tools/swig/Lib/python/cpointer.i
+ - cstring.i:
+ - contrib/tools/swig/Lib/cstring.i
+ - contrib/tools/swig/Lib/perl5/cstring.i
+ - contrib/tools/swig/Lib/python/cstring.i
+ - cwstring.i:
+ - contrib/tools/swig/Lib/cwstring.i
+ - contrib/tools/swig/Lib/python/cwstring.i
+ - defarg.swg:
+ - contrib/tools/swig/Lib/python/defarg.swg
+ - director.swg:
+ - contrib/tools/swig/Lib/go/director.swg
+ - contrib/tools/swig/Lib/java/director.swg
+ - contrib/tools/swig/Lib/perl5/director.swg
+ - contrib/tools/swig/Lib/python/director.swg
+ - embed.i:
+ - contrib/tools/swig/Lib/python/embed.i
+ - enums.swg:
+ - contrib/tools/swig/Lib/java/enums.swg
+ - enumsimple.swg:
+ - contrib/tools/swig/Lib/java/enumsimple.swg
+ - enumtypesafe.swg:
+ - contrib/tools/swig/Lib/java/enumtypesafe.swg
+ - enumtypeunsafe.swg:
+ - contrib/tools/swig/Lib/java/enumtypeunsafe.swg
+ - exception.i:
+ - contrib/tools/swig/Lib/exception.i
+ - contrib/tools/swig/Lib/go/exception.i
+ - contrib/tools/swig/Lib/perl5/exception.i
+ - contrib/tools/swig/Lib/python/exception.i
+ - factory.i:
+ - contrib/tools/swig/Lib/perl5/factory.i
+ - contrib/tools/swig/Lib/python/factory.i
+ - file.i:
+ - contrib/tools/swig/Lib/python/file.i
+ - go.swg:
+ - contrib/tools/swig/Lib/go/go.swg
+ - gokw.swg:
+ - contrib/tools/swig/Lib/go/gokw.swg
+ - goruntime.swg:
+ - contrib/tools/swig/Lib/go/goruntime.swg
+ - gostring.swg:
+ - contrib/tools/swig/Lib/go/gostring.swg
+ - implicit.i:
+ - contrib/tools/swig/Lib/python/implicit.i
+ - java.swg:
+ - contrib/tools/swig/Lib/java/java.swg
+ - javahead.swg:
+ - contrib/tools/swig/Lib/java/javahead.swg
+ - javakw.swg:
+ - contrib/tools/swig/Lib/java/javakw.swg
+ - perl5.swg:
+ - contrib/tools/swig/Lib/perl5/perl5.swg
+ - perlerrors.swg:
+ - contrib/tools/swig/Lib/perl5/perlerrors.swg
+ - perlfragments.swg:
+ - contrib/tools/swig/Lib/perl5/perlfragments.swg
+ - perlhead.swg:
+ - contrib/tools/swig/Lib/perl5/perlhead.swg
+ - perlinit.swg:
+ - contrib/tools/swig/Lib/perl5/perlinit.swg
+ - perlkw.swg:
+ - contrib/tools/swig/Lib/perl5/perlkw.swg
+ - perlmacros.swg:
+ - contrib/tools/swig/Lib/perl5/perlmacros.swg
+ - perlmain.i:
+ - contrib/tools/swig/Lib/perl5/perlmain.i
+ - perlopers.swg:
+ - contrib/tools/swig/Lib/perl5/perlopers.swg
+ - perlprimtypes.swg:
+ - contrib/tools/swig/Lib/perl5/perlprimtypes.swg
+ - perlrun.swg:
+ - contrib/tools/swig/Lib/perl5/perlrun.swg
+ - perlruntime.swg:
+ - contrib/tools/swig/Lib/perl5/perlruntime.swg
+ - perlstrings.swg:
+ - contrib/tools/swig/Lib/perl5/perlstrings.swg
+ - perltypemaps.swg:
+ - contrib/tools/swig/Lib/perl5/perltypemaps.swg
+ - perluserdir.swg:
+ - contrib/tools/swig/Lib/perl5/perluserdir.swg
+ - pyabc.i:
+ - contrib/tools/swig/Lib/python/pyabc.i
+ - pyapi.swg:
+ - contrib/tools/swig/Lib/python/pyapi.swg
+ - pybackward.swg:
+ - contrib/tools/swig/Lib/python/pybackward.swg
+ - pybuffer.i:
+ - contrib/tools/swig/Lib/python/pybuffer.i
+ - pyclasses.swg:
+ - contrib/tools/swig/Lib/python/pyclasses.swg
+ - pycomplex.swg:
+ - contrib/tools/swig/Lib/python/pycomplex.swg
+ - pycontainer.swg:
+ - contrib/tools/swig/Lib/python/pycontainer.swg
+ - pydocs.swg:
+ - contrib/tools/swig/Lib/python/pydocs.swg
+ - pyerrors.swg:
+ - contrib/tools/swig/Lib/python/pyerrors.swg
+ - pyfragments.swg:
+ - contrib/tools/swig/Lib/python/pyfragments.swg
+ - pyhead.swg:
+ - contrib/tools/swig/Lib/python/pyhead.swg
+ - pyinit.swg:
+ - contrib/tools/swig/Lib/python/pyinit.swg
+ - pyiterators.swg:
+ - contrib/tools/swig/Lib/python/pyiterators.swg
+ - pymacros.swg:
+ - contrib/tools/swig/Lib/python/pymacros.swg
+ - pyname_compat.i:
+ - contrib/tools/swig/Lib/python/pyname_compat.i
+ - pyopers.swg:
+ - contrib/tools/swig/Lib/python/pyopers.swg
+ - pyprimtypes.swg:
+ - contrib/tools/swig/Lib/python/pyprimtypes.swg
+ - pyrun.swg:
+ - contrib/tools/swig/Lib/python/pyrun.swg
+ - pyruntime.swg:
+ - contrib/tools/swig/Lib/python/pyruntime.swg
+ - pystdcommon.swg:
+ - contrib/tools/swig/Lib/python/pystdcommon.swg
+ - pystrings.swg:
+ - contrib/tools/swig/Lib/python/pystrings.swg
+ - python.swg:
+ - contrib/tools/swig/Lib/python/python.swg
+ - pythonkw.swg:
+ - contrib/tools/swig/Lib/python/pythonkw.swg
+ - pythreads.swg:
+ - contrib/tools/swig/Lib/python/pythreads.swg
+ - pytuplehlp.swg:
+ - contrib/tools/swig/Lib/python/pytuplehlp.swg
+ - pytypemaps.swg:
+ - contrib/tools/swig/Lib/python/pytypemaps.swg
+ - pyuserdir.swg:
+ - contrib/tools/swig/Lib/python/pyuserdir.swg
+ - pywstrings.swg:
+ - contrib/tools/swig/Lib/python/pywstrings.swg
+ - reference.i:
+ - contrib/tools/swig/Lib/perl5/reference.i
+ - std_alloc.i:
+ - contrib/tools/swig/Lib/python/std_alloc.i
+ - std_array.i:
+ - contrib/tools/swig/Lib/java/std_array.i
+ - contrib/tools/swig/Lib/python/std_array.i
+ - std_auto_ptr.i:
+ - contrib/tools/swig/Lib/java/std_auto_ptr.i
+ - contrib/tools/swig/Lib/python/std_auto_ptr.i
+ - std_basic_string.i:
+ - contrib/tools/swig/Lib/python/std_basic_string.i
+ - std_carray.i:
+ - contrib/tools/swig/Lib/python/std_carray.i
+ - std_char_traits.i:
+ - contrib/tools/swig/Lib/python/std_char_traits.i
+ - std_common.i:
+ - contrib/tools/swig/Lib/go/std_common.i
+ - contrib/tools/swig/Lib/java/std_common.i
+ - contrib/tools/swig/Lib/perl5/std_common.i
+ - contrib/tools/swig/Lib/python/std_common.i
+ - std_complex.i:
+ - contrib/tools/swig/Lib/python/std_complex.i
+ - std_container.i:
+ - contrib/tools/swig/Lib/python/std_container.i
+ - std_deque.i:
+ - contrib/tools/swig/Lib/go/std_deque.i
+ - contrib/tools/swig/Lib/java/std_deque.i
+ - contrib/tools/swig/Lib/perl5/std_deque.i
+ - contrib/tools/swig/Lib/python/std_deque.i
+ - std_except.i:
+ - contrib/tools/swig/Lib/go/std_except.i
+ - contrib/tools/swig/Lib/java/std_except.i
+ - contrib/tools/swig/Lib/perl5/std_except.i
+ - contrib/tools/swig/Lib/python/std_except.i
+ - std_ios.i:
+ - contrib/tools/swig/Lib/python/std_ios.i
+ - std_iostream.i:
+ - contrib/tools/swig/Lib/python/std_iostream.i
+ - std_list.i:
+ - contrib/tools/swig/Lib/go/std_list.i
+ - contrib/tools/swig/Lib/java/std_list.i
+ - contrib/tools/swig/Lib/perl5/std_list.i
+ - contrib/tools/swig/Lib/python/std_list.i
+ - std_map.i:
+ - contrib/tools/swig/Lib/go/std_map.i
+ - contrib/tools/swig/Lib/java/std_map.i
+ - contrib/tools/swig/Lib/perl5/std_map.i
+ - contrib/tools/swig/Lib/python/std_map.i
+ - std_multimap.i:
+ - contrib/tools/swig/Lib/python/std_multimap.i
+ - std_multiset.i:
+ - contrib/tools/swig/Lib/python/std_multiset.i
+ - std_pair.i:
+ - contrib/tools/swig/Lib/go/std_pair.i
+ - contrib/tools/swig/Lib/java/std_pair.i
+ - contrib/tools/swig/Lib/perl5/std_pair.i
+ - contrib/tools/swig/Lib/python/std_pair.i
+ - std_set.i:
+ - contrib/tools/swig/Lib/java/std_set.i
+ - contrib/tools/swig/Lib/python/std_set.i
+ - std_shared_ptr.i:
+ - contrib/tools/swig/Lib/java/std_shared_ptr.i
+ - contrib/tools/swig/Lib/python/std_shared_ptr.i
+ - std_sstream.i:
+ - contrib/tools/swig/Lib/python/std_sstream.i
+ - std_streambuf.i:
+ - contrib/tools/swig/Lib/python/std_streambuf.i
+ - std_string.i:
+ - contrib/tools/swig/Lib/go/std_string.i
+ - contrib/tools/swig/Lib/java/std_string.i
+ - contrib/tools/swig/Lib/perl5/std_string.i
+ - contrib/tools/swig/Lib/python/std_string.i
+ - std_unordered_map.i:
+ - contrib/tools/swig/Lib/java/std_unordered_map.i
+ - contrib/tools/swig/Lib/python/std_unordered_map.i
+ - std_unordered_multimap.i:
+ - contrib/tools/swig/Lib/python/std_unordered_multimap.i
+ - std_unordered_multiset.i:
+ - contrib/tools/swig/Lib/python/std_unordered_multiset.i
+ - std_unordered_set.i:
+ - contrib/tools/swig/Lib/java/std_unordered_set.i
+ - contrib/tools/swig/Lib/python/std_unordered_set.i
+ - std_vector.i:
+ - contrib/tools/swig/Lib/go/std_vector.i
+ - contrib/tools/swig/Lib/java/std_vector.i
+ - contrib/tools/swig/Lib/perl5/std_vector.i
+ - contrib/tools/swig/Lib/python/std_vector.i
+ - std_vectora.i:
+ - contrib/tools/swig/Lib/python/std_vectora.i
+ - std_wios.i:
+ - contrib/tools/swig/Lib/python/std_wios.i
+ - std_wiostream.i:
+ - contrib/tools/swig/Lib/python/std_wiostream.i
+ - std_wsstream.i:
+ - contrib/tools/swig/Lib/python/std_wsstream.i
+ - std_wstreambuf.i:
+ - contrib/tools/swig/Lib/python/std_wstreambuf.i
+ - std_wstring.i:
+ - contrib/tools/swig/Lib/java/std_wstring.i
+ - contrib/tools/swig/Lib/python/std_wstring.i
+ - stl.i:
+ - contrib/tools/swig/Lib/go/stl.i
+ - contrib/tools/swig/Lib/java/stl.i
+ - contrib/tools/swig/Lib/perl5/stl.i
+ - contrib/tools/swig/Lib/python/stl.i
+ - swiginterface.i:
+ - contrib/tools/swig/Lib/java/swiginterface.i
+ - typemaps.i:
+ - contrib/tools/swig/Lib/go/typemaps.i
+ - contrib/tools/swig/Lib/java/typemaps.i
+ - contrib/tools/swig/Lib/perl5/typemaps.i
+ - contrib/tools/swig/Lib/python/typemaps.i
+ - various.i:
+ - contrib/tools/swig/Lib/java/various.i
+ - wchar.i:
+ - contrib/tools/swig/Lib/python/wchar.i
+ - contrib/tools/swig/Lib/wchar.i
diff --git a/build/sysincl/system-jdk.yml b/build/sysincl/system-jdk.yml
new file mode 100644
index 0000000000..d894941ad4
--- /dev/null
+++ b/build/sysincl/system-jdk.yml
@@ -0,0 +1,2 @@
+- includes:
+ - jni.h \ No newline at end of file
diff --git a/build/sysincl/unsorted.yml b/build/sysincl/unsorted.yml
new file mode 100644
index 0000000000..a889b923a0
--- /dev/null
+++ b/build/sysincl/unsorted.yml
@@ -0,0 +1,986 @@
+- source_filter: "^contrib(?!/restricted/gstreamer/gst/parse)"
+ includes:
+ - port.h
+ - types.h
+ - stat.h
+
+- source_filter: ".*contrib.*"
+ includes:
+ - stat.h
+ - libutf8.h
+ #if defined(_OS_QNX) && CONTRIB
+ - devctl.h
+ #endif
+ - CrashReporterClient.h
+ - Eigen/Array
+ - Errors.h
+ - ICSupport.h
+ - LPdir.h
+ - LzFindMt.h
+ - MD5.h
+ - SIOUX.h
+ - TFileSpec.h
+ - TLS.h
+ - XMP.incl_cpp
+ - XMPSDK.hpp
+ - _mingw.h
+ - abi_mutex.h
+ - afxcmn.h
+ - afxdao.h
+ - afxdb.h
+ - afxdisp.h
+ - afxext.h
+ - afxodlgs.h
+ - afxole.h
+ - afxwin.h
+ - alpha/builtins.h
+ - apr_iconv.h
+ - atheos/atomic.h
+ - atheos/semaphore.h
+ - atheos/threads.h
+ - atomic_ops.h
+ - auth-client-parser/parser.h
+ - bluetooth/bluetooth.h
+ - bluetooth/hci.h
+ - bluetooth/l2cap.h
+ - bluetooth/rfcomm.h
+ - bluetooth/sco.h
+ - bstring.h
+ - builtins.h
+ - c_asm.h
+ - config-mac.h
+ - console.h
+ - could_not_find_Perl_patchlevel.h
+ - cpml.h
+ - crtl.h
+ - cthreads.h
+ - ctime.h
+ - db_provider.h
+ - dbmalloc.h
+ - dir.h
+ - dither.h
+ - dl.h
+ - doc/doc_dynamic.h
+ - doc/doc_nan.h
+ - doc/doc_printf.h
+ - doc/doc_register.h
+ - doc/doc_scanf.h
+ - doc/doc_static.h
+ - dvidef.h
+ - fastmath.h
+ - fcntl--.h
+ - fftw3.h
+ - file.h
+ - flags.h
+ - floatingpoint.h
+ - fp.h
+ - fp_class.h
+ - fsio.h
+ - fwriteerror.h
+ - gdbm.h
+ - ghostscript/iapi.h
+ - ghostscript/ierrors.h
+ - glibtop.h
+ - glibtop/close.h
+ - glibtop/open.h
+ - glibtop/parameter.h
+ - glibtop/sysdeps.h
+ - glibtop/union.h
+ - glibtop/xmalloc.h
+ - gmp.h
+ - gnutls/x509.h
+ - hp-timing.h
+ - httpd_wrap.h
+ - i86.h
+ - ieeedef.h
+ - in.h
+ - inet.h
+ - intl.h
+ - iperlsys.h
+ - ipl.h
+ - ipl/ipl.h
+ - ipp.h
+ - ippcp.h
+ - kfuncs.h
+ - l12_integer_tables.h
+ - l3_integer_tables.h
+ - lcms.h
+ - libavcodec/aacps_tables.h
+ - libavcodec/cbrt_tables.h
+ - libavcodec/dv_tables.h
+ - libavcodec/motionpixels_tables.h
+ - libavcodec/mpegaudio_tables.h
+ - libavcodec/pcm_tables.h
+ - libavcodec/qdm2_tables.h
+ - libavcodec/sinewin_tables.h
+ - libio/iolibio.h
+ - libio/libioP.h
+ - libs/regex/test/config_info/regex_config_info.cpp
+ - locale/coll-lookup.h
+ - locale/elem-hash.h
+ - locale/localeinfo.h
+ - locale/weight.h
+ - locale/weightwc.h
+ - lqr.h
+ - lwp/lwp.h
+ - lwp/stackdep.h
+ - m68881.h
+ - mach/cthreads.h
+ - mathimf.h
+ - matrixos.h
+ - mfx/mfxvideo.h
+ - mingw.h
+ - mips64/sysarch.h
+ - ms/uplink.h
+ - msl_utility
+ - namdef.h
+ - ncurses/curses.h
+ - ncurses/term.h
+ - ndir.h
+ - net/netdb.h
+ - net/socket.h
+ - net/uio.h
+ - nks/dirio.h
+ - nks/plat.h
+ - nks/thread.h
+ - nonblocking.h
+ - note.h
+ - opcdef.h
+ - openssl/applink.c
+ - os2def.h
+ - oslib/osfscontrol.h
+ - paper.h
+ - pcre_printint.src
+ - pire/config.h
+ - pngusr.h
+ - probes_mysql_dtrace.h
+ - pth.h
+ - relocatable.h
+ - rtl.h
+ - semLib.h
+ - shlib-compat.h
+ - sigsegv.h
+ - sockLib.h
+ - socket.h
+ - socketshr.h
+ - socklib.h
+ - socks.h
+ - strdef.h
+ - streams/un.h
+ - stropts
+ - swill.h
+ - sysLib.h
+ - taskLib.h
+ - tcp.h
+ - tdep-ia64/dwarf-config.h
+ - thread.h
+ - thread_plan9.h
+ - tickLib.h
+ - ttdef.h
+ - type_traits.h
+ - udplite.h
+ - ulocks.h
+ - unchecked.h
+ - unixlib.h
+ - unixstuff.h
+ - validator/validator.h
+ - vasnwprintf.h
+ - vld.h
+ - win32lib.h
+ - wincecompat.h
+ - wprintf-parse.h
+ - wsockcompat.h
+ - xdelta3-python.h
+ - xml/xmlparse.h
+ - xmlparse/xmlparse.h
+ - xmltok/xmlparse.h
+ - yca/yca.h
+ - zzip-1.h
+ - zzip-2.h
+ - zzip-3.h
+ - zzip-4.h
+ - zzip-5.h
+ #if CONTRIB && defined(_HAVE_LIBIDSA)
+ - idsa.h
+ #endif
+ - ../lib/memdebug.h
+ - ../../VC/include/math.h
+ - ../../VC/include/cfloat
+ - ../extra/yassl/taocrypt/include/sha.hpp
+ - prof.h
+ - ll_alloc_hook.c
+ - cpptl/config.h
+ - cpptl/conststring.h
+ - cpptl/forwards.h
+ - cpptl/smallmap.h
+ - forwards.h
+ - json_valueiterator.inl
+ - value.h
+ - pthread/mit/sys/timers.h
+ - sljit/sljitLir.c
+ - pcre_printint.c
+ #ifdef defined(emacs) && CONTRIB && TRASH
+ - blockinput.h
+ #endif
+ #if defined(__atmos__) && CONTRIB
+ - kernel.h
+ #endif
+ #if defined(_LIBC) && CONTRIB && TRASH
+ - not-cancel.h
+ - local-setxid.h
+ - vasprintf.h
+ #endif
+
+- case_sensitive: false
+ includes:
+ #if defined(WINDOWS) && CONTRIB && TRASH
+ - ../include/locale.h
+ - ../include/signal.h
+ - ../include/sys/stat.h
+ - ../include/fcntl.h
+ - ../include/math.h
+ - vcruntime_exception.h
+ - vcruntime_new.h
+ - vcruntime_typeinfo.h
+ #endif
+ - PowrProf.h
+ - BaseTsd.h
+ - iphlpapi.h
+
+- source_filter: "^(?!contrib/python/line_profiler/)"
+ includes:
+ - timers.h
+
+- includes:
+ - cpu-features.h
+ - cuda/include/cuComplex.h
+ - cuda/include/cublas_v2.h
+ - cuda/include/cuda.h
+ - cuda/include/cudnn.h
+ - cuda/include/cufft.h
+ - cuda/include/curand.h
+ - cpuid.h
+ - nan.h
+ - omp.h
+ - stdatomic.h
+ - unlocked-io.h
+ - cygwin/version.h
+ - zircon/syscalls.h
+ - zircon/types.h
+ - zircon/process.h
+ - sys/linux-syscalls.h
+ - tr1/memory
+ - android/log.h
+ - ompt.h
+ # vvvvv ____ because in [geobase/perl/dynamic] does not work ignoring via "// Y_IGNORE"
+ - geobase6/service_getter.hpp
+ - geobase6/timezone_getter.hpp
+ # ^^^^^ ----
+ #if defined(__FreeBSD__)
+ - bluetooth.h
+ - bsdxml.h
+ - devstat.h
+ - ieeefp.h
+ - jail.h
+ - kvm.h
+ - libutil.h
+ - machine/atomic.h
+ - machine/cpu.h
+ - machine/fpu.h
+ - malloc_np.h
+ - netinet/sctp_uio.h
+ - netinet/ip_options.h
+ - netinet/sctp_kdtrace.h
+ - netinet/sctp_lock_bsd.h
+ - netinet/sctp_lock_empty.h
+ - netinet/sctp_os_bsd.h
+ - netinet6/in6_pcb.h
+ - netinet6/ip6_var.h
+ - netinet6/ip6protosw.h
+ - netinet6/scope6_var.h
+ - netipsec/ipsec.h
+ - netipsec/ipsec6.h
+ - netipsec/key.h
+ - opie.h
+ - osreldate.h
+ - opt_sctp.h
+ - pthread_np.h
+ - ripemd.h
+ - sha.h
+ - sha256.h
+ - sha512.h
+ - sys/cpuctl.h
+ - sys/cpuset.h
+ - sys/disklabel.h
+ - sys/endian.h
+ - sys/eventhandler.h
+ - sys/exec.h
+ - sys/extattr.h
+ - sys/filedesc.h
+ - sys/gsb_crc32.h
+ - sys/jail.h
+ - sys/ktrace.h
+ - sys/machine.h
+ - sys/module.h
+ - sys/mpctl.h
+ - sys/mutex.h
+ - sys/rwlock.h
+ - sys/semaphore.h
+ - sys/smp.h
+ - sys/stdint.h
+ - sys/systm.h
+ - sys/thr.h
+ - sys/timespec.h
+ - sys/umtx.h
+ - sys/uuid.h
+ - ucred.h
+ - varargs.h
+ - vm/vm_param.h
+ #endif
+ #if defined(__GNUC__)
+ - varargs.h
+ - stdfix.h
+ - mm_malloc.h
+ - quadmath.h
+ #endif
+ #if defined(_MSC_VER)
+ - comdef.h
+ - comutil.h
+ - concrt.h
+ - crtdefs.h
+ - crtversion.h
+ - eh.h
+ - excpt.h
+ - hash_map
+ - hash_set
+ - ppl.h
+ - ppltasks.h
+ - rtcapi.h
+ - vadefs.h
+ - varargs.h
+ - xlocinfo.h
+ - xstddef
+ - xutility
+ - ymath.h
+ - crtassem.h
+ #endif
+ #if defined(_unix_) && TODO
+ - bits/types/mbstate_t.h
+ - sys/atomic.h
+ - sys/atomic_op.h
+ - sys/bsdskt.h
+ - sys/bsdtty.h
+ - sys/builtin.h
+ - sys/cygwin.h
+ - sys/dcmd_blk.h
+ - sys/devpoll.h
+ - sys/fmutex.h
+ - sys/int_types.h
+ - sys/loadavg.h
+ - sys/localedef.h
+ - sys/machlock.h
+ - sys/mkdev.h
+ - sys/modem.h
+ - sys/ndir.h
+ - sys/port_impl.h
+ - sys/processor.h
+ - sys/pstat.h
+ - sys/system_properties.h
+ - sys/termio.h
+ - sys/timeval.h
+ - machine/bswap.h
+ - machine/sys/inline.h
+ #endif
+ #if defined(_PERL_)
+ - EXTERN.h
+ - perl.h
+ - XSUB.h
+ #endif
+ #if defined(_darwin_)
+ - AEObjects.h
+ - AEPackObject.h
+ - AERegistry.h
+ - AppleEvents.h
+ - Files.h
+ - Gestalt.h
+ - ImageCompression.h
+ - Palettes.h
+ - PictUtils.h
+ - Processes.h
+ - QDOffscreen.h
+ - QuickDraw.h
+ - TextUtils.h
+ - Types.h
+ - sys/_types/_mbstate_t.h
+ #endif
+ #if defined(_OS2_)
+ - os2.h
+ #endif
+ #if defined(_arm_)
+ - arm/limits.h
+ #endif
+ #if defined(_VMS_) && TODO
+ - atrdef.h
+ - dcdef.h
+ - descrip.h
+ - dvsdef.h
+ - fab.h
+ - fibdef.h
+ - gen64def.h
+ - iledef.h
+ - iodef.h
+ - lib$routines.h
+ - libfildef.h
+ - libfisdef.h
+ - lnmdef.h
+ - nam.h
+ - rms.h
+ - rmsdef.h
+ - ssdef.h
+ - starlet.h
+ - str$routines.h
+ - stsdef.h
+ - syidef.h
+ - times.h
+ - unixio.h
+ - tcpSocketVaxRoutines.h
+ #endif
+ #if defined(_SOLARIS_) && TODO
+ - synch.h
+ - sys/byteorder.h
+ #endif
+ #if defined(__MSL__) && TODO && WTF
+ - unix.h
+ #endif
+ #if defined(__sgi)
+ - sgidefs.h
+ #endif
+ #if defined(__BEOS__)
+ - ByteOrder.h
+ - OS.h
+ - support/SupportDefs.h
+ - kernel/OS.h
+ - kernel/image.h
+ #endif
+ #if defined(_sun_)
+ - procfs.h
+ #endif
+ #if defined(__sun)
+ - sys/port.h
+ #endif
+ #if defined(__sun__)
+ - sys/isa_defs.h
+ #endif
+ #if defined(__X11__)
+ - X11/XKBlib.h
+ - X11/keysym.h
+ - X11/extensions/shape.h
+ - X11/extensions/XShm.h
+ - X11/cursorfont.h
+ - X11/Xutil.h
+ - X11/Xresource.h
+ - X11/Xproto.h
+ - X11/Xos.h
+ - X11/Xlocale.h
+ - X11/Xlib.h
+ - X11/Xatom.h
+ - X11/Intrinsic.h
+ #endif
+ #if defined(HAVE_DMALLOC)
+ - dmalloc.h
+ #endif
+ #if defined(HAVE_ALTIVEC)
+ - altivec.h
+ #endif
+ #if defined(__vxWorks__)
+ - vxCpuLib.h
+ - vxWorks.h
+ - sockLib.h
+ - hostLib.h
+ - ioLib.h
+ - iosLib.h
+ - resolvLib.h
+ - rtpLib.h
+ - pipeDrv.h
+ - selectLib.h
+ #endif
+ #if defined(_LIBC) && TRASH
+ - ../locale/localeinfo.h
+ - ../locale/elem-hash.h
+ - ../locale/coll-lookup.h
+ #endif
+ #if defined(_LINUX_ANDROID)
+ - android/api-level.h
+ - android/ndk-version.h
+ #endif
+ #if defined(__HP_aCC)
+ - acxx_demangle.h
+ #endif
+ #if defined(HAVE_CONFIG_H) && TODO
+ - config_auto.h
+ #endif
+ #if defined(_TRASH_) && TODO
+ - openssl/fips.h
+ - tr1/unordered_map
+ - tr1/unordered_set
+ - tr1/type_traits
+ - ext/atomicity.h
+ - bits/c++config.h
+ - bits/atomicity.h
+ - gcrypt.h
+ - gnutls/gnutls.h
+ - gdwmfapi.h
+ - winmmap.h
+ - sf_unistd.h
+ #endif
+ #if defined(__TURBOC__) || defined(__BORLANDC__)
+ - alloc.h
+ #endif
+ #if defined (__DECC) || defined (__DECCXX)
+ - machine/builtins.h
+ #endif
+ #if defined(USE_PERL) && TODO
+ - perliol.h
+ #endif
+ #if defined(__NetBSD__)
+ - lwp.h
+ - perfuse.h
+ #endif
+ #if V8_OS_QNX
+ - sys/syspage.h
+ #endif
+ #if V8_OS_AIX
+ - sys/systemcfg.h
+ - sys/thread.h
+ #endif
+ - mbarrier.h
+ - iostream.h
+ - streambuf.h
+ - ostream.h
+ - slist
+ - nacl/nacl_random.h
+ - jemalloc/jemalloc.h
+ - tr1/tuple
+ - sys/inttypes.h
+ - lockdep.h
+ - memfault.h
+ - memcheck.h
+ - msvc.h
+ - sqlite3userauth.h
+ - linenoise.h
+ - sunmath.h
+ - sys/fpu.h
+ - win32.h
+ - bsd/stdlib.h
+ - bsd/unistd.h
+ - sys/videoio.h
+ - libv4l2.h
+ - soundcard.h
+ - ../ucrt/fcntl.h
+ - ../ucrt/locale.h
+ - ../ucrt/math.h
+ - ../ucrt/signal.h
+ - ../ucrt/sys/stat.h
+ #if defined (CUDA)
+ - math_constants.h
+ #endif
+ #if defined(BUILDING_LIBCURL)
+ - amitcp/socketbasetags.h
+ - clib.h
+ - exec/execbase.h
+ - exec/types.h
+ - extra/strdup.h
+ - extra/stricmp.h
+ - fabdef.h
+ - floss.h
+ - gnutls/crypto.h
+ - gskssl.h
+ - gss.h
+ - hasht.h
+ - ldap_ssl.h
+ - librtmp/rtmp.h
+ - lwip/init.h
+ - lwip/netdb.h
+ - lwip/sockets.h
+ - nettle/des.h
+ - nettle/md4.h
+ - nettle/md5.h
+ - pk11pub.h
+ - proto/dos.h
+ - proto/exec.h
+ - qsoasync.h
+ - stabs.h
+ - tpf/sysapi.h
+ #endif
+ - asm/page.h
+ - asm/sgidefs.h
+ - wrl\client.h
+ - wrl\event.h
+ - wrl\wrappers\corewrappers.h
+ - wrl\ftm.h
+ - bits/char_traits.h
+ - bits/stl_algobase.h
+ - bits/stl_move.h
+ - bits/stl_pair.h
+ - bits/stl_function.h
+ - bits/move.h
+ - ndir.h
+ - ext/rope
+ - sunmedia_types.h
+ - clidef.h
+ - credef.h
+ - dos/dos.h
+ - lbrdef.h
+ - lbr$routines.h
+ - libclidef.h
+ - libguile.h
+ - mhddef.h
+ - pathstuff.h
+ - perror.h
+ - processes.h
+ - sub_proc.h
+ - w32err.h
+ - procinfo.h
+ #if defined(__HAIKU__)
+ - FindDirectory.h
+ - StorageDefs.h
+ #endif
+ - fpxcp.h
+ - fptrap.h
+ - fortran.h
+ - agg_allocator.h
+ - SIOUX.h
+ - sys/siginfo.h
+ #ifdef HAVE_LIBGIMLI_H
+ - libgimli.h
+ #endif
+ #if MATLAB_MEX_FILE
+ - mex.h
+ #else
+ - lzmalib.h
+ # ICU
+ - uconfig_local.h
+ - ucln_local_hook.c
+ - unistrm.h
+ - udbgutil.h
+ - dll.h
+ - ascii_a.h
+ - qusec.h
+ - qusrjobi.h
+ - qliept.h
+ - mih/testptr.h
+ - sys/neutrino.h
+ - cics.h
+ - tr1/cmath
+ - tr1/complex
+ - tbb/scalable_allocator.h
+ - libmemcached/dtrace_probes.h
+ # unknown
+ - win_stdint.h
+ - probes.h
+ - thread.h
+ # mongoc-driver unused includes
+ - tls.h
+ #if metrika then skip bad includes from metrika
+ - boost/thread/detail/lock.hpp
+ #endif metrika
+ - xti.h
+ # libgit2 unused includes
+ - proto/timer.h
+ - mbsupport.h
+ # end of libgit2 unused includes
+ # xray includes
+ - xray/xray_interface.h
+ - attr/xattr.h
+ - fshelp.h
+ - mlib_image.h
+ - selinux/selinux.h
+ - sys/mntctl.h
+ - sys/mnttab.h
+ - sys/systeminfo.h
+ - sys/vfstab.h
+ - sys/vmount.h
+ - CL/sycl.hpp
+ # libpcap files
+ - os-proto.h
+ - pc.h
+ - pharlap.h
+ - msdos/pm_drvr/lock.h
+ - TcApi.h
+ - net/pfvar.h
+ - net/if_pflog.h
+ - netdnet/dnetdb.h
+ - sys/ethernet.h
+ - sys/stream.h
+ - netlink/genl/genl.h
+ - netlink/genl/family.h
+ - netlink/genl/ctrl.h
+ - netlink/msg.h
+ - netlink/attr.h
+ # end libpcap files
+
+# These includes are not used in autocheck builds, but might be necessary for
+# some external builds with exotic settings
+
+- case_sensitive: false
+ includes:
+ - bemapiset.h
+ - cor.h
+ - fusion.h
+ - IPHlpApi.h
+ - metahost.h
+ #if defined(WINDOWS) && defined (_USE_MFC_)
+ - afx.h
+ #endif
+ #if defined(WINDOWS) && CONTRIB && TRASH
+ - ../include/stdint.h
+ #endif
+
+- source_filter: ".*contrib.*"
+ includes:
+ #if defined (__OpenBSD__) && CONTRIB
+ - spinlock.h
+ #endif
+ #if CONTRIB && TODO
+ - MSTcpIP.h
+ - MacSocket.h
+ - WinIoCtl.h
+ - WinPDFCore.h
+ - Winsock2.h
+ - Xm/XmAll.h
+ - aep.h
+ - atalla.h
+ - crypto/cryptodev.h
+ - cswift.h
+ - cxcore.h
+ - efndef
+ - exiv2/types.hpp
+ - hw_4758_cca.h
+ - hw_ubsec.h
+ - hwcryptohook.h
+ - jpidef.h
+ - lckdef.h
+ - libdtdef.h
+ - novsock2.h
+ - openssl/fips_rand.h
+ - openssl/fipssyms.h
+ - openssl/jpake.h
+ - rld_interface.h
+ - screen.h
+ - sureware.h
+ - t_ctype.h
+ - tr1/unordered_map.hpp
+ - typedefs.h
+ - winmain.h
+ - wintext.h
+ - yandex/http/curl_wrapper.hpp
+ - yandex/threads/boost_threaded.hpp
+ - yasm-plugin.h
+ #endif
+ #if CONTRIB && TRASH
+ - macconfig.h
+ - amigaconfig.h
+ - json_batchallocator.h
+ - json_internalarray.inl
+ - json_internalmap.inl
+ - mysql/mysql_version.h
+ - libiberty.h
+ #endif
+
+- includes:
+ - Aclapi.h
+ - tr1/functional
+ - time64.h
+ - extern.h
+ #if defined(__FreeBSD__)
+ - _ctype.h
+ - alias.h
+ - calendar.h
+ - fetch.h
+ - gelf.h
+ - gnuregex.h
+ - kafs.h
+ - login_cap.h
+ - machine/_inttypes.h
+ - machine/_stdint.h
+ - machine/asm.h
+ - machine/in_cksum.h
+ - machine/sigframe.h
+ - machine/sysarch.h
+ - machine/trap.h
+ - md2.h
+ - md4.h
+ - mp.h
+ - pcap-int.h
+ - sys/_iovec.h
+ - sys/_null.h
+ - sys/_pthreadtypes.h
+ - sys/_sigset.h
+ - sys/_timeval.h
+ - sys/devicestat.h
+ - sys/fnv_hash.h
+ - sys/limits.h
+ - sys/priv.h
+ - sys/sched.h
+ - sys/sema.h
+ - sys/stack.h
+ - sys/timers.h
+ - sys/tree.h
+ - tcpd.h
+ - ypclnt.h
+ #endif
+ #if defined (__linux__)
+ - asm/fpu.h
+ - i386/fpu_control.h
+ - zlibdefs.h
+ #endif
+ #if defined(_MSC_VER)
+ - agents.h
+ - allocators
+ - amp.h
+ - collection.h
+ - ConcurrencySal.h
+ - concurrent_priority_queue.h
+ - concurrent_queue.h
+ - concurrent_unordered_map.h
+ - concurrent_unordered_set.h
+ - concurrent_vector.h
+ - vcruntime_new_debug.h
+ - dvec.h
+ - setjmpex.h
+ - srv.h
+ - typeinfo.h
+ - xcomplex
+ - xdebug
+ - xhash
+ - xiosbase
+ - xkeycheck.h
+ - xlocale
+ - xlocinfo
+ - xlocnum
+ - xmemory
+ - xmemory0
+ - xstring
+ - xtr1common
+ - xtree
+ - yvals.h
+ #endif
+ #if defined(_unix_) && TODO
+ - sys/feature_tests.h
+ #endif
+ #if defined(_darwin_)
+ - libkern/version.h
+ - System/pthread_machdep.h
+ #endif
+ #if defined(_VMS_) && TODO
+ - chfdef.h
+ - libdef.h
+ #endif
+ #if defined(__sgi)
+ - sigfpe.h
+ #endif
+ #if defined(__MWERKS__)
+ - nwfileio.h
+ - nwthread.h
+ #endif
+ #if defined(_TRASH_) && TODO
+ - ext/slist
+ - google/profiler.h
+ #endif
+ #if defined(__QNXNTO__)
+ - sys/cpuinline.h
+ #endif
+ #if V8_OS_QNX
+ - backtrace.h
+ #endif
+ - yabs_mx_calc_table.h
+ - net/errno.h
+ - sys/mode.h
+ - nwstdio.h
+ - os2ish.h
+ - vmsish.h
+ - ./plan9/plan9ish.h
+ - ./vos/vosish.h
+ - vos/vosish.h
+ - symbian/symbianish.h
+ - haiku/haikuish.h
+ - nw5thread.h
+ - os2thread.h
+ - netware.h
+ - perldtrace.h
+ - win32thread.h
+ - wince.h
+ - symbian/symbian_proto.h
+ - xconfig.h
+ - bsd/ctypes.h
+ - objc/NXCType.h
+ - appkit/NXCType.h
+ - sfio.h
+ - vmesa/vmesaish.h
+ - sys\stat.h
+ - mpeix/mpeixish.h
+ - epocish.h
+ - beos/beosish.h
+ - WinNT.h
+ - ../../VC/include/stdio.h
+ - ../ucrt/stdio.h
+ #if defined(BUILDING_LIBCURL)
+ - axTLS/ssl.h
+ - certdb.h
+ - cert.h
+ - cyassl/error.h
+ - cyassl/openssl/ssl.h
+ - cyassl/ssl.h
+ - nspr.h
+ - polarssl/certs.h
+ - polarssl/ctr_drbg.h
+ - polarssl/entropy.h
+ - polarssl/error.h
+ - polarssl/havege.h
+ - polarssl/net.h
+ - polarssl/ssl.h
+ - polarssl/version.h
+ - polarssl/x509.h
+ - prerror.h
+ - prio.h
+ - prtypes.h
+ - qsossl.h
+ - secerr.h
+ - secitem.h
+ - secmod.h
+ - secport.h
+ - spnegohelp.h
+ - sslerr.h
+ - sslproto.h
+ #endif
+ - Activation.h
+ - android/native_window.h
+ - Windows.System.Threading.h
+ #if defined(__MINGW32__) || defined(_MSC_VER)
+ - inet_net_pton.h
+ - inet_ntop.h
+ #endif
+ #if EV_USE_IOCP
+ - ev_iocp.c
+ #endif
+ - zend_exceptions.h
+ #if MATLAB_MEX_FILE
+ # unknown
+ - GL/glx.h
+ - CL/va_ext.h
+ - sys/sysconf.h
+ - ivx.hpp
+ - clAmdBlas.h
+ - clAmdFft.h
+ - va/va.h
+ #if metrika then skip bad includes from metrika
+ - yandex/lbs/LBSLocator.hpp
+ #endif metrika
+ # libpcap files
+ - sys/sysconfig.h
+ - sys/device.h
+ - sys/cfgodm.h
+ - cf.h
+ - zone.h
+ - netpacket/if_packet.h
+ # end libpcap files
diff --git a/build/sysincl/valgrind.yml b/build/sysincl/valgrind.yml
new file mode 100644
index 0000000000..de9c6b9f5d
--- /dev/null
+++ b/build/sysincl/valgrind.yml
@@ -0,0 +1,4 @@
+- includes:
+ - valgrind/callgrind.h: contrib/libs/valgrind/valgrind/callgrind.h
+ - valgrind/memcheck.h: contrib/libs/valgrind/valgrind/memcheck.h
+ - valgrind/valgrind.h: contrib/libs/valgrind/valgrind/valgrind.h
diff --git a/build/sysincl/windows.yml b/build/sysincl/windows.yml
new file mode 100644
index 0000000000..26ae7b5bfa
--- /dev/null
+++ b/build/sysincl/windows.yml
@@ -0,0 +1,316 @@
+- case_sensitive: false
+ includes:
+ - accctrl.h
+ - aclapi.h
+ - activation.h
+ - activscp.h
+ - adhoc.h
+ - apiset.h
+ - apisetcconv.h
+ - atltime.h
+ - audioclient.h
+ - authz.h
+ - basetyps.h
+ - bcrypt.h
+ - bits.h
+ - capi.h
+ - cet.h
+ - cfg.h
+ - comdef.h
+ - commctrl.h
+ - commdlg.h
+ - common.ver
+ - compressapi.h
+ - concurrencysal.h
+ - conio.h
+ - consoleapi.h
+ - corecrt.h
+ - corecrt_terminate.h
+ - cpl.h
+ - crtdbg.h
+ - cryptuiapi.h
+ - d2d1.h
+ - d2d1_2.h
+ - d3d10.h
+ - d3d10_1.h
+ - d3d11.h
+ - d3d11_1.h
+ - d3d9.h
+ - d3dcompiler.h
+ - datetimeapi.h
+ - dbgeng.h
+ - dbghelp.h
+ - dbt.h
+ - dcomp.h
+ - debugapi.h
+ - devguid.h
+ - direct.h
+ - dispex.h
+ - dos.h
+ - downloadmgr.h
+ - driverspecs.h
+ - dshow.h
+ - dsound.h
+ - dsparse.h
+ - dv.h
+ - dvdmedia.h
+ - dwrite.h
+ - dxgi.h
+ - dxgi1_2.h
+ - dxgi1_3.h
+ - dxgidebug.h
+ - dxprogrammablecapture.h
+ - dxva.h
+ - dxva2api.h
+ - effects.h
+ - encdec.h
+ - errhandlingapi.h
+ - eventtoken.h
+ - evntprov.h
+ - evntrace.h
+ - exdisp.h
+ - exdispid.h
+ - fci.h
+ - fibersapi.h
+ - fileapi.h
+ - filter.h
+ - fltuser.h
+ - fltuserstructures.h
+ - fttypes.h
+ - fwpmu.h
+ - gb18030.h
+ - gdiplus.h
+ - gdiplusimagecodec.h
+ - gl/gl.h
+ - gl/glu.h
+ - guiddef.h
+ - handleapi.h
+ - heapapi.h
+ - htmlhelp.h
+ - http.h
+ - imagehlp.h
+ - ime_cmodes.h
+ - imm.h
+ - in6addr.h
+ - inaddr.h
+ - initguid.h
+ - inspectable.h
+ - instance.h
+ - interlockedapi.h
+ - intsafe.h
+ - io.h
+ - ioapiset.h
+ - ipexport.h
+ - ipifcons.h
+ - iptypes.h
+ - iwscapi.h
+ - jobapi.h
+ - journal.h
+ - kbd.h
+ - kernelspecs.h
+ - ksmedia.h
+ - ktmtypes.h
+ - libloaderapi.h
+ - lm.h
+ - lmcons.h
+ - lmerr.h
+ - lmstats.h
+ - mbctype.h
+ - mbstring.h
+ - mcx.h
+ - memoryapi.h
+ - mfapi.h
+ - mi.h
+ - minmax.h
+ - minwinbase.h
+ - minwindef.h
+ - mlang.h
+ - mmdeviceapi.h
+ - mmsystem.h
+ - mq.h
+ - mshtmdid.h
+ - mshtmhst.h
+ - mshtml.h
+ - msi.h
+ - msidefs.h
+ - msiquery.h
+ - msp.h
+ - msputils.h
+ - mstcpip.h
+ - mswsock.h
+ - mtx.h
+ - namedpipeapi.h
+ - namespaceapi.h
+ - netioapi.h
+ - new.h
+ - npapi.h
+ - ntdddisk.h
+ - ntddk.h
+ - ntddndis.h
+ - ntdef.h
+ - ntsecapi.h
+ - ntstatus.h
+ - ntverp.h
+ - oaidl.idl
+ - objbase.h
+ - objectarray.h
+ - objidl.h
+ - objsafe.h
+ - ocidl.h
+ - ocidl.idl
+ - odbcss.h
+ - ole.h
+ - ole2.h
+ - oleacc.h
+ - oleauto.h
+ - olectl.h
+ - packon.h
+ - packoff.h
+ - pathcch.h
+ - p2p.h
+ - pdh.h
+ - pdhmsg.h
+ - perflib.h
+ - persist.h
+ - poppack.h
+ - powerbase.h
+ - process.h
+ - processenv.h
+ - processthreadsapi.h
+ - processtopologyapi.h
+ - profileapi.h
+ - provider.h
+ - psapi.h
+ - pshpack1.h
+ - pshpack2.h
+ - pshpack4.h
+ - pshpack8.h
+ - qos.h
+ - ratings.h
+ - realtimeapiset.h
+ - reason.h
+ - richedit.h
+ - roapi.h
+ - robuffer.h
+ - rpc.h
+ - rpcdce.h
+ - rpcndr.h
+ - safeint.h
+ - sal.h
+ - sapi.h
+ - schannel.h
+ - schedule.h
+ - schnlsp.h
+ - scsi.h
+ - sddl.h
+ - sdkddkver.h
+ - sdv_driverspecs.h
+ - security.h
+ - securityappcontainer.h
+ - securitybaseapi.h
+ - sensors.h
+ - sfc.h
+ - share.h
+ - shellapi.h
+ - shlguid.h
+ - shlobj.h
+ - shlwapi.h
+ - specstrings.h
+ - specstrings_strict.h
+ - specstrings_undef.h
+ - spellcheck.h
+ - sperror.h
+ - sspi.h
+ - stralign.h
+ - stringapiset.h
+ - strsafe.h
+ - suppress.h
+ - synchapi.h
+ - sys/locking.h
+ - sys/utime.h
+ - sysinfoapi.h
+ - systemtopologyapi.h
+ - tbs.h
+ - tchar.h
+ - tdi.h
+ - threadpoolapiset.h
+ - threadpoollegacyapiset.h
+ - timezoneapi.h
+ - tlhelp32.h
+ - traffic.h
+ - tune.h
+ - tvout.h
+ - unknwn.h
+ - unknwn.idl
+ - upnp.h
+ - urlmon.h
+ - urlmon.idl
+ - usb.h
+ - userenv.h
+ - usp10.h
+ - utilapiset.h
+ - uxtheme.h
+ - verrsrc.h
+ - versionhelpers.h
+ - vfw.h
+ - wbemidl.h
+ - websocket.h
+ - winapifamily.h
+ - winbase.h
+ - winber.h
+ - wincon.h
+ - wincrypt.h
+ - windef.h
+ - windns.h
+ - windows.applicationmodel.core.h
+ - windows.graphics.display.h
+ - windows.h
+ - windows.storage.h
+ - windows.storage.streams.h
+ - windows.system.threading.h
+ - windows.ui.xaml.h
+ - windows.ui.xaml.media.dxinterop.h
+ - windowsx.h
+ - winerror.h
+ - wingdi.h
+ - winhttp.h
+ - wininet.h
+ - winioctl.h
+ - winldap.h
+ - winnetwk.h
+ - winnls.h
+ - winnt.h
+ - winperf.h
+ - winreg.h
+ - winres.h
+ - winresrc.h
+ - winsdkver.h
+ - winsock.h
+ - winsock2.h
+ - winstring.h
+ - winsvc.h
+ - winternl.h
+ - winuser.h
+ - winver.h
+ - winwlx.h
+ - wnnc.h
+ - wow64apiset.h
+ - wrl.h
+ - wrl/async.h
+ - wrl/client.h
+ - wrl/event.h
+ - wrl/ftm.h
+ - wrl/implements.h
+ - wrl/wrappers/corewrappers.h
+ - ws2bth.h
+ - ws2def.h
+ - ws2ipdef.h
+ - ws2spi.h
+ - ws2tcpip.h
+ - wscapi.h
+ - wspiapi.h
+ - wtsapi32.h
+ - wtypes.h
+ - xa.h
+ - xaudio2.h
+ - xmllite.h
diff --git a/build/ya.conf.json b/build/ya.conf.json
new file mode 100644
index 0000000000..6d49413094
--- /dev/null
+++ b/build/ya.conf.json
@@ -0,0 +1,8036 @@
+{
+ "tools": {
+ "cc": {
+ "description": "Run C compiler"
+ },
+ "c++": {
+ "description": "Run C++ compiler"
+ },
+ "clang-format": {
+ "description": "Run Clang-Format source code formatter"
+ },
+ "clang-rename": {
+ "description": "Run Clang-Rename refactoring tool"
+ },
+ "clang-tidy": {
+ "description": "Run Clang-Tidy source code linter"
+ },
+ "clang-apply-replacements": {
+ "description": "Run clang-apply-replacements companion for clang-tidy"
+ },
+ "cling": {
+ "description": "Run cling"
+ },
+ "cue": {
+ "description": "Validate and define text-based and dynamic configuration"
+ },
+ "dctl": {
+ "description": "Run Yandex.Deploy CLI"
+ },
+ "llvm-profdata": {
+ "description": "Run llvm-profdata Clang utility"
+ },
+ "llvm-symbolizer": {
+ "description": "Run llvm-symbolizer Clang utility"
+ },
+ "llvm-cov": {
+ "description": "Run llvm-cov Clang utility"
+ },
+ "strip": {
+ "description": "Run strip utility"
+ },
+ "c++filt": {
+ "description": "Run c++filt"
+ },
+ "nm": {
+ "description": "Run nm"
+ },
+ "objcopy": {
+ "description": "Run objcopy"
+ },
+ "svn": {
+ "description": "Subversion command-line client"
+ },
+ "zipatcher": {
+ "description": "Apply zipatch from file or Arcanum pull request"
+ },
+ "ymake": {
+ "description": "Run ymake",
+ "visible": false
+ },
+ "maven_import_sandbox_uploader": {
+ "description": "Sandbox uploader for maven-import cmd",
+ "visible": false
+ },
+ "cmake": {
+ "description": "Run cmake"
+ },
+ "ninja": {
+ "description": "Run ninja"
+ },
+ "pprof": {
+ "description": "Run pprof"
+ },
+ "ytexec": {
+ "description": "Run ytexec"
+ },
+ "gdb": {
+ "description": "Run gdb"
+ },
+ "gdbserver": {
+ "description": "Run gdbserver"
+ },
+ "ag": {
+ "description": "Run ag (super fast source-code grep)"
+ },
+ "valgrind": {
+ "description": "Run valgrind"
+ },
+ "python": {
+ "description": "Run pseudo-python",
+ "visible": false
+ },
+ "python3": {
+ "description": "Run Python 3",
+ "visible": false
+ },
+ "jar": {
+ "description": "Run jar"
+ },
+ "java": {
+ "description": "Run java"
+ },
+ "javac": {
+ "description": "Run javac"
+ },
+ "java10": {
+ "description": "Run java 10"
+ },
+ "javac10": {
+ "description": "Run javac 10"
+ },
+ "java11": {
+ "description": "Run java 11"
+ },
+ "javac11": {
+ "description": "Run javac 11"
+ },
+ "jar15": {
+ "description": "Run jar from jdk15"
+ },
+ "java15": {
+ "description": "Run java 15"
+ },
+ "javac15": {
+ "description": "Run javac 15"
+ },
+ "jar17": {
+ "description": "Run jar from jdk15"
+ },
+ "java17": {
+ "description": "Run java 15"
+ },
+ "javac17": {
+ "description": "Run javac 15"
+ },
+ "jq": {
+ "description": "Run jq"
+ },
+ "vim": {
+ "description": "Run vim"
+ },
+ "nvim": {
+ "description": "Run neovim"
+ },
+ "ctags": {
+ "description": "Run ctags"
+ },
+ "emacs": {
+ "description": "Run emacs"
+ },
+ "tmux": {
+ "description": "Run Tmux"
+ },
+ "gpt_perf": {
+ "description": "Google performance tools: performance checker"
+ },
+ "gpt_heap": {
+ "description": "Google performance tools: heap checker"
+ },
+ "wine": {
+ "description": "Run wine64",
+ "visible": false
+ },
+ "wine32": {
+ "description": "Run wine",
+ "visible": false
+ },
+ "deploy": {
+ "description": "Run Samogon",
+ "visible": false
+ },
+ "uc": {
+ "description": "Run Uber Compressor"
+ },
+ "perf": {
+ "description": "Run Perf"
+ },
+ "cuda-check": {
+ "description": "Run cuda-check"
+ },
+ "sre": {
+ "description": "Run sretool"
+ },
+ "samogonctl": {
+ "description": "Run Samogon Controller"
+ },
+ "ant": {
+ "description": "Ant build system",
+ "visible": false
+ },
+ "mvn": {
+ "description": "Maven build system",
+ "visible": false
+ },
+ "gcov": {
+ "description": "Run gcov"
+ },
+ "bloat": {
+ "description": "Run bloat tool",
+ "visible": false
+ },
+ "ipython": {
+ "description": "Run IPython console",
+ "visible": false
+ },
+ "ptpython": {
+ "description": "Run PTPython console",
+ "visible": false
+ },
+ "allure": {
+ "description": "Run Allure commandline"
+ },
+ "rsync": {
+ "description": "Run RSync"
+ },
+ "yf": {
+ "description": "Run YF client"
+ },
+ "rtmr-deploy": {
+ "description": "Run RTMR deploy"
+ },
+ "yt": {
+ "description": "Run YT client"
+ },
+ "yp-util": {
+ "description": "Run YP useful stuff"
+ },
+ "yp": {
+ "description": "Run low level YP client"
+ },
+ "yndexer": {
+ "description": "Run Yndexer"
+ },
+ "ytyndexer": {
+ "description": "Run YtYndexer"
+ },
+ "ymakeyndexer": {
+ "description": "Run ymake ydx converter"
+ },
+ "transfer-manager": {
+ "description": "Run Transfer Manager client"
+ },
+ "rem-tool": {
+ "description": "Run REM cli client"
+ },
+ "afl-fuzz": {
+ "description": "Run afl-fuzz"
+ },
+ "horadric": {
+ "description": "Run horadric generator"
+ },
+ "logbroker": {
+ "description": "Logbroker configuration utility"
+ },
+ "zcli": {
+ "description": "Run zcli (console client for zephyr)"
+ },
+ "run_python_udf": {
+ "description": "run_python_udf tool"
+ },
+ "arc": {
+ "description": "Arcadia command-line client"
+ },
+ "graphs_difference": {
+ "description": "Run graphs_difference tool",
+ "visible": false
+ },
+ "contexts_difference": {
+ "description": "Run contexts_difference tool",
+ "visible": false
+ },
+ "ycmerge": {
+ "description": "Run ycmerge tool",
+ "visible": false
+ },
+ "ygdiff": {
+ "description": "Run ygdiff tool",
+ "visible": false
+ },
+ "ya-tc": {
+ "description": "Run ya-tc tool",
+ "visible": false
+ },
+ "crypta": {
+ "description": "Run Crypta client"
+ },
+ "apphost": {
+ "description": "Run local apphost instance"
+ },
+ "renderer": {
+ "description": "Run local renderer instance"
+ },
+ "appteka": {
+ "description": "Run local appteka instance"
+ },
+ "news": {
+ "description": "Run news team tools"
+ },
+ "go": {
+ "description": "Run go tool (1.17.6)"
+ },
+ "gofmt": {
+ "description": "Run gofmt tool (1.17.6)"
+ },
+ "go_1.18beta2": {
+ "description": "Run go tool (1.18beta2)"
+ },
+ "gofmt_1.18beta2": {
+ "description": "Run gofmt tool (1.18beta2)"
+ },
+ "godoc": {
+ "description": "Arcadia version of godoc"
+ },
+ "yo": {
+ "description": "Tool for managing vendor/ directory"
+ },
+ "mockgen": {
+ "description": "Run GoMock (go mocking framework)"
+ },
+ "swagger": {
+ "description": "Run go-swagger"
+ },
+ "dlv": {
+ "description": "Debugger for the Go programming language"
+ },
+ "node-search": {
+ "description": "Autocheck data inspector tool",
+ "visible": false
+ },
+ "releaser": {
+ "description": "Release tool"
+ },
+ "tvmknife": {
+ "description": "Tool for debugging and testing with TVM tickets"
+ },
+ "sandboxctl": {
+ "description": "Tool to run tasks in Sandbox"
+ },
+ "qemu": {
+ "description": "QEMU x86_64 machine emulator and virtualizer"
+ },
+ "qemu-i386": {
+ "description": "QEMU i386 machine emulator and virtualizer"
+ },
+ "qemu-img": {
+ "description": "QEMU disk image utility"
+ },
+ "qemu-nbd": {
+ "description": "QEMU disk network block device server"
+ },
+ "qyp": {
+ "description": "QYP tool"
+ },
+ "vmexec": {
+ "description": "VMEXEC run script inside qemu-vm"
+ },
+ "yd-migrate": {
+ "description": "Run deploy migration"
+ },
+ "yfm-docs": {
+ "description": "YFM-extended markdown processor for Cloud deploy (v3)"
+ },
+ "aws": {
+ "description": "Run aws"
+ },
+ "sedem": {
+ "description": "SEDEM tool - Service management tool for Maps services"
+ },
+ "fio": {
+ "description": "flexible I/O tester"
+ },
+ "amduprof-cli": {
+ "description": "AMDuProfCLI is a command-line tool for AMD uProf Profiler"
+ },
+ "amduprof-pcm": {
+ "description": "AMDuProfPcm is a command-line tool to monitor CPU performance metrics of AMD processors"
+ },
+ "foremost": {
+ "description": "Foremost is a Linux program to recover files based on their headers"
+ },
+ "stress-ng": {
+ "description": "stress load tester"
+ },
+ "atop": {
+ "description": "Advanced System & Process Monitor"
+ },
+ "bpftool": {
+ "description": "tool for inspection and simple manipulation of eBPF programs and maps"
+ },
+ "bpftrace": {
+ "description": "High-level tracing language for Linux eBPF"
+ },
+ "strace": {
+ "description": "the linux syscall tracer"
+ },
+ "iperf": {
+ "description": "network load tester"
+ },
+ "lkvm": {
+ "description": "kvmtool is a userland tool for creating and controlling KVM guests"
+ },
+ "coronerctl": {
+ "description": "yandex-coroner cli, https://a.yandex-team.ru/arc/trunk/arcadia/infra/rsm/coroner/README.md"
+ },
+ "blkparse": {
+ "description": "produce formatted output of event streams of block devices from blktrace utility"
+ },
+ "iowatcher": {
+ "description": "Create visualizations from blktrace results"
+ },
+ "blktrace": {
+ "description": "generate traces of the i/o traffic on block devices"
+ },
+ "blkiomon": {
+ "description": "monitor block device I/O based o blktrace data"
+ },
+ "btt": {
+ "description": "analyse block i/o traces produces by blktrace"
+ },
+ "lz4": {
+ "description": "Compress or decompress .lz4 files"
+ },
+ "pqos": {
+ "description": "Intel(R) Resource Director Technology monitoring and control tool"
+ },
+ "rdtset": {
+ "description": "Task CPU affinity and Intel(R) Resource Director Technology control tool"
+ },
+ "optrace": {
+ "description": "optrace records output files written by each process",
+ "visible": false
+ },
+ "yoimports": {
+ "description": "Go imports formatting tool"
+ },
+ "jstyle": {
+ "description": "Java styler"
+ },
+ "ktlint": {
+ "description": "Run kotlin styler"
+ },
+ "ya_sed": {
+ "description": "This tool simplifies replacing of some text in Arcadia"
+ },
+ "black": {
+ "description": "Python styler"
+ },
+ "yadi": {
+ "description": "Arcadia version of Yadi"
+ },
+ "grpc_cli": {
+ "description": "GRPC command-line tool"
+ },
+ "buf": {
+ "description": "Protobuf lint and breaking change detector"
+ },
+ "iceflame": {
+ "description": "Performance data collection and analysis"
+ },
+ "cs": {
+ "description": "Fast CodeSearch CLI tool"
+ },
+ "wall-e": {
+ "description": "Client for Wall-E"
+ },
+ "rtcdiag": {
+ "description": "RTC hosts diag tool"
+ },
+ "skotty": {
+ "description": "Skotty (SSH-agent) launcher"
+ },
+ "license_analyzer": {
+ "description": "Run devtools license analyzer"
+ },
+ "eductl": {
+ "description": "eductl is a toolchain of Yandex Education"
+ },
+ "bigb_request": {
+ "description": "utility to get user info"
+ },
+ "bigb_hitlog_analyser": {
+ "description": "bigb utility"
+ },
+ "bigb_bsyeti_experiments": {
+ "description": "bigb utility"
+ },
+ "bigb_bb_cluster_analyzer": {
+ "description": "bigb utility"
+ },
+ "bigb_yt_profiles_dumper": {
+ "description": "bigb utility"
+ },
+ "bigb_ab": {
+ "description": "bigb utility"
+ },
+ "bigrt_cli": {
+ "description": "bigrt utility"
+ },
+ "caesar_yt_sync": {
+ "description": "caesar utility"
+ },
+ "caesar_lookup_profile": {
+ "description": "caesar utility"
+ },
+ "caesar_profile_size_analyzer": {
+ "description": "caesar utility"
+ },
+ "exp_stats": {
+ "description": "bsyeti tool"
+ }
+ },
+ "toolchain": {
+ "bigb_request": {
+ "tools": {
+ "bigb_request": {
+ "bottle": "bigb_request",
+ "executable": "bb_requester"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigb_hitlog_analyser": {
+ "tools": {
+ "bigb_hitlog_analyser": {
+ "bottle": "bigb_hitlog_analyser",
+ "executable": "hitlog_analyser"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigb_bsyeti_experiments": {
+ "tools": {
+ "bigb_bsyeti_experiments": {
+ "bottle": "bigb_bsyeti_experiments",
+ "executable": "bsyeti_experiments"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigb_bb_cluster_analyzer": {
+ "tools": {
+ "bigb_bb_cluster_analyzer": {
+ "bottle": "bigb_bb_cluster_analyzer",
+ "executable": "bb_cluster_analyzer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigb_yt_profiles_dumper": {
+ "tools": {
+ "bigb_yt_profiles_dumper": {
+ "bottle": "bigb_yt_profiles_dumper",
+ "executable": "yt_profiles_dumper"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigb_ab": {
+ "tools": {
+ "bigb_ab": {
+ "bottle": "bigb_ab",
+ "executable": "ab"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bigrt_cli": {
+ "tools": {
+ "bigrt_cli": {
+ "bottle": "bigrt_cli",
+ "executable": "big_rt_cli"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "caesar_lookup_profile": {
+ "tools": {
+ "caesar_lookup_profile": {
+ "bottle": "caesar_lookup_profile",
+ "executable": "lookup_profile"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "exp_stats": {
+ "tools": {
+ "exp_stats": {
+ "bottle": "exp_stats",
+ "executable": "exp_stats"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "caesar_profile_size_analyzer": {
+ "tools": {
+ "caesar_profile_size_analyzer": {
+ "bottle": "caesar_profile_size_analyzer",
+ "executable": "profile_size_analyzer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "caesar_yt_sync": {
+ "tools": {
+ "caesar_yt_sync": {
+ "bottle": "caesar_yt_sync",
+ "executable": "yt_sync"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "msvc2019-i686": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "i686"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "$(MSVC)/bin/Hostx64/x86/cl.exe",
+ "cxx_compiler": "$(MSVC)/bin/Hostx64/x86/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019"
+ }
+ },
+ "msvc2019-x86_64": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "$(MSVC)/bin/Hostx64/x64/cl.exe",
+ "cxx_compiler": "$(MSVC)/bin/Hostx64/x64/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019",
+ "for_ide": "msvs2019"
+ }
+ },
+ "msvc2019-arm": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "arm"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "$(MSVC)/bin/Hostx64/arm/cl.exe",
+ "cxx_compiler": "$(MSVC)/bin/Hostx64/arm/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019"
+ }
+ },
+ "wine-msvc2019-i686": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "i686"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 c $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/x86/cl.exe",
+ "cxx_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 cxx $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/x86/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019",
+ "wine": "yes"
+ }
+ },
+ "wine-msvc2019-x86_64": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 c $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/x64/cl.exe",
+ "cxx_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 cxx $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/x64/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019",
+ "wine": "yes"
+ }
+ },
+ "wine-msvc2019-arm": {
+ "name": "msvc2019",
+ "tools": {
+ "cc": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ },
+ "c++": {
+ "bottle": "msvc2019",
+ "executable": "msvc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "arm"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "match_root": "MSVC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 c $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/arm/cl.exe",
+ "cxx_compiler": "${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140 cxx $WINE_ENV ${ARCADIA_ROOT} ${ARCADIA_BUILD_ROOT} $(MSVC)/bin/Hostx64/arm/cl.exe",
+ "cxx_std": "c++latest",
+ "version": "2019",
+ "wine": "yes"
+ }
+ },
+ "clang-format": {
+ "tools": {
+ "clang-format": {
+ "bottle": "clang-format",
+ "executable": "clang-format"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "clang-tidy": {
+ "tools": {
+ "clang-tidy": {
+ "bottle": "clang-tidy",
+ "executable": "clang-tidy"
+ },
+ "clang-apply-replacements": {
+ "bottle": "clang-tidy",
+ "executable": "clang-apply-replacements"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ymake": {
+ "tools": {
+ "ymake": {
+ "bottle": "ymake",
+ "executable": "ymake"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ }
+ ]
+ },
+ "maven_import_sandbox_uploader": {
+ "tools": {
+ "maven_import_sandbox_uploader": {
+ "bottle": "maven_import_sandbox_uploader",
+ "executable": "maven_import_sandbox_uploader"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "arc": {
+ "tools": {
+ "arc": {
+ "bottle": "arc",
+ "executable": "arc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yo": {
+ "tools": {
+ "yo": {
+ "bottle": "yo",
+ "executable": "yo"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "mockgen": {
+ "tools": {
+ "mockgen": {
+ "bottle": "mockgen",
+ "executable": "mockgen"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "swagger": {
+ "tools": {
+ "swagger": {
+ "bottle": "swagger",
+ "executable": "swagger"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "dlv": {
+ "tools": {
+ "dlv": {
+ "bottle": "delve",
+ "executable": "dlv"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cue": {
+ "tools": {
+ "cue": {
+ "bottle": "cue",
+ "executable": "cue"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yoimports": {
+ "tools": {
+ "yoimports": {
+ "bottle": "yoimports",
+ "executable": "yoimports"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "releaser": {
+ "tools": {
+ "releaser": {
+ "bottle": "releaser",
+ "executable": "releaser"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "tvmknife": {
+ "tools": {
+ "tvmknife": {
+ "bottle": "tvmknife",
+ "executable": "tvmknife"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "sandboxctl": {
+ "tools": {
+ "sandboxctl": {
+ "bottle": "sandboxctl",
+ "executable": "sandboxctl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "gcc82": {
+ "tools": {
+ "cc": {
+ "bottle": "gcc82",
+ "executable": "cc"
+ },
+ "c++": {
+ "bottle": "gcc82",
+ "executable": "c++"
+ },
+ "gcov": {
+ "bottle": "gcc82",
+ "executable": "gcov"
+ },
+ "c++filt": {
+ "bottle": "gcc82",
+ "executable": "c++filt"
+ },
+ "nm": {
+ "bottle": "gcc82",
+ "executable": "nm"
+ },
+ "strip": {
+ "bottle": "gcc82",
+ "executable": "strip"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ }
+ }
+ ],
+ "params": {
+ "type": "gnu",
+ "match_root": "GCC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "$(GCC)/gcc/bin/gcc",
+ "cxx_compiler": "$(GCC)/gcc/bin/g++",
+ "cxx_std": "c++17",
+ "gcc_version": "8.2.0",
+ "arch_opt": [
+ "-w"
+ ],
+ "dwarf_tool": {
+ "DARWIN": "dsymutil -f"
+ }
+ }
+ },
+ "clang12-windows": {
+ "name": "clang12",
+ "tools": {
+ "c++": {
+ "bottle": "clang12",
+ "executable": "c++"
+ },
+ "c++filt": {
+ "bottle": "clang12",
+ "executable": "c++filt"
+ },
+ "cc": {
+ "bottle": "clang12",
+ "executable": "cc"
+ },
+ "gcov": {
+ "bottle": "clang12",
+ "executable": "llvm-gcov"
+ },
+ "llvm-cov": {
+ "bottle": "clang12",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "clang12",
+ "executable": "llvm-profdata"
+ },
+ "llvm-symbolizer": {
+ "bottle": "clang12",
+ "executable": "llvm-symbolizer"
+ },
+ "nm": {
+ "bottle": "clang12",
+ "executable": "llvm-nm"
+ },
+ "strip": {
+ "bottle": "clang12",
+ "executable": "llvm-strip"
+ },
+ "objcopy": {
+ "bottle": "clang12",
+ "executable": "llvm-objcopy"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "i686"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "target": {
+ "os": "WIN",
+ "arch": "i686"
+ },
+ "default": false
+ }
+ ],
+ "params": {
+ "type": "msvc",
+ "use_clang": true,
+ "match_root": "CLANG",
+ "werror_mode": "all",
+ "c_compiler": "$(CLANG)/bin/clang-cl",
+ "cxx_compiler": "$(CLANG)/bin/clang-cl",
+ "cxx_std": "c++latest",
+ "llvm-symbolizer": "$(CLANG)/bin/llvm-symbolizer",
+ "wine": "yes",
+ "version": "2019"
+ }
+ },
+ "clang12": {
+ "tools": {
+ "c++": {
+ "bottle": "clang12",
+ "executable": "c++"
+ },
+ "c++filt": {
+ "bottle": "clang12",
+ "executable": "c++filt"
+ },
+ "cc": {
+ "bottle": "clang12",
+ "executable": "cc"
+ },
+ "clang-rename": {
+ "bottle": "clang12",
+ "executable": "clang-rename"
+ },
+ "gcov": {
+ "bottle": "clang12",
+ "executable": "llvm-gcov"
+ },
+ "llvm-cov": {
+ "bottle": "clang12",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "clang12",
+ "executable": "llvm-profdata"
+ },
+ "llvm-symbolizer": {
+ "bottle": "clang12",
+ "executable": "llvm-symbolizer"
+ },
+ "nm": {
+ "bottle": "clang12",
+ "executable": "llvm-nm"
+ },
+ "strip": {
+ "bottle": "clang12",
+ "executable": "llvm-strip"
+ },
+ "objcopy": {
+ "bottle": "clang12",
+ "executable": "llvm-objcopy"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "power9le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "YOCTO",
+ "arch": "armv7a"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "power9le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "power9le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "armv7a_cortex_a9"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "armv7ahf_cortex_a35"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "armv7ahf_cortex_a53"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "armv8a_cortex_a35"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "armv8a_cortex_a53"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "target": {
+ "os": "LINUX",
+ "arch": "power9le"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "clang",
+ "match_root": "CLANG",
+ "werror_mode": "all",
+ "c_compiler": "$(CLANG)/bin/clang",
+ "cxx_compiler": "$(CLANG)/bin/clang++",
+ "llvm-symbolizer": "$(CLANG)/bin/llvm-symbolizer",
+ "objcopy": "$(CLANG)/bin/llvm-objcopy",
+ "simctl": "$(XCODE_TOOLS_ROOT-sbr:799017771)/Xcode/SystemRoot/PrivateFrameworks/CoreSimulator.framework/Resources/bin/simctl",
+ "profiles": "$(XCODE_TOOLS_ROOT-sbr:799017771)/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles",
+ "strip": "$(CLANG)/bin/llvm-strip",
+ "gcc_version": "12.0"
+ }
+ },
+ "local": {
+ "tools": {
+ "c++": {
+ "executable": "c++"
+ },
+ "cc": {
+ "executable": "cc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": false
+ }
+ ],
+ "params": {
+ "type": "xcode",
+ "local": true,
+ "werror_mode": "all",
+ "gcc_version": "13.1"
+ }
+ },
+ "xcode_11_1": {
+ "tools": {
+ "c++": {
+ "bottle": "xcode_11_1",
+ "executable": "c++"
+ },
+ "cc": {
+ "bottle": "xcode_11_1",
+ "executable": "cc"
+ },
+ "llvm-cov": {
+ "bottle": "xcode_11_1",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "xcode_11_1",
+ "executable": "llvm-profdata"
+ },
+ "nm": {
+ "bottle": "xcode_11_1",
+ "executable": "llvm-nm"
+ },
+ "strip": {
+ "bottle": "xcode_11_1",
+ "executable": "strip"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": false
+ }
+ ],
+ "params": {
+ "type": "xcode",
+ "match_root": "CLANG",
+ "werror_mode": "all",
+ "c_compiler": "$(CLANG)/usr/bin/clang",
+ "cxx_compiler": "$(CLANG)/usr/bin/clang++",
+ "ar": "$(CLANG)/usr/bin/libtool",
+ "inplace_tools": true,
+ "gcc_version": "8.0",
+ "dwarf_tool": {
+ "DARWIN": "$(CLANG)/usr/bin/dsymutil -flat"
+ }
+ }
+ },
+ "xcode_12_1": {
+ "tools": {
+ "c++": {
+ "bottle": "xcode_12_1",
+ "executable": "c++"
+ },
+ "cc": {
+ "bottle": "xcode_12_1",
+ "executable": "cc"
+ },
+ "llvm-cov": {
+ "bottle": "xcode_12_1",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "xcode_12_1",
+ "executable": "llvm-profdata"
+ },
+ "nm": {
+ "bottle": "xcode_12_1",
+ "executable": "llvm-nm"
+ },
+ "strip": {
+ "bottle": "xcode_12_1",
+ "executable": "strip"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": false
+ }
+ ],
+ "params": {
+ "type": "xcode",
+ "match_root": "CLANG",
+ "werror_mode": "all",
+ "c_compiler": "$(CLANG)/usr/bin/clang",
+ "cxx_compiler": "$(CLANG)/usr/bin/clang++",
+ "cxx_std": "c++17",
+ "ar": "$(CLANG)/usr/bin/libtool",
+ "inplace_tools": true,
+ "gcc_version": "8.0",
+ "dwarf_tool": {
+ "DARWIN": "$(CLANG)/usr/bin/dsymutil -flat"
+ }
+ }
+ },
+ "xcode_12_5": {
+ "tools": {
+ "c++": {
+ "bottle": "xcode_12_5",
+ "executable": "c++"
+ },
+ "cc": {
+ "bottle": "xcode_12_5",
+ "executable": "cc"
+ },
+ "llvm-cov": {
+ "bottle": "xcode_12_5",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "xcode_12_5",
+ "executable": "llvm-profdata"
+ },
+ "nm": {
+ "bottle": "xcode_12_5",
+ "executable": "llvm-nm"
+ },
+ "strip": {
+ "bottle": "xcode_12_5",
+ "executable": "strip"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "DARWIN",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "i386"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "x86_64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "armv7"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOS",
+ "arch": "arm64"
+ },
+ "default": false
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "IOSSIM",
+ "arch": "arm64"
+ },
+ "default": false
+ }
+ ],
+ "params": {
+ "type": "xcode",
+ "match_root": "CLANG",
+ "werror_mode": "all",
+ "c_compiler": "$(CLANG)/usr/bin/clang",
+ "cxx_compiler": "$(CLANG)/usr/bin/clang++",
+ "cxx_std": "c++17",
+ "ar": "$(CLANG)/usr/bin/libtool",
+ "inplace_tools": true,
+ "gcc_version": "8.0",
+ "dwarf_tool": {
+ "DARWIN": "$(CLANG)/usr/bin/dsymutil -flat"
+ }
+ }
+ },
+ "android-ndk-r23": {
+ "name": "clang12",
+ "tools": {
+ "cc": {
+ "bottle": "android-ndk-r23",
+ "executable": "cc"
+ },
+ "c++": {
+ "bottle": "android-ndk-r23",
+ "executable": "c++"
+ },
+ "gcov": {
+ "bottle": "android-ndk-r23",
+ "executable": "llvm-cov"
+ },
+ "strip": {
+ "bottle": "android-ndk-r23",
+ "executable": "strip"
+ },
+ "objcopy": {
+ "bottle": "android-ndk-r23",
+ "executable": "objcopy"
+ },
+ "nm": {
+ "bottle": "android-ndk-r23",
+ "executable": "nm"
+ },
+ "llvm-cov": {
+ "bottle": "android-ndk-r23",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "android-ndk-r23",
+ "executable": "llvm-profdata"
+ },
+ "llvm-symbolizer": {
+ "bottle": "android-ndk-r23",
+ "executable": "llvm-symbolizer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "i686"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a_neon"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv8a"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "i686"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "x86_64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a_neon"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv8a"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "clang",
+ "match_root": "NDK",
+ "ar": "$(NDK)/llvm-toolchain/bin/llvm-ar",
+ "c_compiler": "$(NDK)/llvm-toolchain/bin/clang",
+ "cxx_compiler": "$(NDK)/llvm-toolchain/bin/clang++",
+ "objcopy": "$(NDK)/llvm-toolchain/bin/llvm-objcopy",
+ "strip": "$(NDK)/llvm-toolchain/bin/llvm-strip",
+ "werror_mode": "all",
+ "gcc_version": "12.0",
+ "android_ndk_version": 23
+ }
+ },
+ "android-ndk-r24": {
+ "name": "clang13",
+ "tools": {
+ "cc": {
+ "bottle": "android-ndk-r24",
+ "executable": "cc"
+ },
+ "c++": {
+ "bottle": "android-ndk-r24",
+ "executable": "c++"
+ },
+ "gcov": {
+ "bottle": "android-ndk-r24",
+ "executable": "llvm-cov"
+ },
+ "strip": {
+ "bottle": "android-ndk-r24",
+ "executable": "strip"
+ },
+ "objcopy": {
+ "bottle": "android-ndk-r24",
+ "executable": "objcopy"
+ },
+ "nm": {
+ "bottle": "android-ndk-r24",
+ "executable": "nm"
+ },
+ "llvm-cov": {
+ "bottle": "android-ndk-r24",
+ "executable": "llvm-cov"
+ },
+ "llvm-profdata": {
+ "bottle": "android-ndk-r24",
+ "executable": "llvm-profdata"
+ },
+ "llvm-symbolizer": {
+ "bottle": "android-ndk-r24",
+ "executable": "llvm-symbolizer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "i686"
+ }
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "x86_64"
+ }
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a"
+ }
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a_neon"
+ }
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv8a"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "i686"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "x86_64"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv7a_neon"
+ }
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "target": {
+ "os": "ANDROID",
+ "arch": "armv8a"
+ }
+ }
+ ],
+ "params": {
+ "type": "clang",
+ "match_root": "NDK",
+ "ar": "$(NDK)/llvm-toolchain/bin/llvm-ar",
+ "c_compiler": "$(NDK)/llvm-toolchain/bin/clang",
+ "cxx_compiler": "$(NDK)/llvm-toolchain/bin/clang++",
+ "objcopy": "$(NDK)/llvm-toolchain/bin/llvm-objcopy",
+ "strip": "$(NDK)/llvm-toolchain/bin/llvm-strip",
+ "werror_mode": "all",
+ "gcc_version": "13.0",
+ "android_ndk_version": 24
+ }
+ },
+ "bloat": {
+ "tools": {
+ "bloat": {
+ "bottle": "bloat",
+ "executable": "bloat"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "pprof": {
+ "tools": {
+ "pprof": {
+ "bottle": "pprof",
+ "executable": "pprof"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ytexec": {
+ "tools": {
+ "ytexec": {
+ "bottle": "ytexec",
+ "executable": "ytexec"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "gdb": {
+ "tools": {
+ "gdb": {
+ "bottle": "gdb",
+ "executable": "gdb"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ }
+ ],
+ "env": {
+ "TERMINFO": [
+ "$(ROOT)/gdb/lib/terminfo"
+ ]
+ }
+ },
+ "gdbserver": {
+ "tools": {
+ "gdbserver": {
+ "bottle": "gdb",
+ "executable": "gdbserver"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ }
+ ]
+ },
+ "python": {
+ "tools": {
+ "python": {
+ "bottle": "python",
+ "executable": "python"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "aarch64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX",
+ "arch": "ppc64le"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ipython": {
+ "tools": {
+ "ipython": {
+ "bottle": "ptipython",
+ "executable": "ptipython"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ptpython": {
+ "tools": {
+ "ptpython": {
+ "bottle": "ptpython",
+ "executable": "ptpython"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "wine": {
+ "tools": {
+ "wine": {
+ "bottle": "wine",
+ "executable": "wine"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "wine32": {
+ "tools": {
+ "wine32": {
+ "bottle": "wine32",
+ "executable": "wine"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "deploy": {
+ "tools": {
+ "deploy": {
+ "bottle": "deploy",
+ "executable": "deploy"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yt": {
+ "tools": {
+ "yt": {
+ "bottle": "yt",
+ "executable": "yt"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yndexer": {
+ "tools": {
+ "yndexer": {
+ "bottle": "yndexer",
+ "executable": "yndexer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ytyndexer": {
+ "tools": {
+ "ytyndexer": {
+ "bottle": "ytyndexer",
+ "executable": "ytyndexer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ymakeyndexer": {
+ "tools": {
+ "ymakeyndexer": {
+ "bottle": "ymakeyndexer",
+ "executable": "ymakeyndexer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "transfer-manager": {
+ "tools": {
+ "transfer-manager": {
+ "bottle": "transfer-manager",
+ "executable": "transfer-manager"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "rem-tool": {
+ "tools": {
+ "rem-tool": {
+ "bottle": "rem-tool",
+ "executable": "rem-tool"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "uc": {
+ "tools": {
+ "uc": {
+ "bottle": "uc",
+ "executable": "uc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "perf": {
+ "tools": {
+ "perf": {
+ "bottle": "perf",
+ "executable": "perf"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cuda-check": {
+ "tools": {
+ "cuda-check": {
+ "bottle": "cuda-check",
+ "executable": "cuda-check"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "sre": {
+ "tools": {
+ "sre": {
+ "bottle": "sre",
+ "executable": "sre"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "samogonctl": {
+ "tools": {
+ "samogonctl": {
+ "bottle": "samogonctl",
+ "executable": "samogonctl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jdk": {
+ "tools": {
+ "javac": {
+ "bottle": "jdk",
+ "executable": "javac"
+ },
+ "java": {
+ "bottle": "jdk",
+ "executable": "java"
+ },
+ "jar": {
+ "bottle": "jdk",
+ "executable": "jar"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jdk10": {
+ "tools": {
+ "javac10": {
+ "bottle": "jdk10",
+ "executable": "javac10"
+ },
+ "java10": {
+ "bottle": "jdk10",
+ "executable": "java10"
+ },
+ "jar10": {
+ "bottle": "jdk10",
+ "executable": "jar10"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jdk11": {
+ "tools": {
+ "javac11": {
+ "bottle": "jdk11",
+ "executable": "javac11"
+ },
+ "java11": {
+ "bottle": "jdk11",
+ "executable": "java11"
+ },
+ "jar11": {
+ "bottle": "jdk11",
+ "executable": "jar11"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jdk15": {
+ "tools": {
+ "javac15": {
+ "bottle": "jdk15",
+ "executable": "javac15"
+ },
+ "java15": {
+ "bottle": "jdk15",
+ "executable": "java15"
+ },
+ "jar15": {
+ "bottle": "jdk15",
+ "executable": "jar15"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jdk17": {
+ "tools": {
+ "jar17": {
+ "bottle": "jdk17",
+ "executable": "jar"
+ },
+ "java17": {
+ "bottle": "jdk17",
+ "executable": "java"
+ },
+ "javac17": {
+ "bottle": "jdk17",
+ "executable": "javac"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "svn110": {
+ "tools": {
+ "svn": {
+ "bottle": "svn110",
+ "executable": "svn"
+ },
+ "svnadmin": {
+ "bottle": "svn110",
+ "executable": "svnadmin"
+ },
+ "svnlook": {
+ "bottle": "svn110",
+ "executable": "svnlook"
+ },
+ "svnversion": {
+ "bottle": "svn110",
+ "executable": "svnversion"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "default": true
+ }
+ }
+ ]
+ },
+ "zipatcher": {
+ "tools": {
+ "zipatcher": {
+ "bottle": "zipatcher",
+ "executable": "zipatcher"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "darwin"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cmake": {
+ "tools": {
+ "cmake": {
+ "bottle": "cmake",
+ "executable": "cmake"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cling": {
+ "tools": {
+ "cling": {
+ "bottle": "cling",
+ "executable": "cling"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ninja": {
+ "tools": {
+ "ninja": {
+ "bottle": "ninja",
+ "executable": "ninja"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "valgrind": {
+ "tools": {
+ "valgrind": {
+ "bottle": "valgrind",
+ "executable": "valgrind"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ag": {
+ "tools": {
+ "ag": {
+ "bottle": "ag",
+ "executable": "ag"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yf": {
+ "tools": {
+ "yf": {
+ "bottle": "yf",
+ "executable": "yf"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "rtmr-deploy": {
+ "tools": {
+ "rtmr-deploy": {
+ "bottle": "rtmr-deploy",
+ "executable": "rtmr-deploy"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yp-util": {
+ "tools": {
+ "yp-util": {
+ "bottle": "yp-util",
+ "executable": "yp-util"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yp": {
+ "tools": {
+ "yp": {
+ "bottle": "yp",
+ "executable": "yp"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yd-migrate": {
+ "tools": {
+ "yd-migrate": {
+ "bottle": "yd-migrate",
+ "executable": "yd-migrate"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "dctl": {
+ "tools": {
+ "dctl": {
+ "bottle": "dctl",
+ "executable": "dctl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jq": {
+ "tools": {
+ "jq": {
+ "bottle": "jq",
+ "executable": "jq"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "vim": {
+ "tools": {
+ "vim": {
+ "bottle": "vim",
+ "executable": "vim"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "nvim": {
+ "tools": {
+ "nvim": {
+ "bottle": "nvim",
+ "executable": "nvim"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "emacs": {
+ "tools": {
+ "emacs": {
+ "bottle": "emacs",
+ "executable": "emacs"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "tmux": {
+ "tools": {
+ "tmux": {
+ "bottle": "tmux",
+ "executable": "tmux"
+ }
+ },
+ "env": {
+ "TERMINFO": [
+ "$(ROOT)/share/terminfo"
+ ]
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "rsync": {
+ "tools": {
+ "rsync": {
+ "bottle": "rsync",
+ "executable": "rsync"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "kiwi": {
+ "tools": {
+ "kwmktorrent": {
+ "bottle": "kwmktorrent",
+ "executable": "kwmktorrent"
+ },
+ "kwmqbuild": {
+ "bottle": "kwmqbuild",
+ "executable": "kwmqbuild"
+ },
+ "kwfeed": {
+ "bottle": "kwfeed",
+ "executable": "kwfeed"
+ },
+ "metaquery.sh": {
+ "bottle": "kwfeed",
+ "executable": "metaquery.sh"
+ },
+ "protobin_diff": {
+ "bottle": "protobin_diff",
+ "executable": "protobin_diff"
+ },
+ "multipb_convert": {
+ "bottle": "multipb_convert",
+ "executable": "multipb_convert"
+ },
+ "kwworm": {
+ "bottle": "kwworm",
+ "executable": "kwworm"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "optrace": {
+ "tools": {
+ "optrace": {
+ "bottle": "optrace",
+ "executable": "optrace"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "node-search": {
+ "tools": {
+ "node-search": {
+ "bottle": "node-search",
+ "executable": "node-search"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "gpt": {
+ "tools": {
+ "gpt_perf": {
+ "bottle": "gpt"
+ },
+ "gpt_heap": {
+ "bottle": "gpt"
+ }
+ },
+ "params": {
+ "gpt_perf": {
+ "LD_PRELOAD": [
+ "$(GPT_PERF)/gpt/lib/libprofiler.so"
+ ],
+ "HEAPCHECK": [
+ "normal"
+ ],
+ "PPROF_PATH": [
+ "$(GPT_PERF)/gpt/bin/pprof"
+ ]
+ },
+ "gpt_heap": {
+ "LD_PRELOAD": [
+ "$(GPT_HEAP)/gpt/lib/libtcmalloc.so"
+ ],
+ "PPROF_PATH": [
+ "$(GPT_HEAP)/gpt/bin/pprof"
+ ]
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ant": {
+ "tools": {
+ "ant": {
+ "bottle": "ant",
+ "executable": "ant"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "mvn": {
+ "tools": {
+ "mvn": {
+ "bottle": "maven",
+ "executable": "mvn"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "fast_diff": {
+ "tools": {
+ "fast_diff": {
+ "bottle": "fast_diff",
+ "executable": "fast_diff"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cuda": {
+ "tools": {
+ "cuda": {
+ "bottle": "cuda"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "idea_run_plugin": {
+ "tools": {
+ "idea_run_plugin": {
+ "bottle": "idea_run_plugin"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "idea_style_config": {
+ "tools": {
+ "idea_style_config": {
+ "bottle": "idea_style_config"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "error_prone": {
+ "tools": {
+ "error_prone": {
+ "bottle": "error_prone"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jstyle_runner": {
+ "tools": {
+ "jstyle_runner": {
+ "bottle": "jstyle_runner"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "sonar_scanner": {
+ "tools": {
+ "sonar_scanner": {
+ "bottle": "sonar_scanner"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "gcovr": {
+ "tools": {
+ "gcovr": {
+ "bottle": "gcovr",
+ "executable": "gcovr"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "lcov_cobertura": {
+ "tools": {
+ "lcov_cobertura": {
+ "bottle": "lcov_cobertura",
+ "executable": "lcov_cobertura"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "uber_jar": {
+ "tools": {
+ "uber_jar": {
+ "bottle": "uber_jar"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "uber_jar10": {
+ "tools": {
+ "uber_jar10": {
+ "bottle": "uber_jar10"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "kythe": {
+ "tools": {
+ "kythe": {
+ "bottle": "kythe"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "kythe_to_proto": {
+ "tools": {
+ "kythe_to_proto": {
+ "bottle": "kythe_to_proto"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "scriptgen": {
+ "tools": {
+ "scriptgen": {
+ "bottle": "scriptgen"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "kiwi_protos": {
+ "tools": {
+ "kiwi_protos": {
+ "bottle": "kiwi_protos"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "allure_commandline": {
+ "tools": {
+ "allure": {
+ "bottle": "allure_commandline",
+ "executable": "allure"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ctags": {
+ "tools": {
+ "ctags": {
+ "bottle": "ctags",
+ "executable": "ctags"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "you_complete_me": {
+ "tools": {
+ "you_complete_me": {
+ "bottle": "you_complete_me"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "rtags": {
+ "tools": {
+ "rtags": {
+ "bottle": "rtags"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "afl-fuzz": {
+ "tools": {
+ "afl-fuzz": {
+ "bottle": "afl-fuzz",
+ "executable": "afl-fuzz"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "horadric": {
+ "tools": {
+ "horadric": {
+ "bottle": "horadric",
+ "executable": "horadric"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "logbroker": {
+ "tools": {
+ "logbroker": {
+ "bottle": "logbroker",
+ "executable": "logbroker"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "zcli": {
+ "tools": {
+ "zcli": {
+ "bottle": "zcli",
+ "executable": "zcli"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "python3": {
+ "tools": {
+ "python3": {
+ "bottle": "python3",
+ "executable": "python3"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "run_python_udf": {
+ "tools": {
+ "run_python_udf": {
+ "bottle": "run_python_udf",
+ "executable": "run_python_udf"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "graphs_difference": {
+ "tools": {
+ "graphs_difference": {
+ "bottle": "graphs_difference",
+ "executable": "graphs_difference"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "contexts_difference": {
+ "tools": {
+ "contexts_difference": {
+ "bottle": "contexts_difference",
+ "executable": "contexts_difference"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ycmerge": {
+ "tools": {
+ "ycmerge": {
+ "bottle": "ycmerge",
+ "executable": "ycmerge"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ygdiff": {
+ "tools": {
+ "ygdiff": {
+ "bottle": "ygdiff",
+ "executable": "ygdiff"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ya-tc": {
+ "tools": {
+ "ya-tc": {
+ "bottle": "ya-tc",
+ "executable": "ya-tc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "crypta": {
+ "tools": {
+ "crypta": {
+ "bottle": "crypta",
+ "executable": "crypta"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "apphost": {
+ "tools": {
+ "apphost": {
+ "bottle": "apphost",
+ "executable": "app_host_launcher"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "renderer": {
+ "tools": {
+ "renderer": {
+ "bottle": "renderer",
+ "executable": "renderer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "appteka": {
+ "tools": {
+ "appteka": {
+ "bottle": "appteka",
+ "executable": "appteka"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "news": {
+ "tools": {
+ "news": {
+ "bottle": "news",
+ "executable": "news_launcher"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "golang_1_17_6": {
+ "tools": {
+ "golang": {
+ "bottle": "golang_1.17.6",
+ "executable": "golang"
+ },
+ "go": {
+ "bottle": "golang_1.17.6",
+ "executable": "go"
+ },
+ "gofmt": {
+ "bottle": "golang_1.17.6",
+ "executable": "gofmt"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "golang",
+ "version": "1.17.6"
+ }
+ },
+ "golang_1_18beta2": {
+ "tools": {
+ "golang_1.18beta2": {
+ "bottle": "golang_1.18beta2",
+ "executable": "golang_1.18beta2"
+ },
+ "go_1.18beta2": {
+ "bottle": "golang_1.18beta2",
+ "executable": "go_1.18beta2"
+ },
+ "gofmt_1.18beta2": {
+ "bottle": "golang_1.18beta2",
+ "executable": "gofmt_1.18beta2"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "golang",
+ "version": "1.18beta2"
+ }
+ },
+ "godoc": {
+ "tools": {
+ "godoc": {
+ "bottle": "godoc",
+ "executable": "godoc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "qemu": {
+ "tools": {
+ "qemu": {
+ "bottle": "qemu",
+ "executable": "qemu"
+ },
+ "qemu-i386": {
+ "bottle": "qemu",
+ "executable": "qemu-i386"
+ },
+ "qemu-img": {
+ "bottle": "qemu",
+ "executable": "qemu-img"
+ },
+ "qemu-nbd": {
+ "bottle": "qemu",
+ "executable": "qemu-nbd"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "qyp": {
+ "tools": {
+ "qyp": {
+ "bottle": "qyp",
+ "executable": "vmctl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "rtcdiag": {
+ "tools": {
+ "rtcdiag": {
+ "bottle": "rtcdiag",
+ "executable": "rtcdiag"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "fio": {
+ "tools": {
+ "fio": {
+ "bottle": "fio",
+ "executable": "fio"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "amduprof": {
+ "tools": {
+ "amduprof-cli": {
+ "bottle": "amduprof",
+ "executable": "amduprof-cli"
+ },
+ "amduprof-pcm": {
+ "bottle": "amduprof",
+ "executable": "amduprof-pcm"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "foremost": {
+ "tools": {
+ "foremost": {
+ "bottle": "foremost",
+ "executable": "foremost"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "atop": {
+ "tools": {
+ "atop": {
+ "bottle": "atop",
+ "executable": "atop"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bpftool": {
+ "tools": {
+ "bpftool": {
+ "bottle": "bpftool",
+ "executable": "bpftool"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "bpftrace": {
+ "tools": {
+ "bpftrace": {
+ "bottle": "sre",
+ "executable": "bpftrace"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "strace": {
+ "tools": {
+ "strace": {
+ "bottle": "strace",
+ "executable": "strace"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "stress-ng": {
+ "tools": {
+ "stress-ng": {
+ "bottle": "stress-ng",
+ "executable": "stress-ng"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "iperf": {
+ "tools": {
+ "iperf": {
+ "bottle": "iperf",
+ "executable": "iperf"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "lkvm": {
+ "tools": {
+ "lkvm": {
+ "bottle": "kvmtool",
+ "executable": "lkvm"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "coronerctl": {
+ "tools": {
+ "coronerctl": {
+ "bottle": "coronerctl",
+ "executable": "coronerctl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "lz4": {
+ "tools": {
+ "lz4": {
+ "bottle": "lz4",
+ "executable": "lz4"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "intel-cmt-cat": {
+ "tools": {
+ "pqos": {
+ "bottle": "intel-cmt-cat",
+ "executable": "pqos"
+ },
+ "rdtset": {
+ "bottle": "intel-cmt-cat",
+ "executable": "rdtset"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "blktrace": {
+ "tools": {
+ "blkparse": {
+ "bottle": "blktrace",
+ "executable": "blkparse"
+ },
+ "iowatcher": {
+ "bottle": "blktrace",
+ "executable": "iowatcher"
+ },
+ "blktrace": {
+ "bottle": "blktrace",
+ "executable": "blktrace"
+ },
+ "blkiomon": {
+ "bottle": "blktrace",
+ "executable": "blkiomon"
+ },
+ "btt": {
+ "bottle": "blktrace",
+ "executable": "btt"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "vmexec": {
+ "tools": {
+ "vmexec": {
+ "bottle": "vmexec",
+ "executable": "vmexec"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "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": {
+ "bottle": "aws",
+ "executable": "aws"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "sedem": {
+ "tools": {
+ "sedem": {
+ "bottle": "sedem",
+ "executable": "sedem"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "jstyle_bundle": {
+ "tools": {
+ "jstyle": {
+ "bottle": "jstyle_bundle",
+ "executable": "jstyle"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ktlint_bundle": {
+ "tools": {
+ "ktlint": {
+ "bottle": "ktlint_bundle",
+ "executable": "ktlint"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "devtools_license_analyzer_bundle": {
+ "tools": {
+ "license_analyzer": {
+ "bottle": "devtools_license_analyzer_bundle",
+ "executable": "license_analyzer"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "ya_sed": {
+ "tools": {
+ "ya_sed": {
+ "bottle": "ya_sed",
+ "executable": "ya_sed"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "black": {
+ "tools": {
+ "black": {
+ "bottle": "black",
+ "executable": "black"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN",
+ "arch": "arm64"
+ },
+ "default": true
+ }
+ ]
+ },
+ "yadi": {
+ "tools": {
+ "yadi": {
+ "bottle": "yadi",
+ "executable": "yadi-arc"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "grpc_cli": {
+ "tools": {
+ "grpc_cli": {
+ "bottle": "grpc_cli",
+ "executable": "grpc_cli"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "buf": {
+ "tools": {
+ "buf": {
+ "bottle": "buf",
+ "executable": "buf"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ }
+ ]
+ },
+ "iceflame": {
+ "tools": {
+ "iceflame": {
+ "bottle": "iceflame",
+ "executable": "iceflame"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "cs": {
+ "tools": {
+ "cs": {
+ "bottle": "cs",
+ "executable": "cs"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "wall-e": {
+ "tools": {
+ "wall-e": {
+ "bottle": "wall-e",
+ "executable": "wall-e"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "skotty": {
+ "tools": {
+ "skotty": {
+ "bottle": "skotty",
+ "executable": "launcher"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "WIN"
+ },
+ "default": true
+ }
+ ]
+ },
+ "gcc102-arm-none-eabi": {
+ "tools": {
+ "cc": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "cc"
+ },
+ "c++": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "c++"
+ },
+ "gcov": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "gcov"
+ },
+ "c++filt": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "c++filt"
+ },
+ "nm": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "nm"
+ },
+ "strip": {
+ "bottle": "gcc102-arm-none-eabi",
+ "executable": "strip"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "target": {
+ "os": "NONE",
+ "arch": "armv8m_cortex_m33"
+ },
+ "default": true
+ }
+ ],
+ "params": {
+ "type": "gnu",
+ "match_root": "GCC",
+ "werror_mode": "compiler_specific",
+ "c_compiler": "$(GCC)/bin/arm-none-eabi-gcc",
+ "cxx_compiler": "$(GCC)/bin/arm-none-eabi-g++",
+ "ar": "$(GCC)/bin/arm-none-eabi-ar",
+ "objcopy": "$(GCC)/bin/arm-none-eabi-objcopy",
+ "gcc_version": "10.2.1"
+ }
+ },
+ "eductl": {
+ "tools": {
+ "eductl": {
+ "bottle": "eductl",
+ "executable": "eductl"
+ }
+ },
+ "platforms": [
+ {
+ "host": {
+ "os": "LINUX"
+ },
+ "default": true
+ },
+ {
+ "host": {
+ "os": "DARWIN"
+ },
+ "default": true
+ }
+ ]
+ }
+ },
+ "bottles": {
+ "msvc2019": {
+ "formula": {
+ "sandbox_id": 887495315,
+ "match": "Microsoft Visual C++"
+ },
+ "executable": {
+ "msvc": [
+ "bin",
+ "Hostx64",
+ "x64",
+ "cl.exe"
+ ]
+ }
+ },
+ "ymake": {
+ "formula": {
+ "sandbox_id": [1206141440],
+ "match": "ymake"
+ },
+ "executable": {
+ "ymake": [
+ "ymake"
+ ]
+ }
+ },
+ "clang-format": {
+ "formula": {
+ "sandbox_id": [
+ 1042773541
+ ],
+ "match": "clang-format"
+ },
+ "executable": {
+ "clang-format": [
+ "clang-format"
+ ]
+ }
+ },
+ "clang-tidy": {
+ "formula": {
+ "sandbox_id": [
+ 1073581733,
+ 1073610805,
+ 1073627148
+ ],
+ "match": "CLANG_TIDY"
+ },
+ "executable": {
+ "clang-tidy": [
+ "bin",
+ "clang-tidy"
+ ],
+ "clang-apply-replacements": [
+ "bin",
+ "clang-apply-replacements"
+ ]
+ }
+ },
+ "maven_import_sandbox_uploader": {
+ "formula": {
+ "sandbox_id": 1031028343,
+ "match": "uploader"
+ },
+ "executable": {
+ "maven_import_sandbox_uploader": [
+ "uploader"
+ ]
+ }
+ },
+ "arc": {
+ "formula": {
+ "sandbox_id": [
+ 1205199935
+ ],
+ "match": "arc"
+ },
+ "executable": {
+ "arc": [
+ "arc"
+ ]
+ }
+ },
+ "godoc": {
+ "formula": {
+ "sandbox_id": 511821444,
+ "match": "godoc"
+ },
+ "executable": {
+ "godoc": [
+ "godoc"
+ ]
+ }
+ },
+ "yo": {
+ "formula": {
+ "sandbox_id": 1183539336,
+ "match": "yo"
+ },
+ "executable": {
+ "yo": [
+ "yo"
+ ]
+ }
+ },
+ "mockgen": {
+ "formula": {
+ "sandbox_id": [
+ 742810450,
+ 742810460,
+ 742810456
+ ],
+ "match": "mockgen"
+ },
+ "executable": {
+ "mockgen": [
+ "mockgen"
+ ]
+ }
+ },
+ "swagger": {
+ "formula": {
+ "sandbox_id": [
+ 1002355733
+ ],
+ "match": "swagger"
+ },
+ "executable": {
+ "swagger": [
+ "swagger"
+ ]
+ }
+ },
+ "delve": {
+ "formula": {
+ "sandbox_id": [
+ 1192022937
+ ],
+ "match": "delve"
+ },
+ "executable": {
+ "dlv": [
+ "dlv"
+ ]
+ }
+ },
+ "cue": {
+ "formula": {
+ "sandbox_id": [
+ 631593996,
+ 631593924
+ ],
+ "match": "cue"
+ },
+ "executable": {
+ "cue": [
+ "cue"
+ ]
+ }
+ },
+ "yoimports": {
+ "formula": {
+ "sandbox_id": 1113620552,
+ "match": "yoimports"
+ },
+ "executable": {
+ "yoimports": [
+ "yoimports"
+ ]
+ }
+ },
+ "releaser": {
+ "formula": {
+ "sandbox_id": [
+ 1026890210
+ ],
+ "match": "releaser"
+ },
+ "executable": {
+ "releaser": [
+ "releaser"
+ ]
+ }
+ },
+ "tvmknife": {
+ "formula": {
+ "sandbox_id": 1162775119,
+ "match": "tvmknife"
+ },
+ "executable": {
+ "tvmknife": [
+ "tvmknife"
+ ]
+ }
+ },
+ "sandboxctl": {
+ "formula": {
+ "sandbox_id": [
+ 832226067
+ ],
+ "match": "tools/sandboxctl/bin/sandboxctl"
+ },
+ "executable": {
+ "sandboxctl": [
+ "sandboxctl"
+ ]
+ }
+ },
+ "python": {
+ "formula": {
+ "sandbox_id": 981577320,
+ "match": "Python"
+ },
+ "executable": {
+ "python": [
+ "python"
+ ]
+ }
+ },
+ "bloat": {
+ "formula": {
+ "sandbox_id": [
+ 801218211
+ ],
+ "match": "Bloat"
+ },
+ "executable": {
+ "bloat": [
+ "bloat"
+ ]
+ }
+ },
+ "jdk": {
+ "formula": {
+ "sandbox_id": [
+ 854293674,
+ 854378931,
+ 854302209,
+ 1054292521
+ ],
+ "match": "jdk"
+ },
+ "executable": {
+ "javac": [
+ "bin",
+ "javac"
+ ],
+ "java": [
+ "bin",
+ "java"
+ ],
+ "jar": [
+ "bin",
+ "jar"
+ ]
+ }
+ },
+ "jdk10": {
+ "formula": {
+ "sandbox_id": [
+ 240834225,
+ 240834934,
+ 240835020
+ ],
+ "match": "jdk"
+ },
+ "executable": {
+ "javac10": [
+ "bin",
+ "javac"
+ ],
+ "java10": [
+ "bin",
+ "java"
+ ],
+ "jar10": [
+ "bin",
+ "jar"
+ ]
+ }
+ },
+ "jdk11": {
+ "formula": {
+ "sandbox_id": [
+ 365362175,
+ 365387897,
+ 365361227
+ ],
+ "match": "jdk"
+ },
+ "executable": {
+ "javac11": [
+ "bin",
+ "javac"
+ ],
+ "java11": [
+ "bin",
+ "java"
+ ],
+ "jar11": [
+ "bin",
+ "jar"
+ ]
+ }
+ },
+ "jdk15": {
+ "formula": {
+ "sandbox_id": [
+ 823158461,
+ 823183568,
+ 823899886
+ ],
+ "match": "openjdk"
+ },
+ "executable": {
+ "javac15": [
+ "bin",
+ "javac"
+ ],
+ "java15": [
+ "bin",
+ "java"
+ ],
+ "jar15": [
+ "bin",
+ "jar"
+ ]
+ }
+ },
+ "jdk17": {
+ "formula": {
+ "sandbox_id": [
+ 1086829307,
+ 1086824941,
+ 1086822428,
+ 1086827917
+ ],
+ "match": "openjdk"
+ },
+ "executable": {
+ "jar": [
+ "bin",
+ "jar"
+ ],
+ "java": [
+ "bin",
+ "java"
+ ],
+ "javac": [
+ "bin",
+ "javac"
+ ]
+ }
+ },
+ "clang12": {
+ "formula": {
+ "sandbox_id": [
+ 1042818759,
+ 1042820568,
+ 1042823154,
+ 1042827120,
+ 1042828064
+ ],
+ "match": "CLANG"
+ },
+ "executable": {
+ "c++": [
+ "bin",
+ "clang++"
+ ],
+ "c++filt": [
+ "bin",
+ "llvm-cxxfilt"
+ ],
+ "cc": [
+ "bin",
+ "clang"
+ ],
+ "clang-rename": [
+ "bin",
+ "clang-rename"
+ ],
+ "llvm-gcov": [
+ "bin",
+ "llvm-gcov"
+ ],
+ "llvm-cov": [
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-symbolizer": [
+ "bin",
+ "llvm-symbolizer"
+ ],
+ "llvm-nm": [
+ "bin",
+ "llvm-nm"
+ ],
+ "llvm-strip": [
+ "bin",
+ "llvm-strip"
+ ],
+ "llvm-objcopy": [
+ "bin",
+ "llvm-objcopy"
+ ]
+ }
+ },
+ "xcode_11_1": {
+ "formula": {
+ "sandbox_id": [
+ 542909976
+ ],
+ "match": "toolchain"
+ },
+ "executable": {
+ "c++": [
+ "usr",
+ "bin",
+ "clang++"
+ ],
+ "cc": [
+ "usr",
+ "bin",
+ "clang"
+ ],
+ "llvm-cov": [
+ "usr",
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "usr",
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-nm": [
+ "usr",
+ "bin",
+ "llvm-nm"
+ ],
+ "strip": [
+ "usr",
+ "bin",
+ "strip"
+ ]
+ }
+ },
+ "xcode_12_1": {
+ "formula": {
+ "sandbox_id": [
+ 816448826
+ ],
+ "match": "toolchain"
+ },
+ "executable": {
+ "c++": [
+ "usr",
+ "bin",
+ "clang++"
+ ],
+ "cc": [
+ "usr",
+ "bin",
+ "clang"
+ ],
+ "llvm-cov": [
+ "usr",
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "usr",
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-nm": [
+ "usr",
+ "bin",
+ "llvm-nm"
+ ],
+ "strip": [
+ "usr",
+ "bin",
+ "strip"
+ ]
+ }
+ },
+ "xcode_12_5": {
+ "formula": {
+ "sandbox_id": [
+ 1047943010
+ ],
+ "match": "toolchain"
+ },
+ "executable": {
+ "c++": [
+ "usr",
+ "bin",
+ "clang++"
+ ],
+ "cc": [
+ "usr",
+ "bin",
+ "clang"
+ ],
+ "llvm-cov": [
+ "usr",
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "usr",
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-nm": [
+ "usr",
+ "bin",
+ "llvm-nm"
+ ],
+ "strip": [
+ "usr",
+ "bin",
+ "strip"
+ ]
+ }
+ },
+ "android-ndk-r23": {
+ "formula": {
+ "sandbox_id": [
+ 1125103574,
+ 1125105409
+ ],
+ "match": "NDK"
+ },
+ "executable": {
+ "c++": [
+ "llvm-toolchain",
+ "bin",
+ "clang++"
+ ],
+ "cc": [
+ "llvm-toolchain",
+ "bin",
+ "clang"
+ ],
+ "strip": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-strip"
+ ],
+ "c++filt": [
+ "llvm-toolchain",
+ "bin",
+ "i686-linux-android-c++filt"
+ ],
+ "llvm-cov": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-symbolizer": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-symbolizer"
+ ],
+ "nm": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-nm"
+ ],
+ "objcopy": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-objcopy"
+ ]
+ }
+ },
+ "android-ndk-r24": {
+ "formula": {
+ "sandbox_id": [
+ 1125138634,
+ 1125141078
+ ],
+ "match": "NDK"
+ },
+ "executable": {
+ "c++": [
+ "llvm-toolchain",
+ "bin",
+ "clang++"
+ ],
+ "cc": [
+ "llvm-toolchain",
+ "bin",
+ "clang"
+ ],
+ "strip": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-strip"
+ ],
+ "c++filt": [
+ "llvm-toolchain",
+ "bin",
+ "i686-linux-android-c++filt"
+ ],
+ "llvm-cov": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-cov"
+ ],
+ "llvm-profdata": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-profdata"
+ ],
+ "llvm-symbolizer": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-symbolizer"
+ ],
+ "nm": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-nm"
+ ],
+ "objcopy": [
+ "llvm-toolchain",
+ "bin",
+ "llvm-objcopy"
+ ]
+ }
+ },
+ "cuda": {
+ "formula": {
+ "sandbox_id": [
+ 29625981
+ ],
+ "match": "CUDA"
+ }
+ },
+ "idea_run_plugin": {
+ "formula": {
+ "sandbox_id": [
+ 98817148
+ ],
+ "match": "ya runner idea plugin"
+ }
+ },
+ "idea_style_config": {
+ "formula": {
+ "sandbox_id": [
+ 874273162
+ ],
+ "match": "Intellij IDEA codestyle config"
+ }
+ },
+ "error_prone": {
+ "formula": {
+ "sandbox_id": [
+ 273389189
+ ],
+ "match": "ERRORPRONE"
+ }
+ },
+ "jstyle_runner": {
+ "formula": {
+ "sandbox_id": [
+ 623847348
+ ],
+ "match": "JSTYLERUNNER"
+ }
+ },
+ "sonar_scanner": {
+ "formula": {
+ "sandbox_id": [
+ 142526229
+ ],
+ "match": "sonar_scanner"
+ }
+ },
+ "gcovr": {
+ "formula": {
+ "sandbox_id": [
+ 145238992
+ ],
+ "match": "gcovr"
+ },
+ "executable": {
+ "gcovr": [
+ "gcovr"
+ ]
+ }
+ },
+ "lcov_cobertura": {
+ "formula": {
+ "sandbox_id": [
+ 151814389
+ ],
+ "match": "lcov_cobertura"
+ },
+ "executable": {
+ "lcov_cobertura": [
+ "lcovcob"
+ ]
+ }
+ },
+ "uber_jar": {
+ "formula": {
+ "sandbox_id": [
+ 147123506
+ ],
+ "match": "uber_jar"
+ }
+ },
+ "uber_jar10": {
+ "formula": {
+ "sandbox_id": [
+ 260182938
+ ],
+ "match": "uber_jar10"
+ }
+ },
+ "kythe": {
+ "formula": {
+ "sandbox_id": [
+ 377918568
+ ],
+ "match": "KYTHE"
+ }
+ },
+ "kythe_to_proto": {
+ "formula": {
+ "sandbox_id": [
+ 403346294
+ ],
+ "match": "KYTHETOPROTO"
+ }
+ },
+ "scriptgen": {
+ "formula": {
+ "sandbox_id": [
+ 1164520637
+ ],
+ "match": "SCRIPTGEN"
+ }
+ },
+ "wine": {
+ "formula": {
+ "sandbox_id": 495594294,
+ "match": "Wine"
+ },
+ "executable": {
+ "wine": [
+ "bin",
+ "wine64"
+ ]
+ }
+ },
+ "wine32": {
+ "formula": {
+ "sandbox_id": 1010959442,
+ "match": "Wine"
+ },
+ "executable": {
+ "wine": [
+ "bin",
+ "wine"
+ ]
+ }
+ },
+ "deploy": {
+ "formula": {
+ "sandbox_id": 243231127,
+ "match": "DEPLOY"
+ },
+ "executable": {
+ "deploy": [
+ "samogon",
+ "deploy"
+ ]
+ }
+ },
+ "yt": {
+ "formula": {
+ "sandbox_id": [
+ 1195249182
+ ],
+ "match": "YT"
+ },
+ "executable": {
+ "yt": [
+ "yt"
+ ]
+ }
+ },
+ "yndexer": {
+ "formula": {
+ "sandbox_id": 992600186,
+ "match": "YNDEXER"
+ },
+ "executable": {
+ "yndexer": [
+ "yndexer"
+ ]
+ }
+ },
+ "ytyndexer": {
+ "formula": {
+ "sandbox_id": 1051903185,
+ "match": "YTYNDEXER"
+ },
+ "executable": {
+ "ytyndexer": [
+ "ytyndexer"
+ ]
+ }
+ },
+ "ymakeyndexer": {
+ "formula": {
+ "sandbox_id": 239256113,
+ "match": "YMAKEYNDEXER"
+ },
+ "executable": {
+ "ymakeyndexer": [
+ "ymakeyndexer"
+ ]
+ }
+ },
+ "transfer-manager": {
+ "formula": {
+ "sandbox_id": 135979123,
+ "match": "transfer-manager"
+ },
+ "executable": {
+ "transfer-manager": [
+ "transfer-manager"
+ ]
+ }
+ },
+ "rem-tool": {
+ "formula": {
+ "sandbox_id": 79265295,
+ "match": "rem-tool"
+ },
+ "executable": {
+ "rem-tool": [
+ "rem-tool"
+ ]
+ }
+ },
+ "uc": {
+ "formula": {
+ "sandbox_id": 505682252,
+ "match": "UC"
+ },
+ "executable": {
+ "uc": [
+ "uc"
+ ]
+ }
+ },
+ "perf": {
+ "formula": {
+ "sandbox_id": 1130176134,
+ "match": "infra/kernel/tools/perf/build/perf-static.tar.gz"
+ },
+ "executable": {
+ "perf": [
+ "perf"
+ ]
+ }
+ },
+ "cuda-check": {
+ "formula": {
+ "sandbox_id": "1128218000",
+ "match": "infra/rsm/nvgpumanager/tools/cuda-check/cuda-check"
+ },
+ "executable": {
+ "cuda-check": [
+ "cuda-check"
+ ]
+ }
+ },
+ "sre": {
+ "formula": {
+ "sandbox_id": "1156434675",
+ "match": "infra/rtc/sretools/sretools.tar.gz"
+ },
+ "executable": {
+ "sre": [
+ "sretool"
+ ],
+ "bpftrace": [
+ "tools",
+ "bpftrace"
+ ]
+ }
+ },
+ "samogonctl": {
+ "formula": {
+ "sandbox_id": 438053038,
+ "match": "SAMOGONCTL"
+ },
+ "executable": {
+ "samogonctl": [
+ "samogonctl"
+ ]
+ }
+ },
+ "gcc61": {
+ "formula": {
+ "sandbox_id": 63189766,
+ "match": "GCC"
+ },
+ "executable": {
+ "c++": [
+ "gcc",
+ "bin",
+ "g++-6.1"
+ ],
+ "cc": [
+ "gcc",
+ "bin",
+ "gcc-6.1"
+ ],
+ "gcov": [
+ "gcc",
+ "bin",
+ "gcov-6.1"
+ ],
+ "c++filt": [
+ "gcc",
+ "bin",
+ "c++filt"
+ ],
+ "nm": [
+ "gcc",
+ "bin",
+ "nm"
+ ],
+ "strip": [
+ "gcc",
+ "bin",
+ "strip"
+ ]
+ }
+ },
+ "gcc82": {
+ "formula": {
+ "sandbox_id": 288125345,
+ "match": "GCC"
+ },
+ "executable": {
+ "c++": [
+ "gcc",
+ "bin",
+ "g++"
+ ],
+ "cc": [
+ "gcc",
+ "bin",
+ "gcc"
+ ],
+ "gcov": [
+ "gcc",
+ "bin",
+ "gcov"
+ ],
+ "c++filt": [
+ "gcc",
+ "bin",
+ "c++filt"
+ ],
+ "nm": [
+ "gcc",
+ "bin",
+ "nm"
+ ],
+ "strip": [
+ "gcc",
+ "bin",
+ "strip"
+ ]
+ }
+ },
+ "gdb": {
+ "formula": {
+ "sandbox_id": [
+ 1037272933,
+ 1032891985,
+ 717207102,
+ 1032896450
+ ],
+ "match": "GDB"
+ },
+ "executable": {
+ "gdb": [
+ "gdb",
+ "bin",
+ "gdb"
+ ],
+ "gdbserver": [
+ "gdb",
+ "bin",
+ "gdbserver"
+ ]
+ }
+ },
+ "pprof": {
+ "formula": {
+ "sandbox_id": 1115456319,
+ "match": "pprof"
+ },
+ "executable": {
+ "pprof": [
+ "pprof"
+ ]
+ }
+ },
+ "ytexec": {
+ "formula": {
+ "sandbox_id": 1101655914,
+ "match": "ytexec"
+ },
+ "executable": {
+ "ytexec": [
+ "ytexec",
+ "ytexec"
+ ]
+ }
+ },
+ "ag": {
+ "formula": {
+ "sandbox_id": 75851513,
+ "match": "Ag"
+ },
+ "executable": {
+ "ag": [
+ "ag"
+ ]
+ }
+ },
+ "valgrind": {
+ "formula": {
+ "sandbox_id": 944969271,
+ "match": "Valgrind"
+ },
+ "executable": {
+ "valgrind": [
+ "valgrind"
+ ]
+ }
+ },
+ "jq": {
+ "formula": {
+ "sandbox_id": [
+ 38336932,
+ 38337150,
+ 38337983
+ ],
+ "match": "jq"
+ },
+ "executable": {
+ "jq": [
+ "jq"
+ ]
+ }
+ },
+ "yf": {
+ "formula": {
+ "sandbox_id": [
+ 1044416355
+ ],
+ "match": "yf-client"
+ },
+ "executable": "yf-client"
+ },
+ "rtmr-deploy": {
+ "formula": {
+ "sandbox_id": [
+ 986392295,
+ 986388505
+ ],
+ "match": "rtmr-deploy"
+ },
+ "executable": "rtmr-deploy"
+ },
+ "yp-util": {
+ "formula": {
+ "sandbox_id": [
+ 1204918529
+ ],
+ "match": "yp_util"
+ },
+ "executable": {
+ "yp-util": [
+ "yp_util"
+ ]
+ }
+ },
+ "yp": {
+ "formula": {
+ "sandbox_id": [
+ 1204919943
+ ],
+ "match": "YP"
+ },
+ "executable": {
+ "yp": [
+ "yp"
+ ]
+ }
+ },
+ "yd-migrate": {
+ "formula": {
+ "sandbox_id": [
+ 990283171
+ ],
+ "match": "yd_migrate"
+ },
+ "executable": {
+ "yd-migrate": [
+ "migrate"
+ ]
+ }
+ },
+ "dctl": {
+ "formula": {
+ "sandbox_id": [
+ 1198127186
+ ],
+ "match": "dctl"
+ },
+ "executable": {
+ "dctl": [
+ "dctl"
+ ]
+ }
+ },
+ "vim": {
+ "formula": {
+ "sandbox_id": 82345405,
+ "match": "vim"
+ },
+ "executable": {
+ "vim": [
+ "vim"
+ ]
+ }
+ },
+ "nvim": {
+ "formula": {
+ "sandbox_id": 123061100,
+ "match": "nvim"
+ },
+ "executable": {
+ "nvim": [
+ "nvim"
+ ]
+ }
+ },
+ "emacs": {
+ "formula": {
+ "sandbox_id": 84328012,
+ "match": "emacs"
+ },
+ "executable": {
+ "emacs": [
+ "emacs"
+ ]
+ }
+ },
+ "tmux": {
+ "formula": {
+ "sandbox_id": [
+ 1105659071
+ ],
+ "match": "tmux"
+ },
+ "executable": {
+ "tmux": [
+ "bin",
+ "tmux"
+ ]
+ }
+ },
+ "optrace": {
+ "formula": {
+ "sandbox_id": [
+ 894130496
+ ],
+ "match": "optrace"
+ },
+ "executable": {
+ "optrace": [
+ "optrace"
+ ]
+ }
+ },
+ "node-search": {
+ "formula": {
+ "sandbox_id": [
+ 1157378401
+ ],
+ "match": "node_search"
+ },
+ "executable": {
+ "node-search": [
+ "node_search"
+ ]
+ }
+ },
+ "rsync": {
+ "formula": {
+ "sandbox_id": [
+ 65088954
+ ],
+ "match": "rsync"
+ },
+ "executable": {
+ "rsync": [
+ "bin",
+ "rsync"
+ ]
+ }
+ },
+ "svn110": {
+ "formula": {
+ "sandbox_id": 368201676,
+ "match": "svn"
+ },
+ "executable": {
+ "svn": [
+ "svn"
+ ],
+ "svnadmin": [
+ "svnadmin"
+ ],
+ "svnlook": [
+ "svnlook"
+ ],
+ "svnversion": [
+ "svnversion"
+ ]
+ }
+ },
+ "zipatcher": {
+ "formula": {
+ "sandbox_id": 897674372,
+ "match": "zipatcher"
+ },
+ "executable": {
+ "zipatcher": [
+ "zipatcher"
+ ]
+ }
+ },
+ "cmake": {
+ "formula": {
+ "sandbox_id": 105454515,
+ "match": "cmake"
+ },
+ "executable": {
+ "cmake": [
+ "bin",
+ "cmake"
+ ]
+ }
+ },
+ "cling": {
+ "formula": {
+ "sandbox_id": 87671454,
+ "match": "cling"
+ },
+ "executable": {
+ "cling": [
+ "cling"
+ ]
+ }
+ },
+ "ninja": {
+ "formula": {
+ "sandbox_id": 19094385,
+ "match": "ninja"
+ },
+ "executable": "ninja"
+ },
+ "kwfeed": {
+ "formula": {
+ "sandbox_id": 36077631,
+ "match": "KWFeed"
+ },
+ "executable": {
+ "kwfeed": [
+ "kwfeed"
+ ],
+ "metaquery.sh": [
+ "metaquery.sh"
+ ]
+ }
+ },
+ "protobin_diff": {
+ "formula": {
+ "sandbox_id": 28621470,
+ "match": "protobin_diff"
+ },
+ "executable": {
+ "protobin_diff": [
+ "protobin_diff"
+ ]
+ }
+ },
+ "multipb_convert": {
+ "formula": {
+ "sandbox_id": 31061929,
+ "match": "Multipb_convert"
+ },
+ "executable": {
+ "multipb_convert": [
+ "multipb_convert"
+ ]
+ }
+ },
+ "kwworm": {
+ "formula": {
+ "sandbox_id": 18521490,
+ "match": "Kwworm"
+ },
+ "executable": {
+ "kwworm": [
+ "kwworm"
+ ]
+ }
+ },
+ "kwmktorrent": {
+ "formula": {
+ "sandbox_id": 451506451,
+ "match": "KWMKTorrent"
+ },
+ "executable": {
+ "kwmktorrent": [
+ "kwmktorrent"
+ ]
+ }
+ },
+ "kwmqbuild": {
+ "formula": {
+ "sandbox_id": 41067877,
+ "match": "KWMQBuild"
+ },
+ "executable": {
+ "kwmqbuild": [
+ "kwmqbuild"
+ ]
+ }
+ },
+ "gpt": {
+ "formula": {
+ "sandbox_id": 21836503,
+ "match": "GooglePerformanceTools"
+ }
+ },
+ "ant": {
+ "formula": {
+ "sandbox_id": 36996223,
+ "match": "ant"
+ },
+ "executable": {
+ "ant": [
+ "apache-ant-1.9.6",
+ "bin",
+ "ant"
+ ]
+ }
+ },
+ "maven": {
+ "formula": {
+ "sandbox_id": 39222824,
+ "match": "maven"
+ },
+ "executable": {
+ "mvn": [
+ "bin",
+ "mvn"
+ ]
+ }
+ },
+ "fast_diff": {
+ "formula": {
+ "sandbox_id": 42519064,
+ "match": "fast_diff"
+ }
+ },
+ "kiwi_protos": {
+ "formula": {
+ "sandbox_id": 32521995,
+ "match": "KiWi python protos"
+ }
+ },
+ "allure_commandline": {
+ "formula": {
+ "sandbox_id": 569859192,
+ "match": "Allure Commandline"
+ },
+ "executable": {
+ "allure": [
+ "bin",
+ "allure"
+ ]
+ }
+ },
+ "ctags": {
+ "formula": {
+ "sandbox_id": 55229519,
+ "match": "ctags"
+ },
+ "executable": {
+ "ctags": [
+ "bin",
+ "ctags"
+ ]
+ }
+ },
+ "you_complete_me": {
+ "formula": {
+ "sandbox_id": 121751471,
+ "match": "YouCompleteMe"
+ }
+ },
+ "rtags": {
+ "formula": {
+ "sandbox_id": 84460170,
+ "match": "rtags"
+ }
+ },
+ "afl-fuzz": {
+ "formula": {
+ "sandbox_id": 80600007,
+ "match": "afl-fuzz"
+ },
+ "executable": {
+ "afl-fuzz": [
+ "afl-fuzz"
+ ]
+ }
+ },
+ "horadric": {
+ "formula": {
+ "sandbox_id": 1204623165,
+ "match": "horadric"
+ },
+ "executable": {
+ "horadric": [
+ "horadric"
+ ]
+ }
+ },
+ "logbroker": {
+ "formula": {
+ "sandbox_id": 1061549819,
+ "match": "logbroker"
+ },
+ "executable": {
+ "logbroker": [
+ "logbroker"
+ ]
+ }
+ },
+ "zcli": {
+ "formula": {
+ "sandbox_id": 948535797,
+ "match": "zcli"
+ },
+ "executable": {
+ "zcli": [
+ "zcli"
+ ]
+ }
+ },
+ "ptpython": {
+ "formula": {
+ "sandbox_id": 50746186,
+ "match": "PTPython"
+ },
+ "executable": {
+ "ptpython": [
+ "ptpython"
+ ]
+ }
+ },
+ "ptipython": {
+ "formula": {
+ "sandbox_id": 50746160,
+ "match": "PTIPython"
+ },
+ "executable": {
+ "ptipython": [
+ "ptipython"
+ ]
+ }
+ },
+ "python3": {
+ "formula": {
+ "sandbox_id": 1020522806,
+ "match": "python3"
+ },
+ "executable": {
+ "python3": [
+ "python3"
+ ]
+ }
+ },
+ "run_python_udf": {
+ "formula": {
+ "sandbox_id": 273337583,
+ "match": "RUN_PYTHON_UDF"
+ },
+ "executable": {
+ "run_python_udf": [
+ "run_python_udf"
+ ]
+ }
+ },
+ "graphs_difference": {
+ "formula": {
+ "sandbox_id": 374662639,
+ "match": "graphs_difference"
+ },
+ "executable": {
+ "graphs_difference": [
+ "graphs_difference"
+ ]
+ }
+ },
+ "contexts_difference": {
+ "formula": {
+ "sandbox_id": 1128937263,
+ "match": "contexts_difference"
+ },
+ "executable": {
+ "contexts_difference": [
+ "contexts_difference"
+ ]
+ }
+ },
+ "ycmerge": {
+ "formula": {
+ "sandbox_id": 1164600398,
+ "match": "ycmerge"
+ },
+ "executable": {
+ "ycmerge": [
+ "ycmerge"
+ ]
+ }
+ },
+ "ygdiff": {
+ "formula": {
+ "sandbox_id": 982695480,
+ "match": "ygdiff"
+ },
+ "executable": {
+ "ygdiff": [
+ "ygdiff"
+ ]
+ }
+ },
+ "ya-tc": {
+ "formula": {
+ "sandbox_id": 981372621,
+ "match": "ya-tc"
+ },
+ "executable": {
+ "ya-tc": [
+ "ya-tc"
+ ]
+ }
+ },
+ "crypta": {
+ "formula": {
+ "sandbox_id": 550700694,
+ "match": "crypta"
+ },
+ "executable": {
+ "crypta": [
+ "crypta"
+ ]
+ }
+ },
+ "apphost": {
+ "formula": {
+ "sandbox_id": 1205658794,
+ "match": "app_host_launcher"
+ },
+ "executable": {
+ "app_host_launcher": [
+ "app_host_launcher"
+ ]
+ }
+ },
+ "renderer": {
+ "formula": {
+ "sandbox_id": [
+ 1085349224,
+ 1088353208
+ ],
+ "match": ""
+ },
+ "executable": {
+ "renderer": [
+ "report-renderer/bin/run"
+ ]
+ }
+ },
+ "appteka": {
+ "formula": {
+ "sandbox_id": [
+ 1195570412,
+ 1195574111
+ ],
+ "match": "appteka"
+ },
+ "executable": {
+ "appteka": [
+ "appteka/appteka"
+ ]
+ }
+ },
+ "news": {
+ "formula": {
+ "sandbox_id": 1088628929,
+ "match": "news_launcher"
+ },
+ "executable": {
+ "news_launcher": [
+ "news_launcher"
+ ]
+ }
+ },
+ "golang_1.17.6": {
+ "formula": {
+ "sandbox_id": [
+ 1178356987,
+ 1178357306,
+ 1178357717,
+ 1178358055
+ ],
+ "match": "GOLANG"
+ },
+ "executable": {
+ "go": [
+ "bin",
+ "go"
+ ],
+ "gofmt": [
+ "bin",
+ "gofmt"
+ ]
+ }
+ },
+ "golang_1.18beta2": {
+ "formula": {
+ "sandbox_id": [
+ 1206631393,
+ 1206631765,
+ 1206632232,
+ 1206632597
+ ],
+ "match": "GOLANG"
+ },
+ "executable": {
+ "go_1.18beta2": [
+ "bin",
+ "go"
+ ],
+ "gofmt_1.18beta2": [
+ "bin",
+ "gofmt"
+ ]
+ }
+ },
+ "qemu": {
+ "formula": {
+ "sandbox_id": [
+ 504011268
+ ],
+ "match": "Build executable"
+ },
+ "executable": {
+ "qemu": [
+ "qemu",
+ "bin",
+ "qemu-system-x86_64"
+ ],
+ "qemu-i386": [
+ "qemu",
+ "bin",
+ "qemu-system-i386"
+ ],
+ "qemu-img": [
+ "qemu",
+ "bin",
+ "qemu-img"
+ ],
+ "qemu-nbd": [
+ "qemu",
+ "bin",
+ "qemu-nbd"
+ ]
+ }
+ },
+ "qyp": {
+ "formula": {
+ "sandbox_id": [
+ 1197649240
+ ],
+ "match": "infra/qyp/vmctl/bin/vmctl"
+ },
+ "executable": {
+ "vmctl": [
+ "vmctl"
+ ]
+ }
+ },
+ "rtcdiag": {
+ "formula": {
+ "sandbox_id": [
+ 944810510
+ ],
+ "match": "search/mon/rtc/rtcdiag/bin/rtcdiag"
+ },
+ "executable": {
+ "rtcdiag": [
+ "rtcdiag"
+ ]
+ }
+ },
+ "fio": {
+ "formula": {
+ "sandbox_id": [
+ 1136887344
+ ],
+ "match": "infra/kernel/tools/fio/build/fio-static.tar.gz"
+ },
+ "executable": {
+ "fio": [
+ "fio",
+ "bin",
+ "fio"
+ ]
+ }
+ },
+ "amduprof": {
+ "formula": {
+ "sandbox_id": [
+ 747426974
+ ],
+ "match": "AMDuProf_Linux_x64_3.2.228.tar.gz"
+ },
+ "executable": {
+ "amduprof-cli": [
+ "AMDuProf_Linux_x64_3.2.228",
+ "bin",
+ "AMDuProfCLI"
+ ],
+ "amduprof-pcm": [
+ "AMDuProf_Linux_x64_3.2.228",
+ "bin",
+ "AMDuProfPcm"
+ ]
+ }
+ },
+ "foremost": {
+ "formula": {
+ "sandbox_id": [
+ 684724398
+ ],
+ "match": "infra/kernel/tools/foremost/build/foremost-static.tar.gz"
+ },
+ "executable": {
+ "foremost": [
+ "foremost"
+ ]
+ }
+ },
+ "atop": {
+ "formula": {
+ "sandbox_id": [
+ 576898586
+ ],
+ "match": "infra/kernel/tools/atop/build/atop-static.tar.gz"
+ },
+ "executable": {
+ "atop": [
+ "atop",
+ "atop"
+ ]
+ }
+ },
+ "bpftool": {
+ "formula": {
+ "sandbox_id": [
+ 1130914217
+ ],
+ "match": "infra/kernel/tools/bpftool/build/bpftool-static.tar.gz"
+ },
+ "executable": {
+ "bpftool": [
+ "bpftool",
+ "bpftool"
+ ]
+ }
+ },
+ "bpftrace": {
+ "formula": {
+ "sandbox_id": [
+ 866596155
+ ],
+ "match": "infra/kernel/tools/bpftrace/build/bpftrace-static.tar.gz"
+ },
+ "executable": {
+ "bpftrace": [
+ "bpftrace",
+ "bpftrace"
+ ]
+ }
+ },
+ "strace": {
+ "formula": {
+ "sandbox_id": [
+ 654255646
+ ],
+ "match": "infra/kernel/tools/strace/build/strace-static.tar.gz"
+ },
+ "executable": {
+ "strace": [
+ "strace",
+ "strace"
+ ]
+ }
+ },
+ "stress-ng": {
+ "formula": {
+ "sandbox_id": [
+ 755257561
+ ],
+ "match": "infra/kernel/tools/stress-ng/build/stress-ng-static.tar.gz"
+ },
+ "executable": {
+ "stress-ng": [
+ "stress-ng",
+ "stress-ng"
+ ]
+ }
+ },
+ "iperf": {
+ "formula": {
+ "sandbox_id": [
+ 635087857
+ ],
+ "match": "infra/kernel/tools/iperf/build/iperf.tar.gz"
+ },
+ "executable": {
+ "iperf": [
+ "iperf",
+ "bin",
+ "iperf3"
+ ]
+ }
+ },
+ "kvmtool": {
+ "formula": {
+ "sandbox_id": [
+ 547591282
+ ],
+ "match": "infra/kernel/tools/kvmtool"
+ },
+ "executable": {
+ "lkvm": [
+ "kvmtool",
+ "lkvm"
+ ]
+ }
+ },
+ "coronerctl": {
+ "formula": {
+ "sandbox_id": [
+ 1183844682
+ ],
+ "match": "infra/rsm/coroner/build/packages/coroner/pkg.json"
+ },
+ "executable": {
+ "coronerctl": [
+ "coronerctl"
+ ]
+ }
+ },
+ "lz4": {
+ "formula": {
+ "sandbox_id": [
+ 756420904
+ ],
+ "match": "infra/kernel/tools/lz4"
+ },
+ "executable": {
+ "lz4": [
+ "lz4",
+ "usr",
+ "bin",
+ "lz4"
+ ]
+ }
+ },
+ "intel-cmt-cat": {
+ "formula": {
+ "sandbox_id": [
+ 798382448
+ ],
+ "match": "infra/kernel/tools/resctrl"
+ },
+ "executable": {
+ "pqos": [
+ "intel-cmt-cat",
+ "bin",
+ "pqos"
+ ],
+ "rdtset": [
+ "intel-cmt-cat",
+ "bin",
+ "rdtset"
+ ]
+ }
+ },
+ "blktrace": {
+ "formula": {
+ "sandbox_id": [
+ 643294824
+ ],
+ "match": "infra/kernel/tools/blktrace/build"
+ },
+ "executable": {
+ "blkparse": [
+ "blktrace",
+ "usr",
+ "bin",
+ "blkparse"
+ ],
+ "iowatcher": [
+ "blktrace",
+ "usr",
+ "bin",
+ "iowatcher"
+ ],
+ "blktrace": [
+ "blktrace",
+ "usr",
+ "bin",
+ "blktrace"
+ ],
+ "blkiomon": [
+ "blktrace",
+ "usr",
+ "bin",
+ "blkiomon"
+ ],
+ "btt": [
+ "blktrace",
+ "usr",
+ "bin",
+ "btt"
+ ]
+ }
+ },
+ "vmexec": {
+ "formula": {
+ "sandbox_id": [
+ 940486578
+ ],
+ "match": "infra/qemu/vmexec/vmexec"
+ },
+ "executable": {
+ "vmexec": [
+ "vmexec"
+ ]
+ }
+ },
+ "yfm-docs": {
+ "formula": {
+ "sandbox_id": 1150530779,
+ "match": "yfm-docs"
+ },
+ "executable": {
+ "yfm-docs": [
+ "yfm-docs"
+ ]
+ }
+ },
+ "aws": {
+ "formula": {
+ "sandbox_id": 489186634,
+ "match": "aws"
+ },
+ "executable": {
+ "aws": [
+ "aws"
+ ]
+ }
+ },
+ "sedem": {
+ "formula": {
+ "sandbox_id": 1194502495,
+ "match": "SEDEM archive"
+ },
+ "executable": {
+ "sedem": [
+ "sedem"
+ ]
+ }
+ },
+ "jstyle_bundle": {
+ "formula": {
+ "sandbox_id": [
+ 603849348,
+ 603450767,
+ 603859837
+ ],
+ "match": "jstyle"
+ },
+ "executable": {
+ "jstyle": [
+ "idea-community",
+ "bin",
+ "format.bat"
+ ]
+ }
+ },
+ "ktlint_bundle": {
+ "formula": {
+ "sandbox_id": [
+ 1037460929,
+ 1037467384,
+ 1038449502
+ ],
+ "match": "ktlint"
+ },
+ "executable": {
+ "ktlint": [
+ "run.bat"
+ ]
+ }
+ },
+ "devtools_license_analyzer_bundle": {
+ "formula": {
+ "sandbox_id": [
+ 1188584819,
+ 1188585190
+ ],
+ "match": "license_analyzer"
+ },
+ "executable": {
+ "license_analyzer": [
+ "license_analyzer"
+ ]
+ }
+ },
+ "ya_sed": {
+ "formula": {
+ "sandbox_id": [
+ 1197714990
+ ],
+ "match": "ya_sed"
+ },
+ "executable": {
+ "ya_sed": [
+ "ya_sed"
+ ]
+ }
+ },
+ "black": {
+ "formula": {
+ "sandbox_id": [
+ 1147448676
+ ],
+ "match": "black"
+ },
+ "executable": {
+ "black": [
+ "black"
+ ]
+ }
+ },
+ "yadi": {
+ "formula": {
+ "sandbox_id": 1155032720,
+ "match": "yadi-arc"
+ },
+ "executable": {
+ "yadi-arc": [
+ "yadi-arc"
+ ]
+ }
+ },
+ "grpc_cli": {
+ "formula": {
+ "sandbox_id": 739261887,
+ "match": "grpc_cli"
+ },
+ "executable": {
+ "grpc_cli": [
+ "grpc_cli"
+ ]
+ }
+ },
+ "buf": {
+ "formula": {
+ "sandbox_id": 813444352,
+ "match": "buf"
+ },
+ "executable": {
+ "buf": [
+ "buf"
+ ]
+ }
+ },
+ "iceflame": {
+ "formula": {
+ "sandbox_id": 1179554942,
+ "match": "iceflame"
+ },
+ "executable": {
+ "iceflame": [
+ "iceflame"
+ ]
+ }
+ },
+ "cs": {
+ "formula": {
+ "sandbox_id": 1206856496,
+ "match": "cs"
+ },
+ "executable": {
+ "cs": [
+ "cs"
+ ]
+ }
+ },
+ "wall-e": {
+ "formula": {
+ "sandbox_id": 1085675590,
+ "match": "wall-e"
+ },
+ "executable": {
+ "wall-e": [
+ "wall-e"
+ ]
+ }
+ },
+ "skotty": {
+ "formula": {
+ "sandbox_id": 1160938937,
+ "match": "launcher"
+ },
+ "executable": {
+ "launcher": [
+ "launcher"
+ ]
+ }
+ },
+ "gcc102-arm-none-eabi": {
+ "formula": {
+ "sandbox_id": 1020757602,
+ "match": "GNU ARM"
+ },
+ "executable": {
+ "c++": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-g++"
+ ],
+ "cc": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-gcc"
+ ],
+ "gcov": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-gcov"
+ ],
+ "c++filt": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-c++filt"
+ ],
+ "nm": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-nm"
+ ],
+ "strip": [
+ "bin",
+ "arm-none-eabi",
+ "arm-none-eabi-strip"
+ ]
+ }
+ },
+ "eductl": {
+ "formula": {
+ "sandbox_id": 1198463788,
+ "match": "eductl"
+ },
+ "executable": {
+ "eductl": [
+ "eductl"
+ ]
+ }
+ },
+ "bigb_request": {
+ "formula": {
+ "sandbox_id": 1205658862,
+ "match": "bb_requester"
+ },
+ "executable": {
+ "bb_requester": [
+ "bb_requester"
+ ]
+ }
+ },
+ "bigb_hitlog_analyser": {
+ "formula": {
+ "sandbox_id": 1204623172,
+ "match": "hitlog_analyser"
+ },
+ "executable": {
+ "hitlog_analyser": [
+ "hitlog_analyser"
+ ]
+ }
+ },
+ "bigb_bsyeti_experiments": {
+ "formula": {
+ "sandbox_id": 1117529876,
+ "match": "bsyeti_experiments"
+ },
+ "executable": {
+ "bsyeti_experiments": [
+ "bsyeti_experiments"
+ ]
+ }
+ },
+ "bigb_bb_cluster_analyzer": {
+ "formula": {
+ "sandbox_id": 1205657903,
+ "match": "bb_cluster_analyzer"
+ },
+ "executable": {
+ "bb_cluster_analyzer": [
+ "bb_cluster_analyzer"
+ ]
+ }
+ },
+ "bigb_yt_profiles_dumper": {
+ "formula": {
+ "sandbox_id": 1205657009,
+ "match": "yt_profiles_dumper"
+ },
+ "executable": {
+ "yt_profiles_dumper": [
+ "yt_profiles_dumper"
+ ]
+ }
+ },
+ "bigb_ab": {
+ "formula": {
+ "sandbox_id": 1207217219,
+ "match": "ab"
+ },
+ "executable": {
+ "ab": [
+ "ab"
+ ]
+ }
+ },
+ "bigrt_cli": {
+ "formula": {
+ "sandbox_id": [
+ 1063136697
+ ],
+ "match": "big_rt_cli"
+ },
+ "executable": {
+ "big_rt_cli": [
+ "big_rt_cli"
+ ]
+ }
+ },
+ "caesar_yt_sync": {
+ "formula": {
+ "sandbox_id": 1205657532,
+ "match": "yt_sync"
+ },
+ "executable": {
+ "yt_sync": [
+ "yt_sync"
+ ]
+ }
+ },
+ "caesar_lookup_profile": {
+ "formula": {
+ "sandbox_id": 1205656722,
+ "match": "lookup_profile"
+ },
+ "executable": {
+ "lookup_profile": [
+ "lookup_profile"
+ ]
+ }
+ },
+ "exp_stats": {
+ "formula": {
+ "sandbox_id": 1204623878,
+ "match": "exp_stats"
+ },
+ "executable": {
+ "exp_stats": [
+ "exp_stats"
+ ]
+ }
+ },
+ "caesar_profile_size_analyzer": {
+ "formula": {
+ "sandbox_id": 1205656696,
+ "match": "profile_size_analyzer"
+ },
+ "executable": {
+ "profile_size_analyzer": [
+ "profile_size_analyzer"
+ ]
+ }
+ }
+ },
+ "toolchain_aliases": {
+ "clang-win-x86_64": "clang12-win-x86_64",
+ "clang-win-i686": "clang12-win-i686",
+ "gcc-linux-x86_64": "gcc82-linux-x86_64"
+ }
+}
diff --git a/build/ya.make b/build/ya.make
new file mode 100644
index 0000000000..407b8f13e0
--- /dev/null
+++ b/build/ya.make
@@ -0,0 +1,38 @@
+OWNER(
+ g:ymake
+ somov
+)
+
+NEED_CHECK()
+
+PY2_LIBRARY()
+
+PY_SRCS(
+ ymake_conf.py
+)
+
+PEERDIR(
+ library/cpp/deprecated/enum_codegen
+ library/cpp/deprecated/split
+ library/cpp/string_utils/scan
+)
+
+END()
+
+RECURSE(
+ conf_fatal_error
+ config
+ docs/empty
+ external_resources
+ platform/java
+ platform/local_so
+ platform/perl
+ platform/python
+ platform/python/ldflags
+ plugins
+ prebuilt
+ scripts
+ tests
+ tests_slow
+ yandex_specific/config
+)
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
new file mode 100644
index 0000000000..06d6696fa6
--- /dev/null
+++ b/build/ymake.core.conf
@@ -0,0 +1,9269 @@
+# !!! DISCLAIMER! PLEASE DON'T IGNORE !!!
+# The FAKEID value is huge hammer. It affects UIDs of all nodes in build graph including, but not limnited to
+# any resource fetch (think java contrib), build on any language (C++, Python, Java, Go), any code generation.
+# Any build after this change will pay the price:
+# - Local builds and Sandbox builds will reload all resources from Sandbox and cached data from YT (if ready).
+# - Distributed (YT) cache warmup will take signigicant time to catch up and will need to recache everithing.
+# - Autocheck will rebuild and recache everything.
+# Use this with extreme care and only change if it is utlimately needed. Consider more specific XXX_FAKEIDs below instead.
+FAKEID=3141592653
+
+SANDBOX_FAKEID=${FAKEID}.7600000
+CPP_FAKEID=9107926
+GO_FAKEID=9056219
+ANDROID_FAKEID=8821472
+CLANG_TIDY_FAKEID=8625699
+
+CURDIR=.
+MODDIR=.
+BINDIR=bin:/
+SRCDIR=
+YMAKE=ymake
+ECHO=echo
+INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i
+CPP_EXT=.cpp
+OBJ_SUF=
+CFLAGS=
+EXTRA_C_FLAGS=
+SFLAGS=
+
+AUTOCHECK_BALANCING_OPTIONS=
+SO_OTPUTS=no
+
+@import "${CONF_ROOT}/conf/settings.conf"
+@import "${CONF_ROOT}/conf/opensource.conf"
+@import "${CONF_ROOT}/conf/rules.conf"
+@import "${CONF_ROOT}/conf/sysincl.conf"
+@import "${CONF_ROOT}/conf/license.conf"
+@import "${CONF_ROOT}/conf/ts.conf"
+
+@import "${CONF_ROOT}/conf/project_specific/other.conf"
+
+USE_GLOBAL_CMD=no
+when ($OS_WINDOWS != "yes") {
+ USE_GLOBAL_CMD=yes
+}
+
+YMAKE_RESOURCE_BIN=${YMAKE_RESOURCE_GLOBAL}/ymake
+YMAKE_RESOURCE_DIR=build/external_resources/ymake
+when ($USE_YMAKE_RESOURCE == "yes") {
+ PEERDIR+=${YMAKE_RESOURCE_DIR}
+}
+
+__COMMA__=${comma:""}
+
+ARCADIA_TEST_ROOT=../arcadia_tests_data/
+DEFAULT_REQUIREMENTS=network:restricted cpu:1 ram:32
+CC_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+LIB_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+LD_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+JAVA_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+PY_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+BISON_DATA_DIR=contrib/tools/bison/bison/data
+CPP_BISON_SKELS=${BISON_DATA_DIR}/glr.cc ${BISON_DATA_DIR}/lalr1.cc ${BISON_DATA_DIR}/yacc.c ${BISON_DATA_DIR}/stack.hh ${BISON_DATA_DIR}/variant.hh ${BISON_DATA_DIR}/c++.m4 ${BISON_DATA_DIR}/c++-skel.m4
+
+USE_PREBUILT_TOOLS=yes
+when ($OPENSOURCE == "yes") {
+ USE_PREBUILT_TOOLS=no
+}
+
+FAIL_PY2=no
+
+_PREBUILT_TOOLS_ROOT=build/prebuilt
+_TOOL_PROTOC_GEN_GO=vendor/github.com/golang/protobuf/protoc-gen-go
+_TOOL_RESCOMPILER=tools/rescompiler
+_TOOL_RESCOMPRESSOR=tools/rescompressor
+_TOOL_RORESCOMPILER=tools/rorescompiler
+
+when ($HOST_ARCH_X86_64 == "yes") {
+ when ($HOST_OS_DARWIN == "yes" || $HOST_OS_LINUX == "yes" || $HOST_OS_WINDOWS == "yes") {
+ VALID_HOST_PLATFORM_FOR_COMMON_PREBUILT_TOOLS=yes
+
+ when ($USE_PREBUILT_TOOLS == "yes" && $ARCH_X86_64 == "yes") {
+ _TOOL_PROTOC_GEN_GO=${_PREBUILT_TOOLS_ROOT}/vendor/github.com/golang/protobuf/protoc-gen-go
+ }
+ }
+}
+
+FAIL_MODULE_CMD=$YMAKE_PYTHON ${input:"build/scripts/fail_module_cmd.py"} $TARGET ${kv;hide:"p ER"} ${kv;hide:"pc red"}
+
+when ($TIDY == "yes") {
+ when ($TIDY_EXPORT_FIXES=="") {
+ TIDY_EXPORT_FIXES="no"
+ }
+
+ CLANG_TIDY_ARGS=${hide:CLANG_TIDY_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/clang_tidy.py"} "--ymake-python" $YMAKE_PYTHON "--clang-tidy-bin" "$(CLANG_TIDY_BIN)/bin/clang-tidy" "--config-validation-script" ${input:"build/tests/config/clang_tidy/tidy_config_validation.py"} "--testing-src" ${input:SRC} "--source-root" $(SOURCE_ROOT) "--build-root" $(BUILD_ROOT) "--tidy-json" ${output;noauto;suf=${OBJ_CROSS_SUF}${COMPILE_OUT_SUFFIX}.tidyjson:SRC} "--export-fixes" $TIDY_EXPORT_FIXES
+ CLANG_TIDY_ARGS+="--default-config-file" ${input:DEFAULT_TIDY_CONFIG}
+ CLANG_TIDY_ARGS+="--project-config-file" ${input:PROJECT_TIDY_CONFIG}
+ when ($TIDY_CHECKS) {
+ CLANG_TIDY_ARGS+="--checks=$TIDY_CHECKS"
+ }
+
+ when ($TIDY_HEADER_FILTER) {
+ CLANG_TIDY_ARGS+="--header-filter=$TIDY_HEADER_FILTER"
+ }
+
+ TIDY_VALUE=USE_CONDITIONAL_SRCS
+}
+otherwise {
+ CLANG_TIDY_ARGS=
+ TIDY_VALUE=
+}
+
+# tag:codenav
+when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+ PY_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"pyndex $TARGET"}
+ YNDEXER_ARGS=$YMAKE_PYTHON ${input:"build/scripts/yndexer.py"} $CPPYNDEXER_RESOURCE_GLOBAL/yndexer 1500 $(SOURCE_ROOT) $ARCADIA_BUILD_ROOT ${input:SRC}
+ YNDEXER_OUTPUT=${output;noauto;suf=${OBJ_CROSS_SUF}.ydx.pb2:SRC}
+}
+otherwise {
+ PY_PROGRAM_LINK_EXE=$LINK_EXE
+ YNDEXER_ARGS=
+ YNDEXER_OUTPUT=
+}
+
+COVERAGE_FLAGS=
+EXTRA_OUTPUT=
+when ($CLANG == "yes" || $GCC == "yes") {
+ when ($BUILD_TYPE == "COVERAGE" || $GCOV_COVERAGE) {
+ COVERAGE_FLAGS=-fprofile-arcs -ftest-coverage
+ EXTRA_OUTPUT=${output;noauto;hide;suf=${OBJ_CROSS_SUF}${COMPILE_OUT_SUFFIX}.gcno:SRC}
+ }
+}
+
+when ($OS_CYGWIN == "yes") {
+ CFLAGS+=-D_LDBL_EQ_DBL=1 -U__STRICT_ANSI__
+ USE_ASMLIB=no
+ FSTACK=
+}
+
+CFLAGS+=$COVERAGE_FLAGS
+LDFLAGS+=$COVERAGE_FLAGS
+
+CHECKFLAG=
+LEX_FLAGS=
+NO_MAPREDUCE=
+
+when ($NO_MAPREDUCE == "yes") {
+ C_DEFINES+=-DNO_MAPREDUCE
+}
+
+when ($OS_ANDROID == "yes") {
+ PIE=yes
+}
+
+# TODO: extract to conf/maps/maps.conf
+when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_LINUX != "yes") {
+ USE_STL_SYSTEM=yes
+}
+when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_IOS == "yes") {
+ BUILD_IOS_APP=yes
+ when ($ARCH_ARM7 || $ARCH_ARM64) {
+ BOOSTTEST_IS_FAT_OBJECT=yes
+ }
+}
+
+# USE_INTERNAL_STL is an internal flag (set on by default) but may be used externally to
+# select system standard C++ library when USE_INTERNAL_STL=no is set.
+#
+# USE_STL_SYSTEM=yes is a regular way to select system standard C++ library.
+#
+when ($USE_STL_SYSTEM == "yes") {
+ USE_INTERNAL_STL=no
+}
+
+when ($USE_INTERNAL_STL == "no") {
+ USE_STL_SYSTEM=yes
+}
+otherwise {
+ USE_INTERNAL_STL=yes
+ # TODO: Extract to conf/sysincl.conf
+ # This trigger doesn't work for module level since SYSINCL is processed at
+ # configuration stage (This means that NO_RUNTIME() macro called in ya.make
+ # won't affect SYSINCL and the only way to make this trigger work correctly
+ # is to define configuration varaible NORUNTIME (-DNORUNTIME) on the command
+ # line when `ya make ...` is invoked.
+ when ($NORUNTIME != "yes") {
+ SYSINCL+=build/sysincl/stl-to-libcxx.yml
+ when ($MUSL == "yes") {
+ SYSINCL+=build/sysincl/libc-musl-libcxx.yml
+ }
+ }
+}
+
+# tag:linux-specific
+when ($OS_LINUX && $OS_SDK == "ubuntu-14" && $MUSL != "yes") {
+ USE_UBUNTU_COMPATIBILITY=yes
+}
+
+USE_ARCADIA_PYTHON=yes
+USE_ARCADIA_LIBM=no
+USE_EAT_MY_DATA=no
+
+HAVE_MKL=
+when ($HAVE_MKL == "") {
+ when ($OS_LINUX && $ARCH_X86_64 && !$SANITIZER_TYPE) {
+ HAVE_MKL=yes
+ }
+ otherwise {
+ HAVE_MKL=no
+ }
+}
+
+SFDL_TMP_OUT= ${output;tmp:SRC.tmp}
+
+# tag:perl-specific
+when ($USE_LOCAL_TOOLS == "yes") {
+ PERL=$LOCAL_PERL
+ PERL_VERSION=$LOCAL_PERL_VERSION
+ PERL_PRIVLIB=$LOCAL_PERL_PRIVLIB
+ PERL_ARCHLIB=$LOCAL_PERL_ARCHLIB
+ when ($LOCAL_PERL_LIBS) {
+ PERL_LIBS=$LOCAL_PERL_LIBS
+ }
+}
+otherwise {
+ PERL=NO-PERL-SELECTED
+ PERL_VERSION=NO-PERL-SELECTED-VERSION
+ PERL_PRIVLIB=NO-PERL-SELECTED-PRIVLIB
+ PERL_ARCHLIB=NO-PERL-SELECTED-ARCHLIB
+}
+
+# tag:perl-specific
+PERL_LD_LIBRARY_PATH=
+PERL_INCLUDE=
+USE_PERL_SYSTEM=yes
+when ($USE_PERL_SYSTEM == "yes") {
+ select ($PERL_SDK) {
+ "ubuntu-12" ? {
+ PERL_VERSION=5.14
+ PERL_ROOT=${SYSTEM_PERL_514_RESOURCE_GLOBAL}/perl${PERL_VERSION}
+ PERL_LIB_ARCH=
+ }
+ "ubuntu-14" ? {
+ PERL_VERSION=5.18
+ PERL_ROOT=${SYSTEM_PERL_518_RESOURCE_GLOBAL}/perl${PERL_VERSION}
+ PERL_LIB_ARCH=
+ }
+ "ubuntu-16" ? {
+ PERL_VERSION=5.22
+ PERL_ROOT=${SYSTEM_PERL_522_RESOURCE_GLOBAL}/perl${PERL_VERSION}
+ PERL_LIB_ARCH=/x86_64-linux-gnu
+ }
+ "ubuntu-18" ? {
+ PERL_VERSION=5.26
+ PERL_ROOT=${SYSTEM_PERL_526_RESOURCE_GLOBAL}/perl${PERL_VERSION}
+ PERL_LIB_ARCH=/x86_64-linux-gnu
+ }
+ "ubuntu-20" ? {
+ PERL_VERSION=5.30
+ PERL_ROOT=${SYSTEM_PERL_530_RESOURCE_GLOBAL}/usr
+ PERL_LIB_ARCH=/x86_64-linux-gnu
+ }
+ }
+
+ PERL=${PERL_ROOT}/bin/perl
+ PERL_ARCHLIB=${PERL_ROOT}/lib$PERL_LIB_ARCH/perl/${PERL_VERSION}
+ PERL_PRIVLIB=${PERL_ROOT}/share/perl/${PERL_VERSION}
+ PERL_LIBS=${PERL_ROOT}/lib${PERL_LIB_ARCH}
+ PERL_LD_LIBRARY_PATH=${env:"LD_LIBRARY_PATH=${PERL_ROOT}/lib"}
+
+ # Perl searches it's modules in INC@ paths. They can not be sysrooted or disabled (at least I haven't found a way),
+ # so default Perl module directories should be prepended to perl command lines when using non-local perl.
+ PERL_INCLUDE=-I${PERL_ARCHLIB} -I${PERL_PRIVLIB}
+}
+PERL_DEFAULT_PEERDIR=yes
+
+# tag:perl-specific
+PERLSUFFIX=-csuffix .cpp
+PERLOUTPUT=${stdout;output:SRC.cpp}
+when ($PERLC == "yes") {
+ PERLSUFFIX=-csuffix .c
+ PERLOUTPUT=${stdout;output:SRC.c}
+}
+XSUBPPFLAGS=
+
+# tag:tool-specific
+ARCH_TOOL=${tool:"tools/archiver"}
+
+# tag:tool-specific tag:proto
+PROTOC=${tool:"contrib/tools/protoc"}
+PROTOC_STYLEGUIDE_OUT=--cpp_styleguide_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
+PROTOC_PLUGIN_STYLEGUIDE=--plugin=protoc-gen-cpp_styleguide=${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
+PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf/src
+USE_VANILLA_PROTOC=no
+
+# tag:tool-specific
+FML_TOOL=${tool:"tools/relev_fml_codegen"}
+FML_UNUSED_TOOL=${tool:"tools/relev_fml_unused"}
+LUA_TOOL=${tool:"tools/lua"}
+ENUM_PARSER_TOOL=${tool:"tools/enum_parser/enum_parser"}
+
+# tag:python-specific tag:cython-specific
+CYTHON_SCRIPT=${input:"${ARCADIA_ROOT}/contrib/tools/cython/cython.py"}
+RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+CYTHON_OUTPUT_INCLUDES=\
+${output_include;hide:"contrib/libs/python/Include/compile.h"} \
+${output_include;hide:"contrib/libs/python/Include/frameobject.h"} \
+${output_include;hide:"contrib/libs/python/Include/longintrepr.h"} \
+${output_include;hide:"contrib/libs/python/Include/pyconfig.h"} \
+${output_include;hide:"contrib/libs/python/Include/Python.h"} \
+${output_include;hide:"contrib/libs/python/Include/pythread.h"} \
+${output_include;hide:"contrib/libs/python/Include/structmember.h"} \
+${output_include;hide:"contrib/libs/python/Include/traceback.h"} \
+${output_include;hide:"contrib/tools/cython/generated_c_headers.h"} \
+${output_include;hide:"omp.h"}
+
+# tag:cython-specific
+CYTHON_CPP_OUTPUT_INCLUDES=${output_include;hide:"contrib/tools/cython/generated_cpp_headers.h"}
+
+# tag:cython-specific
+CYTHON_OPTIONS=
+when ($OS_LINUX) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Linux
+}
+elsewhen ($OS_DARWIN) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Darwin
+}
+elsewhen ($OS_WINDOWS) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Windows
+}
+
+when ($USE_LOCAL_SWIG != "yes") {
+ _SWIG_TOOL=${tool:"contrib/tools/swig"}
+ _SWIG_LIBRARY=contrib/tools/swig/Lib
+ _SWIG_LIBRARY_ABS=$ARCADIA_ROOT/$_SWIG_LIBRARY
+}
+otherwise {
+ _SWIG_TOOL=$SWIG_TOOL
+ _SWIG_LIBRARY=$SWIG_LIBRARY
+ _SWIG_LIBRARY_ABS=$SWIG_LIBRARY
+}
+SWIG_IMPLICIT_INCLUDES = swig.swg go.swg java.swg perl5.swg python.swg
+
+FATAL_ERROR_MODULE=no
+FATAL_ERROR_MESSAGE=
+
+# tag:python-specific
+# PYTHON_DISTR={ "default" | "macos-brew" } determine python system supply
+# see build/platform/python/ya.make
+PYTHON_DISTR="default"
+when ($USE_SYSTEM_PYTHON) {
+ USE_ARCADIA_PYTHON=no
+ select ($USE_SYSTEM_PYTHON) {
+ "2.7" ? {
+ _SYSTEM_PYTHON27=yes
+ PY_VERSION=2.7
+ PY_FRAMEWORK_VERSION=2.7
+ }
+ "3.4" ? {
+ _SYSTEM_PYTHON34=yes
+ PY_VERSION=3.4m
+ PY_FRAMEWORK_VERSION=3.4
+ }
+ "3.5" ? {
+ _SYSTEM_PYTHON35=yes
+ PY_VERSION=3.5m
+ PY_FRAMEWORK_VERSION=3.5
+ }
+ "3.6" ? {
+ _SYSTEM_PYTHON36=yes
+ PY_VERSION=3.6m
+ PY_FRAMEWORK_VERSION=3.6
+ }
+ "3.7" ? {
+ _SYSTEM_PYTHON37=yes
+ PY_VERSION=3.7m
+ PY_FRAMEWORK_VERSION=3.7
+ }
+ "3.8" ? {
+ _SYSTEM_PYTHON38=yes
+ PY_VERSION=3.8
+ PY_FRAMEWORK_VERSION=3.8
+ }
+ "3.9" ? {
+ _SYSTEM_PYTHON39=yes
+ PY_VERSION=3.9
+ PY_FRAMEWORK_VERSION=3.9
+ }
+ "3.10" ? {
+ _SYSTEM_PYTHON310=yes
+ PY_VERSION=3.10
+ PY_FRAMEWORK_VERSION=3.10
+ }
+ default ? {
+ FATAL_ERROR_MESSAGE+=invalid USE_SYSTEM_PYTHON value
+ }
+ }
+}
+
+# tag:python-specific
+YMAKE_PYTHON3_PEER=build/platform/python/ymake_python3
+YMAKE_PYTHON3=$YMAKE_PYTHON3_RESOURCE_GLOBAL/python3
+when ($HOST_OS_WINDOWS == "yes") {
+ YMAKE_PYTHON3=$YMAKE_PYTHON3_RESOURCE_GLOBAL/python3.exe
+}
+
+# tag:python-specific
+when ($USE_ARCADIA_PYTHON == "no") {
+ SYSINCL+=build/sysincl/python.yml
+}
+
+# tag:allocator
+DEFAULT_ALLOCATOR=LF
+
+# tag:allocator
+when ($OS_ANDROID == "yes" || $MSVC == "yes") {
+ DEFAULT_ALLOCATOR=J
+}
+
+# tag:allocator
+when ($OS_CYGWIN == "yes" || $ARCH_PPC64LE == "yes") {
+ DEFAULT_ALLOCATOR=SYSTEM
+}
+
+# tag:allocator
+when ($OS_DARWIN == "yes") {
+ DEFAULT_ALLOCATOR=SYSTEM
+}
+
+# tag:allocator
+when ($SANITIZER_TYPE) {
+ when ($SANITIZER_TYPE != "no") {
+ DEFAULT_ALLOCATOR=SYSTEM
+ }
+}
+
+# tag:internal
+### @usage: CHECK_CONFIG_H(<conf_header>) # internal
+###
+### This internal macro adds checking code for configuration header in external (contrib) library.
+### The check is needed to avoid conflicts on certain types and functions available in arcadia.
+###
+### @see https://a.yandex-team.ru/arc/trunk/arcadia/build/scripts/check_config_h.py for exact details
+macro CHECK_CONFIG_H(Conf) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/check_config_h.py"} ${input;rootrel:Conf} ${output;nopath;noext:Conf.config.cpp} ${kv;hide:"p CH"} ${kv;hide:"pc yellow"}
+ OUTPUT_INCLUDES=$Conf
+}
+
+REQUIRED_TRANSITIVE_PEERS=
+### @usage REQUIRES(dirs...)
+###
+### Specify list of dirs which this module must depend on indirectly.
+###
+### This macro can be used if module depends on the directories specified but they can't be listed
+### as direct PEERDIR dependencies (due to public include order or link order issues).
+macro REQUIRES(DIRS[]) {
+ SET_APPEND(REQUIRED_TRANSITIVE_PEERS $DIRS)
+}
+
+CHECK_DEPENDENT_DIRS_TYPES=
+CHECK_DEPENDENT_DIRS_RESTRICTIONS=
+### @usage CHECK_DEPENDENT_DIRS(DENY|ALLOW_ONLY ([ALL|PEERDIRS|GLOB] dir)...)
+###
+### Specify project transitive dependencies constraints.
+###
+### @params:
+### 1. DENY: current module can not depend on module from any specified directory neither directly nor transitively.
+### 2. ALLOW_ONLY: current module can not depend on module from a dir not specified in the directory list neither directly nor transitively.
+### 3. ALL: directory constraints following after this modifier are applied to both transitive PEERDIR dependencies and tool dependencies.
+### 4. PEERDIRS: directory constraints following after this modifier are applied to transitive PEERDIR dependencies only.
+### 5. GLOB: next directory constraint is an ANT glob pattern.
+### 6. EXCEPT: next constraint is an excption for the rest of other rules.
+###
+### Direcory constraints added before either ALL or PEERDIRS modifier is used are treated as ALL directory constraints.
+###
+### Note: Can be used multiple times on the same module all specified constraints will be checked.
+### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY)
+macro CHECK_DEPENDENT_DIRS(TYPE, ALL?"UNUSED":"", PEERDIRS?"PEERDIRS":"ALL", RESTRICTIONS...) {
+ SET_APPEND(CHECK_DEPENDENT_DIRS_RESTRICTIONS $PEERDIRS $RESTRICTIONS)
+ SET_APPEND(CHECK_DEPENDENT_DIRS_TYPES $TYPE)
+}
+
+# tag:proto
+PY_PROTOS_FOR=no
+BUILD_PROTO_AS_EVLOG=no
+
+# tag:proto
+PROTO_NAMESPACE=
+
+# tag:proto tag:python-specific
+GEN_PY_PROTOS=$YMAKE_PYTHON ${input:"build/scripts/gen_py_protos.py"}
+
+# tag:proto tag:cpp-specific
+PROTO_HEADER_EXTS=.pb.h
+CPP_PROTO_CMDLINE=
+CPP_PROTO_OPTS=
+CPP_PROTO_OUTS=
+CPP_PROTO_SUFFIXES=.pb.h .pb.cc
+CPP_PROTO_PLUGINS=
+
+# tag:proto tag:cpp-specific
+CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
+CPP_EV_OUTS=
+
+# tag:proto tag:python-specific
+PY_PROTO_OPTS=
+PY_PROTO_OUTS=
+PY_PROTO_OUTS_INTERNAL=
+PY_PROTO_DEPS=
+PY_PROTO_SUFFIXES=_pb2.py
+PY_EVLOG_SUFFIXES=_ev_pb2.py
+
+# tag:proto tag:java-specific
+JAVA_PROTO_ARGS=
+
+# tag:proto tag:python-specific
+OPTIMIZE_PY_PROTOS_FLAG=no
+
+# tag:built-in
+### @usage: RESOURCE([FORCE_TEXT ][Src Key]* [- Key=Value]*) # built-in
+### Add data (resources, random files, strings) to the program)
+### The common usage is to place Src file into binary. The Key is used to access it using library/cpp/resource or library/python/resource.
+### Alternative syntax with '- Key=Value' allows placing Value string as resource data into binary and make it accessible by Key.
+###
+### This is a simpler but less flexible option than ARCHIVE(), because in the case of ARCHIVE(), you have to use the data explicitly,
+### and in the case of RESOURCE(), the data will fall through SRCS() or SRCS(GLOBAL) to binary linking.
+###
+### Use the FORCE_TEXT parameter to explicitly mark all Src files as text files: they will not be parsed unless used elsewhere.
+###
+### @example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a2ispolzujjtekomanduresource
+###
+### @example:
+###
+### LIBRARY()
+### OWNER(user1)
+###
+### RESOURCE(
+### path/to/file1 /key/in/program/1
+### path/to/file2 /key2
+### )
+### END()
+###
+macro RESOURCE(Args...) {
+ PEERDIR(library/cpp/resource)
+}
+
+# tag:internal
+### @usage: _ORDER_ADDINCL([BUILD ...] [SOURCE ...] Args...) # internal
+###
+### Order and filter ADDINCLs (Args - is intentionally omitted in ADDINCL macro)
+macro _ORDER_ADDINCL(BUILD[], SOURCE[], ARGS...) {
+ ADDINCL($BUILD $SOURCE)
+}
+
+# tag:proto
+### @usage: PROTO_ADDINCL([GLOBAL] [WITH_GEN] Path)
+###
+### This macro introduces proper ADDINCLs for .proto-files found in sources and
+### .cpp/.h generated files, supplying them to appropriate commands and allowing
+### proper dependency resolution at configure-time.
+###
+### Note: you normally shouldn't use this macro. ADDINCLs should be sent to user
+### from dependency via PROTO_NAMESPACE macro
+macro PROTO_ADDINCL(GLOBAL?"GLOBAL":"", Path, WITH_GEN?"BUILD":"") {
+ _ORDER_ADDINCL($WITH_GEN $GLOBAL FOR proto ${ARCADIA_BUILD_ROOT}/$Path SOURCE $GLOBAL FOR proto ${ARCADIA_ROOT}/$Path)
+ ADDINCL($GLOBAL ${ARCADIA_BUILD_ROOT}/$Path)
+}
+
+# tag:proto
+### @usage: PROTO_NAMESPACE([GLOBAL] [WITH_GEN] Namespace)
+###
+### Defines protobuf namespace (import/export path prefix) which should be used for imports and
+### which defines output path for .proto generation.
+###
+### For proper importing and configure-time depenedency management it sets ADDINCLs
+### for both .cpp headers includes and .proto imports. If .proto expected to be used outsed of the
+### processing module use GLOBAL to send proper ADDINCLs to all (transitive) users. PEERDIR to
+### PROTO_LIBRARY with PROTO_NAMESPACE(GLOBAL ) is enough at user side to correctly use the library.
+### If generated .proto files are going to be used for building a module than use of WITH_GEN
+### parameter will add appropriate dir from the build root for .proto files search.
+macro PROTO_NAMESPACE(GLOBAL?"GLOBAL":"", WITH_GEN?"WITH_GEN":"", Namespace) {
+ SET(PROTO_NAMESPACE $Namespace)
+ PROTO_ADDINCL($GLOBAL $WITH_GEN $Namespace)
+}
+
+# tag:proto tag:internal tag:python-specific
+### @usage: OPTIMIZE_PY_PROTOS() # internal
+###
+### Enable Python proto optimization by embedding corresponding C++ code into binary.
+### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+### This is default mode for most PROTO_LIBRARY's and PY2_LIBRARY's, some system ones being exceptions.
+macro OPTIMIZE_PY_PROTOS() {
+ SET(OPTIMIZE_PY_PROTOS_FLAG yes)
+}
+
+# tag:proto tag:python-specific
+### @usage: NO_OPTIMIZE_PY_PROTOS()
+###
+### Disable Python proto optimization using embedding corresponding C++ code into binary.
+### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+### This is default mode only for some system libraries.
+macro NO_OPTIMIZE_PY_PROTOS() {
+ SET(OPTIMIZE_PY_PROTOS_FLAG no)
+}
+
+# tag:proto tag:python-specific
+macro _PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
+ .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$OutParm$ARCADIA_BUILD_ROOT/\$PROTO_NAMESPACE
+}
+
+# tag:proto tag:python-specific
+macro _ADD_PY_PROTO_OUT(Suf) {
+ SET_APPEND(PY_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=$Suf:File})
+ SET_APPEND(PY_PROTO_OUTS_INTERNAL \${output;hide;noauto;norel;nopath;noext;suf=__int__$Suf:File} \${hide;kv:"ext_out_name_for_\${nopath;noext;suf=__int__$Suf:File} \${nopath;noext;suf=$Suf:File}"})
+ # XXX fix variable expansion in plugins
+ SET(PY_PROTO_SUFFIXES $PY_PROTO_SUFFIXES $Suf)
+}
+
+# tag:proto tag:python-specific
+### @usage: PY_PROTO_PLUGIN(Name Ext Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for python with given Name that emits extra output with provided Extension
+### using Tool. Extra dependencies are passed via DEPS
+macro PY_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
+ SET_APPEND(PY_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+ _ADD_PY_PROTO_OUT($EXT)
+ # XXX fix variable expansion in plugins
+ SET(PY_PROTO_DEPS $PY_PROTO_DEPS $DEPS)
+}
+
+# tag:proto tag:python-specific
+### @usage: PY_PROTO_PLUGIN2(Name Ext1 Ext2 Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for python with given Name that emits 2 extra outputs with provided Extensions
+### using Tool. Extra dependencies are passed via DEPS
+macro PY_PROTO_PLUGIN2(NAME, EXT1, EXT2, TOOL, DEPS[]) {
+ PY_PROTO_PLUGIN($NAME $EXT1 $TOOL DEPS $DEPS)
+ _ADD_PY_PROTO_OUT($EXT2)
+}
+
+# tag:proto tag:java-specific
+macro _JAVA_PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
+ .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$ARCADIA_BUILD_ROOT/java_out
+}
+
+# tag:proto tag:java-specific
+### @usage: JAVA_PROTO_PLUGIN(Name Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for Java with given Name that emits extra outputs
+### using Tool. Extra dependencies are passed via DEPS
+macro JAVA_PROTO_PLUGIN(NAME, TOOL, DEPS[]) {
+ SET_APPEND(JAVA_PROTO_ARGS $_JAVA_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+ # XXX fix variable expansion in plugins
+ SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS $DEPS)
+}
+
+# tag:proto tag:cpp-specific
+macro _ADD_CPP_PROTO_OUT(Suf) {
+ SET_APPEND(CPP_PROTO_OUTS \${output;hide;norel;nopath;noext;suf=$Suf:File})
+
+ # XXX fix variable expansion in plugins
+ SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
+}
+
+# tag:proto tag:cpp-specific
+HAS_CPP_PROTOBUF_PEERS=no
+CPP_PROTOBUF_PEERS=
+
+# tag:proto tag:cpp-specific
+### @usage: CPP_PROTO_PLUGIN0(Name Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into regular outputs
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN0(NAME, TOOL, DEPS[]) {
+ SET_APPEND(CPP_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+
+ # XXX fix variable expansion in plugins
+ ENABLE(HAS_CPP_PROTOBUF_PEERS)
+ SET(CPP_PROTOBUF_PEERS $CPP_PROTOBUF_PEERS $DEPS)
+}
+
+# tag:proto tag:cpp-specific
+### @usage: CPP_PROTO_PLUGIN(Name Tool Suf DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into 1 extra output
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN(NAME, TOOL, SUF, DEPS[]) {
+ CPP_PROTO_PLUGIN0($NAME $TOOL DEPS $DEPS)
+
+ _ADD_CPP_PROTO_OUT($SUF)
+}
+
+# tag:proto tag:cpp-specific
+### @usage: CPP_PROTO_PLUGIN2(Name Tool Suf1 Suf2 DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into 2 extra outputs
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN2(NAME, TOOL, SUF1, SUF2, DEPS[]) {
+ CPP_PROTO_PLUGIN($NAME $TOOL $SUF1 DEPS $DEPS)
+
+ _ADD_CPP_PROTO_OUT($SUF2)
+}
+
+# tag:proto
+### @usage: USE_SKIFF() #wip, do not use
+###
+### Use mapreduce/yt/skiff_proto/plugin for C++
+macro USE_SKIFF() {
+ # Move extra includes to INDUCED_DEPS macro in mapreduce/yt/skiff_proto/plugin/ya.make
+ CPP_PROTO_PLUGIN0(skiff mapreduce/yt/skiff_proto/plugin DEPS mapreduce/yt/skiff_proto/lib)
+}
+
+# tag:go-specific
+_GO_COMMON_GOOGLE_APIS = \
+vendor/google.golang.org/genproto/googleapis/api/annotations \
+vendor/google.golang.org/genproto/googleapis/api/configchange \
+vendor/google.golang.org/genproto/googleapis/api/distribution \
+vendor/google.golang.org/genproto/googleapis/api/expr/v1alpha1 \
+vendor/google.golang.org/genproto/googleapis/api/expr/v1beta1 \
+vendor/google.golang.org/genproto/googleapis/api/httpbody \
+vendor/google.golang.org/genproto/googleapis/api/label \
+vendor/google.golang.org/genproto/googleapis/api/metric \
+vendor/google.golang.org/genproto/googleapis/api/monitoredres \
+vendor/google.golang.org/genproto/googleapis/api/serviceconfig \
+vendor/google.golang.org/genproto/googleapis/api/servicecontrol/v1 \
+vendor/google.golang.org/genproto/googleapis/api/servicemanagement/v1 \
+vendor/google.golang.org/genproto/googleapis/iam/admin/v1 \
+vendor/google.golang.org/genproto/googleapis/iam/credentials/v1 \
+vendor/google.golang.org/genproto/googleapis/iam/v1 \
+vendor/google.golang.org/genproto/googleapis/iam/v1/logging \
+vendor/google.golang.org/genproto/googleapis/logging/type \
+vendor/google.golang.org/genproto/googleapis/logging/v2 \
+vendor/google.golang.org/genproto/googleapis/rpc/code \
+vendor/google.golang.org/genproto/googleapis/rpc/errdetails \
+vendor/google.golang.org/genproto/googleapis/rpc/status \
+vendor/google.golang.org/genproto/googleapis/type/calendarperiod \
+vendor/google.golang.org/genproto/googleapis/type/color \
+vendor/google.golang.org/genproto/googleapis/type/date \
+vendor/google.golang.org/genproto/googleapis/type/dayofweek \
+vendor/google.golang.org/genproto/googleapis/type/expr \
+vendor/google.golang.org/genproto/googleapis/type/fraction \
+vendor/google.golang.org/genproto/googleapis/type/latlng \
+vendor/google.golang.org/genproto/googleapis/type/money \
+vendor/google.golang.org/genproto/googleapis/type/postaladdress \
+vendor/google.golang.org/genproto/googleapis/type/quaternion \
+vendor/google.golang.org/genproto/googleapis/type/timeofday
+
+# tag:go-specific
+_COMMON_GOOGLE_APIS=None
+
+# tag:go-specific
+### @usage: USE_COMMON_GOOGLE_APIS([apis...])
+###
+### Use common-google-apis library set. Pass optional apis list to be used or use them all.
+### This macro is properly handled for all languages including Go, where apis come in
+## pregenerated form. In other languages apis are generated from sources in Arcadia.
+macro USE_COMMON_GOOGLE_APIS(APIS...) {
+ SET(_COMMON_GOOGLE_APIS ${pre=vendor/google.golang.org/genproto/googleapis/:APIS})
+}
+
+# tag:go-specific tag:proto
+GO_PROTO_GEN_TOOL=$_TOOL_PROTOC_GEN_GO
+GO_PROTO_GEN_PLUGINS=
+GO_PROTO_PACKAGE_MAP=
+GO_PROTO_OPTS=$_GO_PROTOC_PLUGIN_ARGS_BASE(go $GO_PROTO_GEN_TOOL MAP $GO_PROTO_PACKAGE_MAP PLUGINS $GO_PROTO_GEN_PLUGINS)
+GO_PROTO_OUTS=
+
+# tag:go-specific tag:proto
+GO_PROTOBUF_IMPORTS=\
+ ${GOSTD}/sync \
+ ${GOSTD}/reflect \
+ ${GOSTD}/fmt \
+ ${GOSTD}/math \
+ vendor/github.com/golang/protobuf/proto \
+ vendor/google.golang.org/protobuf/types/descriptorpb \
+ vendor/google.golang.org/protobuf/runtime/protoimpl \
+ vendor/google.golang.org/protobuf/runtime/protoiface \
+ vendor/google.golang.org/protobuf/reflect/protoreflect
+
+# tag:go-specific tag:proto
+GO_PROTOBUF_WELLKNOWN_TYPES=\
+ vendor/google.golang.org/protobuf/types/known/anypb \
+ vendor/google.golang.org/protobuf/types/known/apipb \
+ vendor/google.golang.org/protobuf/types/known/durationpb \
+ vendor/google.golang.org/protobuf/types/known/emptypb \
+ vendor/google.golang.org/protobuf/types/known/fieldmaskpb \
+ vendor/google.golang.org/protobuf/types/known/sourcecontextpb \
+ vendor/google.golang.org/protobuf/types/known/structpb \
+ vendor/google.golang.org/protobuf/types/known/timestamppb \
+ vendor/google.golang.org/protobuf/types/known/typepb \
+ vendor/google.golang.org/protobuf/types/known/wrapperspb
+
+# tag:go-specific tag:proto
+### @usage: GO_PROTO_PLUGIN(Name Ext Tool [DEPS dependencies...])
+###
+### Define protoc plugin for GO with given Name that emits extra output with provided extension
+### Ext using Tool. Extra dependencies are passed via DEPS.
+macro GO_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
+ SET_APPEND(GO_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+ SET_APPEND(GO_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=$EXT:File})
+ PEERDIR(${DEPS})
+}
+
+# tag:go-specific tag:proto
+macro _GO_PROTOC_PLUGIN_ARGS_BASE_IMPL(Name, Tool, PLUGINS...) {
+ .CMD=--plugin=protoc-gen-${Name}=${tool:Tool} --${Name}_out=${join=|:PLUGINS}:${ARCADIA_BUILD_ROOT}/$PROTO_NAMESPACE
+}
+
+# tag:go-specific tag:proto
+macro _GO_PROTOC_PLUGIN_ARGS_BASE_PROXY(Name, Tool, MAP[], PLUGINS[]) {
+ .CMD=$_GO_PROTOC_PLUGIN_ARGS_BASE_IMPL($Name $Tool $MAP ${pre=plugins=:PLUGINS})
+}
+
+# tag:go-specific tag:proto
+macro _GO_PROTOC_PLUGIN_ARGS_BASE(Name, Tool, MAP[], PLUGINS[]) {
+ .CMD=$_GO_PROTOC_PLUGIN_ARGS_BASE_PROXY($Name $Tool MAP ${pre=M:MAP} PLUGINS ${join=|:PLUGINS})
+}
+
+# tag:go-specific tag:proto
+GO_PROTO_CMDLINE=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/go_proto_wrapper.py"} $GO_ARCADIA_PROJECT_PREFIX $GO_CONTRIB_PROJECT_PREFIX ./$PROTO_NAMESPACE $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH ${input;rootrel:File}
+
+# tag:go-specific tag:proto
+macro _GO_PROTO_CMD_IMPL(File, OPTS[], OUTS[]) {
+ .CMD=$GO_PROTO_CMDLINE $OPTS $OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=${GO_PROTOBUF_IMPORTS} ${GO_PROTOBUF_WELLKNOWN_TYPES}
+ .ADDINCL=FOR proto contrib/libs/protobuf/src
+}
+
+# tag:go-specific tag:proto
+macro _GO_PROTO_CMD(File) {
+ .CMD=$_GO_PROTO_CMD_IMPL($File OPTS $GO_PROTO_OPTS OUTS $GO_PROTO_OUTS)
+}
+
+# tag:proto
+### @usage: YP_PROTO_YSON(Files... OUT_OPTS Opts...)
+###
+### Genereate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
+macro YP_PROTO_YSON(OUT_OPTS[], Files...) {
+ .CMD=${cwd:BINDIR} $PROTOC --plugin=protoc-gen-custom=${tool:"yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen"} -I=${ARCADIA_ROOT}/${PROTO_NAMESPACE} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} --custom_out="$OUT_OPTS paths=base_name:." --custom_opt="goroot=${GO_TOOLS_ROOT}" ${input:Files} ${output;hide;noauto;nopath;noext;suf=.yson.go:Files}
+ .ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto contrib/libs/protobuf/src
+ .PEERDIR=$GOSTD/strings $GOSTD/fmt $GOSTD/errors $GOSTD/encoding/json library/go/core/xerrors yt/go/yson yt/go/yterrors yp/go/yson/ytypes contrib/libs/protobuf
+
+}
+
+# tag:proto
+macro _CPP_PROTO_CMD(File) {
+ .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .SEM=target_proto_mesages PRIVATE ${input:File} ${output;hide;suf=.pb.o:File} ${output;main;hide;norel;nopath;noext:File.pb.h} ${hide;tool:"contrib/tools/protoc/bin"} && set_global_flags COMON_PROTOC_FLAGS -I=$ARCADIA_ROOT -I=$ARCADIA_BUILD_ROOT && modules_required protobuf.cmake
+ .PEERDIR=contrib/libs/protobuf
+}
+
+# tag:proto
+macro _CPP_VANILLA_PROTO_CMD(File) {
+ .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=contrib/libs/protobuf_std
+}
+
+# tag:proto
+macro _CPP_EVLOG_CMD(File) {
+ .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_EV_OUTS ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+ .PEERDIR=library/cpp/eventlog contrib/libs/protobuf
+}
+
+# tag:proto
+macro _CPP_PROTO_EVLOG_CMD(File) {
+ # process .proto as .ev
+ .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=library/cpp/eventlog contrib/libs/protobuf
+}
+
+# tag:proto
+macro _CPP_CFGPROTO_CMD(File) {
+ # keep extension in output just as in EV: this is hard-codeded behaviour of protoc for non-.proto extensions
+ .CMD=$CPP_PROTO_CMDLINE --plugin=protoc-gen-config=${tool:"library/cpp/proto_config/plugin"} --config_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $CPP_EV_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=library/cpp/proto_config/codegen library/cpp/proto_config/protos contrib/libs/protobuf
+}
+
+# tag:proto
+PY_PROTO_MYPY_ENABLED=yes
+PY_PROTO_MYPY_PLUGIN_BASE=--plugin=protoc-gen-mypy=${tool:"contrib/python/mypy-protobuf/bin/protoc-gen-mypy"} --mypy_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
+
+# tag:proto tag:python-specific
+PY_PROTO_MYPY_SUFFIX=
+PY_PROTO_MYPY_PLUGIN=
+PY_PROTO_MYPY_PLUGIN_INTERNAL=
+
+# tag:proto tag:python-specific
+macro NO_MYPY() {
+ DISABLE(PY_PROTO_MYPY_ENABLED)
+}
+
+# tag:proto tag:python-specific
+macro _PY_PROTO_CMD_BASE(File, Suf, Args...) {
+ .CMD=$PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $Args
+}
+
+# tag:proto tag:python-specific
+macro _PY_PROTO_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $_PY_PROTO_CMD_BASE($File _pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS $PY_PROTO_MYPY_PLUGIN)
+}
+
+# tag:proto tag:python-specific
+macro _PY_PROTO_CMD_INTERNAL(File) {
+ .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_PROTO_SUFFIXES $PY_PROTO_MYPY_SUFFIX -- $_PY_PROTO_CMD_BASE($File __int___pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS_INTERNAL ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.py:File} ${nopath;noext;suf=_pb2.py:File}"} $PY_PROTO_MYPY_PLUGIN_INTERNAL)
+}
+
+# tag:proto tag:java-specific
+JAVA_PROTO_RUNTIME=
+
+# tag:proto tag:java-specific
+### @usage: USE_JAVALITE()
+### Use protobuf-javalite for Java
+macro USE_JAVALITE() {
+ SET(JAVA_PROTO_RUNTIME javalite)
+}
+
+# tag:proto tag:java-specific
+JAVA_PROTO_RUNTIME_VERSION = 3.18.2
+JAVA_PROTO_COMMON_VERSION = 1.12.0
+when ($JAVA_PROTO_RUNTIME == "javalite") {
+ _JAVA_PROTO_OUT_ARG=--java_out=lite:
+ JAVA_PROTOBUF_PEERS=contrib/java/com/google/protobuf/protobuf-javalite/${JAVA_PROTO_RUNTIME_VERSION}
+ JAVA_GRPC_STUB=contrib/java/io/grpc/grpc-stub/1.19.0
+ JAVA_GRPC_PROTOBUF=contrib/java/io/grpc/grpc-protobuf/1.19.0
+}
+otherwise {
+ _JAVA_PROTO_OUT_ARG=--java_out=
+ JAVA_PROTOBUF_PEERS=contrib/java/com/google/protobuf/protobuf-java/${JAVA_PROTO_RUNTIME_VERSION}
+ JAVA_GRPC_STUB=contrib/java/io/grpc/grpc-stub/1.26.0
+ JAVA_GRPC_PROTOBUF=contrib/java/io/grpc/grpc-protobuf/1.26.0
+}
+
+# tag:proto tag:java-specific
+macro _JAVA_PROTO_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/tared_protoc.py"} --tar-output ${output;norel;nopath;noext;suf=.jsrc:File} --protoc-out-dir $ARCADIA_BUILD_ROOT/java_out $PROTOC -I=./$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_ROOT $_JAVA_PROTO_OUT_ARG$ARCADIA_BUILD_ROOT/java_out ${input;rootrel:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $JAVA_PROTO_ARGS
+}
+
+
+# tag:proto tag:perl-specific tag:deprecated
+### @usage: XS_PROTO(InputProto Dir Outputs...) # deprecated
+###
+### Generate Perl code from protobuf.
+### In order to use this macro one should predict all outputs protoc will emit from input_proto file and enlist those as outputs.
+macro XS_PROTO(File, Dir, Outputs...) {
+ .CMD=$PROTOC -I=${ARCADIA_ROOT}/${Dir} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} -I=${PROTOBUF_PATH} --perlxs_out=${BINDIR} ${input:File} ${hide;output:Outputs} ${output_include;hide;nopath;noext;suf=.pb.h:File}
+ PEERDIR(${Dir})
+ ADDINCL(${ARCADIA_BUILD_ROOT}/${Dir})
+}
+
+# tag:proto tag:fbs
+### @usage: PROTO2FBS(InputProto)
+###
+### Produce flatbuf schema out of protobuf description.
+macro PROTO2FBS(File) {
+ .CMD=${cwd:BINDIR} ${tool:"contrib/tools/flatc"} -I . -I ${ARCADIA_ROOT} --proto ${input:File} ${output;hide;nopath;noext:File.fbs} ${kv;hide:"p FBS"} ${kv;hide:"pc yellow"}
+}
+
+# tag:proto tag:python-specific
+when ($PY_PROTOS_FOR == "yes") {
+ PEERDIR+=contrib/libs/protobuf/python
+}
+
+# tag:python-specific
+macro _PY_EVLOG_CMD_BASE(File, Suf, Args...) {
+ .CMD=$_PY_PROTO_CMD_BASE($File $Suf $Args)
+ .PEERDIR=library/cpp/eventlog/proto
+}
+
+# tag:python-specific tag:proto
+macro _PY_EVLOG_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $_PY_EVLOG_CMD_BASE($File _ev_pb2.py)
+}
+
+# tag:python-specific tag:proto
+macro _PY_EVLOG_CMD_INTERNAL(File) {
+ .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_EVLOG_SUFFIXES -- $_PY_EVLOG_CMD_BASE($File __int___ev_pb2.py ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___ev_pb2.py:File} ${nopath;noext;suf=_ev_pb2.py:File}"})
+}
+
+# tag:java-specific tag:proto
+macro _JAVA_EVLOG_CMD(File) {
+ .CMD=$COPY_CMD ${input:File} ${output;nopath;noext;norel;suf=_ev.proto:File} ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+ .PEERDIR=library/cpp/eventlog/proto
+}
+
+# tag:sanitize
+RUN_NO_SANITIZE=$YMAKE_PYTHON ${input:"build/scripts/run_tool.py"} --
+
+# tag:sanitize
+when ($IS_CROSS_SANITIZE) {
+ RUN_NO_SANITIZE=
+}
+
+YIELD=$YMAKE_PYTHON ${input:"build/scripts/yield_line.py"} -- ${BINDIR}/__args
+XARGS=$YMAKE_PYTHON ${input:"build/scripts/xargs.py"} -- ${BINDIR}/__args
+
+RESPFILE_CMD=$YMAKE_PYTHON ${input:"build/scripts/writer.py"}
+
+FS_TOOLS=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"}
+
+COPY_CMD=$FS_TOOLS copy
+LINK_OR_COPY_CMD=$FS_TOOLS link_or_copy
+REMOVE_FILE=$FS_TOOLS remove
+MOVE_FILE=$FS_TOOLS rename
+
+# tag:allocator tag:windows-specific
+MSVC_DYNAMICBASE=/DYNAMICBASE
+when ($ALLOCATOR == "LF") {
+ MSVC_DYNAMICBASE=/DYNAMICBASE:NO
+}
+
+# tag:sanitize
+SANITIZER_CFLAGS=
+
+# tag:proto tag:grpc
+### @usage: GRPC()
+###
+### Emit GRPC code for all .proto files in a PROTO_LIBRARY.
+### This works for all available PROTO_LIBRARY versions (C++, Python 2.x, Pyton 3.x, Java and Go).
+macro GRPC() {
+ # C++
+ CPP_PROTO_PLUGIN2(grpc_cpp contrib/tools/protoc/plugins/grpc_cpp .grpc.pb.cc .grpc.pb.h DEPS contrib/libs/grpc)
+
+ # Python
+ PY_PROTO_PLUGIN(grpc_py _pb2_grpc.py contrib/tools/protoc/plugins/grpc_python DEPS contrib/libs/grpc/python contrib/libs/grpc)
+
+ # Java
+ JAVA_PROTO_PLUGIN(grpc_java contrib/tools/protoc/plugins/grpc_java DEPS $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
+}
+
+# tag:fbs
+FLATC_FLAGS_VALUE=
+### @usage: FLATC_FLAGS(flags...)
+###
+### Add flags to flatc command line
+macro FLATC_FLAGS(FLAGS...) {
+ SET_APPEND(FLATC_FLAGS_VALUE $FLAGS)
+}
+
+# tag:fbs
+_PY_FBS_DEPS=contrib/python/flatbuffers
+
+# tag:fbs tag:internal
+### @usage: FBS_TO_PYSRC(output_base_name fbs_files...) # internal
+###
+### Create a tar archive of .py files generated by flatc for Python. Output tar
+### archive will have .fbs.pysrc extension. This .fbs.pysrc extension is specially
+### processed when --add-flatbuf-result flag is specified on the command line
+### for 'ya make ...' (tar archive is extracted to output directory).
+macro FBS_TO_PYSRC(OUT_NAME, IN_FBS_FILES...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:"contrib/tools/flatc"} --python --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"}
+}
+
+# tag:fbs tag:go-specific
+# Implicit dependencies of generated code for Go
+_GO_FLATC_IMPORTS=\
+ ${GOSTD}/strconv \
+ vendor/github.com/google/flatbuffers/go
+
+# tag:fbs tag:cpp-specific
+macro _CPP_FLATC_CMD(SRC, SRCFLAGS...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${output;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${kv;hide:"p FL"} ${kv;hide:"pc light-green"}
+ .PEERDIR=contrib/libs/flatbuffers
+}
+
+# tag:fbs tag:cpp-specific
+macro _CPP_FLATC64_CMD(SRC, SRCFLAGS...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc64"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --filename-suffix .fbs64 ${FLATC_FLAGS_VALUE} -I ${ARCADIA_ROOT} -I ${ARCADIA_BUILD_ROOT} -o ${output;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;noauto;hide;noext;norel:SRC.bfbs64} ${kv;hide:"p FL64"} ${kv;hide:"pc light-green"}
+ .PEERDIR=contrib/libs/flatbuffers64
+}
+
+# tag:fbs tag:go-specific tag:internal
+### @usage: _GO_FLATC_CMD(fbs_file flags...) # internal
+###
+### Create a tar archive of .go files generated by flatc for Go. Output tar archive
+### wiil have .fbs.gosrc extension. This .fbs.gosrc is specially processed when
+### --add-protobuf-result flag is specified on the command line for 'ya make ...'
+### (tar archive is extracted to output directory).
+macro _GO_FLATC_CMD(SRC, PACKAGE_NAME) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:"contrib/tools/flatc"} --go --gen-mutable --go-namespace ${PACKAGE_NAME} ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR}/_generated ${input:SRC} && $YMAKE_PYTHON ${input:"build/scripts/postprocess_go_fbs.py"} --input-dir ${BINDIR} --map $_FBS_NAMESPACE_MAP_GLOBAL && $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --flat --input ${BINDIR}/_generated --output ${output;noext;tared:SRC.fbs.gosrc} --exts .go ${kv;hide:"p FG"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"}
+ .PEERDIR=${_GO_FLATC_IMPORTS}
+}
+
+# tag:fbs tag:java-specific tag:internal
+### @usage: _JAVA_FLATC_CMD(fbs_file) # internal
+###
+### Create a tar archive of .java files generated by flatc for Java. Output tar
+### acrchive will have .fbs.jsrc extension. Files with .fbs.jsrc extension will
+### be added to results when --add-flatbuf-result flag is specified on the command
+### line for 'ya make ...'
+macro _JAVA_FLATC_CMD(SRC) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:"contrib/tools/flatc"} --java --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:SRC} && $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --input $BINDIR --output ${output;nopath;noext:SRC.fbs.jsrc} --exts .java ${kv;hide:"p FJ"} ${kv;hide:"pc light-green"}
+ .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=
+NEED_PLATFORM_PEERDIRS=yes
+PEERDIR_TEST_TOOL=yes
+
+# tag:python-specific
+PYTHON2=no
+PYTHON3=no
+
+# tag:python-specific
+when (!$ARCADIA_PYTHON_UNICODE_SIZE) {
+ when ($OS_WINDOWS) {
+ ARCADIA_PYTHON_UNICODE_SIZE=2
+ }
+ otherwise {
+ ARCADIA_PYTHON_UNICODE_SIZE=4
+ }
+}
+
+### @usage: _BARE_UNIT # internal
+###
+### The base of all modules describing default bare minimum for all modules.
+### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+module _BARE_UNIT {
+ .EXTS=.*
+ .CMD=TOUCH_UNIT
+ .IGNORED=GO_PROTO_PLUGIN
+ .NODE_TYPE=Bundle
+ .PEERDIR_POLICY=as_include
+ .RESTRICTED=GRPC USE_SKIFF INDUCED_DEPS FUZZ_DICTS FUZZ_OPTS PACK DOCS_DIR DOCS_CONFIG DOCS_VARS YT_SPEC USE_CXX USE_UTIL WHOLE_ARCHIVE PRIMARY_OUTPUT SECONDARY_OUTPUT DEPENDENCY_MANAGEMENT EXCLUDE NO_DOCTESTS EMBED_JAVA_VCS_INFO RESOURCE_FILES PACK_GLOBALS_IN_LIBRARY EXPOSE GLOBAL_DEPS
+ .FINAL_TARGET=no
+
+ PEERDIR_TAGS=__EMPTY__
+
+ when ($FATAL_ERROR_MESSAGE && $FATAL_ERROR_MODULE != "yes") {
+ PEERDIR+=build/conf_fatal_error
+ }
+
+ DEFAULT(MODULE_VERSION)
+ DEFAULT(MODULE_PREFIX)
+ DEFAULT(MODULE_SUFFIX)
+}
+
+### @usage: _BASE_UNIT # internal
+###
+### The base of all LIBRARY/PROGRAM modules describing common logic for all modules.
+### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+module _BASE_UNIT: _BARE_UNIT {
+ .GLOBAL=_FBS_NAMESPACE_MAP
+
+ PEERDIR_TAGS=CPP_PROTO CPP_FBS CPP_SSQLS CPP_IDL PY2 PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB
+
+ CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --cpp_out=${CPP_PROTO_PLUGINS}$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT $PROTOC_PLUGIN_STYLEGUIDE ${input;rootrel:File}
+ CPP_PROTO_OUTS+=${output;hide;norel;nopath;noext:File.pb.cc} ${output;main;hide;norel;nopath;noext:File.pb.h}
+ CPP_EV_OUTS+=${output;hide;norel:File.pb.cc} ${output;hide;norel:File.pb.h}
+
+ when ($PY_PROTOS_FOR == "yes") {
+ MACRO_ALIAS(EVLOG_CMD _PY_EVLOG_CMD)
+ MACRO_ALIAS(PROTO_CMD _PY_PROTO_CMD)
+ }
+ otherwise {
+ MACRO_ALIAS(EVLOG_CMD _CPP_EVLOG_CMD)
+ MACRO_ALIAS(FBS_CMD _CPP_FLATC_CMD)
+ when ($BUILD_PROTO_AS_EVLOG == "yes") {
+ MACRO_ALIAS(PROTO_CMD _CPP_PROTO_EVLOG_CMD)
+ }
+ otherwise {
+ MACRO_ALIAS(PROTO_CMD _CPP_PROTO_CMD)
+ }
+ when ($USE_VANILLA_PROTOC == "yes") {
+ PROTOC=${tool:"contrib/tools/protoc_std"}
+ PROTOC_STYLEGUIDE_OUT=
+ PROTOC_PLUGIN_STYLEGUIDE=
+ PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf_std
+ MACRO_ALIAS(PROTO_CMD _CPP_VANILLA_PROTO_CMD)
+ }
+ }
+
+ SANITIZER_DEFINED=no
+
+ when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled $SANITIZER_CFLAGS -fno-omit-frame-pointer
+ LDFLAGS+=-fsanitize=$SANITIZER_TYPE
+ SANITIZER_DEFINED=yes
+
+ when ($CLANG) {
+ CFLAGS+=-fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"}
+ LDFLAGS+=-fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"}
+ }
+ }
+
+ when ($SANITIZE_COVERAGE && $SANITIZE_COVERAGE != "no") {
+ CFLAGS+=-fsanitize-coverage=$SANITIZE_COVERAGE
+ LDFLAGS+=-fsanitize-coverage=$SANITIZE_COVERAGE
+ }
+
+ when ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") {
+ CFLAGS+=-fprofile-instr-generate -fcoverage-mapping -DCLANG_COVERAGE
+ LDFLAGS+=-fprofile-instr-generate -fcoverage-mapping
+ }
+
+ when ($NLG_COVERAGE && $NLG_COVERAGE != "no") {
+ CFLAGS+=-DNLG_COVERAGE
+ }
+
+ when ($GCC) {
+ select ($SANITIZER_TYPE) {
+ "address" ? {
+ LDFLAGS+=-static-libasan
+ }
+ "undefined" ? {
+ LDFLAGS+=-static-libubsan
+ }
+ "thread" ? {
+ PIE=yes
+ LDFLAGS+=-static-libtsan
+ }
+ }
+ }
+
+ when ($HARDENING == "yes") {
+ when ($CLANG) {
+ CFLAGS+=-fstack-protector-all -D_hardening_enabled_
+ LDFLAGS+=-z relro -z now -z noexecstack
+ PIE=yes
+ }
+ }
+
+ when ($USE_LTO == "yes") {
+ when ($GCC) {
+ CFLAGS+=-flto -fno-fat-lto-objects
+ LDFLAGS+=-flto
+ }
+ when ($CLANG) {
+ CFLAGS+=-flto
+ LDFLAGS+=-flto
+ }
+ }
+
+ when ($USE_THINLTO == "yes") {
+ when ($GCC) {
+ CFLAGS+=-flto=thin
+ LDFLAGS+=-flto=thin
+ }
+ when ($CLANG) {
+ CFLAGS+=-flto=thin
+ LDFLAGS+=-flto=thin
+ }
+ }
+
+
+ when ($CLANG) {
+ when ($PGO_ADD == "yes") {
+ CFLAGS+=-fprofile-instr-generate
+ LDFLAGS+=-fprofile-instr-generate
+ }
+ when ($PGO_PATH) {
+ CFLAGS+=-fprofile-instr-use=$PGO_PATH -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date
+ LDFLAGS+=-fprofile-instr-use=$PGO_PATH
+ }
+ }
+
+ when ($COMPILER_PLATFORM && $NEED_PLATFORM_PEERDIRS == "yes") {
+ PEERDIR+=$COMPILER_PLATFORM
+ }
+
+ when ($OS_LINUX && $NEED_PLATFORM_PEERDIRS == "yes") {
+ PEERDIR+=contrib/libs/linux-headers
+ }
+
+ # Adding PEERDIR from trigger doesn't always work. In this case it
+ # cause troubles in contrib/libs/libc_compat/ubuntu_14 under musl
+ # Workaround this issue by setting variable with PEERDIR in trigger
+ # and then adding PEERDIR to it's value unconditionally.
+ when ($USE_UBUNTU_COMPATIBILITY == "yes" && $NEED_PLATFORM_PEERDIRS == "yes") {
+ _UBUNTU_COMPAT_PEERDIR=contrib/libs/libc_compat/ubuntu_14
+ }
+ otherwise {
+ _UBUNTU_COMPAT_PEERDIR=
+ }
+ PEERDIR+=$_UBUNTU_COMPAT_PEERDIR
+
+ when ($NORUNTIME != "yes") {
+ PEERDIR+=contrib/libs/cxxsupp
+ when ($MAPSMOBI_BUILD_TARGET == "yes") {
+ PEERDIR+=build/platform/mapkit
+ }
+ }
+
+ when ($NOUTIL != "yes") {
+ PEERDIR+=util
+ }
+
+ when ($MUSL == "yes") {
+ CFLAGS += -D_musl_
+ LINK_DYN_LIB_FLAGS += --musl
+ LINK_SCRIPT_EXE_FLAGS += --musl
+ PEERDIR+=contrib/libs/musl/include
+ }
+
+ # g++ has proxy C-headers which are incompatible with libc++ proxy C-headers.
+ # The same problem exists for clang toolchain. On the other hand, the problem
+ # doesn't affect cl since it has united C/C++ library and doesn't need
+ # proxy C-headers.
+ # Disable all C++ headers including proxy C-headers when we use libc++.
+ when ($USE_INTERNAL_STL == "yes" && $MSVC != "yes") {
+ CXXFLAGS += -nostdinc++
+ }
+
+ when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+ PEERDIR += build/external_resources/codenavigation
+ }
+
+ when ($CYTHON_COVERAGE && $CYTHON_COVERAGE == "yes") {
+ CFLAGS+=-DCYTHON_TRACE=1 -DCYTHON_TRACE_NOGIL=1
+ }
+
+ DEFAULT(USE_SSE4 yes)
+
+ when ($NOSSE != "yes") {
+ CFLAGS+=$SSE_CFLAGS
+ C_DEFINES+=$SSE_DEFINES
+ when ($USE_SSE4 == "yes") {
+ CFLAGS+=$SSE4_CFLAGS
+ C_DEFINES+=$SSE4_DEFINES
+ }
+ }
+ elsewhen ($MSVC != "yes") {
+ CFLAGS += -mno-sse
+ }
+
+ when ($LIPO == "yes" && $NEED_PLATFORM_PEERDIRS != "no") {
+ when ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
+ PEERDIR += build/platform/cctools
+ }
+ }
+
+ _REGISTER_NO_CHECK_IMPORTS()
+
+ DEFAULT(PACKAGE_PREFIX_ARGS)
+
+ DEFAULT(BYACC_FLAGS -v)
+ DEFAULT(SWIG_LANG python)
+ DEFAULT(BISON_FLAGS -v)
+ DEFAULT(GP_FLAGS -CtTLANSI-C -Dk* -c)
+
+ when ($NEED_BINUTILS_PEERDIR && $BINUTILS_USED && $NEED_PLATFORM_PEERDIRS == "yes") {
+ PEERDIR+=build/platform/binutils
+ }
+}
+
+_LINKER_ID=
+# GCC does not support -fuse-ld with an executable path, only
+# -fuse-ld=bfd or -fuse-ld=gold (or -fuse-ld=lld in later versions).
+when ($_LINKER_ID != "" && $_DEFAULT_LINKER_ID != "" && $CLANG == "yes" && $NEED_PLATFORM_PEERDIRS == "yes") {
+ when ($_LINKER_ID in [ "bfd", "gold", "lld" ]) {
+ PEERDIR+=build/platform/${_LINKER_ID}
+ }
+}
+
+macro _USE_LINKER_IMPL(LINKER_ID...) {
+ SET(_LINKER_ID $LINKER_ID)
+}
+
+macro _USE_LINKER() {
+ _USE_LINKER_IMPL($_DEFAULT_LINKER_ID)
+}
+
+### @usage: USE_LINKER_BFD()
+### Use bfd linker for a program. This doesn't work in libraries
+macro USE_LINKER_BFD() {
+ _USE_LINKER_IMPL(bfd)
+}
+### @usage: USE_LINKER_GOLD()
+### Use gold linker for a program. This doesn't work in libraries
+macro USE_LINKER_GOLD() {
+ _USE_LINKER_IMPL(gold)
+}
+### @usage: USE_LINKER_LLD()
+### Use lld linker for a program. This doesn't work in libraries
+macro USE_LINKER_LLD() {
+ _USE_LINKER_IMPL(lld)
+}
+
+COMMON_LINK_SETTINGS=
+LINK_ADDITIONAL_SECTIONS=
+LINK_ADDITIONAL_SECTIONS_COMMAND=
+
+when ($COMMON_LINK_SETTINGS == "yes") {
+ when ($_LINKER_ID == "lld" || $_LINKER_ID == "gold") {
+ LDFLAGS += -Wl,--gdb-index
+ }
+
+ when ($EMBED_LINKER_CREF == "yes") {
+ LDFLAGS+=-Wl,--cref ${tmp;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
+ LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_cref=${tmp;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME}
+ }
+ elsewhen ($DUMP_LINKER_CREF == "yes") {
+ LDFLAGS+=-Wl,--cref ${output;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
+ }
+
+ when ($EMBED_LINKER_MAP == "yes") {
+ LDFLAGS+=-Wl,-Map=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_map.${_LINKER_ID}=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ }
+ elsewhen ($DUMP_LINKER_MAP == "yes") {
+ LDFLAGS+=-Wl,-Map=${output;rootrel;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ }
+
+ when ($USE_MKL == "yes") {
+ NOPLATFORM=yes
+ }
+
+ when (($USE_EAT_MY_DATA == "yes") && ($WIN32 != "yes") && ($DARWIN != "yes") && ($OS_ANDROID != "yes") && ($OS_IOS != "yes")) {
+ PEERDIR+=contrib/libs/libeatmydata/autocheck_wrapper
+ }
+
+ when ($USE_ARCADIA_LIBM == "yes") {
+ PEERDIR+=contrib/libs/libm
+ }
+ when ($USE_ARCADIA_LIBM == "no") {
+ C_SYSTEM_LIBRARIES+=-lm
+ }
+
+ when (($MUSL != "yes" && $WITH_VALGRIND == "yes") || $SANITIZER_DEFINED == "yes") {
+ when ($ALLOCATOR in [ "TCMALLOC", "TCMALLOC_SMALL_BUT_SLOW", "TCMALLOC_NUMA_256K", "TCMALLOC_NUMA_LARGE_PAGES", "TCMALLOC_256K", "GOOGLE", "J", "LF", "LF_YT", "LF_DBG", "B", "BM", "C", "LOCKLESS", "YT", "MIM", "HU" ]) {
+ PEERDIR+=library/cpp/malloc/system
+ }
+ }
+ otherwise {
+ select ($ALLOCATOR) {
+ "MIM" ? {
+ PEERDIR+=library/cpp/malloc/mimalloc
+ }
+ "HU" ? {
+ PEERDIR+=library/cpp/malloc/hu
+ }
+ "TCMALLOC_256K" ? {
+ PEERDIR+=library/cpp/malloc/tcmalloc
+ PEERDIR+=contrib/libs/tcmalloc
+ }
+ "TCMALLOC_SMALL_BUT_SLOW" ? {
+ PEERDIR+=library/cpp/malloc/tcmalloc
+ PEERDIR+=contrib/libs/tcmalloc/small_but_slow
+ }
+ "TCMALLOC_NUMA_256K" ? {
+ PEERDIR+=library/cpp/malloc/tcmalloc
+ PEERDIR+=contrib/libs/tcmalloc/numa_256k
+ }
+ "TCMALLOC_NUMA_LARGE_PAGES" ? {
+ PEERDIR+=library/cpp/malloc/tcmalloc
+ PEERDIR+=contrib/libs/tcmalloc/numa_large_pages
+ }
+ "TCMALLOC" ? {
+ PEERDIR+=library/cpp/malloc/tcmalloc
+ PEERDIR+=contrib/libs/tcmalloc/default
+ }
+ "GOOGLE" ? {
+ PEERDIR+=library/cpp/malloc/galloc
+ }
+ "J" ? {
+ when ($WIN32 == "yes") {
+ PEERDIR+=library/cpp/malloc/system
+ }
+ otherwise {
+ PEERDIR+=library/cpp/malloc/jemalloc
+ }
+ }
+ "LF" ? {
+ PEERDIR+=library/cpp/lfalloc
+ }
+ "LF_YT" ? {
+ PEERDIR+=library/cpp/lfalloc/yt
+ }
+ "LF_DBG" ? {
+ PEERDIR+=library/cpp/lfalloc/dbg
+ }
+ "B" ? {
+ PEERDIR+=library/cpp/balloc
+ }
+ "BM" ? {
+ PEERDIR+=library/cpp/balloc_market
+ }
+ "C" ? {
+ PEERDIR+=library/cpp/malloc/calloc
+ }
+ "LOCKLESS" ? {
+ PEERDIR+=library/cpp/malloc/lockless
+ }
+ "YT" ? {
+ PEERDIR+=library/cpp/ytalloc/impl
+ }
+ }
+ }
+
+ when ($ALLOCATOR == "SYSTEM") {
+ PEERDIR+=library/cpp/malloc/system
+ }
+ when ($WERROR != "no") {
+ when ($WERROR_MODE == "all" || ($WERROR_MODE == "compiler_specific" && $WERROR == "yes")) {
+ C_WARNING_OPTS += $WERROR_FLAG
+ }
+ }
+
+ when ($ICC == "yes") {
+ PEERDIR+=contrib/libs/intel/core
+ }
+ when ($WITH_VALGRIND == "yes") {
+ PEERDIR+=contrib/libs/valgrind
+ }
+}
+
+when ($EMBED_LINKER_MAP == "yes" || $EMBED_LINKER_CREF == "yes") {
+ LINK_ADDITIONAL_SECTIONS_COMMAND+= \
+ $OBJCOPY_TOOL $LINK_ADDITIONAL_SECTIONS $TARGET
+}
+
+_SO_EXT_FILTER=${ext=.so:PEERS} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/:PEERS}
+when ($OS_WINDOWS == "yes") {
+ _SO_EXT_FILTER=${ext=.dll:PEERS} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/:PEERS}
+}
+elsewhen ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
+ _SO_EXT_FILTER=${ext=.dylib:PEERS} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/:PEERS}
+}
+
+LINK_OR_COPY_SO_CMD=
+when ($SO_OUTPUTS == "yes") {
+ LINK_OR_COPY_SO_CMD=$FS_TOOLS link_or_copy_to_dir --no-check $_SO_EXT_FILTER ${BINDIR}
+ LDFLAGS+=$RPATH_GLOBAL
+}
+
+# tag:restrinced tag:DLL
+### $usage: WITH_DYNAMIC_LIBS() # restricted
+###
+### Include dynamic libraries as extra PROGRAM/DLL outputs
+macro WITH_DYNAMIC_LIBS() {
+ ENABLE(SO_OUTPUTS)
+}
+
+# tag:internal
+### $usage: REAL_LINK_EXE_IMPL(peers...) # internal
+macro REAL_LINK_EXE_IMPL(WHOLE_ARCHIVE_PEERS...) {
+ .CMD=$REAL_LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
+}
+
+# tag:internal
+### $usage: REAL_LINK_EXEC_DYN_LIB_IMPL(peers...) # internal
+macro REAL_LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
+ .CMD=$REAL_LINK_EXEC_DYN_LIB_CMDLINE
+}
+
+# tag:internal
+### $usage: REAL_LINK_DYN_LIB_IMPL(peers...) # internal
+macro REAL_LINK_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
+ .CMD=$REAL_LINK_DYN_LIB_CMDLINE && $LINK_OR_COPY_SO_CMD
+}
+
+# tag:internal
+### $usage: LINK_EXE_IMPL(peers...) # internal
+macro LINK_EXE_IMPL(WHOLE_ARCHIVE_PEERS...) {
+ .CMD=$LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
+}
+
+# tag:internal
+### $usage: LINK_EXEC_DYN_LIB_IMPL(peers...) # internal
+macro LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
+ .CMD=$LINK_EXEC_DYN_LIB_CMDLINE
+}
+
+# tag:internal
+### @usage: _LINK_UNIT # internal
+###
+### The base of all linkable modules: programs, DLLs etc. Describes common linking logic.
+module _LINK_UNIT: _BASE_UNIT {
+ .EXTS=.o .obj .supp .tidyjson .ld
+ .CMD=LINK_EXE
+ .ALLOWED=EXTRALIBS OBJADDE_GLOBAL RESOURCE_FILES
+ .NODE_TYPE=Program
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=yes
+ .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
+
+ DEFAULT(ALLOCATOR $DEFAULT_ALLOCATOR)
+ _USE_LINKER()
+
+ #link with libunwind manually
+ when ($DARWIN == "yes" && $NOPLATFORM != "yes") {
+ PEERDIR += contrib/libs/cxxsupp
+ }
+
+ when ($USE_LIBCXXRT == "yes") {
+ PEERDIR += contrib/libs/cxxsupp/libcxxrt
+ }
+
+ ENABLE(COMMON_LINK_SETTINGS)
+ CHECK_PROVIDES()
+}
+
+MODULE_TYPE=UNKNOWN
+
+macro ADD_CLANG_TIDY() {
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME clang_tidy)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${ARCADIA_ROOT}/build/yandex_specific/config/clang_tidy/tidy_project_map.json)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${ARCADIA_ROOT}/build/yandex_specific/config/clang_tidy/tidy_default_map.json)
+}
+
+# tag:internal
+### @usage: _BASE_PROGRAM # internal
+###
+### The base of all programs. It adds dependencies to make final artefact complete and runnable.
+module _BASE_PROGRAM: _LINK_UNIT {
+ .SYMLINK_POLICY=EXE
+ .ALLOWED=INDUCED_DEPS WHOLE_ARCHIVE
+ .GLOBAL=LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ SET(MODULE_TYPE PROGRAM)
+
+ when ($OS_IOS == "yes") {
+ EXTS+=.ios.interface
+ }
+
+ when ($WIN32 == "yes" || $OS_CYGWIN == "yes") {
+ MODULE_SUFFIX=.exe
+ }
+
+ when ($TIDY == "yes") {
+ MODULE_SUFFIX=.tidyjson
+ }
+
+ when ($MSVC != "yes" && $NOPLATFORM != "yes" && $WITH_VALGRIND != "yes" && $USE_ASMLIB != "no" && $MIC_ARCH != "yes" && $PIC != "yes" && $PIE != "yes") {
+ PEERDIR+=contrib/libs/asmlib
+ }
+
+ when ($MUSL == "yes") {
+ when ($MUSL_LITE == "yes") {
+ PEERDIR += contrib/libs/musl
+ }
+ otherwise {
+ PEERDIR += contrib/libs/musl/full
+ }
+ }
+
+ DEFAULT(CPU_CHECK yes)
+ when ($USE_SSE4 != "yes" || $NOUTIL == "yes" || $ALLOCATOR == "FAKE") {
+ CPU_CHECK = no
+ }
+
+ when ($CPU_CHECK == "yes") {
+ PEERDIR += library/cpp/cpuid_check
+ }
+
+ when ($USE_ARC_PROFILE == "yes" && $NOUTIL != "yes") {
+ PEERDIR += library/cpp/execprofile/autostart
+ }
+
+ when ($SANITIZER_DEFINED == "yes") {
+ PEERDIR += contrib/libs/cxxsupp/libsan
+ }
+
+ when ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") {
+ PEERDIR+=library/cpp/testing/dump_clang_coverage
+ }
+
+ when ($IDE_MSVS == "yes") {
+ PEERDIR+=build/scripts/c_templates
+ }
+
+ when ($_CUSTOM_LINK_STEP_SCRIPT) {
+ LINK_SCRIPT_EXE_FLAGS+=--python=$YMAKE_PYTHON --custom-step=${input:_CUSTOM_LINK_STEP_SCRIPT}
+ }
+}
+
+CPP_PROGRAM_SEM=add_executable $MODDIR $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} && target_link_flags PUBLIC $OBJADDE_LIB $OBJADDE
+### @usage: PROGRAM([progname])
+###
+### Regular program module.
+### If name is not specified it will be generated from the name of the containing project directory.
+module PROGRAM: _BASE_PROGRAM {
+ .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
+ .SEM=CPP_PROGRAM_SEM
+
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+ ADD_CLANG_TIDY()
+ SET(MODULE_LANG CPP)
+}
+
+# tag:python-specific tag:deprecated tag:internal
+module _PY2_PROGRAM: _BASE_PY_PROGRAM {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+ SET(MODULE_LANG PY2)
+
+ # Looks like we cannot avoid copy-paste util ymake supports multiple inheritance
+ # We need to attach coverage.extractor to every py_program target, except pytest targets
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+}
+
+# tag:python-specific tag:deprecated
+### @usage: PY2_PROGRAM([progname]) # deprecated
+###
+### 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.
+### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY2_PROGRAM: _PY2_PROGRAM {
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
+ ASSERT(_OK You are using deprecated Python2-only code (PY2_PROGRAM). Please consider rewriting to Python 3.)
+}
+
+# tag:python-specific
+### @usage: NO_EXTENDED_SOURCE_SEARCH()
+###
+### Prevent module using in extended python source search.
+### Use the macro if module contains python2-only files (or other python sources which shouldn't be imported by python3 interpreter)
+### which resides in the same directories with python 3 usefull code. contrib/python/future is a example.
+### Anyway, preferred way is to move such files into separate dir and don't use this macro at all.
+###
+### Also see: https://docs.yandex-team.ru/ya-make/manual/python/vars#y_python_extended_source_search for details
+macro NO_EXTENDED_SOURCE_SEARCH() {
+ SET(NO_EXTENDED_SOURCE_SEARCH yes)
+}
+
+# tag:python-specific
+### @usage: PY3_PROGRAM([progname])
+###
+### Python 3.x binary program. Links all Python 3.x libraries and Python 3.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.
+### This only compatible with PYTHON3-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+multimodule PY3_PROGRAM {
+ module PY3_BIN: PY3_PROGRAM_BIN {
+ .PEERDIRSELF=PY3_BIN_LIB
+ .IGNORED=RESOURCE RESOURCE_FILES PEERDIR TASKLET_REG
+ # Notify pybuild to skip almost all PY_SRCS arguments except MAIN
+ ENABLE(PROCESS_PY_MAIN_ONLY)
+ _PY_PROGRAM()
+ }
+
+ module PY3_BIN_LIB: PY3_LIBRARY {
+ .IGNORED=RESTRICT_LICENSES
+ # Notify pybuild to skip all python main function definitions
+ ENABLE(IGNORE_PY_MAIN)
+ _REQUIRE_EXPLICIT_LICENSE()
+ }
+}
+
+# tag:ycr-specific
+macro _YCR_GENERATE_CONFIGS_INTL(Package, App, Configs...) {
+ .CMD=${tool:"maps/infra/yacare/scripts/make_configs"} $Package $App ${cwd:BINDIR} ${output;hide;pre=debian/$Package/:Configs}
+}
+
+# tag:ycr-specific
+macro _YCR_GENERATE_CONFIGS(Package, App) {
+ .CMD=$_YCR_GENERATE_CONFIGS_INTL($Package $App ${pre=etc/yandex/maps/yacare/:App.conf} ${pre=etc/template_generator/templates/etc/logrotate.d/:App} ${pre=etc/nginx/sites-available/:App.conf} ${pre=etc/syslog-ng/conf-available/:App.conf} ${pre=etc/template_generator/config.d/:App.yaml} ${pre=/juggler/checks-available/yacare_;suf=/MANIFEST.json:App} ${pre=etc/yandex/maps/roquefort/:App.conf} ${pre=usr/lib/yandex/maps/yacare/lua/init_worker.d/rate_limiter_:App.lua} ${pre=usr/lib/yandex/maps/yacare/lua/init_worker.d/tvm_:App.lua} ${pre=usr/lib/yandex/maps/yacare/lua/init.d/tvm_:App.lua} ${pre=etc/template_generator/templates/etc/supervisor/conf-available/:App.conf} ${pre=etc/template_generator/templates/etc/yandex/unified_agent/conf.d/04_yacare_:App.yml})
+}
+
+# tag:ycr-specific
+when ($TIDY=="yes") {
+ YCR_LINK_EXE=$LINK_EXE
+}
+otherwise {
+ YCR_LINK_EXE=$LINK_EXE && $_YCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME)
+}
+
+# tag:ycr-specific
+### @usage: YCR_PROGRAM([progname])
+###
+### yacare-specific program module. Generates yacare configs in addition to producing the program.
+### If name is not specified it will be generated from the name of the containing project directory.
+module YCR_PROGRAM: PROGRAM {
+ .CMD=YCR_LINK_EXE
+}
+
+# tag:ycr-specific tag:python-specific
+macro _PYCR_GENERATE_CONFIGS_INTL(Package, App, Configs...) {
+ .CMD=${tool:"maps/infra/pycare/scripts/make_configs"} $Package $App ${cwd:BINDIR} ${output;hide;pre=configs/:Configs}
+}
+
+# tag:ycr-specific tag:python-specific
+macro _PYCR_GENERATE_CONFIGS(Package, App) {
+ .CMD=$_PYCR_GENERATE_CONFIGS_INTL($Package $App ${pre=etc/nginx/sites-available/:App.conf} ${pre=etc/template_generator/templates/etc/logrotate.d/:App} ${pre=etc/syslog-ng/conf-available/:App.conf} ${pre=etc/yandex/maps/roquefort/:App.conf} ${pre=etc/template_generator/config.d/:App.yaml} ${pre=etc/supervisor/conf-available/:App.conf} ${pre=etc/template_generator/templates/etc/yandex/unified_agent/conf.d/04_pycare_:App.yml})
+}
+
+# tag:ycr-specific tag:python-specific
+PYCR_LINK_EXE=$LINK_EXE && $_PYCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME)
+
+# tag:ycr-specific tag:python-specific
+### @usage: PYCR_PROGRAM([progname])
+###
+### pycare-specific program module. Generates pycare configs in addition to producing the program.
+### If name is not specified it will be generated from the name of the containing project directory.
+module PYCR_PROGRAM: PY3_PROGRAM_BIN {
+ .CMD=PYCR_LINK_EXE
+}
+
+### @usage: EXPORTS_SCRIPT(exports_file)
+###
+### Specify exports script within PROGRAM, DLL and DLL-derived modules.
+### This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files.
+### The other option use EXPORTS parameter of the DLL module itself.
+###
+### @see: [DLL](#module_DLL)
+macro EXPORTS_SCRIPT(Arg) {
+ SET(EXPORTS_FILE $Arg)
+}
+
+### @usage: NO_EXPORT_DYNAMIC_SYMBOLS()
+###
+### Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM.
+macro NO_EXPORT_DYNAMIC_SYMBOLS() {
+ ENABLE(NO_EXPORT_DYNAMIC_SYMBOLS)
+}
+
+### @usage: EXPORT_ALL_DYNAMIC_SYMBOLS()
+###
+### Export all non-hidden symbols as dynamic when linking a PROGRAM.
+macro EXPORT_ALL_DYNAMIC_SYMBOLS() {
+ # Dummy: default behaviour
+ ENABLE(EXPORT_ALL_DYNAMIC_SYMBOLS)
+}
+
+### @usage: CUSTOM_LINK_STEP_SCRIPT(name)
+###
+### Specifies name of a script for custom link step. The scripts
+### should be placed in the build/scripts directory and are subject to
+### review by devtools@.
+macro CUSTOM_LINK_STEP_SCRIPT(Name) {
+ SET(_CUSTOM_LINK_STEP_SCRIPT build/scripts/$Name)
+}
+
+### @usage: _BASE_UNITTEST # internal
+###
+### Module with base logic for all unit-test modules: it makes code runnable as unit-test by Arcadia testing machinery.
+module _BASE_UNITTEST: _BASE_PROGRAM {
+ .FINAL_TARGET=no
+ .NODE_TYPE=Program
+ .ALLOWED=YT_SPEC
+ when ($UT_SKIP_EXCEPTIONS == "yes") {
+ C_DEFINES+=-DUT_SKIP_EXCEPTIONS
+ }
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+# tag:test
+### @usage: UNITTEST([name])
+###
+### 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
+module UNITTEST: _BASE_UNITTEST {
+ PEERDIR(library/cpp/testing/unittest_main)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+ SET(MODULE_LANG CPP)
+}
+
+# tag:yt-specific tag:test
+### @usage: YT_UNITTEST([name])
+###
+### YT Unit test module based on mapreduce/yt/library/utlib
+module YT_UNITTEST: _BASE_UNITTEST {
+ PEERDIR(mapreduce/yt/library/utlib)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+}
+
+# tag:test
+### @usage: UNITTEST_WITH_CUSTOM_ENTRY_POINT([name])
+###
+### Generic unit test module.
+module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST {
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+}
+
+# tag:cpp-specific tag:test
+### @usage: GTEST([name])
+###
+### Unit test module based on library/cpp/testing/gtest.
+### It is recommended not to specify the name.
+###
+### Documentation: https://docs.yandex-team.ru/arcadia-cpp/cpp_test
+module GTEST: _BASE_UNITTEST {
+ PEERDIR(library/cpp/testing/gtest library/cpp/testing/gtest_main)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME gunittest)
+ SET(MODULE_LANG CPP)
+}
+
+USE_AFL=no
+
+# tag:fuzzing
+### @usage: FUZZ()
+###
+### In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput().
+### This module should be reachable by RECURSE from /autocheck project in order for the corpus to be regularly updated.
+### AFL and Libfuzzer are supported in Arcadia via a single interface, but the automatic fuzzing still works only through Libfuzzer.
+###
+### Example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2_fuzzer.cc?rev=2919463#L58
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+module FUZZ: _BASE_PROGRAM {
+ .NODE_TYPE=Program
+ .FINAL_TARGET=no
+ .ALLOWED=FUZZ_DICTS FUZZ_OPTS
+
+ DEFAULT(LIBFUZZER_PATH contrib/libs/libfuzzer12)
+ when ($USE_AFL == "no") {
+ PEERDIR+=$LIBFUZZER_PATH
+ }
+ when ($USE_AFL == "yes") {
+ PEERDIR+=$LIBFUZZER_PATH/afl
+ }
+
+ when (!$SANITIZER_TYPE || $SANITIZER_TYPE == "no") {
+ PEERDIR+=devtools/nofuzz
+ }
+
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME fuzz.test)
+}
+
+# tag:ios-specific
+PACK_IOS_CMD=
+when ($OS_IOS && $BUILD_IOS_APP) {
+ PACK_IOS_CMD=$YMAKE_PYTHON ${input:"build/scripts/pack_ios.py"} --binary $TARGET --target $TARGET --temp-dir $BINDIR $PEERS
+}
+
+LINK_BOOSTTEST_CMD=
+BOOST_TEST_TYPE_STRING=
+
+when ($BOOSTTEST_IS_FAT_OBJECT) {
+ LINK_BOOSTTEST_CMD=$LINK_RECURSIVE_LIBRARY
+ BOOST_TEST_TYPE_STRING=no.test
+}
+otherwise {
+ LINK_BOOSTTEST_CMD=$LINK_EXE
+ BOOST_TEST_TYPE_STRING=boost.test
+}
+
+# tag:deprecated
+### @usage: BOOSTTEST([name]) #deprecated
+###
+### Test module based on boost/test/unit_test.hpp.
+### As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects.
+### No new module of this type should be introduced unless it is explicitly approved by C++ committee.
+module BOOSTTEST: _BASE_PROGRAM {
+ .NODE_TYPE=Program
+ .FINAL_TARGET=no
+ .CMD=LINK_BOOSTTEST_CMD
+ PEERDIR(library/cpp/testing/boost_test)
+ when ($BOOSTTEST_IS_FAT_OBJECT) {
+ MODULE_SUFFIX=.a
+ }
+ elsewhen ($OS_IOS && $BUILD_IOS_APP) {
+ PEERDIR+=devtools/boosttest_ios_wrapper/library
+ MODULE_SUFFIX=.ios.tar
+ }
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME $BOOST_TEST_TYPE_STRING)
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+# tag:deprecated
+### @usage BOOSTTEST_WITH_MAIN([name]) #deprecated
+###
+### Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation
+module BOOSTTEST_WITH_MAIN: BOOSTTEST {
+ PEERDIR(library/cpp/testing/boost_test_main)
+}
+
+FUZZ_DICTS_VALUE=
+### @usage: FUZZ_DICTS(path1 [path2...])
+###
+### Allows you to specify dictionaries, relative to the root of Arcadia, which will be used in Fuzzing.
+### Libfuzzer and AFL use a single syntax for dictionary descriptions.
+### Should only be used in FUZZ modules.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+macro FUZZ_DICTS(Data...) {
+ SET_APPEND(FUZZ_DICTS_VALUE $Data)
+}
+
+FUZZ_OPTS_VALUE=
+### @usage: FUZZ_OPTS(opt1 [Opt2...])
+###
+### Overrides or adds options to the corpus mining and fuzzer run.
+### Currently supported only Libfuzzer, so you should use the options for it.
+### Should only be used in FUZZ modules.
+###
+### @example:
+###
+### FUZZ_OPTS (
+### -max_len=1024
+### -rss_limit_mb=8192
+### )
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
+macro FUZZ_OPTS(Data...) {
+ SET_APPEND(FUZZ_OPTS_VALUE $Data)
+}
+
+# tag:yt-specific tag:test
+TEST_YT_SPEC_VALUE=
+### @usage: YT_SPEC(path1 [path2...])
+###
+### Allows you to specify json-files with YT task and operation specs,
+### which will be used to run test node in the YT.
+### Test must be marked with ya:yt tag.
+### Files must be relative to the root of Arcadia.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
+macro YT_SPEC(Data...) {
+ SET_APPEND(TEST_YT_SPEC_VALUE $Data)
+}
+
+# tag:test
+TEST_SRCS_VALUE=
+### @usage: TEST_SRCS(Files...)
+###
+### In PY2TEST, PY3TEST and PY*_LIBRARY modules used as PY_SRCS macro and additionally used to mine test cases to be executed by testing framework.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+macro TEST_SRCS(Tests...) {
+ SET_APPEND(TEST_SRCS_VALUE $Tests)
+}
+
+macro DISABLE_DATA_VALIDATION() {
+ DISABLE(VALIDATE_DATA)
+}
+
+# tag:test
+TEST_DATA_VALUE=
+### @usage: DATA([path...])
+###
+### Specifies the path to the data necessary test.
+### Valid values are: arcadia/<path> , arcadia_tests_data/<path> and sbr://<resource_id>.
+### In the latter case resource will be brought to the working directory of the test before it is started
+###
+### Used only inside TEST modules.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#dannyeizrepozitorija
+macro DATA(Data...) {
+ SET_APPEND(TEST_DATA_VALUE $Data)
+ ADD_CHECK(check.data $Data)
+}
+
+# tag:test
+TEST_TAGS_VALUE=
+### @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.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#obshhieponjatija
+macro TAG(Tags...) {
+ SET_APPEND(TEST_TAGS_VALUE $Tags)
+}
+
+# tag:test
+TEST_REQUIREMENTS_VALUE=
+### @usage: REQUIREMENTS([cpu:<count>] [disk_usage:<size>] [ram:<size>] [ram_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64])
+###
+### Allows you to specify the requirements of the test.
+###
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+macro REQUIREMENTS(Tags...) {
+ SET_APPEND(TEST_REQUIREMENTS_VALUE $Tags)
+}
+
+# tag:test
+TEST_ENV_VALUE=
+### @usage: ENV(key[=value])
+###
+### Sets env variable key to value (gets value from system env by default).
+macro ENV(Data...) {
+ SET_APPEND(TEST_ENV_VALUE ${quo:Data})
+}
+
+### @usage: CONFTEST_LOAD_POLICY_LOCAL()
+###
+### Loads conftest.py files in a way that pytest does it
+macro CONFTEST_LOAD_POLICY_LOCAL() {
+ SET_APPEND(TEST_ENV_VALUE "CONFTEST_LOAD_POLICY=LOCAL")
+}
+
+# tag:test
+TEST_RECIPES_VALUE=
+### @usage: USE_RECIPE(path [arg1 arg2...])
+###
+### Provides prepared environment via recipe for test.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
+macro USE_RECIPE(Data...) {
+ SET_APPEND(TEST_RECIPES_VALUE $Data)
+ SET_APPEND(TEST_RECIPES_VALUE "USE_RECIPE_DELIM")
+}
+
+# tag:python-specific tag:test
+TEST_PYTHON_PATH_VALUE=
+
+# tag:python-specific tag:test
+### @usage: PYTHON_PATH(Path)
+###
+### Set path to Python that will be used to runs scripts in tests
+macro PYTHON_PATH(Path) {
+ SET(TEST_PYTHON_PATH_VALUE $Path)
+}
+
+# tag:test
+SKIP_TEST_VALUE=
+### @usage: SKIP_TEST(Reason)
+###
+### Skip the suite defined by test module. Provide a reason to be output in test execution report.
+macro SKIP_TEST(Reason...) {
+ SET(SKIP_TEST_VALUE $Reason)
+}
+
+# tag:test
+LINT_LEVEL_VALUE=extended
+### @usage: NO_LINT()
+###
+### Do not check for style files included in PY_SRCS, TEST_SRCS, JAVA_SRCS.
+macro NO_LINT() {
+ SET(LINT_LEVEL_VALUE none)
+}
+
+### @usage: LINT(<none|base|strict>)
+###
+### Set linting levem for sources of the module
+macro LINT(level) {
+ SET(LINT_LEVEL_VALUE $level)
+}
+
+# tag:python-specific tag:test
+### @usage: NO_DOCTESTS()
+###
+### Disable doctests in PY[|3|23_]TEST
+macro NO_DOCTESTS() {
+ ENV(YA_PYTEST_DISABLE_DOCTEST="yes")
+}
+
+# tag:python-specific tag:test
+### @usage: _BASE_PYTEST # internal
+###
+### Base logic of Python 2.x py.test modules: common module properties and dependencies.
+module _BASE_PYTEST: _BASE_PY_PROGRAM {
+ .NODE_TYPE=Program
+ .FINAL_TARGET=no
+ .ALLOWED=YT_SPEC NO_DOCTESTS
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ PEERDIR+=library/python/pytest
+ }
+ when ($USE_ARCADIA_PYTHON == "no") {
+ MODULE_SUFFIX=.pkg.fake
+ PEERDIR+=library/python/pytest/empty
+ }
+
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+# tag:python-specific tag:deprecated tag:test
+### @usage: PYTEST_BIN() #deprecated
+###
+### Same as PY2TEST. Don't use this, use PY2TEST instead.
+module PYTEST_BIN: _BASE_PYTEST {
+ .NODE_TYPE=Program
+ SETUP_PYTEST_BIN()
+}
+
+# tag:python-specific tag:test
+### @usage: PY2TEST([name])
+###
+### The test module for Python 2.x based on py.test
+###
+### This module is compatible only with PYTHON2-tagged modules and selects peers from multimodules accordingly.
+### This module is compatible with non-Arcadia Python builds.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#python
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+module PY2TEST: PYTEST_BIN {
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
+ SET(MODULE_LANG PY2)
+ ASSERT(_OK You are using deprecated Python2-only code (PY2TEST). Please consider rewriting to Python 3.)
+}
+
+# tag:python-specific tag:deprecated tag:test
+### @usage: PY3TEST_BIN() #deprecated
+###
+### Same as PY3TEST. Don't use this, use PY3TEST instead.
+module PY3TEST_BIN: _BASE_PY3_PROGRAM {
+ .NODE_TYPE=Program
+ .FINAL_TARGET=no
+ .ALLOWED=YT_SPEC NO_DOCTESTS
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+ SET(MODULE_LANG PY3)
+ SETUP_PYTEST_BIN()
+ PEERDIR+=library/python/pytest
+}
+
+# tag:python-specific tag:test
+### Disable submodules with the specified name(s).
+### Unlike EXCLUDE_TAGS this variable:
+### - affects all projects in the build;
+### - filter by module name and ignore MODULE_TAG.
+EXCLUDE_SUBMODULES=PY3TEST_LIBRARY
+
+# tag:python-specific tag:test
+### @usage: PY3TEST([name])
+###
+### The test module for Python 3.x based on py.test
+###
+### This module is compatible only with PYTHON3-tagged modules and selects peers from multimodules accordingly.
+### This module is only compatible with Arcadia Python build (to avoid tests duplication from Python2/3-tests). For non-Arcadia python use PYTEST.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+multimodule PY3TEST {
+ module PY3TEST_PROGRAM: PY3TEST_BIN {
+ .FINAL_TARGET=yes
+ }
+
+ module PY3TEST_LIBRARY: _PY3_LIBRARY {
+ PEERDIR+=library/python/pytest
+ _REQUIRE_EXPLICIT_LICENSE()
+ }
+}
+
+# tag:cpp-specific tag:test
+module CPP_STYLE_TEST: PY3TEST_BIN {
+ DEPENDS(contrib/libs/clang12/tools/clang-format)
+ PEERDIR+=library/python/cpp_test
+}
+
+macro STYLE(Globs...) {
+ _GLOB(STYLE_SRCS_GLOB ${pre=${ARCADIA_ROOT}:Globs})
+ _STYLE(${STYLE_SRCS_GLOB})
+}
+
+# tag:cpp-specific tag:deprecated tag:test
+### @usage: GTEST_UGLY([name])
+###
+### Deprecated, do not use in new projects. Use GTEST instead.
+###
+### The test module based on gtest (contrib/libs/gtest contrib/libs/gmock).
+### Use public documentation on gtest for details.
+###
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+module GTEST_UGLY: _BASE_PROGRAM {
+ .NODE_TYPE=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)
+}
+
+# tag:test
+### @usage: EXECTEST()
+###
+### Module definition of generic test that executes a binary.
+### Use macro RUN to specify binary to run.
+###
+### @example:
+###
+### EXECTEST()
+### OWNER(g:yatool)
+###
+### RUN(
+### cat input.txt
+### )
+### DATA(
+### arcadia/devtools/ya/test/tests/exectest/data
+### )
+### DEPENDS(
+### devtools/dummy_arcadia/cat
+### )
+### TEST_CWD(devtools/ya/test/tests/exectest/data)
+### END()
+###
+### More examples: https://wiki.yandex-team.ru/yatool/test/#exec-testy
+###
+### @see: [RUN()](#macro_RUN)
+module EXECTEST: _BARE_UNIT {
+ .NODE_TYPE=Program
+ .FINAL_TARGET=no
+ .ALLOWED=YT_SPEC
+ .RESTRICTED=FORK_TEST_FILES
+ SET(MODULE_SUFFIX .pkg.fake)
+ SETUP_EXECTEST()
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+# 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
+module Y_BENCHMARK: PROGRAM {
+ PEERDIR(library/cpp/testing/benchmark/main)
+ SET(MODULE_LANG CPP)
+}
+
+# tag:cpp-specific tag:test
+### @usage: G_BENCHMARK([benchmarkname])
+###
+### Benchmark test based on the google benchmark.
+###
+### For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md
+module G_BENCHMARK: _BASE_PROGRAM {
+ PEERDIR(library/cpp/testing/gbenchmark_main)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME g_benchmark)
+ SET(MODULE_LANG CPP)
+}
+
+# tag:test
+TEST_ROOT=$(TESTS_DATA_ROOT)
+RESULT_MAX_FILE=0
+STRIP_FILES=--dont-strip-files
+VERIFY_RESULTS=--verify-results
+ADDITIONAL_PATH=
+
+# set for tests variables to fill it by YA_DEV or YA
+YA_ROOT=ya
+when ($YA_DEV == "yes") {
+ YA_ROOT=ya-dev
+}
+
+
+# tag:test
+### @usage: UNITTEST_FOR(path/to/lib)
+###
+### Convenience extension of UNITTEST module.
+### The UNINTTEST module with additional SRCDIR + ADDINCL + PEERDIR on path/to/lib.
+### path/to/lib is the path to the directory with the LIBRARY project.
+###
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+module UNITTEST_FOR: UNITTEST {
+ PEERDIR(ADDINCL $UNITTEST_DIR)
+ SRCDIR($UNITTEST_DIR)
+}
+
+### @usage: _LIBRARY # internal
+###
+### Base module definition for all libraries.
+### Contains basic logic like module properties, default variable values etc.
+### All libraries similar to C++-libraries should be inherited from it.
+module _LIBRARY: _BASE_UNIT {
+ .CMD=LINK_LIB
+ .NODE_TYPE=Library
+ .PEERDIR_POLICY=as_include
+ .EXTS=.o .obj .a .mf .supp .tidyjson .ld
+ .ALLOWED=GRPC USE_SKIFF EXTRALIBS OBJADDE_GLOBAL RESOURCE_FILES
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS SRCS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SPLIT_DWARF
+ .FINAL_TARGET=no
+ .GLOBAL_CMD=GLOBAL_LINK_LIB
+ .GLOBAL_EXTS=.o .obj .tidyjson
+ .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
+
+ GLOBAL_SUFFIX=.global$MODULE_SUFFIX
+ #TODO: Remove this hack (really we do not need add fake src at all)
+ ENABLE(NEED_ADD_FAKE_SRC)
+ _REQUIRE_EXPLICIT_LICENSE(contrib/deprecated contrib/libs contrib/restricted contrib/python)
+ CHECK_CONTRIB_CREDITS(contrib/clickhouse contrib/libs contrib/deprecated EXCEPT contrib/deprecated/python)
+
+ when ($USE_MKL == "yes") {
+ NOPLATFORM=yes
+ }
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=
+ MODULE_SUFFIX=.lib
+ }
+ otherwise {
+ when ($TIDY == "yes") {
+ MODULE_PREFIX=
+ MODULE_SUFFIX=.tidyjson
+ }
+ otherwise {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.a
+ }
+ }
+
+ when ($WERROR != "no") {
+ when ($WERROR_MODE == "all" || ($WERROR_MODE == "compiler_specific" && $WERROR == "yes")) {
+ C_WARNING_OPTS += $WERROR_FLAG
+ }
+ }
+
+ when ($WITH_VALGRIND == "yes") {
+ PEERDIR+=contrib/libs/valgrind
+ }
+
+ when ($USE_ARCADIA_LIBM == "yes") {
+ PEERDIR+=contrib/libs/libm
+ }
+}
+
+CPP_LIBRARY_SEM=add_library ${MODDIR} $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} \
+ && consumer_link_library PUBLIC $CMAKE_LINK_TARGET \
+ && target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
+ && target_include_directories PRIVATE $_C__INCLUDE_OWNED \
+ && target_compile_definitions PRIVATE $USER_CFLAGS $USER_CXXFLAGS \
+ && library_fake_marker FAKE_MODULE ${FAKE_MODULE}
+CPP_OBJ_LIBRARY_SEM=add_global_library_for ${MODDIR} ${suf=.global:REALPRJNAME} $REALPRJNAME ${hide:GLOBAL_TARGET} ${hide:AUTO_INPUT} \
+ && target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
+ && target_include_directories PRIVATE $_C__INCLUDE_OWNED \
+ && target_compile_definitions PRIVATE $USER_CFLAGS $USER_CXXFLAGS
+
+CMAKE_FIND_PKG=
+CMAKE_LINK_TARGET=$REALPRJNAME
+CMAKE_FIND_PKG_COMP=
+CONAN_REQUIRE=
+
+### @usage: LIBRARY()
+###
+### The regular static library module.
+###
+### The LIBRARY() is intermediate module, so when built directly it won't build its dependencies.
+### It transitively provides its PEERDIRs to ultimate final target, where all LIBRARY() modules are built and linked together.
+###
+### This is C++ library, and it selects peers from multimodules accordingly.
+###
+### It makes little sense to mention LIBRARY in DEPENDS or BUNDLE, package and deploy it since it is not a standalone entity.
+### In order to use library in tests PEERDIR it to link into tests.
+### If you think you need to distribute static library please contact devtools@ for assistance.
+module LIBRARY: _LIBRARY {
+ .GLOBAL=_AARS _PROGUARD_RULES
+ .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
+ .SEM=CPP_LIBRARY_SEM
+ .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM
+
+ when ($CMAKE_PACKAGE_COMPONENT != "") {
+ CMAKE_FIND_PKG_COMP=COMPONENTS $CMAKE_PACKAGE_COMPONENT
+ }
+ when ($CMAKE_PACKAGE != "") {
+ CMAKE_FIND_PKG=find_package $CMAKE_PACKAGE $CMAKE_FIND_PKG_COMP
+ CPP_LIBRARY_SEM=$CONAN_REQUIRE && $CMAKE_FIND_PKG && consumer_link_library PUBLIC $CMAKE_LINK_TARGET && ignored
+ }
+ when ($CONAN_REFERENCE != "") {
+ CONAN_REQUIRE=conan_require $CONAN_REFERENCE
+ CPP_LIBRARY_SEM=$CONAN_REQUIRE && $CMAKE_FIND_PKG && consumer_link_library PUBLIC $CMAKE_LINK_TARGET && ignored
+ }
+ when ($OPENSOURCE_EXPORT == "no") {
+ CPP_LIBRARY_SEM=ignored
+ }
+
+ when ($HAS_CPP_PROTOBUF_PEERS == "yes") {
+ PEERDIR+=$CPP_PROTOBUF_PEERS
+ }
+ SET(MODULE_TYPE LIBRARY)
+ SET(MODULE_LANG CPP)
+
+ ADD_CLANG_TIDY()
+}
+
+# tag:internal
+### @usage: _BARE_MODULE() # internal
+###
+### Remove unwanted dependencies for "empty" library module
+macro _BARE_MODULE() {
+ SET(NEED_PLATFORM_PEERDIRS no)
+ SET(PEERDIR_TEST_TOOL no)
+ DISABLE(WITH_VALGRIND)
+ NO_CODENAVIGATION()
+ NO_PLATFORM()
+ NO_RUNTIME()
+ NO_UTIL()
+ NO_CLANG_TIDY()
+}
+
+# tag:internal
+### @usage: _BARE_LINK_MODULE() # internal
+###
+### Remove unwanted dependencies for "empty" link module
+macro _BARE_LINK_MODULE() {
+ _BARE_MODULE()
+ ALLOCATOR(FAKE)
+}
+
+# tag:internal
+### @usage: _CONDITIONAL_SRCS([USE_CONDITIONAL_SRCS] Files...) # internal
+###
+### Adds Files... to SRCS if first word is `USE_CONDITIONAL_SRCS`
+### To be used with some variable which is set to `USE_CONDITIONAL_SRCS` under condition
+macro _CONDITIONAL_SRCS(USE_CONDITIONAL_SRCS[], DYMMY...) {
+ SRCS($USE_CONDITIONAL_SRCS)
+}
+
+# XXX: dirty hack for correct LDFLAGS passing
+RESOURCES_LIBRARY_LINK=$TOUCH_UNIT ${hide:LDFLAGS_GLOBAL} ${hide:LDFLAGS}
+RESOURCES_LIBRARY_SEM=ignored
+
+### @usage: RESOURCES_LIBRARY()
+###
+### Definition of a module that brings its content from external source (Sandbox) via DECLARE_EXTERNAL_RESOURCE macro.
+### This can participate in PEERDIRs of others as library but it cannot have own sources and PEERDIRs.
+###
+### @see: [DECLARE_EXTERNAL_RESOURCE()](#macro_DECLARE_EXTERNAL_RESOURCE)
+module RESOURCES_LIBRARY: _BARE_UNIT {
+ .CMD=RESOURCES_LIBRARY_LINK
+ .SEM=RESOURCES_LIBRARY_SEM
+ .ALLOWED=DECLARE_EXTERNAL_RESOURCE EXTRALIBS OBJADDE_GLOBAL
+ .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SRC SRCS PEERDIR SPLIT_DWARF
+ .NODE_TYPE=Library
+ .PEERDIR_POLICY=as_include
+ .EXTS=.o .obj .a .mf .supp .tidyjson .ld
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+
+ MODULE_SUFFIX=.pkg.fake
+ ENABLE(NEED_ADD_FAKE_SRC)
+ WITHOUT_LICENSE_TEXTS()
+}
+
+FAT_OBJECT_ARGS=
+FAT_OBJECT_OUTS=
+
+macro _FAT_OBJECT_ARGS_BASE(Flag, Lib) {
+ .CMD=$Flag=$Lib
+}
+
+macro PACK_GLOBALS_IN_LIBRARY() {
+ SET_APPEND(FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, ${BINDIR}/${pre=$MODULE_PREFIX:REALPRJNAME.globals.a}))
+ SET_APPEND(FAT_OBJECT_OUTS \${output;hide;noauto;norel;nopath;noext;pre=$MODULE_PREFIX;suf=$BINDIR:REALPRJNAME.globals.a})
+}
+
+when ($OS_ANDROID != "yes") {
+ LINK_FAT_OBJECT_CMD=$LINK_FAT_OBJECT
+}
+otherwise {
+ LINK_FAT_OBJECT_CMD=$LINK_FAT_OBJECT_LIBRARY
+}
+
+### @usage: FAT_OBJECT()
+###
+### The "fat" object module. It will contain all its transitive dependencies reachable by PEERDIRs:
+### static libraries, local (from own SRCS) and global (from peers') object files.
+###
+### Designed for use in XCode projects for iOS.
+module FAT_OBJECT: LIBRARY {
+ .ALLOWED=PACK_GLOBALS_IN_LIBRARY
+ .CMD=LINK_FAT_OBJECT_CMD
+ .PEERDIR_POLICY=as_build_from
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.global.lib
+ }
+ elsewhen ($OS_ANDROID == "yes") {
+ MODULE_SUFFIX=.a
+ }
+ otherwise {
+ MODULE_SUFFIX=.o
+ }
+
+ _USE_LINKER()
+
+ # This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS
+ # ymake's handling of NEED_ADD_FAKE_SRC may insert arbitrary command, not necessarily compilation
+ DISABLE(NEED_ADD_FAKE_SRC)
+ SRCS(build/scripts/_fake_src.cpp)
+}
+
+### @usage: RECURSIVE_LIBRARY()
+###
+### The recursive ("fat") library module. It will contain all its transitive dependencies reachable by PEERDIRs:
+### from static libraries, local (from own SRCS) and global (from peers') object files.
+###
+### Designed for use in XCode projects for iOS.
+module RECURSIVE_LIBRARY: LIBRARY {
+ .CMD=LINK_RECURSIVE_LIBRARY
+ .PEERDIR_POLICY=as_build_from
+
+ # This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS
+ # ymake's handling of NEED_ADD_FAKE_SRC may insert arbitrary command, not necessarily compilation
+ DISABLE(NEED_ADD_FAKE_SRC)
+ SRCS(build/scripts/_fake_src.cpp)
+}
+
+_SONAME=
+
+### @usage: DLL_UNIT # internal
+###
+### Base module for all dynamically linked libraries as final artifacts.
+### Contains all general logic for such kind of modules. Supports versioning and export files.
+### Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed).
+module DLL_UNIT: _LINK_UNIT {
+ .CMD=LINK_DYN_LIB
+ .NODE_TYPE=Library
+ .SYMLINK_POLICY=SO
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ .ALLOWED=WHOLE_ARCHIVE
+ DYNAMIC_LINK=yes
+ ALLOCATOR(FAKE)
+ SET(MODULE_TYPE DLL)
+ SET(MODULE_TAG DLL)
+ SET(MODULE_LANG CPP)
+ ADD_CLANG_TIDY()
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.dll
+ }
+ elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.dylib
+ }
+ elsewhen ($TIDY == "yes") {
+ MODULE_PREFIX=
+ MODULE_SUFFIX=.tidyjson
+ }
+ otherwise {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.so
+ }
+
+ # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
+ SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
+ when ($MODULE_VERSION) {
+ LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
+ }
+ _SONAME=$SONAME$MODULE_VERSION
+
+ when ($LINUX == "yes") {
+ # '-z notext' is needed for linking mkl into shared libraries
+ LDFLAGS += -Wl,-z,notext
+ when ($_NO_FIX_ELF != "yes") {
+ LINK_DYN_LIB_FLAGS+=--fix-elf ${tool:"tools/fix_elf"}
+ }
+ }
+
+ when ($DARWIN == "yes") {
+ LDFLAGS += -undefined dynamic_lookup
+ }
+
+ when ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") {
+ PEERDIR+=library/cpp/testing/dump_clang_coverage
+ }
+
+ when ($IDE_MSVS == "yes") {
+ PEERDIR+=build/scripts/c_templates
+ }
+}
+
+# tag:python-specific
+### @usage: PY_ANY_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The Python external module for any versio of Arcadia or system Python.
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: Use PYTHON2_MODULE()/PYTHON3_MODULE() in order to PEERDIR proper version of PY23_NATIVE_LIBRARY.
+### Do not PEERDIR any PY*_LIBRARY: this will link Python in and render artifact unusable as Python module.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY_ANY_MODULE: DLL_UNIT {
+ when ($MSVC != "yes" && $DARWIN != "yes") {
+ LDFLAGS+= -Wl,-Bsymbolic
+ }
+
+ when ($USE_ARCADIA_PYTHON == "no") {
+ when ($USE_SYSTEM_PYTHON) {
+ PEERDIR+=build/platform/python
+ }
+ otherwise {
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ LDFLAGS+=$PYTHON_LIBRARIES
+ }
+ }
+ }
+
+ # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
+ SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
+ when ($MODULE_VERSION) {
+ LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
+ }
+ _SONAME=$SONAME$MODULE_VERSION
+
+ # -bundle
+ when ($DARWIN == "yes") {
+ LDFLAGS+=-flat_namespace
+ }
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=
+ MODULE_SUFFIX=.pyd
+ }
+ otherwise {
+ MODULE_PREFIX=
+ MODULE_SUFFIX=.so
+ }
+ .RESTRICTED=USE_PYTHON2 USE_PYTHON3 PY_SRCS PY_MAIN
+}
+
+# tag:python-specific
+### @usage: PY2MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The Python external module for Python2 and any system Python
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: this module will always PEERDIR Python2 version of PY23_NATIVE_LIBRARY.
+### Do not PEERDIR PY2_LIBRARY or PY23_LIBRARY: this will link Python in and render artifact unusable as Python module.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY2MODULE: PY_ANY_MODULE {
+ PYTHON2_MODULE()
+ SET(MODULE_LANG PY2)
+ .RESTRICTED=PYTHON3_MODULE PYTHON3_ADDINCL
+}
+
+# tag:python-specific
+### @usage: PY3MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The Python external module for Python3 and any system Python
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: this module will always PEERDIR Python3 version of PY23_NATIVE_LIBRARY.
+### Do not PEERDIR PY3_LIBRARY or PY23_LIBRARY: this will link Python in and render artifact unusable as Python module.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY3MODULE: PY_ANY_MODULE {
+ PYTHON3_MODULE()
+ SET(MODULE_LANG PY3)
+ .RESTRICTED=PYTHON2_MODULE PYTHON2_ADDINCL
+}
+
+# tag:python-specific
+### @usage: PYTHON2_MODULE()
+###
+### Use in PY_ANY_MODULE to set it up for Python 2.x.
+macro PYTHON2_MODULE() {
+ when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
+ PEERDIR+=contrib/tools/python/lib
+ }
+
+ PYTHON2_ADDINCL()
+}
+
+# tag:python-specific
+### @usage: PYTHON3_MODULE()
+###
+### Use in PY_ANY_MODULE to set it up for Python 3.x.
+macro PYTHON3_MODULE() {
+ when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
+ PEERDIR+=contrib/tools/python3/lib
+ }
+
+ PYTHON3_ADDINCL()
+}
+
+# tag:r-specific
+### @usage: R_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The external module for R language.
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL 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
+ }
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.dll
+ }
+
+ ADDINCL(contrib/libs/r-lang)
+}
+
+### @usage: DYNAMIC_LIBRARY_FROM(Paths)
+###
+### Use specified libraries as sources of DLL
+macro DYNAMIC_LIBRARY_FROM(Path...) {
+ PEERDIR($Path)
+ WHOLE_ARCHIVE($Path)
+}
+
+
+### @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.
+### 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").
+###
+### 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)
+ SET(MODULE_LANG CPP)
+ when ($OS_WINDOWS) {
+ MODULE_SUFFIX=.dll
+ }
+
+ # TODO: Make it possible to use this syntax
+ # DEFAULT(DLL_FOR_DIR no)
+ ### FIXME: XXX
+ ###when ($DLL_FOR_DIR != "no") {
+ ### SRCDIR($DLL_FOR_DIR)
+ ### ADDINCL($DLL_FOR_DIR)
+ ###}
+}
+
+### DLL_TOOL is a DLL that can be used as a LD_PRELOAD tool.
+module DLL_TOOL: DLL {
+ # ymake resolves only program nodes as tools.
+ .NODE_TYPE=Program
+}
+
+### @usage: SO_PROGRAM(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### Executable dynamic library module defintion.
+### 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.
+module SO_PROGRAM: DLL {
+ .CMD=LINK_EXEC_DYN_LIB
+ SET(MODULE_TYPE PROGRAM)
+
+ MODULE_PREFIX=
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.exe
+ }
+ otherwise {
+ MODULE_SUFFIX=
+ }
+}
+
+DLL_PROXY_CMD_MF=$GENERATE_MF && $COPY_CMD $AUTO_INPUT $TARGET
+
+# tag:internal
+### @usage: DEV_DLL_PROXY() # internal
+###
+### The use of this module is strictly prohibited!!!
+### This is a temporary and project-specific solution.
+module DEV_DLL_PROXY: _BARE_UNIT {
+ .NODE_TYPE=Library
+ .EXTS=.so .dll .dylib .mf
+ .CMD=DLL_PROXY_CMD_MF
+ DYNAMIC_LINK=yes
+
+ when ($OS_WINDOWS == "yes") {
+ MODULE_SUFFIX=.dll
+ }
+ elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.dylib$MODULE_VERSION
+ }
+ otherwise {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.so$MODULE_VERSION
+ }
+}
+
+# tag:internal
+### @usage: DLL_PROXY() # internal
+###
+### The use of this module is strictly prohibited!!!
+### This is a temporary and project-specific solution.
+module DLL_PROXY: DEV_DLL_PROXY {
+ .EXTS=.so .dylib .lib .mf
+ .PROXY=yes
+ .PEERDIR_POLICY=as_build_from
+ SET(PEERDIR_TAGS DLL __EMPTY__)
+
+ when ($OS_WINDOWS == "yes") {
+ MODULE_SUFFIX=.lib
+ }
+}
+
+# tag:internal
+### @usage: DYNAMIC_DEPS(Path...) # internal, temporary
+###
+### Enlist paths to all DYNAMIC_LIBRARY dependencies of the DYNAMIC_LIBRARY
+### This it needed to transfer their outputs through the library to PROGRAM
+### or dependent DLL/DYNAMIC_LIBRARY.
+###
+### Note: this is temporary solution until support of `super-global` variables come
+### which will enable transfer of some properies though final targets like DLLs.
+macro DYNAMIC_DEPS(Path...) {
+ # PEERDIR as macro completely ignored in place where this macro applies
+ SET_APPEND(PEERDIR $Path)
+}
+
+# tag:internal
+### @usage: DYNAMIC_LIBRARY() # internal
+###
+### The use of this module is strictly prohibited except LGPL-related opensourcing
+### This provides linkable DLL module which brings its results to programs and tests
+### for seamless tesing and packaging
+multimodule DYNAMIC_LIBRARY {
+ module DLL_BIN: DLL {
+ .PROXY=yes
+ .IGNORED=PROVIDES
+ SET(MODULE_TAG DLL)
+ }
+ module DLL_LIB: _DLL_COMPATIBLE_LIBRARY {
+ .CMD=TOUCH_UNIT_MF
+ .PEERDIRSELF=DLL_BIN
+ .IGNORED=SRCS PEERDIR RUN_PROGRAM PYTHON DYNAMIC_LIBRARY_FROM GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 USE_PYTHON3
+ .ALLOWED=DYNAMIC_DEPS
+
+ SET(PEERDIR_TAGS DLL_LIB __EMPTY__)
+
+ _BARE_MODULE()
+ DYNAMIC_LINK=yes
+ MODULE_SUFFIX=.pkg.fake
+ PEERDIR+=build/platform/local_so
+
+ RESTRICT_PATH(contrib devtools/dummy_arcadia MSG Use of this module type outside contrib/libs is prohibited)
+
+ # disable credits generation for static library
+ SET(CREDITS_FLAGS)
+ }
+}
+
+### @usage: GLOBAL_SRCS(filenames...)
+###
+### Make all source files listed as GLOBAL.
+### Call to GLOBAL_SRCS macro is equivalent to call to SRCS macro when each source file is marked with GLOBAL keyword.
+### Arcadia root relative or project dir relative paths are supported for filenames arguments. GLOBAL keyword is not
+### recognized for GLOBAL_SRCS in contrast to SRCS macro.
+###
+### @example:
+### Consider the file to ya.make:
+###
+### LIBRARY()
+### GLOBAL_SRCS(foo.cpp bar.cpp)
+### END()
+###
+### @see: [SRCS()](#macro_SRCS)
+macro GLOBAL_SRCS(Files...) {
+ SRCS(${pre=GLOBAL :Files})
+}
+
+### @usage: ALL_SRCS([GLOBAL] filenames...)
+###
+### Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
+### Call to ALL_SRCS macro is equivalent to call to GLOBAL_SRCS macro when GLOBAL keyword is specified
+### as the first argument and is equivalent to call to SRCS macro otherwise.
+###
+### @example:
+###
+### LIBRARY()
+### SET(MAKE_IT_GLOBAL GLOBAL)
+### ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
+### END()
+###
+### @see: [GLOBAL_SRCS()](#macro_GLOBAL_SRCS), [SRCS()](#macro_SRCS)
+macro ALL_SRCS(GLOBAL?"GLOBAL":"", Files...) {
+ SRCS(${pre=$GLOBAL :Files})
+}
+
+### @usage: _DLL_COMPATIBLE_LIBRARY # internal
+###
+### Base module to place DLLs into multimodules back to back with libraries.
+### In order to function properly all modules in multimodule shall have the
+### same set of arguments. So this module is just library that accepts but
+### ignores all DLL arguments.
+module _DLL_COMPATIBLE_LIBRARY: LIBRARY {
+}
+
+@import "${CONF_ROOT}/conf/project_specific/yql_udf.conf"
+
+# as SRCS in packages use macro BUNDLE_SRCS!
+
+PACKED_PACKAGE_ARGS=
+PACKED_PACKAGE_EXT=
+### @usage: PACK(archive_type)
+###
+### When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz`
+###
+### Is not allowed other module types than PACKAGE().
+###
+### @see: [PACKAGE()](#module_PACKAGE)
+macro PACK(Ext) {
+ SET(PACKED_PACKAGE_EXT $Ext)
+}
+
+PACKAGE_STRICT_VALUE=
+macro PACKAGE_STRICT() {
+ SET(PACKAGE_STRICT_VALUE yes)
+}
+
+### @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.
+### 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.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+###
+### @see: [PACK()](#macro_PACK)
+module PACKAGE: _BASE_UNIT {
+ .CMD=TOUCH_PACKAGE_MF
+ .PEERDIR_POLICY=as_build_from
+ .ALL_INS_TO_OUT=yes
+ .FINAL_TARGET=yes
+ .ALLOWED=PACK
+ SET(MODULE_SUFFIX .pkg.fake)
+ SET(DONT_RESOLVE_INCLUDES yes)
+ NO_PLATFORM()
+ when ($PACKED_PACKAGE_EXT) {
+ PACKED_PACKAGE_ARGS+=--dest-arch ${output;pre=$MODULE_PREFIX;suf=.$PACKED_PACKAGE_EXT:REALPRJNAME}
+ }
+ SET(NEED_PLATFORM_PEERDIRS no)
+ PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL
+}
+
+TOUCH_GROUP=$TOUCH_PACKAGE ${kv;hide:"p CI"}
+
+### @usage: CI_GROUP()
+###
+### Module collects what is described directly inside it transitively by PEERDIRs.
+### No particular layout of built artifacts is implied. This module is needed primarilly for CI dependency analysis and may not trigger builds at all.
+###
+### Is only used together with the macro PEERDIR() and FILES(). Don't use SRCS inside CI_GROUP().
+module CI_GROUP: _BARE_UNIT {
+ .CMD=TOUCH_GROUP
+ .PEERDIR_POLICY=as_build_from
+ .ALL_INS_TO_OUT=yes
+ .FINAL_TARGET=yes
+ .RESTRICTED=SRCS
+ MODULE_SUFFIX=.ci.pkg.fake
+ 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
+
+# tag:proto
+### @usage: RESOLVE_PROTO()
+###
+### Enable include resolving within UNIONs and let system .proto being resolved
+### among .proto/.gztproto imports
+###
+### Note: it is currently impossible to enbale resolving only for .proto, so resolving is enabled for all supported files
+### also we only add ADDINCL for stock protobuf. So use this macro with care: it may cause resolving problems those are
+### to be addressed by either ADDINCLs or marking them as TEXT. Please contact devtools for details.
+macro RESOLVE_PROTO() {
+ SET(DONT_RESOLVE_INCLUDES no)
+ ADDINCL(FOR proto $PROTOBUF_PATH)
+}
+
+### @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/
+module UNION: _BASE_UNIT {
+ .ALL_INS_TO_OUT=yes
+ .FINAL_TARGET=no
+ NO_PLATFORM()
+ SET(MODULE_SUFFIX .pkg.fake)
+ SET(DONT_RESOLVE_INCLUDES yes)
+ .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
+}
+
+# tag:python-specific
+module _PY_PACKAGE: UNION {
+ .EXTS=.py
+ .ALL_INS_TO_OUT=yes
+ .ALLOWED=GRPC USE_SKIFF
+ ENABLE(PY_PROTOS_FOR)
+ SET(PEERDIR_TAGS PY_PROTO)
+ SET(DONT_RESOLVE_INCLUDES no)
+}
+
+# tag:python-specific tag:deprecated tag:internal
+### @usage: PY_PACKAGE(name) # internal, deprecated
+###
+### This is module created via PY_PROTOS_FOR() macro
+module PY_PACKAGE: _PY_PACKAGE {
+ .FINAL_TARGET=yes
+}
+
+# tag:internal
+### @usage: _SET_FIRST_VALUE(name args...) # interanl
+###
+### This macro sets the value of `name` vraiable to the value of next argument
+macro _SET_FIRST_VALUE(NAME, VALUE, OTHER...) {
+ SET($NAME $VALUE)
+}
+
+# tag:internal
+macro _EVAL_HIDE_TOOLS(ARGS...) {
+ .CMD=${tool;hide:ARGS}
+}
+
+# tag:internal
+macro _EVAL_HIDE_INPUTS(ARGS...) {
+ .CMD=${input;hide:ARGS}
+}
+
+# tag:docs
+_DOCS_USE_PLANTUML=no
+_DOCS_EXTRA_TOOLS=
+_DOCS_EXTRA_INPUTS=
+_DOCS_ENV=
+_DOCS_KV=${kv;hide:"p DO"} ${kv;hide:"pc light-cyan"} ${kv;hide:"show_out yes"}
+
+_DOCS_PLANTUML_ENV=\
+${env:"JAVA_PATH=$JDK_RESOURCE_GLOBAL/bin/java"} \
+${env:"PLANTUML_PATH=${ARCADIA_BUILD_ROOT}/contrib/tools/plantuml/plantuml.run.cp.jar"} \
+${env:"_JAVA_OPTIONS=-Dsun.awt.fontconfig=$BINDIR/fontconfig.properties"} \
+${env:"LANG=en_US.UTF-8"} \
+${env:"LC_ALL=C.UTF-8"}
+
+_DOCS_BOOK_CMD=$TOUCH_DOCS_MF
+_DOCS_LIB_CMD=$TOUCH_DOCS_MF
+
+_DOCS_VARS_FLAG=
+
+_DOCS_COMMON_PROCESS_DEPS=
+_DOCS_COMMON_LIB_PROCESS_DEPS=
+
+_DOCS_YFM_OUTPUT_FORMAT=
+_DOCS_YFM_BOOK_OUTPUT_FORMAT=--output-format html --allowHTML
+_DOCS_YFM_LIB_OUTPUT_FORMAT=--output-format md
+_DOCS_YFM_BOOK_PROCESS_DEPS=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/extract_docs.py"} --skip-prefix $ARCADIA_BUILD_ROOT --dest-dir $BINDIR/__s ${rootrel:PEERS}
+
+_DOCS_COMMON_CMDLINE_PREFIX=\
+${cwd:ARCADIA_ROOT} $FS_TOOLS copy_all_files $_DOCS_DIR_VALUE $BINDIR/__s $_DOCS_SRCS_VALUE \
+&& $_DOCS_COMMON_PROCESS_DEPS \
+&& $YMAKE_PYTHON ${input:"build/scripts/copy_files_to_dir.py"} --dest-dir $BINDIR/__s --skip-prefix $ARCADIA_ROOT --skip-prefix $ARCADIA_BUILD_ROOT ${input;context=TEXT:INCLUDE_SRCS}
+
+_DOCS_YFM_BOOK_CMDLINIE=\
+$_DOCS_COMMON_CMDLINE_PREFIX \
+&& $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} $YFM_TOOL_RESOURCE_GLOBAL/yfm-docs --input $BINDIR/__s --output $BINDIR/__docsbuild $_DOCS_VARS_FLAG $_DOCS_YFM_OUTPUT_FORMAT --config ${input:CONFIG} $_DOCS_EXTRA_TOOLS ${hide;input:EXTRA_INPUTS} $_DOCS_ENV \
+&& $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --output $TARGET --input $BINDIR/__docsbuild $_DOCS_KV
+
+# tag:internal tag:docs
+macro _DOCS_YFM_BOOK_IMPL(CONFIG, INCLUDE_SRCS[], EXTRA_INPUTS[]) {
+ .CMD=$_DOCS_YFM_BOOK_CMDLINIE
+}
+
+_DOCS_YFM_CMD=$_DOCS_YFM_BOOK_IMPL($_DOCS_CONFIG_VALUE INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE EXTRA_INPUTS $_DOCS_EXTRA_INPUTS)
+
+_DOCS_MKDOCS_CMDLINE_SUFFIX=
+_DOCS_MKDOCS_BOOK_CMDLINE_SUFFIX=${pre=--dep ;ext=preprocessed.tar.gz:PEERS}
+_DOCS_MKDOCS_LIB_CMDLINE_SUFFIX=--preprocess-md-only
+_DOCS_MKDOCS_BOOK_PROCESS_DEPS=
+
+_DOCS_MKDOCS_CMDLINIE=\
+$_DOCS_COMMON_CMDLINE_PREFIX \
+&& ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdocs_builder_wrapper.py"} $ARCADIA_BUILD_ROOT ${tool:"tools/mkdocs_builder"} --docs-dir $BINDIR/__s --output-tar $TARGET --config ${input:CONFIG} $_DOCS_VARS_FLAG $_DOCS_MKDOCS_CMDLINE_SUFFIX $_DOCS_EXTRA_TOOLS ${hide;input:EXTRA_INPUTS} $_DOCS_ENV $_DOCS_KV
+
+macro _DOCS_MKDOCS_CMD_IMPL(CONFIG, INCLUDE_SRCS[], EXTRA_INPUTS[]) {
+ .CMD=$_DOCS_MKDOCS_CMDLINIE
+}
+
+_DOCS_MKDOCS_CMD=$_DOCS_MKDOCS_CMD_IMPL($_DOCS_CONFIG_VALUE INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE)
+
+_DOCS_YFM_DEFAULT_CONFIG=$MODDIR/.yfm
+_DOCS_MKDOCS_DEFAULT_CONFIG=$MODDIR/mkdocs.yml
+
+### FIXME(snermolaev)
+module _DOCS_BASE_UNIT: _BARE_UNIT {
+ .ALLOWED=DOCS_DIR DOCS_CONFIG DOCS_VARS
+ .CMD=TOUCH_DOCS_MF
+ .FINAL_TARGET=no
+
+ ENABLE(_DOCS_BASE_UNIT)
+
+ SET(MODULE_SUFFIX .tar.gz)
+ SET(MODULE_LANG DOCS)
+ DEFAULT(_DOCS_BUILDER_VALUE yfm)
+ DEFAULT(_DOCS_DIR_VALUE ${MODDIR})
+ select ($_DOCS_BUILDER) {
+ "yfm" ? {
+ PEERDIR+=build/platform/yfm
+ _DOCS_BOOK_CMD=$_DOCS_YFM_CMD
+ _DOCS_LIB_CMD=$_DOCS_YFM_CMD
+ _DOCS_DEFAULT_CONFIG=$_DOCS_YFM_DEFAULT_CONFIG
+ _DOCS_COMMON_BOOK_PROCESS_DEPS=$_DOCS_YFM_BOOK_PROCESS_DEPS
+ }
+ "mkdocs" ? {
+ _DOCS_BOOK_CMD=$_DOCS_MKDOCS_CMD
+ _DOCS_LIB_CMD=$_DOCS_MKDOCS_CMD
+ _DOCS_DEFAULT_CONFIG=$_DOCS_MKDOCS_DEFAULT_CONFIG
+ _DOCS_COMMON_BOOK_PROCESS_DEPS=$_DOCS_MKDOCS_BOOK_PROCESS_DEPS
+ }
+ }
+}
+
+# tag:internal tag:docs
+### _DOCS_EPILOOGUE() # internal
+###
+### This macro executes macros which should be envoked after all user
+### specified macros in the ya.make file
+macro _DOCS_EPILOGUE() {
+ SET(_DOCS_BUILDER $_DOCS_BUILDER_VALUE)
+
+ _LATE_GLOB(_DOCS_SRCS_GLOB ${pre=${ARCADIA_ROOT}/;suf=/**/*:_DOCS_DIR_VALUE})
+ SET(_DOCS_SRCS_VALUE \${input;hide:_DOCS_SRCS_GLOB})
+}
+
+# tag:internal tag:docs
+### _DOCS_YFM_USE_PLANTUML() # internal
+###
+### This macr sets appropriate dependencies for use of plantuml plugin
+macro _DOCS_YFM_USE_PLANTUML() {
+ PEERDIR(build/platform/java/jdk contrib/java/openjdk-fontconfig)
+ COPY_FILE(${ARCADIA_BUILD_ROOT}/contrib/java/openjdk-fontconfig/fontconfig.properties fontconfig.properties)
+ SET_APPEND(_DOCS_EXTRA_TOOLS \${hide;tool:"contrib/tools/plantuml"})
+ SET_APPEND(_DOCS_EXTRA_INPUTS fontconfig.properties)
+ # It's rather strange that a commented statement below doesn't work
+ # SET_APPEND(_DOCS_ENV ${_DOCS_PLANTUML_ENV})
+ when ($_DOCS_USE_PLANTUML) {
+ _DOCS_ENV+=$_DOCS_PLANTUML_ENV
+ }
+}
+
+# tag:docs
+### @usage: DOCS()
+###
+### Documentation project multimodule.
+###
+### When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder).
+### 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 {
+ module DOCSBOOK: _DOCS_BASE_UNIT {
+ .CMD=_DOCS_BOOK_CMD
+ .EPILOGUE=_DOCS_EPILOGUE
+ .FINAL_TARGET=yes
+ .PEERDIR_POLICY=as_build_from
+
+ ENABLE(DOCSBOOK)
+
+ SET(MODULE_TYPE PROGRAM)
+ 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()
+ }
+
+ module DOCSLIB: _DOCS_BASE_UNIT {
+ .CMD=_DOCS_LIB_CMD
+ .EPILOGUE=_DOCS_EPILOGUE
+ .PEERDIR_POLICY=as_include
+
+ ENABLE(DOCSLIB)
+
+ SET(MODULE_TYPE LIBRARY)
+ SET(PEERDIR_TAGS DOCSLIB)
+ SET(MODULE_TAG DOCSLIB)
+
+ REALPRJNAME=preprocessed
+
+ _DOCS_YFM_OUTPUT_FORMAT=$_DOCS_YFM_LIB_OUTPUT_FORMAT
+ _DOCS_MKDOCS_CMDLINE_SUFFIX=$_DOCS_MKDOCS_LIB_CMDLINE_SUFFIX
+ _DOCS_COMMON_PROCESS_DEPS=$_DOCS_COMMON_LIB_PROCESS_DEPS
+
+ PROCESS_DOCS()
+ }
+}
+
+# tag:docs
+_DOCS_USE_PLANTUML=
+### @usage: USE_PLANTUML()
+###
+### Use PlantUML plug-in for yfm builder to render UML diagrams into documentation
+macro USE_PLANTUML() {
+ ENABLE(_DOCS_USE_PLANTUML)
+}
+
+# tag:docs
+DOCSBUILDER=yfm
+### @usage: DOCS_BUILDER(tool)
+###
+### Specify docs builder tool.
+### Avalialbe tools: mkdocs and yfm (by default).
+###
+### @see: [DOCS](#multimodule_DOCS)
+macro DOCS_BUILDER(DocsTool) {
+ SET(_DOCS_BUILDER_VALUE $DocsTool)
+}
+
+# tag:docs
+### @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.
+###
+### @see: [DOCS](#multimodule_DOCS)
+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.
+###
+### @see: [DOCS](#multimodule_DOCS)
+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.
+###
+### @see: [DOCS](#multimodule_DOCS)
+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...) {
+ SET_APPEND(_DOCS_INCLUDE_SOURCES_VALUE $Args)
+}
+
+# tag:python-specific
+PY_NAMESPACE_VALUE=
+
+# tag:python-specific
+### @usage: PY_NAMESPACE(prefix)
+###
+### Sets default Python namespace for all python sources in the module.
+### Especially suitable in PROTO_LIBRARY where Python sources are generated and there is no PY_SRCS to place NAMESPACE parameter.
+macro PY_NAMESPACE(Arg) {
+ SET(PY_NAMESPACE_VALUE $Arg)
+}
+
+# tag: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)
+}
+
+# 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
+ COMPILE_JAVA_MF=$GENERATE_VCS_JAVA_INFO_NODEP && $COMPILE_JAVA
+}
+
+# tag:java-specific
+EXT_JAVA_VCS_INFO=no
+### @usage: EMBED_JAVA_VCS_INFO()
+###
+### Embed manifest with vcs info into `EXTERNAL_JAVA_LIBRARY`
+### By default this is disabled.
+macro EMBED_JAVA_VCS_INFO() {
+ ENABLE(EXT_JAVA_VCS_INFO)
+}
+
+# tag:java-specific tag:internal
+### @usage: EXTERNAL_JAVA_LIBRARY() #internal
+###
+### EXTERNAL_JAVA_LIBRARY() is a module for creating a .jar file using non-Java code (generators etc.)
+### 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
+ .NODE_TYPE=Bundle
+ .CMD=COMPILE_JAVA_MF
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=no
+ .ALIASES=SRCS=_SRCS_NO_GLOBAL
+ .ALLOWED=EMBED_JAVA_VCS_INFO
+ .RESTRICTED=EXTERNAL_JAR
+
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+
+ PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL
+ PROPAGATES_MANAGEABLE_PEERS=yes
+ DYNAMIC_LINK=yes
+ MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD)
+ MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD)
+ MACRO_ALIAS(FBS_CMD _JAVA_FLATC_CMD)
+
+ when ($PACKAGE_PREFIX) {
+ PACKAGE_PREFIX_ARGS=--package-prefix=$PACKAGE_PREFIX
+ }
+
+ DISABLE(NEED_PLATFORM_PEERDIRS)
+ NO_PLATFORM()
+ SET(MODULE_SUFFIX .jar)
+ SET(MODULE_LANG JAVA)
+}
+
+# tag:java-specific
+ALL_JAR_SOURCES=
+LINT_JAVA_SOURCES=
+ALL_SRCDIRS=
+LINK_JAR_RESOURCES=
+LINK_JAR_JSOURCES=
+JAR_GEN_SRCS=
+JAR_GEN_JSRCS=
+macro _JAR_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"yes":"no", Globs...) {
+ _CHECK_JAVA_SRCDIR($SRCDIR)
+ SET_APPEND(ALL_SRCDIRS $SRCDIR)
+ SET(VAR_SALT $SRCDIR $Globs $EXCLUDE $PACKAGE_PREFIX $RESOURCES $FILES)
+ SET(JAR_SRCS_GLOB uniq_${hash:VAR_SALT})
+ _LATE_GLOB(${JAR_SRCS_GLOB} ${pre=${SRCDIR}/:Globs} EXCLUDE ${EXCLUDE})
+ SET_APPEND(LINT_JAVA_SOURCES \${input;rootrel;ext=.java:${JAR_SRCS_GLOB}})
+ SET_APPEND(ALL_JAR_SOURCES --jsources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt --resources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt --srcdir ${quo:SRCDIR} \${input:${JAR_SRCS_GLOB}} ${pre=\$\{input\:\";suf=\"\}:FILES})
+ _FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_RESOURCES ${quo:SRCDIR} ${BINDIR}/cls ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt)
+ _FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_JSOURCES ${quo:SRCDIR} ${BINDIR}/src ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt)
+ _FILL_JAR_GEN_SRCS(JAR_GEN_SRCS JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst ${BINDIR}/misc/all-kt-sources.txt ${BINDIR}/misc/all-gr-sources.txt ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt $Globs EXCLUDE $EXCLUDE)
+ _FILL_JAR_GEN_SRCS(JAR_GEN_JSRCS SRC_JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst ${BINDIR}/misc/all-kt-sources.txt ${BINDIR}/misc/all-gr-sources.txt ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt $Globs EXCLUDE $EXCLUDE)
+}
+
+macro IDEA_JAR_SRCS(Args...) {
+ _JAR_SRCS($Args)
+ SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args)
+}
+
+macro _HASH_HELPER(Args...) {
+ .CMD=${hash:Args}
+}
+
+macro _GENTAR_HELPER(OUT_DIR[], Args...) {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/autotar_gendirs.py"} --pack ${OUT_DIR} --outs ${output;tared;suf=.$_HASH_HELPER($Args).gentar:OUT_DIR} ${kv;hide:"tared_kind nodir"}
+}
+
+# tag:java-specific
+RUN_JAR_PROG_CP_PRE=@
+RUN_JAR_PROG_CP_SUF=.cplst
+when($JDK_VERSION == "8") {
+ RUN_JAR_PROG_CP_PRE=
+ RUN_JAR_PROG_CP_SUF=
+}
+
+# tag:java-specific
+macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], IN_DIR[], OUT_NOAUTO{output}[], OUT{output}[], TOOL{tool}[], OUT_DIR[], CLASSPATH[], REQUIREMENTS[], ADD_SRCS_TO_CLASSPATH?"yes":"no", CWD="${ARCADIA_BUILD_ROOT}", Args...) {
+ _LATE_GLOB(${IN_DIRS_VAR} ${suf=/**/*:IN_DIR})
+ _CHECK_RUN_JAVA_PROG_CLASSPATH($CLASSPATH)
+ .PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} ${OUT_DIR} && ${cwd:CWD} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} $YMAKE_PYTHON ${input:"build/scripts/fix_java_command_file_cp.py"} --build-root ${ARCADIA_BUILD_ROOT} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} ${Args} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} && $_GENTAR_HELPER($CLASSPATH $IN_DIR $IN $TOOL $Args OUT_DIR $OUT_DIR) ${input;hide:IN} ${output;noauto;hide:OUT_NOAUTO} ${output;hide:OUT} ${tool;hide:TOOL} ${IN_DIRS_INPUTS}
+}
+
+# tag:java-specific
+macro _DO_1_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq", Args...) {
+ _DO_2_RUN_JAR_PROGRAM($Args IN_DIRS_VAR $IN_DIRS_VAR IN_DIRS_INPUTS ${"$"}{input;hide:$IN_DIRS_VAR})
+}
+
+# tag:java-specific
+macro RUN_JAVA_PROGRAM(Args...) {
+ _DO_1_RUN_JAR_PROGRAM($Args IN_DIRS_VAR uniq_${hash:Args})
+}
+
+# tag:java-specific
+_JAR_ANN_PROCESSORS=
+_JAR_ANN_PROC_OPT_PREFIX=
+macro JAR_ANNOTATION_PROCESSOR(Classes...) {
+ SET_APPEND(_JAR_ANN_PROCESSORS $Classes)
+ SET(_JAR_ANN_PROC_OPT_PREFIX -processor)
+
+ # for ya ide idea only
+ SET_APPEND(ANNOTATION_PROCESSOR_VALUE $ARGS_DELIM $Classes)
+}
+
+# tag:java-specific
+macro _JAR_ANN_PROC_OPTS(Classes...) {
+ .CMD=$_JAR_ANN_PROC_OPT_PREFIX ${join=,:Classes}
+}
+
+# tag:java-specific
+macro _NOOP_MACRO(Args...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:java-specific
+module _JAR_BASE: _BARE_UNIT {
+ .NODE_TYPE=Bundle
+ .CMD=TOUCH_UNIT
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=no
+ .ALIASES=SRCS=_SRCS_NO_GLOBAL
+ .ALLOWED=EMBED_JAVA_VCS_INFO DEPENDENCY_MANAGEMENT EXCLUDE
+
+ PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL DLL JAR_COMPILATION __EMPTY__
+
+ HAS_MANAGEABLE_PEERS=yes
+ DYNAMIC_LINK=yes
+ MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD)
+ MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD)
+ MACRO_ALIAS(FBS_CMD _JAVA_FLATC_CMD)
+
+ DISABLE(NEED_PLATFORM_PEERDIRS)
+ NO_PLATFORM()
+ VCS_JAVA=${suf=.__vcs_version__.mf:TARGET}
+ SET(MODULE_LANG JAVA)
+}
+
+# tag:java-specific
+module JAVA_CONTRIB_PROXY: _JAR_BASE {
+}
+
+# tag:java-specific
+macro _FETCH_CONTRIB(Id, Out, SBR="sbr:") {
+ .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id --copy-to ${output:Out} ${input;hide:"build/scripts/fetch_from.py"} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+ ADD_CHECK(check.resource $Id)
+}
+
+# tag:java-specific
+LOCAL_JAR_PATH=
+LOCAL_SOURCES_JAR_PATH=
+JAR_RESOURCE_ID=
+SRC_RESOURCE_ID=
+FETCH_SRCS_JAR=
+FETCH_TARGET_JAR=
+FETCH_CONTRIB_JAR=$FETCH_TARGET_JAR $FETCH_SRCS_JAR
+
+# tag:java-specific
+macro JAR_RESOURCE(Id) {
+ SET(JAR_RESOURCE_ID $Id)
+}
+
+# tag:java-specific
+macro SRC_RESOURCE(Id) {
+ SET(SRC_RESOURCE_ID $Id)
+}
+
+# tag:java-specific
+macro LOCAL_JAR(File) {
+ SET(LOCAL_JAR_PATH $File)
+}
+
+# tag:java-specific
+macro LOCAL_SOURCES_JAR(File) {
+ SET(LOCAL_SOURCES_JAR_PATH $File)
+}
+
+# tag:java-specific
+module JAVA_CONTRIB: _JAR_BASE {
+ .CMD=FETCH_CONTRIB_JAR
+ .FINAL_TARGET=yes
+
+ when ($JAR_RESOURCE_ID) {
+ FETCH_TARGET_JAR= && $_FETCH_CONTRIB($JAR_RESOURCE_ID ${BINDIR}/${MODULE_PREFIX}${REALPRJNAME}${MODULE_SUFFIX})
+ }
+ otherwise {
+ when ($LOCAL_JAR_PATH) {
+ FETCH_TARGET_JAR= && $FS_TOOLS copy ${input:LOCAL_JAR_PATH} $TARGET
+ }
+ otherwise {
+ FETCH_TARGET_JAR= && $GENERATE_VCS_JAVA_INFO_NODEP && ${cwd:BINDIR} $JDK_RESOURCE/bin/jar cfvm $TARGET $VCS_JAVA .
+ PEERDIR+=build/platform/java/jdk
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+ }
+ }
+ when ($SRC_RESOURCE_ID) {
+ FETCH_SRCS_JAR= && $_FETCH_CONTRIB($SRC_RESOURCE_ID ${BINDIR}/${REALPRJNAME}-sources.jar)
+ }
+ otherwise {
+ when ($LOCAL_SOURCES_JAR_PATH) {
+ FETCH_SRCS_JAR= && $FS_TOOLS copy ${input:LOCAL_SOURCES_JAR_PATH} {output;pre=${BINDIR}/;suf=-sources.jar:REALPRJNAME}
+ }
+ otherwise {
+ FETCH_SRCS_JAR= && $GENERATE_VCS_JAVA_INFO_NODEP && $FS_TOOLS md ${BINDIR}/fake-src && ${cwd;suf=/fake-src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/;suf=-sources.jar:REALPRJNAME} $VCS_JAVA .
+ PEERDIR+=build/platform/java/jdk
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+ }
+ }
+
+ SET(MODULE_SUFFIX .jar)
+}
+
+# tag:kotlin-specific
+KOTLINC_OPTS_VALUE=
+
+# tag:kotlin-specific
+KT_SRSCLIST_FLAG=--kotlin ${BINDIR}/misc/all-kt-sources.txt
+KT_CLASSES_DIR=${BINDIR}/kt_cls
+COLLECT_KT_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/kt_bfg.txt -m --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} --ya-end-command-file
+LINK_KT_CLASSPATH=$YMAKE_PYTHON ${input:"build/scripts/make_java_classpath_file.py"} ${BINDIR}/kt_bfg.txt ${BINDIR}/kt_cp.txt && $FS_TOOLS md $KT_CLASSES_DIR
+COMPILE_KT=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/with_pathsep_resolve.py"} $YMAKE_PYTHON ${input:"build/scripts/run_javac.py"} --kotlin --sources-list ${BINDIR}/misc/all-kt-sources.txt $JDK_RESOURCE/bin/java -jar $KOTLIN_COMPILER_RESOURCE_GLOBAL/kotlin-compiler.jar -no-stdlib -module-name $REALPRJNAME -jvm-target ${KOTLIN_JVM_TARGET} @${BINDIR}/misc/all-kt-sources.txt -classpath @${BINDIR}/kt_cp.txt $KOTLINC_FLAGS_VALUE -d $KT_CLASSES_DIR $KOTLINC_OPTS_VALUE
+ALL_KT_COMMANDS=
+KT_CLASSPATH_ITEM=
+
+# tag:java-specific
+JAVAC_CMD=$JDK_RESOURCE/bin/javac
+ERROR_PRONE_JAVAC_CMD=${YMAKE_PYTHON} ${input:"build/scripts/build_java_with_error_prone2.py"} $JDK_RESOURCE/bin/java $JDK_RESOURCE/bin/javac $ERROR_PRONE_RESOURCE/error_prone.jar
+
+# tag:java-specific tag:codenav
+JAVA_YNDEXING=no
+
+# tag:java-specific
+when ($USE_SYSTEM_KYTHE) {
+ KYTHE_RESOURCE=$USE_SYSTEM_KYTHE
+}
+otherwise {
+ KYTHE_RESOURCE=$KYTHE_RESOURCE_GLOBAL
+}
+
+# tag:java-specific tag:codenav
+_JAVA_YNDEXING_CMD=$YMAKE_PYTHON ${input:"build/scripts/build_java_codenav_index.py"} $TARGET $ARCADIA_BUILD_ROOT $ARCADIA_ROOT ${BINDIR}/all-java.srclst $JDK_RESOURCE/bin/java -jar $KYTHE_RESOURCE/kythe/extractors/javac_extractor.jar
+_DO_JAVA_YNDEXING=
+
+# tag:java-specific
+SOURCES_JAR=no
+_PACK_SRC_JAR_IMPL=&& $FS_TOOLS md ${BINDIR}/src $JAR_GEN_JSRCS $LINK_JAR_JSOURCES && ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA .
+_PACK_SRC_JAR=
+
+# tag:java-specific
+_PACK_JNI=
+_PACK_JNI_CMD= && $FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} --ya-end-command-file ${BINDIR}/cls
+
+# tag:java-specific
+_MAKE_JSTYLE_FILE_LIST=
+
+# tag:java-specific
+_LINK_UBERJAR=
+_UBERJAR_SELF=
+_DO_LINK_UBERJAR= && $JDK_RESOURCE/bin/java -cp $UBERJAR_RESOURCE/devtools-java_shader.jar ru.yandex.devtools.emigrante.Main --out-jar $TARGET $_UBERJAR_SELF ${ext=.jar;pre=--jar :MANAGED_PEERS_CLOSURE} ${UBERJAR_PREFIX_FLAG} ${UBERJAR_HIDE_EXCLUDE_FLAGS} $UBERJAR_PATH_EXCLUDES ${UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG} ${UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS} ${UBERJAR_APPENDING_TRANSFORMER_FLAGS} ${UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG}\
+ && $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} $BINDIR/_empty/META-INF \
+ && $YMAKE_PYTHON ${input:"build/scripts/touch.py"} $BINDIR/_empty/META-INF/MANIFEST.MF \
+ && $UPDATE_VCS_JAVA_INFO_NODEP($TARGET) \
+ && ${cwd;suf=/_empty:BINDIR} ${JDK_RESOURCE}/bin/jar ufv ${TARGET} META-INF/MANIFEST.MF \
+ && $JDK_RESOURCE/bin/jar ufvm $TARGET $VCS_JAVA
+
+# tag:java-specific
+macro _PACK_JAR_HELPER(Out) {
+ .CMD=${cwd;suf=/cls:BINDIR} $JDK_RESOURCE/bin/jar cfvm $Out $VCS_JAVA .
+}
+
+# tag:java-specific
+macro _JAVAC_RUN_HELPER(JAVAC_CMD_WITH_ARGS...) {
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/with_pathsep_resolve.py"} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/run_javac.py"} --sources-list ${BINDIR}/all-java.srclst ${JAVAC_CMD_WITH_ARGS} @${BINDIR}/all-java.srclst -classpath ${ARCADIA_BUILD_ROOT}/bfg.jar -Xpkginfo:always ${JAVAC_OPTS} $_JAR_ANN_PROC_OPTS($_JAR_ANN_PROCESSORS) -d ${BINDIR}/cls -g -encoding UTF-8
+}
+macro _ADD_HIDDEN_INPUTS(Inputs...) {
+ .CMD=${input;hide:Inputs}
+}
+
+# tag:java-specific
+ERROR_PRONE_JDK16_ADD_OPENS=-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+ERROR_PRONE_2_7_1_FORCED_OPTS=-Xep:InlineMeInliner:OFF -Xep:SameNameButDifferent:OFF
+
+# tag:java-specific
+JAVA_COVERAGE_SRCLIST_FLAG=--coverage ${output;pre=${MODULE_PREFIX};suf=.cpsf:REALPRJNAME} --source-root ${ARCADIA_ROOT}
+JAVA_COVERAGE_SRCLIST=
+PREPARE_JAVA_BUILD_DIRS=$FS_TOOLS md ${BINDIR}/cls && $FS_TOOLS md ${BINDIR}/misc
+EXTRACT_GENDIRS=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/autotar_gendirs.py"} --unpack --ext .gentar ${ext=.gentar:AUTO_INPUT}
+COLLECT_JAVA_SRCLIST=${YMAKE_PYTHON} ${input:"build/scripts/make_java_srclists.py"} --moddir ${CURDIR} --java ${BINDIR}/all-java.srclst ${KT_SRSCLIST} ${JAVA_COVERAGE_SRCLIST} --ya-start-command-file ${ALL_JAR_SOURCES} ${ext=.java:AUTO_INPUT} ${ext=.kt:AUTO_INPUT} --ya-end-command-file
+COLLECT_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/bfg.txt -m --ya-start-command-file ${rootrel:MANAGED_PEERS_CLOSURE} $KT_CLASSPATH_ITEM --ya-end-command-file
+LINK_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/bfg.txt ${ARCADIA_BUILD_ROOT}/bfg.jar
+COMPILE_JAVA_SRCLIST=$_JAVAC_RUN_HELPER($JAVAC_CMD)
+PACK_JAR=$_PACK_JAR_HELPER($TARGET)
+# NOTE: No && before LINK_JAR_RESOURCES, ALL_KT_COMMANDS and JAR_GEN_SRCS needed since those vars either empty or starts with &&
+LINK_JAR=$PREPARE_JAVA_BUILD_DIRS \
+ && $EXTRACT_GENDIRS \
+ && $COLLECT_JAVA_SRCLIST \
+ $JAR_GEN_SRCS \
+ $ALL_KT_COMMANDS \
+ && $COLLECT_CLASSPATH \
+ && $LINK_CLASSPATH \
+ && $COMPILE_JAVA_SRCLIST \
+ $LINK_JAR_RESOURCES \
+ && ${cwd;suf=/cls:BINDIR} $GENERATE_VCS_JAVA_INFO_NODEP . \
+ $_PACK_SRC_JAR \
+ $_PACK_JNI \
+ && $PACK_JAR \
+ $_DO_JAVA_YNDEXING \
+ ${requirements;hide:JAVA_REQUIREMENTS} \
+ ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} \
+ $_MAKE_JSTYLE_FILE_LIST \
+ $_LINK_UBERJAR \
+ $_ADD_HIDDEN_INPUTS($JAVA_EXTERNAL_DEPENDENCIES_VALUE)
+
+# tag:java-specific
+_EXT_SRC_JAR=
+_EXT_JAR=
+_COPY_EXT_SRC_JAR=
+_DO_USE_EXT_JAR=$FS_TOOLS copy ${input:_EXT_JAR} $TARGET $_COPY_EXT_SRC_JAR
+_DO_COPY_EXT_SRC_JAR= && $FS_TOOLS copy $_EXT_SRC_JAR ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME}
+macro JAVA_RESOURCE(JAR, SOURCES="") {
+ SET(_EXT_SRC_JAR $SOURCES)
+ SET(_EXT_JAR $JAR)
+}
+
+# tag:java-specific tag:fbs
+JAVA_FLATBUFFERS_VERSION = 2.0.0
+
+# tag:java-specific
+module _COMPILABLE_JAR_BASE : _JAR_BASE {
+ # flatbuffers-java
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/flatbuffers/flatbuffers-java EXCEPT contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION})
+
+ # protobuf-java
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-java/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java EXCEPT contrib/java/com/google/protobuf/protobuf-java/${JAVA_PROTO_RUNTIME_VERSION})
+
+ # protobuf-javalite
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-javalite/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-javalite EXCEPT contrib/java/com/google/protobuf/protobuf-javalite/${JAVA_PROTO_RUNTIME_VERSION})
+
+ # protobuf-java-util
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java-util EXCEPT contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
+}
+
+# tag:java-specific tag:internal
+### @usage: JAR_LIBRARY() #internal
+###
+### Reimplementation of the JAVA_LIBRARY with ymake.core.conf and ymake based dependency management
+module JAR_LIBRARY: _COMPILABLE_JAR_BASE {
+ .EXTS=.jsrc .java .jar .mf .gentar .kt
+ .CMD=LINK_JAR
+ .FINAL_TARGET=yes
+ .ALIASES=JAVA_SRCS=IDEA_JAR_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR
+ .RESTRICTED=EXTERNAL_JAR
+ MODULE_SUFFIX=.jar
+
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+
+ when ($_EXT_SRC_JAR) {
+ _COPY_EXT_SRC_JAR=_DO_COPY_EXT_SRC_JAR
+ }
+ when ($_EXT_JAR) {
+ LINK_JAR=$_DO_USE_EXT_JAR
+ }
+
+ # in the ideal world this statement must be under condition bellow
+ DEPENDENCY_MANAGEMENT(contrib/java/org/jetbrains/kotlin/kotlin-stdlib-jdk8/${KOTLIN_VERSION})
+ when ($WITH_KOTLIN_VALUE) {
+ KT_SRSCLIST=$KT_SRSCLIST_FLAG
+ ALL_KT_COMMANDS=&& $COLLECT_KT_CLASSPATH && $LINK_KT_CLASSPATH && $COMPILE_KT
+ LINK_JAR_RESOURCES+=&& $FS_TOOLS copy_all_files ${KT_CLASSES_DIR} ${BINDIR}/cls
+ PEERDIR+=build/platform/java/kotlin contrib/java/org/jetbrains/kotlin/kotlin-stdlib-jdk8
+ when($WITH_KOTLINC_PLUGIN_ALLOPEN) {
+ KOTLINC_OPTS_VALUE+=-Xplugin=${KOTLIN_COMPILER_RESOURCE_GLOBAL}/plugins/kotlin-allopen-plugin.jar
+ }
+ when($WITH_KOTLINC_PLUGIN_NOARG) {
+ KOTLINC_OPTS_VALUE+=-Xplugin=${KOTLIN_COMPILER_RESOURCE_GLOBAL}/plugins/kotlin-noarg-plugin.jar
+ }
+ # Must be in sync with KT_CLASSES_DIR!
+ # There are problems in JDK13 with abs paths in classapth baked into jar file manifest. Using relative path
+ # here assumes that jar file with classpath for javac located in the $ARCADIA_BUILD_ROOT
+ KT_CLASSPATH_ITEM=$MODDIR/kt_cls
+ }
+ otherwise {
+ KT_SRSCLIST=
+ ALL_KT_COMMANDS=
+ KT_CLASSES=
+ }
+
+ when ($SOURCES_JAR == "yes") {
+ _PACK_SRC_JAR=$_PACK_SRC_JAR_IMPL
+ }
+
+ when ($JAVA_COVERAGE == "yes") {
+ JAVA_COVERAGE_SRCLIST=$JAVA_COVERAGE_SRCLIST_FLAG
+ }
+
+ when ($MAKE_UBERJAR_VALUE == "yes") {
+ _LINK_UBERJAR=$_DO_LINK_UBERJAR
+ PACK_JAR=$_PACK_JAR_HELPER(${BINDIR}/${REALPRJNAME}.lib.jar)
+ # TODO: This condition is incorrect in case of autoinputs _UBERJAR_SELF should be empty only for
+ # modules without AUTO_INPUT and withuout JAVA_SRCS added inputs.
+ when($ALL_JAR_SOURCES) {
+ _UBERJAR_SELF=--jar ${BINDIR}/${REALPRJNAME}.lib.jar
+ }
+ PEERDIR+=build/platform/java/uberjar
+ PEERDIR+=$UBERJAR_RESOURCE_PEERDIR
+ }
+
+ when($JAVA_YNDEXING == "yes") {
+ PEERDIR+=build/platform/java/kythe
+ _DO_JAVA_YNDEXING=&& $_JAVAC_RUN_HELPER($_JAVA_YNDEXING_CMD) && ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/find_and_tar.py"} kindex.tar .kzip ${output;hide;tared:"kindex.tar"}
+ }
+
+ when($ERROR_PRONE_VALUE) {
+ PEERDIR+=$ERROR_PRONE_PEERDIR
+ JAVAC_CMD=$ERROR_PRONE_JAVAC_CMD
+ }
+
+ when($ERROR_PRONE_VALUE && $JDK_VERSION == "16") {
+ JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
+ JAVAC_OPTS+=$ERROR_PRONE_JDK16_ADD_OPENS
+ }
+
+ when($ERROR_PRONE_VALUE && $JDK_VERSION == "17") {
+ JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
+ JAVAC_OPTS+=$ERROR_PRONE_JDK16_ADD_OPENS
+ }
+
+ when($ERROR_PRONE_VALUE && $ERROR_PRONE_VERSION == "2.7.1") {
+ JAVAC_FLAGS_VALUE+=$ERROR_PRONE_2_7_1_FORCED_OPTS
+ JAVAC_OPTS+=$ERROR_PRONE_2_7_1_FORCED_OPTS
+ }
+
+ when ($JAVA_ADD_DLLS_VALUE == "yes") {
+ CONSUME_NON_MANAGEABLE_PEERS=yes
+ _PACK_JNI=$_PACK_JNI_CMD
+ }
+
+ when ($LINT_LEVEL_VALUE != "none") {
+ _MAKE_JSTYLE_FILE_LIST= && $YMAKE_PYTHON ${input:"build/scripts/writer.py"} --file ${output;noauto:"lint-java.srclst"} -m --ya-start-command-file $LINT_JAVA_SOURCES --ya-end-command-file
+ }
+
+ SET(MODULE_TYPE JAVA_LIBRARY)
+ ENABLE(YMAKE_JAVA_TEST)
+ _ADD_JAVA_STYLE_CHECKS($(BUILD_ROOT)/$MODDIR/lint-java.srclst::$(SOURCE_ROOT))
+ _ADD_CLASSPATH_CLASH_CHECK()
+ JAVA_MODULE(IDEA_ONLY)
+}
+
+# tag:java-specific
+_SCRIPTGEN_FLAGS=
+macro _GEN_JAVA_SCRIPT_IMPL(Out, Template, Props...) {
+ .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;ext=.jar;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} $Props
+}
+
+# tag:java-specific
+_GEN_USERSCRIPTS=
+macro _ADD_GEN_JAVA_SCRIPT(Out, Template, Props...) {
+ SET_APPEND(_GEN_USERSCRIPTS && \$_GEN_JAVA_SCRIPT_IMPL($Out $Template $Props))
+}
+
+# tag:java-specific
+_PACK_JDK=
+
+# tag:java-specific
+DO_GEN_JAVA_RUN_SH=
+_SOURCE_JARS=
+_SOURCE_JARS_CPLIST=
+GEN_JAVA_RUN_SH=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:"run.sh"} -D GENERATE_DEFAULT_RUNNER=yes -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${REALPRJNAME}
+GEN_RUN_CP=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${nopath;qe;pre=$REALPRJNAME/:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET}
+COLLECT_JAR_PROGRAM_CP=$FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;late_out;nopath;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE}
+MAKE_JAR_PROGRAM_CPLST=$YMAKE_PYTHON ${input:"build/scripts/make_java_classpath_file.py"} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} --ya-start-command-file ${nopath;rootrel;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS_CPLIST} --ya-end-command-file
+TAR_CLASSPATH= && $YMAKE_PYTHON ${input:"build/scripts/find_and_tar.py"} ${output;pre=$MODULE_PREFIX;suf=.tar:REALPRJNAME} ${cwd;pre=$BINDIR/:REALPRJNAME}
+DO_TAR_CLASSPATH=
+LINK_JAR_PROGRAM=$FS_TOOLS md ${BINDIR}/${REALPRJNAME} && $COLLECT_JAR_PROGRAM_CP && $DO_GEN_JAVA_RUN_SH && $GEN_RUN_CP && $MAKE_JAR_PROGRAM_CPLST $DO_TAR_CLASSPATH $_GEN_USERSCRIPTS $_PACK_JDK ${kv;hide:"p JP"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+# tag:java-specific
+# UBERJAR program link command
+LINK_UBERJAR_PROGRAM=$YMAKE_PYTHON ${input:"build/scripts/make_java_classpath_file.py"} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} $TARGET \
+ && $FS_TOOLS md ${BINDIR}/${REALPRJNAME} \
+ && $FS_TOOLS link_or_copy ${BINDIR}/${REALPRJNAME}.jar $TARGET \
+ && $FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${BINDIR}/${REALPRJNAME}.jar ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;late_out;ext=.jar;pre=$BINDIR/$REALPRJNAME/:REALPRJNAME} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} \
+ $DO_TAR_CLASSPATH \
+ $_GEN_USERSCRIPTS \
+ $_PACK_JDK
+
+# tag:java-specific
+RUN_WITH_SOURCES=no
+TARED_CLASSPATH=yes # TODO jbuild creates tar with all classpath deps by default and some projects rely on this. In ymake build this tar file creation is not needed and should be disabled by dafault in future
+_JAR_SRCS_CALLED=no
+
+# tag:java-specific
+macro _MARK_JAVA_PROG_WITH_SOURCES(Args...) {
+ ENABLE(_JAR_SRCS_CALLED)
+}
+
+# tag:java-specific
+module _JAR_RUNABLE: _COMPILABLE_JAR_BASE {
+ .FINAL_TARGET=yes
+ .CMD=LINK_JAR_PROGRAM
+ .ALIASES=JAVA_SRCS=_MARK_JAVA_PROG_WITH_SOURCES GENERATE_SCRIPT=_YMAKE_GENERATE_SCRIPT
+ MODULE_SUFFIX=.run.cp.jar
+ CONSUME_NON_MANAGEABLE_PEERS=yes
+
+ when ($RUN_WITH_SOURCES == "yes") {
+ _SOURCE_JARS=${ext=.jar;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE} ${hide;late_out;ext=.jar;nopath;pre=$BINDIR/$REALPRJNAME/;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE}
+ _SOURCE_JARS_CPLIST=${nopath;rootrel;ext=.jar;pre=$BINDIR/$REALPRJNAME/;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE}
+ }
+
+ when ($_JAR_SRCS_CALLED && $TARED_CLASSPATH) {
+ DO_TAR_CLASSPATH=$TAR_CLASSPATH
+ }
+
+ when ($DISABLE_SCRIPTGEN) {
+ DO_GEN_JAVA_RUN_SH=
+ }
+ otherwise {
+ DO_GEN_JAVA_RUN_SH=$GEN_JAVA_RUN_SH
+ PEERDIR+=build/platform/java/scriptgen
+ }
+
+ when ($WITH_JDK_VALUE) {
+ _PACK_JDK= && ${YMAKE_PYTHON} ${input:"build/scripts/tar_directory.py"} ${output;tared:"jdk.tar"} $WITH_JDK_RESOURCE $WITH_JDK_RESOURCE
+ }
+
+ when ($MAKE_UBERJAR_VALUE == "yes") {
+ LINK_JAR_PROGRAM=$LINK_UBERJAR_PROGRAM
+ DYNAMIC_LINK=no
+ _SCRIPTGEN_FLAGS=-D IS_UBERJAR=yes
+ }
+ otherwise {
+ _SCRIPTGEN_FLAGS=-D IS_UBERJAR=no
+ }
+ CHECK_PROVIDES()
+}
+
+# tag:java-specific
+multimodule JAR_PROGRAM {
+ module JAR_RUNABLE: _JAR_RUNABLE {
+ .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM
+ .ALIASES=EXCLUDE=_NOOP_MACRO PEERDIR=_NOOP_MACRO DEPENDENCY_MANAGEMENT=_NOOP_MACRO JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+ .FINAL_TARGET=no
+ SET(MODULE_TYPE JAVA_PROGRAM)
+ }
+}
+
+# tag:java-specific
+LINK_JAR_TEST=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET}
+YMAKE_JAVA_TEST=
+module _JAR_TEST: _COMPILABLE_JAR_BASE {
+ .FINAL_TARGET=yes
+ .CMD=LINK_JAR_TEST
+ CONSUME_NON_MANAGEABLE_PEERS=yes
+
+ SET(MODULE_SUFFIX .test.cp.jar)
+ ENABLE(YMAKE_JAVA_TEST)
+ JAVA_TEST()
+ CHECK_PROVIDES()
+}
+
+# tag:java-specific
+multimodule JUNIT5_YMAKE {
+ module JAR_TESTABLE: _JAR_TEST {
+ .ALLOWED=JAVA_TEST_PEERDIR
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM
+ .ALIASES=EXCLUDE=_NOOP_MACRO PEERDIR=_NOOP_MACRO DEPENDENCY_MANAGEMENT=_NOOP_MACRO JAVA_TEST_PEERDIR=PEERDIR
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JUNIT5)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .IGNORED=JAVA_TEST_PEERDIR
+ .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO
+ .FINAL_TARGET=no
+
+ PEERDIR(devtools/junit5-runner build/platform/java/jacoco-agent)
+ }
+}
+
+# tag:java-specific
+multimodule JTEST_YMAKE {
+ module JAR_TESTABLE: _JAR_TEST {
+ .ALLOWED=YT_SPEC
+ .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM
+ .ALIASES=EXCLUDE=_NOOP_MACRO PEERDIR=_NOOP_MACRO DEPENDENCY_MANAGEMENT=_NOOP_MACRO JAVA_TEST_PEERDIR=PEERDIR
+ .PEERDIRSELF=JAR_COMPILATION
+
+ SET(MODULE_TYPE JTEST)
+ PEERDIR(devtools/junit-runner)
+ DEPENDENCY_MANAGEMENT(contrib/java/org/hamcrest/hamcrest-core/1.3 contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12)
+ }
+ module JAR_COMPILATION: JAR_LIBRARY {
+ .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO
+ .ALLOWED=YT_SPEC
+ .FINAL_TARGET=no
+
+ DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+ PEERDIR(build/platform/java/jacoco-agent)
+ }
+}
+
+# tag:python-specific tag:deprecated
+### @usage: PY2_LIBRARY() # deprecated
+###
+### Deprecated. Use PY23_LIBRARY or PY3_LIBRARY instead.
+### Python 2.x binary built library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM.
+### Adds dependencies to Python 2.x runtime library from Arcadia.
+### This module is only compatible with PYTHON2-tagged modules and selects those from multimodules.
+### This module is only compatible with Arcadia Python build.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY2_LIBRARY: _LIBRARY {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+ _ARCADIA_PYTHON_ADDINCL()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py
+ }
+ otherwise {
+ MODULE_PREFIX=libpy
+ }
+ .ALLOWED=FORK_TESTS
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ USE_GLOBAL_CMD=yes
+
+ when ($PY_PROTO_MYPY_ENABLED == "yes") {
+ PY_PROTO_MYPY_SUFFIX=_pb2.pyi
+ PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
+ PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
+ }
+ SET(MODULE_LANG PY2)
+}
+
+
+### @usage: _PY3_LIBRARY()
+###
+### Basic Python3 library module
+module _PY3_LIBRARY: _LIBRARY {
+ _ARCADIA_PYTHON3_ADDINCL()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py
+ }
+ otherwise {
+ MODULE_PREFIX=libpy
+ }
+ .ALLOWED=FORK_TESTS
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ USE_GLOBAL_CMD=yes
+
+ PEERDIR($YMAKE_PYTHON3_PEER)
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON3 $CYTHON_SCRIPT
+
+ when ($PY_PROTO_MYPY_ENABLED == "yes") {
+ PY_PROTO_MYPY_SUFFIX=_pb2.pyi
+ PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
+ PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
+ }
+ SET(MODULE_LANG PY3)
+}
+
+# tag:python-specific
+### @usage: PY3_LIBRARY()
+###
+### Python 3.x binary library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM
+### Adds dependencies to Python 2.x runtime library from Arcadia.
+### This module is only compatible with PYTHON3-tagged modules and selects those from multimodules.
+### This module is only compatible with Arcadia Python build.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY3_LIBRARY: _PY3_LIBRARY {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+}
+
+
+# tag:python-specific
+### @usage: _BASE_PY_PROGRAM #internal
+###
+### The base module for all Python 2.x binary programs. Adds linking logic, relevant module properties and
+### dependency on Python 2.x interpreter. Also adds import tests on all sources including PEERDIR'ed libraries.
+### Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
+### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module _BASE_PY_PROGRAM: _BASE_PROGRAM {
+ .CMD=PY_PROGRAM_LINK_EXE
+ _ARCADIA_PYTHON_ADDINCL()
+
+ when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ NO_CHECK_IMPORTS_FOR_VALUE=
+ }
+ ADD_CHECK_PY_IMPORTS()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR += contrib/libs/python
+ }
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ PEERDIR += library/python/runtime/main
+ PEERDIR += contrib/python/subprocess32
+ when ($PYTHON_SQLITE3 != "no") {
+ PEERDIR += contrib/tools/python/src/Modules/_sqlite
+ }
+ }
+ when ($PYTHON_COVERAGE == "yes") {
+ PEERDIR+=library/python/coverage
+ }
+
+ when ($ARCH_PPC64LE == "yes") {
+ _MY_ALLOCATOR=SYSTEM
+ }
+ otherwise {
+ _MY_ALLOCATOR=J
+ }
+ ALLOCATOR($_MY_ALLOCATOR)
+ STRIP()
+
+ when ($BUILD_TYPE == "DEBUG") {
+ NO_STRIP=yes
+ }
+ when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ NO_STRIP=yes
+ }
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ SET(MODULE_LANG PY2)
+}
+
+# tag:python-specific tag:codenav
+when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+ PY3_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"py3yndex $TARGET"}
+}
+otherwise {
+ PY3_PROGRAM_LINK_EXE=$LINK_EXE
+}
+
+
+# tag:python-specific
+### @usage: _BASE_PY_PROGRAM #internal
+###
+### The base module for all Python 3.x binary programs. Adds linking logic, relevant module properties and
+### dependency on Python 3.x interpreter. Also adds import tests on all sources including libraries.
+### Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
+### This only compatible with PYTHON3-tagged modules and selects those from multimodules
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
+ .CMD=PY3_PROGRAM_LINK_EXE
+ _ARCADIA_PYTHON3_ADDINCL()
+ PEERDIR(library/python/runtime_py3/main)
+ when ($PYTHON_SQLITE3 != "no") {
+ PEERDIR += contrib/tools/python3/src/Modules/_sqlite
+ }
+
+ when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ NO_CHECK_IMPORTS_FOR_VALUE=
+ }
+ ADD_CHECK_PY_IMPORTS()
+
+ when ($ARCH_PPC64LE == "yes") {
+ _MY_ALLOCATOR=SYSTEM
+ }
+ otherwise {
+ _MY_ALLOCATOR=J
+ }
+ ALLOCATOR($_MY_ALLOCATOR)
+ STRIP()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
+ when ($BUILD_TYPE == "DEBUG") {
+ NO_STRIP=yes
+ }
+ when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ NO_STRIP=yes
+ }
+ when ($PYTHON_COVERAGE == "yes") {
+ PEERDIR+=library/python/coverage
+ }
+ when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+ PEERDIR += contrib/python/six
+ }
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2
+ SET(MODULE_LANG PY3)
+}
+
+# tag:python-specific
+### @usage: PY3_PROGRAM_BIN([progname])
+### Use instead of PY3_PROGRAM only if ya.make with PY3_PROGRAM() included in another ya.make
+### In all other cases use PY3_PROGRAM
+module PY3_PROGRAM_BIN: _BASE_PY3_PROGRAM {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+ # Look's like we cannot avoid copy-paste util ymake supports multiple inheritance
+ # We need to attach coverage.extractor to every py_program target, except pytest targets
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+}
+
+# tag:java-specific
+JAVA_SWIG_DELIM=JAVA_SWIG_DELIM
+
+# tag:java-specific
+JDK_VERSION=11
+when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
+ JDK_VERSION=8
+}
+
+
+# tag:java-specific
+# remove extra peerdir to jdk11 after https://st.yandex-team.ru/DEVTOOLS-8851 is done
+when ($JDK_VERSION == "17") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk17 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "16") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk16 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "15") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk15 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "14") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk14 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "13") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk13 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "12") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk12 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "11") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "10") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk10 build/platform/java/jdk/jdk11
+}
+when ($JDK_VERSION == "8") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk11
+}
+
+# tag:java-specific
+when ($JDK_VERSION == "17") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar17
+}
+when ($JDK_VERSION == "16") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar16
+}
+when ($JDK_VERSION == "15") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar15
+}
+when ($JDK_VERSION == "14") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar14
+}
+when ($JDK_VERSION == "13") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar13
+}
+when ($JDK_VERSION == "12") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar12
+}
+when ($JDK_VERSION == "11") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar11
+}
+when ($JDK_VERSION == "10") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar10
+}
+when ($JDK_VERSION == "8") {
+ UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar8
+}
+
+# tag:java-specific
+JAVAC_OPTS=
+when ($USE_SYSTEM_JDK) {
+ JDK_RESOURCE=$USE_SYSTEM_JDK
+}
+otherwise {
+ when ($JDK_VERSION == "17") {
+ JDK_RESOURCE=$JDK17_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "16") {
+ JDK_RESOURCE=$JDK16_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "15") {
+ JDK_RESOURCE=$JDK15_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "14") {
+ JDK_RESOURCE=$JDK14_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "13") {
+ JDK_RESOURCE=$JDK13_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "12") {
+ JDK_RESOURCE=$JDK12_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "11") {
+ JDK_RESOURCE=$JDK11_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "10") {
+ JDK_RESOURCE=$JDK10_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "8") {
+ JDK_RESOURCE=$JDK8_RESOURCE_GLOBAL
+ }
+}
+
+# tag:java-specific
+when (!$USE_SYSTEM_ERROR_PRONE) {
+ when ($JDK_VERSION == "8" || $JDK_VERSION == "10") {
+ ERROR_PRONE_VERSION=2.3.1
+ ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.3.1
+ ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_3_1_RESOURCE_GLOBAL
+ }
+ elsewhen ($JDK_VERSION == "11" || $JDK_VERSION == "12" || $JDK_VERSION == "13" || $JDK_VERSION == "14" || $JDK_VERSION == "15" || $JDK_VERSION == "16") {
+ ERROR_PRONE_VERSION=2.7.1
+ ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.7.1
+ ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_7_1_RESOURCE_GLOBAL
+ }
+ elsewhen ($JDK_VERSION == "17") {
+ ERROR_PRONE_VERSION=2.10.0
+ ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.10.0
+ ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_10_0_RESOURCE_GLOBAL
+ }
+ otherwise {
+ ERROR_PRONE_VERSION=2.7.1
+ ERROR_PRONE_PEERDIR=build/platform/java/error_prone
+ ERROR_PRONE_RESOURCE=$ERROR_PRONE_RESOURCE_GLOBAL
+ }
+}
+otherwise {
+ ERROR_PRONE_VERSION=2.7.1
+ ERROR_PRONE_PEERDIR=build/platform/java/error_prone
+ ERROR_PRONE_RESOURCE=$ERROR_PRONE_RESOURCE_GLOBAL
+}
+
+# tag:java-specific
+when ($USE_SYSTEM_UBERJAR) {
+ UBERJAR_RESOURCE=$USE_SYSTEM_UBERJAR
+}
+otherwise {
+ when ($JDK_VERSION == "17") {
+ UBERJAR_RESOURCE=$UBERJAR17_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "16") {
+ UBERJAR_RESOURCE=$UBERJAR16_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "15") {
+ UBERJAR_RESOURCE=$UBERJAR15_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "14") {
+ UBERJAR_RESOURCE=$UBERJAR14_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "13") {
+ UBERJAR_RESOURCE=$UBERJAR13_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "12") {
+ UBERJAR_RESOURCE=$UBERJAR12_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "11") {
+ UBERJAR_RESOURCE=$UBERJAR11_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "10") {
+ UBERJAR_RESOURCE=$UBERJAR10_RESOURCE_GLOBAL
+ }
+ when ($JDK_VERSION == "8") {
+ UBERJAR_RESOURCE=$UBERJAR8_RESOURCE_GLOBAL
+ }
+}
+
+# tag:java-specific
+when ($JDK_VERSION == "17") {
+ WITH_JDK_RESOURCE=$WITH_JDK17_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "16") {
+ WITH_JDK_RESOURCE=$WITH_JDK16_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "15") {
+ WITH_JDK_RESOURCE=$WITH_JDK15_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "14") {
+ WITH_JDK_RESOURCE=$WITH_JDK14_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "13") {
+ WITH_JDK_RESOURCE=$WITH_JDK13_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "12") {
+ WITH_JDK_RESOURCE=$WITH_JDK12_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "11") {
+ WITH_JDK_RESOURCE=$WITH_JDK11_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "10") {
+ WITH_JDK_RESOURCE=$WITH_JDK10_RESOURCE_GLOBAL
+}
+when ($JDK_VERSION == "8") {
+ WITH_JDK_RESOURCE=$WITH_JDK8_RESOURCE_GLOBAL
+}
+
+# tag:java-specific
+COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_java.py"} --javac-bin $JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $PEERS ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"PEERS $PEERS"}
+REAL_SWIG_DLL_JAR_CMD=$GENERATE_VCS_JAVA_INFO_NODEP && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/build_dll_and_java.py"} $JAVA_SWIG_DELIM $REAL_LINK_DYN_LIB $JAVA_SWIG_DELIM $COMPILE_JAVA $JAVA_SWIG_DELIM $AUTO_INPUT $JAVA_SWIG_DELIM $TARGET $JAVA_SWIG_DELIM ${output;suf=.jar:REALPRJNAME} $JAVA_SWIG_DELIM ${output;suf=-sources.jar:REALPRJNAME} $JAVA_SWIG_DELIM $ARCADIA_BUILD_ROOT $ARCADIA_ROOT
+
+# tag:deprecated
+### @usage: METAQUERY() #deprecated
+###
+### Project Definition - KIWI Meta query. (Objected)
+###
+### https://wiki.yandex-team.ru/robot/manual/kiwi/techdoc/design/metaquery/
+module METAQUERY: _BASE_UNIT {
+ .ALL_INS_TO_OUT=yes
+ .FINAL_TARGET=yes
+ PRINT_MODULE_TYPE(METAQUERY $MODULE_PREFIX$REALPRJNAME)
+}
+
+ARGS_DELIM="MACRO_CALLS_DELIM"
+
+SYSTEM_PROPERTIES_VALUE=
+### @usage: SYSTEM_PROPERTIES([<Key Value>...] [<File Path>...])
+###
+### List of Key,Value pairs that will be available to test via System.getProperty().
+### FILE means that parst should be read from file specifies as Path.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
+macro SYSTEM_PROPERTIES(Args...) {
+ SET_APPEND(SYSTEM_PROPERTIES_VALUE $Args)
+}
+
+# tag:java-specific
+JVM_ARGS_VALUE=
+### @usage: JVM_ARGS(Args...)
+###
+### Arguments to run Java programs in tests.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
+macro JVM_ARGS(Args...) {
+ SET_APPEND(JVM_ARGS_VALUE $Args)
+}
+
+# tag:java-specific
+CHECK_JAVA_DEPS_VALUE=
+### @usage: CHECK_JAVA_DEPS(<yes|no>)
+###
+### Check for different classes with duplicate name in classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
+macro CHECK_JAVA_DEPS(Arg) {
+ SET(CHECK_JAVA_DEPS_VALUE $Arg)
+}
+
+ERROR_PRONE_VALUE=
+### @usage: USE_ERROR_PRONE()
+###
+### Use errorprone instead of javac for .java compilation.
+macro USE_ERROR_PRONE() {
+ SET(ERROR_PRONE_VALUE yes)
+}
+
+TEST_CWD_VALUE=
+### @usage: TEST_CWD(path)
+###
+### Defines working directory for test runs. Othen used in conjunction with DATA() macro.
+### Is only used inside of the TEST modules.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
+macro TEST_CWD(Arg) {
+ SET(TEST_CWD_VALUE $Arg)
+}
+
+# tag:java-specific
+MAKE_UBERJAR_VALUE=
+### @usage: UBERJAR()
+###
+### UBERJAR is a single all-in-one jar-archive that includes all its Java dependencies (reachable PEERDIR).
+### It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin).
+### Use UBERJAR inside JAVA_PROGRAM module.
+###
+### You can use the following macros to configure the archive:
+### 1. UBERJAR_HIDING_PREFIX prefix for classes to shade (classes remain in their packages by default)
+### 2. UBERJAR_HIDE_EXCLUDE_PATTERN exclude classes matching this patterns from shading (if enabled).
+### 3. UBERJAR_PATH_EXCLUDE_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default)
+### 4. UBERJAR_MANIFEST_TRANSFORMER_MAIN add ManifestResourceTransformer class to uberjar processing and specify main-class
+### 5. UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE add ManifestResourceTransformer class to uberjar processing and specify some attribute
+### 6. UBERJAR_APPENDING_TRANSFORMER add AppendingTransformer class to uberjar processing
+### 7. UBERJAR_SERVICES_RESOURCE_TRANSFORMER add ServicesResourceTransformer class to uberjar processing
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+###
+### @see: [JAVA_PROGRAM](#module_JAVA_PROGRAM), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX), [UBERJAR_HIDE_EXCLUDE_PATTERN](#macro_UBERJAR_HIDE_EXCLUDE_PATTERN), [UBERJAR_PATH_EXCLUDE_PREFIX](#macro_UBERJAR_PATH_EXCLUDE_PREFIX)
+macro UBERJAR() {
+ SET(MAKE_UBERJAR_VALUE yes)
+}
+
+# tag:java-specific
+UBERJAR_PREFIX_VALUE=
+UBERJAR_PREFIX_FLAG=
+### @usage: UBERJAR_HIDING_PREFIX(Arg)
+###
+### Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg.
+### Classes remain in their packages by default.
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_HIDING_PREFIX(Arg) {
+ SET(UBERJAR_PREFIX_VALUE $Arg)
+ SET(UBERJAR_PREFIX_FLAG ${pre=--shade-prefix :Arg})
+}
+
+# tag:java-specific
+UBERJAR_HIDE_EXCLUDE_VALUE=
+UBERJAR_HIDE_EXCLUDE_FLAGS=
+### @usage: UBERJAR_HIDE_EXCLUDE_PATTERN(Args...)
+###
+### Exculude classes matching this patterns from shading (if enabled).
+### Pattern may contain '*' and '**' globs.
+### Shading is enabled for UBERJAR program using UBERJAR_HIDING_PREFIX macro. If this macro is not specified all classes are shaded.
+###
+### @see: [UBERJAR](#macro_UBERJAR), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX)
+macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) {
+ SET_APPEND(UBERJAR_HIDE_EXCLUDE_VALUE $ARGS_DELIM $Args)
+ SET_APPEND(UBERJAR_HIDE_EXCLUDE_FLAGS ${pre=--shade-exclude :Args})
+}
+
+# tag:java-specific
+UBERJAR_PATH_EXCLUDES=
+UBERJAR_PATH_EXCLUDE_VALUE=
+### @usage: UBERJAR_PATH_EXCLUDE_PREFIX(Args...)
+###
+### Exculude classes matching this patterns from UBERJAR.
+### By default all dependencies of UBERJAR program will lend in a .jar archive.
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_PATH_EXCLUDE_PREFIX(Args...) {
+ SET_APPEND(UBERJAR_PATH_EXCLUDE_VALUE $ARGS_DELIM $Args)
+ SET_APPEND(UBERJAR_PATH_EXCLUDES ${pre=--uber-exclude :Args})
+}
+
+# tag:java-specific
+UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE=
+UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG=
+### @usage: UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main)
+###
+### Transform manifest.mf for UBERJAR() java programs, set main-class attribute
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main) {
+ SET(UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE $Main)
+ SET(UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG --manifest-main $Main)
+}
+
+# tag:java-specific
+UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE=
+UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS=
+### @usage: UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value)
+###
+### Transform manifest.mf for UBERJAR() java programs, set attribute
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) {
+ SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE $ARGS_DELIM $Key : $Value)
+ SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS --manifest-attribute ${Key}:${Value})
+}
+
+# tag:java-specific
+UBERJAR_APPENDING_TRANSFORMER_VALUE=
+UBERJAR_APPENDING_TRANSFORMER_FLAGS=
+### @usage: UBERJAR_APPENDING_TRANSFORMER(Resource)
+###
+### Add AppendingTransformer for UBERJAR() java programs
+###
+### Parameters:
+### - Resource - Resource name
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_APPENDING_TRANSFORMER(Resources...) {
+ SET_APPEND(UBERJAR_APPENDING_TRANSFORMER_VALUE $ARGS_DELIM $Resources)
+ SET_APPEND(UBERJAR_APPENDING_TRANSFORMER_FLAGS ${pre=--append-transformer :Resources})
+}
+
+# tag:java-specific
+UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE=
+UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG=
+### @usage: UBERJAR_SERVICES_RESOURCE_TRANSFORMER()
+###
+### Add ServicesResourceTransformer for UBERJAR() java programs
+###
+### @see: [UBERJAR](#macro_UBERJAR)
+macro UBERJAR_SERVICES_RESOURCE_TRANSFORMER() {
+ SET(UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE yes)
+ SET(UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG --service-transformer)
+}
+
+# tag:idea-specific
+IDEA_EXCLUDE_DIRS_VALUE=
+### @usage: IDEA_EXCLUDE_DIRS(<excluded dirs>)
+###
+### Exclude specified directories from an idea project generated by ya ide idea
+### Have no effect on regular build.
+macro IDEA_EXCLUDE_DIRS(Args...) {
+ SET_APPEND(IDEA_EXCLUDE_DIRS_VALUE $Args)
+}
+
+# tag:idea-specific
+IDEA_RESOURCE_DIRS_VALUE=
+### @usage: IDEA_RESOURCE_DIRS(<additional dirs>)
+###
+### Set specified resource directories in an idea project generated by ya ide idea
+### Have no effect on regular build.
+macro IDEA_RESOURCE_DIRS(Args...) {
+ SET_APPEND(IDEA_RESOURCE_DIRS_VALUE $Args)
+}
+
+# tag:idea-specific
+IDEA_MODULE_NAME_VALUE=
+### @usage: IDEA_MODULE_NAME(module_name)
+###
+### Set module name in an idea project generated by ya ide idea
+### Have no effect on regular build.
+macro IDEA_MODULE_NAME(Name) {
+ SET(IDEA_MODULE_NAME_VALUE $Name)
+}
+
+# tag:java-specific
+JAVAC_FLAGS_VALUE=
+### @usage: JAVAC_FLAGS(Args...)
+###
+### Set additional Java compilation flags.
+macro JAVAC_FLAGS(Args...) {
+ SET_APPEND(JAVAC_OPTS $Args)
+ SET_APPEND(JAVAC_FLAGS_VALUE $ARGS_DELIM $Args)
+}
+
+# tag:java-specific
+ENABLE_PREVIEW_VALUE=
+### @usage: ENABLE_PREVIEW()
+###
+### Enable java preview features.
+macro ENABLE_PREVIEW() {
+ SET_APPEND(JVM_ARGS_VALUE --enable-preview)
+ SET_APPEND(JAVAC_OPTS --enable-preview --release $JDK_VERSION)
+ SET_APPEND(JAVAC_FLAGS_VALUE --enable-preview --release $JDK_VERSION)
+ SET(ENABLE_PREVIEW_VALUE yes)
+}
+
+# tag:java-specific
+SAVE_JAVAC_GENERATED_SRCS=
+SAVE_JAVAC_GENERATED_SRCS_DIR=
+SAVE_JAVAC_GENERATED_SRCS_TAR=
+when ($SAVE_JAVAC_GENERATED_SRCS) {
+ SAVE_JAVAC_GENERATED_SRCS_DIR=${BINDIR}/__javac_generated_srcs__
+ SAVE_JAVAC_GENERATED_SRCS_TAR=${BINDIR}/javac_generated.tar
+ JAVAC_FLAGS_VALUE+=-s $SAVE_JAVAC_GENERATED_SRCS_DIR
+}
+
+# tag:java-specific
+MAVEN_GROUP_ID_VALUE=
+### @usage: MAVEN_GROUP_ID(group_id_for_maven_export)
+###
+### Set maven export group id for JAVA_PROGRAM() and JAVA_LIBRARY().
+### Have no effect on regular build.
+macro MAVEN_GROUP_ID(Arg) {
+ SET(MAVEN_GROUP_ID_VALUE $Arg)
+}
+
+# tag:java-specific
+ANNOTATION_PROCESSOR_VALUE=
+### @usage: ANNOTATION_PROCESSOR(processors...)
+###
+### The macro is in development.
+### Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY().
+macro ANNOTATION_PROCESSOR(Args...) {
+ SET_APPEND(ANNOTATION_PROCESSOR_VALUE $ARGS_DELIM $Args)
+}
+
+EXCLUDE_VALUE=
+### EXCLUDE(prefixes)
+###
+### The macro is in development.
+### Specifies which libraries should be excluded from the classpath.
+macro EXCLUDE(Args...) {
+ SET_APPEND(EXCLUDE_VALUE $ARGS_DELIM $Args)
+}
+
+# tag:java-specific
+JAVA_SRCS_VALUE=
+### @usage: JAVA_SRCS(srcs)
+###
+### Specify java source files and resources. A macro can be contained in any of four java modules.
+### Keywords:
+### 1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory.
+### 2. PACKAGE_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE_PREFIX package.name.
+###
+### @example:
+### - example/ya.make
+###
+### JAVA_PROGRAM()
+### JAVA_SRCS(SRCDIR src/main/java **/*)
+### END()
+###
+### - example/src/main/java/ru/yandex/example/HelloWorld.java
+###
+### package ru.yandex.example;
+### public class HelloWorld {
+### public static void main(String[] args) {
+### System.out.println("Hello, World!");
+### }
+### }
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs
+macro JAVA_SRCS(Args...) {
+ SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args)
+}
+
+# tag:java-specific
+JAVA_ADD_DLLS_VALUE=no
+macro ADD_DLLS_TO_JAR() {
+ SET(JAVA_ADD_DLLS_VALUE yes)
+}
+
+# tag:java-specific
+MANAGED_PEERS=
+MANAGED_PEERS_CLOSURE=
+RUN_JAVA_PROGRAM_MANAGED=
+MANAGEABLE_PEERS_ROOTS=contrib/java
+HAS_MANAGEABLE_PEERS=no
+PROPAGATES_MANAGEABLE_PEERS=no
+YMAKE_CLASSPATH_CHECKS=yes
+# All items of this list must be PEERS, GHOST PEERS or TOOLS of the test module or module itself.
+# All items of this list must has at least one of HAS_MANAGEABLE_PEERS or PROPAGATES_MANAGEABLE_PEERS flags set yes.
+# This variable is used by JUnit tests but not TestNG.
+TEST_CLASSPATH_VALUE=
+# Calculated and replaced by ymake can be used in DART DATA
+TEST_CLASSPATH_MANAGED=
+
+# tag:java-specific
+DEPENDENCY_MANAGEMENT_VALUE=
+### @usage: DEPENDENCY_MANAGEMENT(path/to/lib1 path/to/lib2 ...)
+###
+### Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version.
+###
+### For example, if the moduse has PEERDIR (contrib/java/junit/junit), and
+### 1. specifies DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12),
+### the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12;
+### 2. doesn't specify DEPENDENCY_MANAGEMENT, PEERDIR automatically replaced
+### with the default from contrib/java/junit/junit/ya.make.
+### These defaults are always there and are supported by maven-import, which puts
+### there the maximum version available in contrib/java.
+###
+### The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B.
+###
+### If some module has both DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+macro DEPENDENCY_MANAGEMENT(Args...) {
+ SET_APPEND(DEPENDENCY_MANAGEMENT_VALUE $ARGS_DELIM $Args)
+ _GHOST_PEERDIR($Args)
+}
+
+# tag:java-specific
+WITH_JDK_VALUE=
+### @usage: WITH_JDK()
+###
+### Add directory with JDK to JAVA_PROGRAM output
+macro WITH_JDK() {
+ SET(WITH_JDK_VALUE yes)
+}
+
+# tag:kotlin-specific
+WITH_KOTLIN_VALUE=
+### @usage: WITH_KOTLIN()
+###
+### Compile kotlin source code in this java module
+macro WITH_KOTLIN() {
+ SET(WITH_KOTLIN_VALUE yes)
+}
+
+# tag:java-specific
+WITH_GROOVY_VALUE=
+### @usage: WITH_GROOVY()
+###
+### Compile groovy source code in this java module
+macro WITH_GROOVY() {
+ SET(WITH_GROOVY_VALUE yes)
+}
+
+# tag:kotlin-specific
+KOTLINC_FLAGS_VALUE=-Xjvm-default=all
+### @usage: KOTLINC_FLAGS(-flags)
+###
+### Set additional Kotlin compilation flags.
+macro KOTLINC_FLAGS(Args...) {
+ SET_APPEND(KOTLINC_OPTS_VALUE $Args)
+}
+
+# tag:kotlin-specific
+WITH_KOTLINC_PLUGIN_ALLOPEN=
+### @usage: WITH_KOTLINC_ALLOPEN(-flags)
+###
+### Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html
+macro WITH_KOTLINC_ALLOPEN(Options...) {
+ SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.allopen\::Options})
+ SET(WITH_KOTLINC_PLUGIN_ALLOPEN yes)
+}
+
+# tag:kotlin-specific
+WITH_KOTLINC_PLUGIN_NOARG=
+### @usage: WITH_KOTLINC_NOARG(-flags)
+###
+### Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html
+macro WITH_KOTLINC_NOARG(Options...) {
+ SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.noarg\::Options})
+ SET(WITH_KOTLINC_PLUGIN_NOARG yes)
+}
+
+# tag:kotlin-specific
+KOTLIN_VERSION=1.6.10
+KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/1.6.10/ya.dependency_management.inc
+GROOVY_VERSION=3.0.5
+
+# tag:java-specific
+DIRECT_DEPS_ONLY_VALUE=
+### @usage: DIRECT_DEPS_ONLY
+###
+### Add direct PEERDIR's only in java compile classpath
+macro DIRECT_DEPS_ONLY() {
+ SET(DIRECT_DEPS_ONLY_VALUE yes)
+}
+
+# tag:java-specific
+JAVA_EXTERNAL_DEPENDENCIES_VALUE=
+### @usage: JAVA_EXTERNAL_DEPENDENCIES(file1 file2 ...)
+###
+### Add non-source java external build dependency (like lombok config file)
+macro JAVA_EXTERNAL_DEPENDENCIES(Args...) {
+ SET_APPEND(JAVA_EXTERNAL_DEPENDENCIES_VALUE $Args)
+}
+
+# tag:java-specific
+### @usage _JAVA_PLACEHOLDER #internal
+### The base module for all Java modules. Defines common properties and dependencies.
+module _JAVA_PLACEHOLDER: _BASE_UNIT {
+ .CMD=TOUCH_JAVA_UNIT
+ .FINAL_TARGET=yes
+ .ALLOWED=DEPENDENCY_MANAGEMENT EXCLUDE
+ .ALIASES=RUN_JAVA_PROGRAM=_RUN_JBUILD_PROGRAM
+ HAS_MANAGEABLE_PEERS=yes
+ DYNAMIC_LINK=yes
+ PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL JAR_COMPILATION
+ PEERDIR(build/platform/java/jdk)
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+ when($MAKE_UBERJAR_VALUE) {
+ PEERDIR+=build/platform/java/uberjar
+ PEERDIR+=$UBERJAR_RESOURCE_PEERDIR
+ }
+ when($ERROR_PRONE_VALUE) {
+ # Jbuild assumes hardcoded resource name https://a.yandex-team.ru/arc_vcs/devtools/ya/jbuild/gen/consts/__init__.py?rev=1739368ed5aaa585b8300b84e5dea708a2bedd3a#L130
+ # adding default peerdir as a hack to make `ya ide idea` and `ya maven-export` work for now
+ PEERDIR+=build/platform/java/error_prone
+ PEERDIR+=$ERROR_PRONE_PEERDIR
+ }
+ # in the ideal world this statement must be under condition bellow
+ DEPENDENCY_MANAGEMENT(contrib/java/org/jetbrains/kotlin/kotlin-stdlib-jdk8/${KOTLIN_VERSION})
+ when($WITH_KOTLIN_VALUE) {
+ PEERDIR+=build/platform/java/kotlin contrib/java/org/jetbrains/kotlin/kotlin-stdlib-jdk8
+ when($WITH_KOTLINC_PLUGIN_ALLOPEN) {
+ KOTLINC_OPTS_VALUE+=-Xplugin=${KOTLIN_COMPILER_RESOURCE_GLOBAL}/plugins/kotlin-allopen-plugin.jar
+ }
+ when($WITH_KOTLINC_PLUGIN_NOARG) {
+ KOTLINC_OPTS_VALUE+=-Xplugin=${KOTLIN_COMPILER_RESOURCE_GLOBAL}/plugins/kotlin-noarg-plugin.jar
+ }
+ }
+ when($WITH_GROOVY_VALUE) {
+ PEERDIR+=build/platform/java/groovy contrib/java/org/codehaus/groovy/groovy/${GROOVY_VERSION}
+ }
+
+ when($ERROR_PRONE_VALUE && $JDK_VERSION == "16") {
+ JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
+ }
+
+ when($ERROR_PRONE_VALUE && $ERROR_PRONE_VERSION == "2.7.1") {
+ JAVAC_FLAGS_VALUE+=$ERROR_PRONE_2_7_1_FORCED_OPTS
+ }
+
+ JAVA_DEPENDENCIES_CONFIGURATION(FORBID_DEFAULT_VERSIONS)
+ DISABLE(NEED_PLATFORM_PEERDIRS)
+ NO_PLATFORM()
+ JAVA_MODULE()
+
+ # flatbuffers-java
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/flatbuffers/flatbuffers-java EXCEPT contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION})
+
+ # protobuf-java
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-java/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java EXCEPT contrib/java/com/google/protobuf/protobuf-java/${JAVA_PROTO_RUNTIME_VERSION})
+
+ # protobuf-javalite
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-javalite/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-javalite EXCEPT contrib/java/com/google/protobuf/protobuf-javalite/${JAVA_PROTO_RUNTIME_VERSION})
+
+ # protobuf-java-util
+ DEPENDENCY_MANAGEMENT(contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
+ CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java-util EXCEPT contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION})
+ SET(MODULE_LANG JAVA)
+}
+
+# tag:java-specific
+JAVA_CLASSPATH_CMD_TYPE_VALUE=
+
+# tag:java-specific
+### @usage:TEST_JAVA_CLASSPATH_CMD_TYPE(Type)
+### Availible types: MANIFEST(default), COMMAND_FILE, LIST
+### Method for passing a classpath value to a java command line
+### MANIFEST via empty jar file with manifest that cantains Class-Path attribute
+### COMMAND_FILE via @command_file
+### LIST via flat args
+macro TEST_JAVA_CLASSPATH_CMD_TYPE(Type) {
+ SET(JAVA_CLASSPATH_CMD_TYPE_VALUE $Type)
+}
+
+# tag:java-specific
+IGNORE_JAVA_DEPENDENCIES_CONFIGURATION=no
+JAVA_DEPENDENCIES_CONFIGURATION_VALUE=
+
+# tag:java-specific
+### @usage JAVA_DEPENDENCIES_CONFIGURATION(Vetos...)
+### Validate contrib/java dependencies
+### Valid arguments
+### FORBID_DIRECT_PEERDIRS - fail when module have direct PEERDIR (with version) (non-transitive)
+### FORBID_DEFAULT_VERSIONS - fail when module have PEERDIR to library with default (last) version (transitive)
+### FORBID_CONFLICT - fail when module have resolved without DEPENDENCY_MANAGEMENT version conflict (transitive)
+### FORBID_CONFLICT_DM - fail when module have resolved with DEPENDENCY_MANAGEMENT version conflict (transitive)
+### FORBID_CONFLICT_DM_RECENT - like FORBID_CONFLICT_DM but fail only when dependency have more recent version than specified in DEPENDENCY_MANAGEMENT
+### REQUIRE_DM - all dependencies must be specified in DEPENDENCY_MANAGEMENT (transitive)
+macro JAVA_DEPENDENCIES_CONFIGURATION(Args...) {
+ SET_APPEND(JAVA_DEPENDENCIES_CONFIGURATION_VALUE $Args)
+}
+
+# tag:java-specific
+# TODO(DEVTOOLS-6901): remove this variable when there are no more references to it in jbuild
+JAVA_FORBIDDEN_LIBRARIES_VALUE=
+
+# tag:java-specific
+JAR_INCLUDE_FILTER_VALUE=
+JAR_EXCLUDE_FILTER_VALUE=
+
+# tag:java-specific
+### @usage:JAR_INCLUDE(Filters...)
+### Filter .jar file content: keep only matched files
+### * and ** patterns are supported (like JAVA_SRCS)
+macro JAR_INCLUDE(Filters...) {
+ SET_APPEND(JAR_INCLUDE_FILTER_VALUE $Filters)
+}
+
+# tag:java-specific
+### @usage:JAR_EXCLUDE(Filters...)
+### Filter .jar file content: remove matched files
+### * and ** patterns are supported (like JAVA_SRCS)
+macro JAR_EXCLUDE(Filters...) {
+ SET_APPEND(JAR_EXCLUDE_FILTER_VALUE $Filters)
+}
+
+# tag:sandbox-specific
+### @usage: SANDBOX_TASK([Name])
+###
+### Multimodule describing Sandbox task (Python code that can be executed by Sandbox system).
+###
+### When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX_TASKs as libraries.
+### The final artifact is provided when SANDBOX_TASK is referred to by DEPENDS and BUNDLE macros.
+### As PEERDIR target, it works like regular PY2_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX_TASKs.
+###
+### Currently Sandbox supports only Python 2.x, so both variants will be compatible only with Python 2.x modules
+### and will select multimodule variants accordingly.
+###
+### Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+multimodule SANDBOX_TASK {
+ module SB_TASK_BIN: _PY2_PROGRAM {
+ PY_MAIN(sandbox.taskbox.binary)
+ PEERDIR(sandbox/bin sandbox/sdk2 sandbox/sandboxsdk sandbox/taskbox/worker)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE kernel.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE library.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE sky*)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
+
+ ASSERT(_OK You are using deprecated Python2-only code (SANDBOX_TASK). Please consider rewriting to 2/3-compatible code.)
+ }
+ module PY2: PY2_LIBRARY {
+ PEERDIR(sandbox/sdk2 sandbox/sandboxsdk)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ }
+}
+
+# tag:sandbox-specific
+multimodule SANDBOX_PY23_TASK {
+ module SB_TASK_BIN: _PY2_PROGRAM {
+ PY_MAIN(sandbox.taskbox.binary)
+ PEERDIR(sandbox/bin sandbox/sdk2 sandbox/sandboxsdk sandbox/taskbox/worker)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE kernel.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE library.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE sky*)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ }
+ module PY2: PY2_LIBRARY {
+ PEERDIR(sandbox/sdk2 sandbox/sandboxsdk)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ OBJ_SUF=.py2
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ }
+ module PY3: PY3_LIBRARY {
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
+ OBJ_SUF=.py3
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ PEERDIR(sandbox/sdk2)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ }
+}
+
+# tag:sandbox-specific
+### @usage: SANDBOX_PY3_TASK([Name])
+###
+### Multimodule describing Sandbox task (Python3 code that can be executed by Sandbox system).
+###
+### When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX_PY3_TASKs as libraries.
+### The final artifact is provided when SANDBOX_PY3_TASK is referred to by DEPENDS and BUNDLE macros.
+### As PEERDIR target, it works like regular PY3_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX_PY3_TASKs.
+###
+### Currently Sandbox supports Python 3.x only in binary tasks, both variants will be compatible only with Python 3.x and py23 libraries
+### and will select multimodule variants accordingly.
+###
+### Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+multimodule SANDBOX_PY3_TASK {
+ module SB_TASK_BIN: PY3_PROGRAM_BIN {
+ PY_MAIN(sandbox.taskbox.binary)
+ PEERDIR(sandbox/bin sandbox/sdk2 sandbox/taskbox/worker)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE kernel.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE library.*)
+ SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE sky*)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ }
+ module PY3: PY3_LIBRARY {
+ PEERDIR(sandbox/sdk2)
+ REGISTER_SANDBOX_IMPORT(${MODDIR})
+ }
+}
+
+# tag:python-specific tag:internal
+NO_PYTHON_INCLS=no
+### @usage: NO_PYTHON_INCLUDES() # internal
+###
+### Disable dependencies on libraries providing Python headers.
+### This is only used in Python libraries themselves to avoid PEERDIR loops.
+macro NO_PYTHON_INCLUDES() {
+ ENABLE(NO_PYTHON_INCLS)
+}
+
+# tag:python-specific
+### @usage: PYTHON2_ADDINCL()
+###
+### This macro adds include path for Python headers (Python 2.x variant) without PEERDIR.
+### This should be used in 2 cases only:
+### - In PY2MODULE since it compiles into .so and uses external Python runtime;
+### - In system Python libraries themselves since proper PEERDIR there may create a loop;
+### In all other cases use USE_PYTHON2 macro instead.
+###
+### Never use this macro in PY2_PROGRAM, PY2_LIBRARY and PY23_LIBRARY: they have everything needed by default.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
+macro PYTHON2_ADDINCL() {
+ _PYTHON_ADDINCL()
+ SET(MODULE_TAG PY2_NATIVE)
+ SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
+# tag:python-specific tag:internal
+### @usage: _ARCADIA_PYTHON_ADDINCL() # internal
+### This macro sets up Python headers for modules with Arcadia python (e.g. PY2_LIBRARY) and configures module as Python 2.x.
+macro _ARCADIA_PYTHON_ADDINCL() {
+ _PYTHON_ADDINCL()
+ SET(MODULE_TAG PY2)
+ SET(PEERDIR_TAGS PY2 PY2_NATIVE PY_PROTO PY2_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
+# tag:python-specific tag:internal
+### @usage: _PYTHON_ADDINCL() # internal
+### This macro sets up Python 2.x headers for both Arcadia and non-Arcadia python.
+macro _PYTHON_ADDINCL() {
+ SET(PYTHON2 yes)
+ SET(PYTHON3 no)
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ ADDINCL+=GLOBAL contrib/libs/python/Include
+ CFLAGS+=-DARCADIA_PYTHON_UNICODE_SIZE=$ARCADIA_PYTHON_UNICODE_SIZE
+ }
+ otherwise {
+ when ($USE_SYSTEM_PYTHON) {
+ PEERDIR+=build/platform/python
+ }
+ otherwise {
+ CFLAGS+=$PYTHON_INCLUDE
+ }
+ }
+}
+
+# tag:python-specific
+### @usage: PYTHON3_ADDINCL()
+###
+### This macro adds include path for Python headers (Python 3.x variant).
+### This should be used in 2 cases only:
+### - In PY2MODULE since it compiles into .so and uses external Python runtime;
+### - In system Python libraries themselves since peerdir there may create a loop;
+### In all other cases use USE_PYTHON3() macro instead.
+###
+### Never use this macro in PY3_PROGRAM and PY3_LIBRARY and PY23_LIBRARY: they have everything by default.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
+macro PYTHON3_ADDINCL() {
+ _PYTHON3_ADDINCL()
+ SET(MODULE_TAG PY3_NATIVE)
+ SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY3_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
+# tag:python-specific tag:internal
+### @usage: _ARCADIA_PYTHON3_ADDINCL() # internal
+###
+### This macro sets up Python3 headers for modules with Arcadia python (e.g. PY3_LIBRARY) and configures module as Python 3.x.
+macro _ARCADIA_PYTHON3_ADDINCL() {
+ _PYTHON3_ADDINCL()
+ SET(MODULE_TAG PY3)
+ SET(MODULE_LANG PY3)
+ SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE PY3_PROTO PY3_FBS PY3_SSQLS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
+# tag:python-specific tag:internal
+### @usage: _PYTHON_ADDINCL() # internal
+###
+### This macro sets up Python 3.x headers for both Arcadia and non-Arcadia python.
+macro _PYTHON3_ADDINCL() {
+ SET(PYTHON3 yes)
+ SET(PYTHON2 no)
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ CFLAGS+=-DUSE_PYTHON3
+ ADDINCL+=GLOBAL contrib/libs/python/Include
+ }
+ otherwise {
+ when ($USE_SYSTEM_PYTHON) {
+ PEERDIR+=build/platform/python
+ }
+ otherwise {
+ CFLAGS+=$PYTHON_INCLUDE
+ }
+ }
+}
+
+# tag:python-specific
+### @usage: USE_PYTHON2()
+###
+### This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible.
+### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+###
+### If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY.
+### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
+### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
+###
+### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
+macro USE_PYTHON2() {
+ _ARCADIA_PYTHON_ADDINCL()
+ SET(PEERDIR_TAGS PY2 PY2_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+ PEERDIR(contrib/libs/python)
+}
+
+# tag:python-specific
+### @usage: USE_PYTHON3()
+###
+### This adds Python3 library to your LIBRARY and makes it Python3-compatible.
+### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+###
+### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
+### If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY.
+### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
+###
+### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
+macro USE_PYTHON3() {
+ _ARCADIA_PYTHON3_ADDINCL()
+ SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+ PEERDIR(contrib/libs/python)
+
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ PEERDIR+=library/python/runtime_py3
+ }
+}
+
+# tag:python-specific
+when ($PERL_DEFAULT_PEERDIR == "yes") {
+ when (($PERLXS == "yes") || ($PERLXSCPP == "yes") || ($USE_PERL == "yes")) {
+ PEERDIR+=build/platform/perl
+ }
+}
+
+# tag:perl-specific
+### @usage: USE_PERL_LIB()
+### Add dependency on Perl to your LIBRARY
+macro USE_PERL_LIB() {
+ PEERDIR(build/platform/perl)
+}
+
+# tag:perl-specific
+### @usage: USE_PERL_514_LIB()
+### Add dependency on Perl 5.14 to your LIBRARY
+macro USE_PERL_514_LIB() {
+ SET(PERL_SDK ubuntu-12)
+ SET(PERL_DEFAULT_PEERDIR no)
+ PEERDIR(build/platform/perl/5.14)
+}
+
+# tag:perl-specific
+### @usage: ADD_PERL_MODULE(Dir ModuleName)
+### Add dependency on specified Perl module to the library
+macro ADD_PERL_MODULE(Dir, Module) {
+ PEERDIR($Dir)
+ SET_APPEND(modules $Module)
+}
+
+# tag:allocator
+### @usage: ALLOCATOR(Alloc) # Default: LF
+###
+### Set memory allocator implementation for the PROGRAM()/DLL() module.
+### This may only be specified for programs and dlls, use in other modules leads to configuration errors.
+###
+### Available allocators are: "LF", "LF_YT", "LF_DBG", "YT", "J", "B", "BM", "C", "TCMALLOC", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE", "MIM", "HU".
+### - LF - lfalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc)
+### - LF_YT - Allocator selection for YT (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/yt/ya.make)
+### - LF_DBG - Debug allocator selection (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/dbg/ya.make)
+### - YT - The YTAlloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/ytalloc/impl/ya.make)
+### - J - The JEMalloc allocator (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/jemalloc)
+### - B - The balloc allocator named Pyotr Popov and Anton Samokhvalov
+### - Discussion: https://ironpeter.at.yandex-team.ru/replies.xml?item_no=126
+### - Code: https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/balloc
+### - BM - The balloc for market (agri@ commits from july 2018 till November 2018 saved)
+### - C - Like B, but can be disabled for each thread to LF or SYSTEM one (B can be disabled only to SYSTEM)
+### - MIM - Microsoft's mimalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/mimalloc)
+### - TCMALLOC - Google TCMalloc (actual version) (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/tcmalloc)
+### - GOOGLE - Google TCMalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/galloc)
+### - LOCKLESS - Allocator based upon lockless queues (https://a.yandex-team.ru/arc/trunk/arcadia/library/malloc/lockless)
+### - SYSTEM - Use target system allocator
+### - FAKE - Don't link with any allocator
+###
+### More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/
+macro ALLOCATOR(Alloc) {
+ SET(ALLOCATOR $Alloc)
+
+ when ($ALLOCATOR in [ "LF", "LF_YT", "LF_DBG", "YT", "J", "B", "BM", "C", "TCMALLOC", "TCMALLOC_SMALL_BUT_SLOW", "TCMALLOC_NUMA_256K", "TCMALLOC_NUMA_LARGE_PAGES", "TCMALLOC_256K", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE", "MIM", "HU" ]) {
+ }
+ otherwise {
+ PEERDIR+=___configure_error___unknown_allocator_type___$ALLOCATOR
+ }
+}
+
+### @usage: CC_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all C/C++ compilation commands in the module
+macro CC_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(CC_REQUIREMENTS $reqs)
+}
+
+### @usage: LIB_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for library creation comand of a x_LIBRARY modules
+macro LIB_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(LIB_REQUIREMENTS $reqs)
+}
+
+### @usage: LD_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for link command in the module
+macro LD_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(LD_REQUIREMENTS $reqs)
+}
+
+### @usage: JAVA_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all C/C++ compilation commands in the module
+macro JAVA_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(JAVA_REQUIREMENTS $reqs)
+}
+
+
+### @usage: PY_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all Python build commands
+macro PY_REQUIREMENTS(reqs) {
+ # Here we use the fact that quierem
+ SET_APPEND(PY_REQUIREMENTS $reqs)
+}
+
+when ($MIC_ARCH == "yes") {
+ CFLAGS+=-mmic
+ LDFLAGS+=-mmic
+}
+when ($USE_OPENMP == "yes") {
+ PEERDIR+=contrib/libs/openmp
+}
+
+when ($STRIP == "yes" && $NO_STRIP != "yes") {
+ STRIP_FLAG=$LD_STRIP_FLAG
+ DWARF_COMMAND=
+ GO_LINK_FLAGS_VALUE+=-s
+}
+
+when ($NO_LINKER_DCE != "yes") {
+ DCE_FLAG=$LD_DCE_FLAG
+}
+
+when ($BT_MINSIZEREL == "yes" || $LINKER_ICF == "yes") {
+ ICF_FLAG=$LD_ICF_FLAG
+}
+
+OBJCOPY_TOOL=$OBJCOPY_TOOL_VENDOR
+STRIP_TOOL=$STRIP_TOOL_VENDOR
+NEED_BINUTILS_PEERDIR=
+BINUTILS_USED=
+
+when (!$OBJCOPY_TOOL_VENDOR) {
+ OBJCOPY_TOOL=$BINUTILS_ROOT_RESOURCE_GLOBAL/bin/objcopy
+ NEED_BINUTILS_PEERDIR=yes
+}
+when (!$STRIP_TOOL_VENDOR) {
+ STRIP_TOOL=$BINUTILS_ROOT_RESOURCE_GLOBAL/bin/strip
+ NEED_BINUTILS_PEERDIR=yes
+}
+
+SPLIT_DWARF_VALUE=no
+NO_SPLIT_DWARF=no
+
+when ($STRIP_DEBUG_INFO) {
+ SPLIT_DWARF_VALUE=yes
+ NO_SPLIT_DWARF=no
+}
+
+### @usage: SPLIT_DWARF()
+###
+### Emit debug info for the PROGRAM/DLL as a separate file <module_name>.debug.
+### NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
+macro SPLIT_DWARF() {
+ SET(SPLIT_DWARF_VALUE yes)
+}
+
+SPLIT_DWARF_OUTPUT=${output;tobindir;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.debug:REALPRJNAME}
+when ($SPLIT_DWARF_VALUE == "yes" && $NO_SPLIT_DWARF != "yes" && $NO_DEBUGINFO != "yes" && $HOST_OS_LINUX == "yes" && $TARGET_PLATFORM == "LINUX") {
+ DWARF_COMMAND+= \
+ $OBJCOPY_TOOL --only-keep-debug $TARGET $SPLIT_DWARF_OUTPUT && \
+ $STRIP_TOOL --strip-debug $TARGET && \
+ $OBJCOPY_TOOL --remove-section=.gnu_debuglink --add-gnu-debuglink $SPLIT_DWARF_OUTPUT $TARGET
+ BINUTILS_USED=yes
+}
+
+### @usage: EXTRALIBS_STATIC(Libs...)
+###
+### Add the specified external static libraries to the program link
+macro EXTRALIBS_STATIC(Args...) {
+ LDFLAGS(-Wl,-Bstatic ${Args} -Wl,-Bdynamic)
+}
+
+### @usage ADD_COMPILABLE_TRANSLATE(Dict Name Options...)
+###
+### Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
+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})
+}
+
+### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...)
+###
+### Generate transliteration dictionary code
+### This will emit both translit, untranslit and ngrams table codes those will be than further compiled into library
+macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) {
+ __translitname_lower=${tolower:Name}
+ __translit_table=${BINDIR}/translit_trie_${__translitname_lower}.cpp
+ __untranslit_table=${BINDIR}/untranslit_trie_${__translitname_lower}.cpp
+ __ngrams_table=${BINDIR}/ngr_arr_${__translitname_lower}.cpp
+ __gentrie_dir=dict/tools/make_untranslit_trie
+
+ RUN_PROGRAM(${__gentrie_dir} -i ${TranslitTable} ${Options} ${__translitname_lower} IN ${TranslitTable} STDOUT ${__untranslit_table})
+ RUN_PROGRAM(${__gentrie_dir} -i ${TranslitTable} -n ${Options} ${__translitname_lower} IN ${TranslitTable} STDOUT ${__translit_table})
+ RUN_PROGRAM(dict/tools/make_ngrams -i ${NGrams} ${Options} ${__translitname_lower} IN ${NGrams} STDOUT ${__ngrams_table})
+}
+
+
+# tag:python-specific tag:proto tag:deprecated
+### @usage GENERATE_PY_PROTOS(ProtoFiles...) # deprecated
+###
+### Generate python bindings for protobuf files.
+### Macro is obsolete and not recommended for use!
+macro GENERATE_PY_PROTOS(FILES...) {
+ foreach (FILE : $FILES) {
+ _PY_PROTO_CMD($FILE)
+ }
+}
+
+# tag:python-specific tag:proto
+macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) {
+ foreach (FILE : $FILES) {
+ _PY_PROTO_CMD_INTERNAL($FILE)
+ }
+}
+
+# tag:python-specific
+macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
+ foreach (FILE : $FILES) {
+ _PY_EVLOG_CMD_INTERNAL($FILE)
+ }
+}
+
+macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
+ .CMD=$COPY_CMD ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+ .SEM=copy_file ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST}
+}
+
+### @usage: COPY_FILE(File Destination [AUTO] [OUTPUT_INCLUDES Deps...])
+###
+### Copy file to build root. It is possible to change both location and the name.
+###
+### Parameters:
+### - File - Source file name.
+### - Destination - Output file name.
+### - AUTO - Consider copied file for further processing automtically.
+### - OUTPUT_INCLUDES output_includes... - Output file dependencies.
+###
+### The file will be just copied if AUTO boolean parameter is not specified. You should explicitly
+### mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
+macro COPY_FILE(File, Destination, AUTO?"AUTO_DST":"NOAUTO_DST", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
+ .CMD=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
+ .SEM=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
+}
+
+### @usage: COPY_FILE_WITH_CONTEXT(FILE DEST [AUTO] [OUTPUT_INCLUDES DEPS...])
+###
+### Copy file to build root the same way as it is done for COPY_FILE, but also
+### propagates the context of the source file.
+macro COPY_FILE_WITH_CONTEXT(FILE, DEST, AUTO?"AUTO":"", OUTPUT_INCLUDES[]) {
+ .CMD=$COPY_FILE($FILE $DEST $AUTO OUTPUT_INCLUDES $FILE $OUTPUT_INCLUDES)
+}
+
+macro _BUNDLE_TARGET(Target, Destination) {
+ .CMD=$MOVE_FILE ${result:Target} ${output;noauto:Destination} ${kv;hide:"p BN"} ${kv;hide:"pc light-cyan"} $VCS_INFO_DISABLE_CACHE__NO_UID__
+}
+
+### @usage: TIMEOUT(TIMEOUT)
+###
+### Sets a timeout on test execution
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro TIMEOUT(Time) {
+ SET(TEST_TIMEOUT $Time)
+}
+
+SBR_UID_EXT=""
+# tag:test
+### @usage: VALIDATE_DATA_RESTART(ext)
+###
+### Change uid for resource validation tests. May be useful when sandbox resource ttl is changed, but test status is cached in CI.
+### You can change ext to change test's uid. For example VALIDATE_DATA_RESTART(X), where is X is current revision.
+macro VALIDATE_DATA_RESTART(Ext) {
+ SET(SBR_UID_EXT $Ext)
+}
+
+# tag:test
+TEST_FORK_MODE=none
+TEST_PARTITION=SEQUENTIAL
+
+# tag:test
+### @usage: FORK_TESTS()
+###
+### Splits a test run on chunks by test classes.
+### The number of chunks can be overridden using the macro SPLIT_FACTOR.
+###
+### Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro FORK_TESTS(MODE...) {
+ SET(TEST_FORK_MODE tests)
+ SET(TEST_PARTITION $MODE)
+}
+
+# tag:test
+### @usage: FORK_SUBTESTS()
+###
+### Splits the test run in chunks on subtests.
+### The number of chunks can be overridden using the macro SPLIT_FACTOR.
+###
+### Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro FORK_SUBTESTS(MODE...) {
+ SET(TEST_FORK_MODE subtests)
+ SET(TEST_PARTITION $MODE)
+}
+
+# tag:test
+### @usage: SPLIT_FACTOR(x)
+###
+### Sets the number of chunks for parallel run tests when used in test module with FORK_TESTS() or FORK_SUBTESTS().
+### If none of those is specified this macro implies FORK_TESTS().
+###
+### Supports C++ ut and PyTest.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro SPLIT_FACTOR(Factor) {
+ SET(TEST_SPLIT_FACTOR $Factor)
+}
+
+# tag:test
+FORK_TEST_FILES_MODE=
+### @usage: FORK_TEST_FILES()
+###
+### Only for PY2TEST and PY3TEST: splits a file executable with the tests on chunks in the files listed in TEST_SRCS
+### Compatible with FORK_(SUB)TESTS.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro FORK_TEST_FILES() {
+ SET(FORK_TEST_FILES_MODE on)
+}
+
+# tag:test
+TEST_SIZE_NAME=SMALL
+### @usage: SIZE(SMALL/MEDIUM/LARGE)
+###
+### Set the 'size' for the test. Each 'size' has own set of resrtictions, SMALL bein the most restricted and LARGE being the list.
+### See documentation on test system for more details.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro SIZE(Type) {
+ SET(TEST_SIZE_NAME $Type)
+}
+
+### @usage: JOIN_SRCS(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing.
+### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+### You should specify file name with the extension as Out. Futher processing will be done according this extension.
+macro JOIN_SRCS(Out, Src...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ .SEM=target_joined_source $Out ${input:Src} ${output;hide;suf=.o:Out} && modules_required yandex_common.cmake
+ _CONDITIONAL_SRCS($TIDY_VALUE $Src)
+}
+
+### @usage: JOIN_SRCS_GLOBAL(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+### You should specify file name with the extension as Out. Further processing will be done according to this extension.
+macro JOIN_SRCS_GLOBAL(Out, Src...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output;noauto:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ SRCS(GLOBAL $Out)
+}
+
+### @usage: FLAT_JOIN_SRCS_GLOBAL(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+### This macro places all files into single file, so will work with any sources.
+### You should specify file name with the extension as Out. Further processing will be done according to this extension.
+macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"} cat ${output;noauto:Out} --ya-start-command-file ${input:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
+ SRCS(GLOBAL $Out)
+}
+
+# tag:cpu
+PIC_CFLAGS=
+SSE2_CFLAGS=
+SSE3_CFLAGS=
+SSSE3_CFLAGS=
+SSE41_CFLAGS=
+SSE42_CFLAGS=
+POPCNT_CFLAGS=
+PCLMUL_CFLAGS=
+CX16_FLAGS=
+AVX_CFLAGS=
+AVX2_CFLAGS=
+AVX512_CFLAGS=
+
+# tag:cpu
+SSE_DEFINES=
+SSE_CFLAGS=
+SSE4_DEFINES=
+SSE4_CFLAGS=
+
+# tag:cpu
+when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") {
+ when ($CLANG || $CLANG_CL || $GCC) {
+ PIC_CFLAGS=-fPIC
+ SSE2_CFLAGS=-msse2
+ SSE3_CFLAGS=-msse3
+ SSSE3_CFLAGS=-mssse3
+ SSE41_CFLAGS=-msse4.1
+ SSE42_CFLAGS=-msse4.2
+ POPCNT_CFLAGS=-mpopcnt
+ PCLMUL_CFLAGS=-mpclmul
+ AVX_CFLAGS=-mavx
+
+ # On Intel FMA3 instruction set comes together with AVX-2 extension starting with Broadwell / Haswell.
+ # See:
+ # https://en.wikipedia.org/wiki/FMA_instruction_set
+ #
+ # AMD implemented it in Piledriver architecture over AVX prior to AVX-2 which was introduced in Zen.
+ # See:
+ # https://en.wikipedia.org/wiki/Template:AMD_x86_CPU_features
+ AVX2_CFLAGS=-mavx2 -mfma
+
+ # All Intel CPUS with AVX-512 have these instructions except for the Knights Landing / Knights Mill
+ # (these are Xeon Phi)
+ # See:
+ # https://en.wikichip.org/wiki/x86/avx-512
+ AVX512_CFLAGS=-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl
+ when ($ARCH_X86_64 && $OS_ANDROID != "yes") {
+ CX16_FLAGS=-mcx16
+ }
+ SSE_DEFINES=-DSSE_ENABLED=1 -DSSE3_ENABLED=1 -DSSSE3_ENABLED=1
+ SSE4_DEFINES=-DSSE41_ENABLED=1 -DSSE42_ENABLED=1 -DPOPCNT_ENABLED=1 -DCX16_ENABLED=1
+ }
+ elsewhen ($MSVC) {
+ SSE2_CFLAGS=/D__SSE2__=1
+ SSE3_CFLAGS=/D__SSE3__=1
+ SSSE3_CFLAGS=/D__SSSE3__=1
+ SSE41_CFLAGS=/D__SSE4_1__=1
+ SSE42_CFLAGS=/D__SSE4_2__=1
+ POPCNT_CFLAGS=/D__POPCNT__=1
+ PCLMUL_CFLAGS=/D__PCLMUL__=1
+ AVX_CFLAGS=/arch:AVX /DAVX_ENABLED=1
+ AVX2_CFLAGS=/arch:AVX2 /DAVX2_ENABLED=1
+ AVX512_CFLAGS=/arch:AVX512 /DAVX512_ENABLED=1
+ SSE_DEFINES=/DSSE_ENABLED=1 /DSSE3_ENABLED=1 /DSSSE3_ENABLED=1
+ SSE4_DEFINES=/DSSE41_ENABLED=1 /DSSE42_ENABLED=1 /DPOPCNT_ENABLED=1 /DCX16_ENABLED=1
+ }
+ SSE_CFLAGS=$SSE2_CFLAGS $SSE3_CFLAGS $SSSE3_CFLAGS
+ SSE4_CFLAGS=$SSE41_CFLAGS $SSE42_CFLAGS $POPCNT_CFLAGS $CX16_FLAGS
+ when ($ARCH_I386 && $OS_ANDROID == "yes") {
+ USE_SSE4=no
+ }
+}
+otherwise {
+ USE_SSE4=no
+ CPU_CHECK=no
+}
+
+# tag:cpu
+when ($NOSSE == "yes") {
+ USE_SSE4=no
+}
+
+# tag:cpu
+### @usage: NO_SSE4()
+###
+### Compile module without SSE4
+macro NO_SSE4() {
+ SET(USE_SSE4 no)
+}
+
+# tag:cpu
+### @usage: NO_CPU_CHECK()
+###
+### Compile module without startup CPU features check
+macro NO_CPU_CHECK() {
+ SET(CPU_CHECK no)
+}
+
+### @usage: ADDINCLSELF()
+###
+### The macro adds the -I<project source path> flag to the source compilation flags of the current project.
+macro ADDINCLSELF(FOR="") {
+ when($FOR) {
+ ADDINCL+=FOR $FOR ${MODDIR}
+ }
+ otherwise {
+ ADDINCL+=${MODDIR}
+ }
+}
+
+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})
+ SET(_COMPILE_TIME_TRACE_OUTPUTS \${output;noauto;suf=\${OBJECT_SUF}.time_trace.json$NOREL:SRC})
+}
+
+_EMPTY_CMD=
+
+# tag:src-processing tag:internal
+### @usage: _SRC(Ext Src Flags) # internal
+###
+### Basic building block of extension-based command dispatching
+### To enable specific extension processing define _SRC() macro with fixed first argument (Ext).
+### Internal logic will apply this macro to all files with this Ext listed in SRC/SRCS macros or outputs
+### of other commands (except ones marked as noauto)
+macro _SRC(EXT, SRC, SRCFLAGS...) {
+ # Generic macro definition for _SRC (just a placeholder, it does nothing)
+}
+
+# tag:src-processing
+macro _SRC("S", SRC, SRCFLAGS...) {
+ .CMD=$C_COMPILER $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output:SRC.o} ${input:SRC} ${pre=-I:_C__INCLUDE}
+ .SEM=add_asm_source ${input:SRC} ${output;hide;suf=.o:SRC}
+}
+
+# tag:src-processing
+macro _SRC("s", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(S, $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("s79", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(S, $SRC $SRCFLAGS -x assembler-with-cpp)
+}
+
+# tag:src-processing
+macro _SRC("mm", SRC, SRCFLAGS...) {
+ .CMD=$C_COMPILER $C_FLAGS_PLATFORM -x objective-c++ -fobjc-arc -fobjc-abi-version=2 -c -o ${output:SRC.o} ${input:SRC} $CXXFLAGS ${pre=-I:_C__INCLUDE} ${SRCFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p CC"} ${kv;hide:"pc light-green"} $TOOLCHAIN_ENV
+}
+
+# tag:src-processing
+macro _SRC("fml", SRC, SRCFLAGS...) {
+ .CMD=$FML_TOOL $CHECKFLAG -b -o ${output:SRC.inc} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("fml2", SRC, SRCFLAGS...) {
+ .CMD=$FML_TOOL $CHECKFLAG -b -o ${output;nopath;noext:SRC.fml.inc} -2 -O ${output;nopath;noext:SRC.fml.cpp} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("fml3", SRC, SRCFLAGS...) {
+ .CMD=$FML_TOOL $CHECKFLAG -b -o ${output;nopath;noext:SRC.fml.inc} -3 -O ${output;nopath;noext:SRC.fml.cpp} -L ${input;nopath;noext:SRC.list} -P ${nopath;noext:SRC} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("sfdl", SRC, SRCFLAGS...) {
+ .CMD=$CXX_COMPILER $C_FLAGS_PLATFORM $CXXFLAGS $SFDL_FLAG ${SRCFLAGS} ${input:SRC} && ${tool:"tools/calcstaticopt"} -i ${tmp:SRC.tmp} -a $ARCADIA_ROOT ${output;stdout;nopath;noext;defext=.inc:SRC} ${kv;hide:"p SF"} ${kv;hide:"pc yellow"} $TOOLCHAIN_ENV
+}
+
+# tag:src-processing
+macro _SRC("xs", SRC, SRCFLAGS...) {
+ .CMD=$PERL_LD_LIBRARY_PATH $PERL $PERL_INCLUDE ${suf=/ExtUtils/xsubpp:PERL_PRIVLIB} -typemap ${suf=/ExtUtils/typemap:PERL_PRIVLIB} $PERLSUFFIX $XSUBPPFLAGS ${SRCFLAGS} ${input:SRC} $PERLOUTPUT ${kv;hide:"p XS"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("y", SRC, SRCFLAGS...) {
+ # .CMD=${tool:"contrib/tools/byacc"} $BYACC_FLAGS ${nopath;noext;output:SRC.cpp} ${input:SRC} ${nopath;noext;hide;output;addincl:SRC.h} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"}
+ .CMD=${tool:"contrib/tools/bison/bison"} $BISON_FLAGS --m4=${tool:"contrib/tools/bison/m4"} -d -o ${nopath;noext;output;main;hide:SRC.h} ${nopath;noext;output:SRC.cpp} ${input:SRC} ${SRCFLAGS} && $YMAKE_PYTHON ${input:"build/scripts/preprocess.py"} $_ADD_HIDDEN_INPUTS($CPP_BISON_SKELS) ${nopath;noext;output;addincl:SRC.h} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"}
+}
+
+# tag:src-processing
+macro _SRC("ypp", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(y $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("gperf", SRC, SRCFLAGS...) {
+ .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/gperf"} $GP_FLAGS ${SRCFLAGS} ${pre=-Nin_;suf=_set;nopath;noallext:SRC} ${input:SRC} ${output;stdout;nopath;noext;defext=.gperf.cpp:SRC} ${kv;hide:"p GP"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("rl", SRC, SRCFLAGS...) {
+ .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel5/ragel"} $RAGEL_FLAGS ${SRCFLAGS} -o ${tmp:SRC.tmp} ${input:SRC} && $RUN_NO_SANITIZE ${tool:"contrib/tools/ragel5/rlgen-cd"} $RLGEN_FLAGS -o ${output;nopath;noext;defext=.rl5.cpp:SRC} ${tmp:SRC.tmp} ${kv;hide:"p R5"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("rl5", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(rl $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("asp", SRC, SRCFLAGS...) {
+ .CMD=$RUN_NO_SANITIZE ${tool:"tools/html2cpp"} ${input:SRC} ${output:SRC.cpp} ${kv;hide:"p HT"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("rl6", SRC, SRCFLAGS...) {
+ .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel6"} $RAGEL6_FLAGS ${SRCFLAGS} -L -I${ARCADIA_ROOT} -o ${output;nopath;noext;defext=.rl6.cpp:SRC} ${input:SRC} ${kv;hide:"p R6"} ${kv;hide:"pc yellow"}
+ .SEM=target_ragel_lexers PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $RAGEL6_FLAGS ${SRCFLAGS} && set_global_flags RAGEL_FLAGS -L -I $S/ && conan_require ragel/6.10 && conan_import '"bin, ragel* -> ./bin"' && modules_required yandex_common.cmake
+}
+
+# tag:src-processing
+macro _SRC("l", SRC, SRCFLAGS...) {
+ .CMD=${tool:"contrib/tools/flex-old"} $LEX_FLAGS ${SRCFLAGS} -o${output:SRC.cpp} ${output_include;hide:"util/system/compiler.h"} ${input:SRC} ${kv;hide:"p LX"} ${kv;hide:"pc yellow"}
+ .ADDINCL=contrib/tools/flex-old
+}
+
+# tag:src-processing
+macro _SRC("lex", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(l $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("lpp", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(l $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("pln", SRC, SRCFLAGS...) {
+ .CMD=$FML_TOOL -b -o ${output;pre=pln.;nopath;noext:SRC.cpp} -f ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("xsyn", SRC, SRCFLAGS...) {
+ .CMD=$YMAKE_PYTHON ${input:"library/cpp/xml/parslib/xsyn2ragel.py"} ${input:SRC} ${input:"library/cpp/xml/parslib/xmlpars.xh"} dontuse ${output;stdout:SRC.h.rl5} ${kv;hide:"p XN"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("ev", SRC, SRCFLAGS...) {
+ .CMD=$EVLOG_CMD($SRC)
+}
+
+# tag:src-processing
+macro _SRC("proto", SRC, SRCFLAGS...) {
+ .CMD=$PROTO_CMD($SRC)
+ .SEM=$PROTO_CMD($SRC)
+}
+
+# tag:src-processing
+macro _SRC("gztproto", SRC, SRCFLAGS...) {
+ # _PROTO__INCLUDE is before ARCADIA_ROOT in includes because in gazetteer we don't use builtins now and paths'canonization (resolving) depends on order of roots.
+ # descriptor.proto must be resolved as google/protobuf/descriptor.proto
+ .CMD=${tool:"dict/gazetteer/converter"} -I$PROTOBUF_PATH ${pre="-I":_PROTO__INCLUDE} -I$ARCADIA_ROOT ${SRCFLAGS} ${input:SRC} ${output;nopath;noext;norel:SRC.proto} ${kv;hide:"p GZ"} ${kv;hide:"pc yellow"}
+ .PEERDIR=kernel/gazetteer/proto
+}
+
+# tag:src-processing
+macro _SRC("cfgproto", SRC, SRCFLAGS...) {
+ .CMD=$_CPP_CFGPROTO_CMD($SRC)
+}
+
+# tag:src-processing
+macro _SRC("pyx", SRC, SRCFLAGS...) {
+ # Copy-paste from BUILDWITH_CYTHON
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:SRC} -o ${output;tobindir:SRC.cpp} $CYTHON_OUTPUT_INCLUDES ${SRCFLAGS} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ .ADDINCL=FOR cython contrib/tools/cython/Cython/Includes
+}
+
+# tag:src-processing
+macro _SRC("in", SRC, SRCFLAGS...) {
+ .CMD=$CONFIGURE_FILE(${SRC} ${nopath;noext:SRC})
+}
+
+# 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"}
+}
+
+# tag:src-processing
+macro _SRC("ssqls", SRC, SRCFLAGS...) {
+ .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT $SRCFLAGS ${output;noext;hide:SRC.cpp} ${output;noext;hide:SRC.h} ${kv;hide:"p SS"} ${kv;hide:"pc yellow"}
+}
+
+# tag:src-processing
+macro _SRC("f", SRC, SRCFLAGS...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/f2c.py"} -t ${tool:"contrib/tools/f2c"} -c ${input:SRC} -o ${output:SRC.c} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p FT"} ${kv;hide:"pc light-green"}
+ .PEERDIR=contrib/libs/libf2c
+ .ADDINCL=contrib/libs/libf2c
+}
+
+# tag:src-processing
+macro _SRC("cpp", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_cpp($SRC $SRCFLAGS)
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+}
+
+# tag:src-processing
+macro _SRC("cxx", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(cpp $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("cc", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(cpp $SRC $SRCFLAGS)
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+}
+
+# tag:src-processing
+macro _SRC("C", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(cpp $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("c", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_c($SRC $SRCFLAGS)
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+}
+
+# tag:src-processing
+macro _SRC("m", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(c $SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("masm", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_masm($SRC $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("yasm", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_yasm($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE)
+ .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} && set_global_flags YASM_FLAGS -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"' && modules_required yandex_common.cmake
+}
+
+# tag:src-processing
+macro _SRC("asm", SRC, SRCFLAGS...) {
+ .CMD=$_SRC(yasm $SRC $SRCFLAGS)
+ .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS && set_global_flags YASM_FLAGS -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"' && modules_required yandex_common.cmake
+}
+
+# tag:src-processing
+macro _SRC("lua", SRC, SRCFLAGS...) {
+ .CMD=${cwd:LUAJIT_PATH} ${tool:"contrib/libs/luajit/compiler"} -b -g ${input:SRC} ${SRCFLAGS} ${global;output;suf=.o:SRC} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
+ .PEERDIR=$LUAJIT_PATH
+}
+
+# tag:src-processing
+macro _SRC("cu", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_CU_CMD
+ .PEERDIR=$_SRC_CU_PEERDIR
+}
+
+# tag:src-processing
+macro _SRC("fbs", SRC, SRCFLAGS...) {
+ .CMD=$FBS_CMD($SRC, $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("fbs64", SRC, SRCFLAGS...) {
+ .CMD=$_CPP_FLATC64_CMD($SRC, $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC("pysrc", SRC, SRCFLAGS...) {
+ .CMD=$_SRC_PYSRC($SRC, $SRCFLAGS)
+}
+
+# tag:src-processing
+macro _SRC_py2src(SRC, SRCFLAGS...) {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/compile_pysrc.py"} --input ${input:SRC} --output ${output;noext;suf=.py2_raw.cpp:SRC} --rescompiler ${tool:"tools/rescompiler"} py2 --python $(PYTHON)/python --py_compile ${input:"build/scripts/py_compile.py"} ${kv;hide:"p P2"} ${kv;hide:"pc light-green"}
+}
+
+# tag:src-processing
+macro _SRC_py3src(SRC, SRCFLAGS...) {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/compile_pysrc.py"} --input ${input:SRC} --output ${output;noext;suf=.py3_raw.cpp:SRC} --rescompiler ${tool:"tools/rescompiler"} py3 --pycc ${tool:"contrib/tools/python3/pycc"} ${kv;hide:"p P3"} ${kv;hide:"pc light-green"}
+}
+
+# tag:src-processing python-specific
+when ($PYTHON3 == "yes") {
+ MACRO_ALIAS(_SRC_PYSRC _SRC_py3src)
+}
+otherwise {
+ MACRO_ALIAS(_SRC_PYSRC _SRC_py2src)
+}
+
+# tag:src-processing
+macro _SRC_c_nodeps(SRC, OUTFILE, INC...) {
+ .CMD=$_SRC_C_NODEPS_CMD
+}
+
+# Custom flags for generated cpp-files. To support another generator:
+# - insert additional file extension before .cpp into generated cpp-file name
+# - update _LANG_CFLAGS_FILTER variable. Don't forget to add ' SKIP ' after flag list
+#
+# ragel5 and ragel6 generated terrible code which makes use of goto's in switch statements.
+# This triggers -Werror-implicit-fallthrough due to `unannotated fall-through between switch labels`.
+#
+# cython generated code also fails to pass this diagnostics due to `fallthrough annotation in unreachable code`.
+# We use cython==0.29.26 at the time. This issue might be fixed in further versions.
+
+## tag:src-processing
+_LANG_CFLAGS_FILTER=\
+ ${pre=-Wno-implicit-fallthrough SKIP ;ext=.rl5:SRC} \
+ ${pre=-Wno-implicit-fallthrough SKIP ;ext=.rl6:SRC} \
+ ${pre=-Wno-implicit-fallthrough SKIP ;ext=.pyx:SRC}
+
+# tag:src-processing
+# Magic macro for removing file name from result (file name is passed as unused SKIP parameter)
+macro _FILTER_EXTS(SKIP="", FLAGS...) {
+ .CMD=$FLAGS
+}
+
+# tag:src-processing
+macro _LANG_CFLAGS(SRC) {
+ .CMD=$_FILTER_EXTS($_LANG_CFLAGS_FILTER)
+}
+
+# tag:src-processing
+# ymake bug workaround: variables followed a macros call in .CMD are not substituted and are placed in result as is
+# Pack macro call into a variable and use it in _SRC_CPP_CMD instead of macro call
+_LANG_CFLAGS_VALUE=
+when ($CLANG == "yes" || $GCC == "yes") {
+ _LANG_CFLAGS_VALUE=$_LANG_CFLAGS(${noext:SRC})
+}
+
+# tag:src-processing
+macro _SRC_cpp(SRC, COMPILE_OUT_SUFFIX="", SRCFLAGS...) {
+ .CMD=$_SRC_CPP_CMD
+}
+
+# tag:src-processing
+macro _SRC_c(SRC, COMPILE_OUT_SUFFIX="", SRCFLAGS...) {
+ .CMD=$_SRC_C_CMD
+}
+
+# tag:src-processing
+macro _SRC_m(SRC, SRCFLAGS...) {
+ .CMD=$_SRC_M_CMD
+}
+
+# tag:src-processing
+macro _SRC_masm(SRC, SRCFLAGS...) {
+ .CMD=$_SRC_MASM_CMD
+}
+
+# tag:lua-specific
+### @usage: COMPILE_LUA(Src, [NAME <import_name>])
+###
+### Compile LUA source file to object code using LUA 2.0
+### Optionally override import name which is by default reflects Src name
+macro COMPILE_LUA(Src, NAME="") {
+ .CMD=$_SRC(lua, $Src, ${pre=-n :NAME})
+}
+
+# tag:lua-specific
+### @usage: _SRC_lua_21(SRC [SRCFLAGS...]) # internal
+###
+### Compile LUA source file to object code using LUA 2.1
+macro _SRC_lua_21(SRC, SRCFLAGS...) {
+ .CMD=${cwd:LUAJIT_21_PATH} ${tool:"contrib/libs/luajit_21/compiler"} -b -g ${input:SRC} ${SRCFLAGS} ${global;output;suf=.o:SRC} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
+ .PEERDIR=$LUAJIT_21_PATH
+}
+
+# tag:lua-specific
+### @usage: COMPILE_LUA_21(Src, [NAME <import_name>])
+###
+### Compile LUA source file to object code using LUA 2.1
+### Optionally override import name which is by default reflects Src name
+macro COMPILE_LUA_21(Src, NAME="") {
+ .CMD=$_SRC_lua_21($Src, ${pre=-n :NAME})
+}
+
+GETTEXT_KEEP_PATH=no
+_MO_OUTPUT=
+when ($GETTEXT_KEEP_PATH == "yes") {
+ _MO_OUTPUT=${output;noauto;norel;noext:SRC.mo}
+}
+otherwise {
+ _MO_OUTPUT=${output;noauto;nopath;noext;tobindir:SRC.mo}
+}
+
+# tag:src-processing
+macro _SRC("po", SRC, SRCFLAGS...) {
+ .CMD=$YMAKE_PYTHON ${input:"contrib/tools/python/src/Tools/i18n/msgfmt.py"} -o $_MO_OUTPUT ${input:SRC}
+}
+
+# tag:ydl-specific
+YDL_FLAGS= --force-color -I ${ARCADIA_ROOT}
+YDL_DESC_FLAGS=
+
+# tag:src-processing tag:ydl-specific
+macro _SRC("ydl", SRC, SRCFLAGS...) {
+ .CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} c $YDL_FLAGS --cpp-output-header ${output;suf=.h:SRC} --cpp-output-source ${output;suf=.cpp:SRC} ${input:SRC} ${output_include;hide:"statbox/ydl/runtime/cpp/gen_support/standard_includes.h"} ${kv;hide:"p YDL"} ${kv;hide:"pc yellow"}
+ .PEERDIR+=statbox/ydl/runtime/cpp
+}
+
+# tag:ydl-specific
+### @usage BUILD_YDL_DESC(Input Symbol Output)
+###
+### Generate a descriptor for a Symbol located in a ydl module Input, and put it to the file Output.
+###
+### @example:
+###
+### PACKAGE()
+### BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+### END()
+###
+### This will parse file ../types.ydl, generate a descriptor for a symbol Event defined in the said file, and put the descriptor to the Event.ydld.
+macro BUILD_YDL_DESC(Input, Symbol, Output) {
+ .CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} ti $YDL_FLAGS $YDL_DESC_FLAGS -o ${output;noauto:Output} ${input:Input} ${Symbol} ${kv;hide:"p YDL"} ${kv;hide:"pc yellow"}
+}
+
+# tag:ydl-specific
+### @usage: YDL_DESC_USE_BINARY()
+###
+### Used in conjunction with BUILD_YDL_DESC. When enabled, all generated descriptors are binary.
+###
+### @example:
+###
+### PACKAGE()
+### YDL_DESC_USE_BINARY()
+### BUILD_YDL_DESC(../types.ydl Event Event.ydld)
+### END()
+###
+### This will generate descriptor Event.ydld in a binary format.
+macro YDL_DESC_USE_BINARY() {
+ YDL_DESC_FLAGS_BINARY= --binary
+ SET_APPEND(YDL_DESC_FLAGS $YDL_DESC_FLAGS_BINARY)
+}
+
+### @usage SRC(File Flags...)
+###
+### Compile single file with extra Flags.
+### Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
+macro SRC(FILE, FLAGS...) {
+ _SRC(${lastext:FILE} $FILE $FLAGS)
+}
+
+### @usage: SRCS(<[GLOBAL] File> ...)
+###
+### Source files of the project. Files are built according to their extension and put int module output or fed to ultimate PROGRAM/DLL depending on GLOBAL presence.
+### Arcadia Paths from the root and is relative to the project's LIST are supported
+###
+### GLOBAL marks next file as direct input to link phase of the program/shared library project built into. This prevents symbols of the file to be excluded by linker as unused.
+### The scope of the GLOBAL keyword is the following file (that is, in the case of SRCS(GLOBAL foo.cpp bar.cpp) global will be only foo.cpp)
+###
+### @example:
+###
+### LIBRARY(test_global)
+### SRCS(GLOBAL foo.cpp)
+### END()
+###
+### This will produce foo.o and feed it to any PROGRAM/DLL module transitively depending on test_global library. The library itself will be empty and won't produce .a file.
+macro SRCS(FILES...) {
+ foreach (FILE : $FILES) {
+ _SRC(${lastext:FILE} $FILE)
+ }
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_SSE2(File Flags...)
+### Compile single .c-file with SSE2 and extra Flags.
+macro SRC_C_SSE2(FILE, FLAGS...) {
+ _SRC(c $FILE $SSE2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse2)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_SSE3(File Flags...)
+### Compile single .c-file with SSE3 and extra Flags.
+macro SRC_C_SSE3(FILE, FLAGS...) {
+ _SRC(c $FILE $SSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse3)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_SSSE3(File Flags...)
+### Compile single .c-file with SSSE3 and extra Flags.
+macro SRC_C_SSSE3(FILE, FLAGS...) {
+ _SRC(c $FILE $SSSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .ssse3)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_SSE41(File Flags...)
+### Compile single .c-file with SSE4.1 and extra Flags.
+macro SRC_C_SSE41(FILE, FLAGS...) {
+ _SRC(c $FILE $SSE41_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse41)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_SSE4(File Flags...)
+### Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+macro SRC_C_SSE4(FILE, FLAGS...) {
+ _SRC(c $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_AVX(File Flags...)
+### Compile single .c-file with AVX and extra Flags.
+macro SRC_C_AVX(FILE, FLAGS...) {
+ _SRC(c $FILE $AVX_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_C_AVX2(File Flags...)
+### Compile single .c-file with AVX2 and extra Flags.
+macro SRC_C_AVX2(FILE, FLAGS...) {
+ _SRC(c $FILE $AVX2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx2)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_PIC(File Flags...)
+### Compile single .c-file with -fPIC and extra Flags.
+macro SRC_CPP_PIC(FILE, FLAGS...) {
+ _SRC(cpp $FILE $PIC_CFLAGS $FLAGS)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_SSE2(File Flags...)
+### Compile single .cpp-file with SSE2 and extra Flags.
+macro SRC_CPP_SSE2(FILE, FLAGS...) {
+ _SRC(cpp $FILE $SSE2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse2)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_SSE3(File Flags...)
+### Compile single .cpp-file with SSE3 and extra Flags.
+macro SRC_CPP_SSE3(FILE, FLAGS...) {
+ _SRC(cpp $FILE $SSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse3)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_SSSE3(File Flags...)
+### Compile single .cpp-file with SSSE3 and extra Flags.
+macro SRC_CPP_SSSE3(FILE, FLAGS...) {
+ _SRC(cpp $FILE $SSSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sss3)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_SSE41(File Flags...)
+### Compile single .cpp-file with SSE4.1 and extra Flags.
+macro SRC_CPP_SSE41(FILE, FLAGS...) {
+ _SRC(cpp $FILE $SSE41_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse41)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_SSE4(File Flags...)
+### Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+macro SRC_CPP_SSE4(FILE, FLAGS...) {
+ _SRC(cpp $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_AVX(File Flags...)
+### Compile single .cpp-file with AVX and extra Flags.
+macro SRC_CPP_AVX(FILE, FLAGS...) {
+ _SRC(cpp $FILE $AVX_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx)
+}
+
+# tag:cpu tag:src-processing
+### @usage SRC_CPP_AVX2(File Flags...)
+### Compile single .cpp-file with AVX2 and extra Flags.
+macro SRC_CPP_AVX2(FILE, FLAGS...) {
+ _SRC(cpp $FILE $AVX2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx2)
+}
+
+# tag:python-processing tag:cython
+# TODO: use it in [.pyx] cmd
+### @usage: BUILDWITH_CYTHON_CPP(Src Options...)
+###
+### Generates .cpp file from .pyx.
+macro BUILDWITH_CYTHON_CPP(Src, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:cython tag:internal
+### @usage: _BUILDWITH_CYTHON_CPP_DEP(Src Dep Options...) # internal
+###
+### Generates .cpp file from .pyx and attach extra input Dep.
+### If Dep changes the .cpp file will be re-generated.
+macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:cython
+### @usage: BUILDWITH_CYTHON_C(Src Options...)
+###
+### Generates .c file from .pyx.
+macro BUILDWITH_CYTHON_C(Src, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:cython tag:internal
+### @usage: _BUILDWITH_CYTHON_C_DEP(Src Dep Options...) # internal
+###
+### Generates .c file from .pyx and attach extra input Dep.
+### If Dep changes the .c file will be re-generated.
+macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:cython tag:internal
+### @usage: _BUILDWITH_CYTHON_C_H(Src Dep Options...) # internal
+###
+### BUILDWITH_CYTHON_C without .pyx infix and with cdef public .h file.
+macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:cython tag:internal
+### @usage: _BUILDWITH_CYTHON_C_API_H(Src Dep Options...) # internal
+###
+### BUILDWITH_CYTHON_C_H with cdef api _api.h file.
+macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) {
+ .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} ${output;hide;addincl;noext;defext=_api.h;tobindir:Src} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
+}
+
+# tag:python-processing tag:internal
+### @usage: _SWIG_PYTHON_CPP(Src, DstSubPrefix) # internal
+###
+### Run swig on Src to produce DstSubPrefix.py and DstSubPrefix_swg.cpp that
+### provides DstSubPrefix_swg python module.
+macro _SWIG_PYTHON_CPP(Src, DstSubPrefix) {
+ .CMD=$_SWIG_TOOL -I$ARCADIA_BUILD_ROOT -I$ARCADIA_ROOT -I$_SWIG_LIBRARY_ABS/python -I$_SWIG_LIBRARY_ABS -c++ -python -module ${nopath:DstSubPrefix} -interface ${nopath;suf=_swg:DstSubPrefix} -o ${output;suf=.swg.cpp:DstSubPrefix} ${input:Src} ${output;noauto;hide;suf=.py:DstSubPrefix} ${kv;hide:"p SW"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
+}
+
+# tag:python-processing tag:internal
+### @usage: _SWIG_PYTHON_C(Src, DstSubPrefix) # internal
+###
+### Like _SWIG_PYTHON_CPP but generate DstSubPrefix_swg.c.
+macro _SWIG_PYTHON_C(Src, DstSubPrefix) {
+ .CMD=$_SWIG_TOOL -I$ARCADIA_BUILD_ROOT -I$ARCADIA_ROOT -I$_SWIG_LIBRARY_ABS/python -I$_SWIG_LIBRARY_ABS -python -module ${nopath:DstSubPrefix} -interface ${nopath;suf=_swg:DstSubPrefix} -o ${output;suf=.swg.c:DstSubPrefix} ${input:Src} ${output;noauto;hide;suf=.py:DstSubPrefix} ${kv;hide:"p SW"} ${kv;hide:"pc yellow"}
+ ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
+}
+
+### @usage: BUILDWITH_RAGEL6(Src Options...)
+###
+### Compile .rl file using Ragel6.
+macro BUILDWITH_RAGEL6(Src, Options...) {
+ .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel6"} $RAGEL6_FLAGS ${Options} -I${ARCADIA_ROOT} -o ${output;nopath;noext;defext=.rl6.cpp:Src} ${input:Src} ${kv;hide:"p R6"} ${kv;hide:"pc yellow"}
+}
+
+# tag:python-processing tag:internal
+# TODO: use it in [.pyx] cmd
+### @usage: _PY_REGISTER() # internal
+###
+### Register Python 2.x module in internal resource file system. Arcadia Python 2.x importer will be retrieve these on import directive.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY_REGISTER(Func) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py_reg.py"} $Func ${output;noauto:Func.reg.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+ SRCS(GLOBAL $Func.reg.cpp)
+}
+
+# tag:python-processing tag:internal
+### @usage: _PY3_REGISTER() # internal
+###
+### Register Python 3.x module in internal resource file system. Arcadia Python 3.x importer will be retrieve these on import directive
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY3_REGISTER(Func) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py3_reg.py"} $Func ${output;noauto:Func.reg3.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+ SRCS(GLOBAL $Func.reg3.cpp)
+}
+
+# tag:python-processing tag:internal
+### @usage: _PY_COMPILE_BYTECODE(SrcX Src) # internal
+###
+### Compile Python 2.x .py source file into Arcadia binary form suitable for PY2_PROGRAM
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY_COMPILE_BYTECODE(SrcX, Src, Dst) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/py_compile.py"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+}
+
+# tag:python-processing tag:internal
+### @usage: _PY3_COMPILE_BYTECODE(SrcX Src) # internal
+###
+### Compile Python 3.x .py source file into Arcadia binary form suitable for PY3_PROGRAM
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY3_COMPILE_BYTECODE(SrcX, Src, Dst) {
+ .CMD=${env:"PYTHONHASHSEED=0"} ${tool:"contrib/tools/python3/pycc"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc3} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+}
+
+### @usage: ARCHIVE_ASM(NAME archive_name files...)
+###
+### Similar to the macro ARCHIVE, but:
+### 1. works faster and it is better to use for large files.
+### 2. Different syntax (see examples in codesearch or users/pg/tests/archive_test)
+macro ARCHIVE_ASM(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;suf=$OBJ_SUF.rodata:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-cyan"}
+}
+
+# tag:yweb-specific
+macro PIRE_INLINE_CMD(SRC) {
+ .CMD=${tool:"library/cpp/regex/pire/inline"} -o ${output:SRC} ${input:SRC} ${output_include;hide:SRC} ${kv;hide:"p PI"} ${kv;hide:"pc yellow"}
+}
+
+# tag:yweb-specific
+macro PIRE_INLINE(FILES...) {
+ foreach (FILE : $FILES) {
+ PIRE_INLINE_CMD($FILE)
+ }
+}
+
+### @usage: ARCHIVE(archive_name [DONT_COMPRESS] files...)
+###
+### Add arbitrary data to a modules. Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+###
+### Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+macro ARCHIVE(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
+}
+
+### @usage: ARCHIVE_BY_KEYS(archive_name key [DONT_COMPRESS] files...)
+###
+### Add arbitrary data to a module be accessible by specified key.
+### Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
+###
+### Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+macro ARCHIVE_BY_KEYS(NAME="", KEYS="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input:Files} -k $KEYS -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
+}
+
+#scripts
+
+#special commands
+BUILDVERSION_SCRIPT=build/scripts/build_info_gen.py
+SVNVERSION_JAVA_MARKER=output-java-class
+SVNVERSION_GO_MARKER=output-go
+VCS_C_OBJ=$BINDIR/__vcs_version__.c$OBJECT_SUF
+VCS_C_OBJ_RR=$MODDIR/__vcs_version__.c$OBJECT_SUF
+VCS_C=$BINDIR/__vcs_version__.c
+VCS_GO=$BINDIR/__vcs_version__.go
+VCS_JAVA=$BINDIR/__vcs_version__.mf
+VCS_INFO_DISABLE_CACHE__NO_UID__=
+YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=
+CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=
+CL_MACRO_INFO_DISABLE_CACHE__NO_UID__=
+YASM_DEBUG_INFO=
+CL_DEBUG_INFO=
+CL_MACRO_INFO=
+when ($FORCE_VCS_INFO_UPDATE == "yes") {
+ VCS_INFO_DISABLE_CACHE__NO_UID__=${hide;kv:"disable_cache"}
+}
+### Works for pyton too.
+GENERATE_VCS_C_INFO_NODEP=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} $(VCS)/vcs.json $VCS_C ${input:"build/scripts/c_templates/svn_interface.c"} $VCS_INFO_DISABLE_CACHE__NO_UID__ && $_SRC_c_nodeps($VCS_C, $VCS_C_OBJ, $(SOURCE_ROOT))
+GENERATE_VCS_GO_INFO_NODEP=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} output-go $(VCS)/vcs.json $VCS_GO $VCS_INFO_DISABLE_CACHE__NO_UID__
+GENERATE_VCS_JAVA_INFO_NODEP=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} output-java $(VCS)/vcs.json $VCS_JAVA $VCS_INFO_DISABLE_CACHE__NO_UID__
+macro UPDATE_VCS_JAVA_INFO_NODEP(Jar) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} output-java $(VCS)/vcs.json $VCS_JAVA $Jar $VCS_INFO_DISABLE_CACHE__NO_UID__
+}
+
+### @usage: CREATE_BUILDINFO_FOR(GenHdr)
+###
+### Creates header file to access some information about build specified via configuration variables.
+### Unlike CREATE_SVNVERSION_FOR() it doesn't take revion information from VCS, it uses revision and SandboxTaskId passed via -D options to ya make
+macro CREATE_BUILDINFO_FOR(GenHdr) {
+ .CMD=$YIELD $CXX_COMPILER && $YIELD $CXXFLAGS && $XARGS $YMAKE_PYTHON ${input:BUILDVERSION_SCRIPT} ${output:GenHdr} ${kv;hide:"p BI"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"} $SVN_DEPENDS_CACHE__NO_UID__
+}
+
+DECIMAL_MD5_SCRIPT=build/scripts/decimal_md5.py
+DECIMAL_MD5_FIXED=
+
+### @usage: DECIMAL_MD5_LOWER_32_BITS(<fileName> [FUNCNAME funcName] [inputs...])
+###
+### 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"}
+}
+
+# tag:internal
+### @usage $CFG_VARS # internal
+###
+### Mark commands that embed Configuration variables into files
+macro CFG_VARS() {
+ .GEN_FROM_FILE=yes
+}
+
+### @usage: CONFIGURE_FILE(from to)
+###
+### Copy file with the replacement of configuration variables in form of @ANY_CONF_VAR@ with their values.
+### The values are collected during configure stage, while replacement itself happens during build stage.
+### Used implicitly for .in-files processing.
+macro CONFIGURE_FILE(Src, Dst) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/configure_file.py"} ${input:Src} ${output;addincl:Dst} $CFG_VARS ${kv;hide:"p CF"} ${kv;hide:"pc yellow"}
+}
+
+### @usage: BASE_CODEGEN(tool_path prefix)
+###
+### Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
+macro BASE_CODEGEN(Tool, Prefix, Opts...) {
+ .CMD=${tool:Tool} ${input:Prefix.in} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc yellow"}
+}
+
+# tag:internal
+### @usage: _SPLIT_CODEGEN_BASE(tool prefix OUTS[] OUTPUT_INCLUDES[]) # internal
+###
+### Generator of a certain number .the. cpp file + one header .h file from .in.
+### This is the call of the generator. Python macro SPLIT_CODEGEN() is defined in order to properly fill command outputs from OUT_NUM argument.
+macro _SPLIT_CODEGEN_BASE(Tool, Prefix, OUT[], OPTS[], OUTPUT_INCLUDES[]) {
+ .CMD=${tool:Tool} ${input:Prefix.in} ${output;hide:OUT} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $OPTS ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"}
+}
+
+STRUCT_CODEGEN_OUTPUT_INCLUDES=${output_include;hide:"util/generic/singleton.h"} \
+${output_include;hide:"util/generic/strbuf.h"} \
+${output_include;hide:"util/generic/vector.h"} \
+${output_include;hide:"util/generic/ptr.h"} \
+${output_include;hide:"util/generic/yexception.h"} \
+${output_include;hide:"kernel/struct_codegen/reflection/reflection.h"} \
+${output_include;hide:"kernel/struct_codegen/reflection/floats.h"}
+
+### @usage: STRUCT_CODEGEN(Prefix)
+### A special case BASE_CODEGEN, in which the kernel/struct_codegen/codegen_tool tool is used.
+macro STRUCT_CODEGEN(Prefix) {
+ .CMD=$BASE_CODEGEN(kernel/struct_codegen/codegen_tool, $Prefix, $STRUCT_CODEGEN_OUTPUT_INCLUDES)
+ .PEERDIR=kernel/struct_codegen/metadata kernel/struct_codegen/reflection
+}
+
+### @usage: DUMPERF_CODEGEN(Prefix)
+### A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
+macro DUMPERF_CODEGEN(Prefix) {
+ .CMD=$BASE_CODEGEN(extsearch/images/robot/tools/dumperf/codegen, $Prefix, ${output_include;hide:"extsearch/images/kernel/erf/erf_format.h"})
+}
+
+# tag:flags
+### @usage: LDFLAGS(LinkerFlags...)
+###
+### Add flags to the link command line of executable or shared library/dll.
+### Note: LDFLAGS are always global. When set in the LIBRARY module they will affect all programs/dlls/tests the library is linked into.
+### Note: remember about the incompatibility of flags for gcc and cl.
+macro LDFLAGS(Flags...) {
+ SET_APPEND(LDFLAGS_GLOBAL $Flags)
+}
+
+# tag:flags
+### @usage: CFLAGS([GLOBAL compiler_flag]* compiler_flags)
+###
+### Add the specified flags to the compilation command of C and C++ files.
+### @params: GLOBAL - Propagates these flags to dependent projects
+### Note: remember about the incompatibility flags for clang and cl (to set flags specifically for cl.exe use MSVC_FLAGS).
+macro CFLAGS(Flags...) {
+ SET_APPEND_WITH_GLOBAL(USER_CFLAGS $Flags)
+}
+
+# tag:flags
+### @usage: MASMFLAGS(compiler flags)
+### Add the specified flags to the compilation command of .masm files.
+macro MASMFLAGS(Flags...) {
+ SET_APPEND(MASMFLAGS $Flags)
+}
+
+# tag:flags
+### @usage: CONLYFLAGS([GLOBAL compiler_flag]* compiler_flags)
+### Add the specified flags to the compilation command of .c (but not .cpp) files.
+### @params: GLOBAL - Distributes these flags on dependent projects
+macro CONLYFLAGS(Flags...) {
+ SET_APPEND_WITH_GLOBAL(USER_CONLYFLAGS $Flags)
+}
+
+# tag:flags
+### @usage: CXXFLAGS(compiler_flags)
+### Add the specified flags to the compilation command of .cpp (but not .c) files.
+macro CXXFLAGS(Flags...) {
+ SET_APPEND_WITH_GLOBAL(USER_CXXFLAGS $Flags)
+}
+
+# tag:flags
+### @usage: CUDA_NVCC_FLAGS(compiler flags)
+### Add the specified flags to the compile line .cu-files.
+macro CUDA_NVCC_FLAGS(Flags...) {
+ SET_APPEND(CUDA_NVCC_FLAGS $Flags)
+}
+
+# tag:flags
+### @usage: NVCC_DEVICE_LINK(file.cu...)
+### Run nvcc --device-link on objects compiled from srcs with --device-c.
+### This generates a stub object devlink.o that supplies missing pieces for the
+### host linker to link relocatable device objects into the final executable.
+macro NVCC_DEVICE_LINK(Srcs...) {
+ .CMD=$NVCC $NVCC_FLAGS -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:"devlink"} -dlink ${input;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:Srcs} ${kv;hide:"p DL"} ${kv;hide:"pc light-blue"}
+}
+
+### @usage: STRIP()
+### Strip debug info from a PROGRAM, DLL or TEST.
+### This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
+macro STRIP() {
+ ENABLE(STRIP)
+}
+
+### @usage: NO_OPTIMIZE()
+### Build code without any optimizations (-O0 mode).
+macro NO_OPTIMIZE() {
+ ENABLE(NO_OPTIMIZE)
+}
+
+### @usage: NO_COMPILER_WARNINGS()
+### Disable all compiler warnings in the module.
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+macro NO_COMPILER_WARNINGS() {
+ ENABLE(NO_COMPILER_WARNINGS)
+}
+
+### @usage: WERROR()
+### Consider warnings as errors in the current module.
+### In the bright future will be removed, since WERROR is the default.
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+macro WERROR() {
+ ENABLE(WERROR)
+}
+
+### @usage: NO_WERROR()
+### Override WERROR() behavior
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+macro NO_WERROR() {
+ DISABLE(WERROR)
+}
+
+### @usage: NO_WSHADOW()
+### Disable C++ shadowing warnings.
+macro NO_WSHADOW() {
+ ENABLE(NO_WSHADOW)
+}
+
+# tag:internal
+### @usage: NO_PLATFORM_RESOURCES() # internal
+### Exclude dependency on platform resources libraries.
+### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+macro NO_PLATFORM_RESOURCES() {
+ ENABLE(NOPLATFORM_RESOURCES)
+}
+
+# tag:internal tag:codenav
+### @usage: NO_CODENAVIGATION() # internal
+### Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support.
+### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+macro NO_CODENAVIGATION() {
+ ENABLE(NOCODENAVIGATION)
+}
+
+### @usage: NO_UTIL()
+### Build module without dependency on util.
+### Note: use this with care. Util most likely will be linked into executable anyway,
+### so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time.
+macro NO_UTIL() {
+ ENABLE(NOUTIL)
+}
+
+### @usage: NO_RUNTIME()
+###
+### This macro:
+### 1. Sets the ENABLE(NOUTIL) + DISABLE(USE_INTERNAL_STL);
+### 2. If the project that contains the macro NO_RUNTIME(), peerdir-it project does not contain NO_RUNTIME() => Warning.
+### Note: use this with care. Arcadia STL most likely will be linked into executable anyway, so using STL headers/functions/classes
+### may not be detected at build time and may lead to unpredictable behavors at configure time.
+macro NO_RUNTIME() {
+ SET(USE_ARCADIA_LIBM no)
+ NO_UTIL()
+ ENABLE(NORUNTIME)
+}
+
+### @usage: NO_LIBC()
+###
+### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata).
+### Note: use this with care. libc most likely will be linked into executable anyway,
+### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+macro NO_LIBC() {
+ NO_RUNTIME()
+ DISABLE(MUSL)
+}
+
+### @usage: NO_PLATFORM()
+###
+### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO_PLATFORM variable for special processing.
+### Note: use this with care. libc most likely will be linked into executable anyway,
+### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+macro NO_PLATFORM() {
+ NO_LIBC()
+ ENABLE(NOPLATFORM)
+}
+
+# tag:cpp-specific
+### @usage: USE_CXX()
+###
+### Add dependency on C++ runtime
+### Note: This macro is inteneded for use in _GO_BASE_UNIT like module when the module is built without C++ runtime by default
+macro USE_CXX() {
+ DISABLE(NORUNTIME)
+}
+
+### @usage: USE_UTIL()
+###
+### Add dependency on util and C++ runtime
+### Note: This macro is intended for use in _GO_BASE_UNIT like module when the module is build without util by default
+macro USE_UTIL() {
+ USE_CXX()
+ DISABLE(NOUTIL)
+}
+
+# tag:deprecated
+### @usage: NO_JOIN_SRC() # deprecated, does-nothing
+### This macro currently does nothing. This is default behavior which cannot be overridden at module level.
+macro NO_JOIN_SRC() {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:deprecated
+### @usage: JOINSRC() # deprecated, does-nothing
+### This macro currently does nothing. Use JOIN_SRCS and similar macros to make one file of set of sources.
+macro JOINSRC() {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:sanitize
+### @usage: NO_SANITIZE()
+###
+### Disable all sanitizers for the module.
+macro NO_SANITIZE() {
+ DISABLE(SANITIZER_TYPE)
+}
+
+# tag:coverage tag:sanitize
+### @usage: NO_SANITIZE_COVERAGE()
+###
+### Disable lightweight coverage (-fsanitize-coverage) for the module.
+macro NO_SANITIZE_COVERAGE() {
+ DISABLE(SANITIZE_COVERAGE)
+}
+
+# tag:coverage
+### @usage: NO_CLANG_COVERAGE()
+###
+### Disable heavyweight clang coverage for the module
+macro NO_CLANG_COVERAGE() {
+ DISABLE(CLANG_COVERAGE)
+}
+
+macro NO_CLANG_TIDY() {
+ DISABLE(TIDY)
+}
+
+# tag:python-specific tag:coverage
+### @usage: NO_PYTHON_COVERAGE()
+###
+### Disable python coverage for module
+macro NO_PYTHON_COVERAGE() {
+ DISABLE(PYTHON_COVERAGE)
+}
+
+# tag:python-specific tag:coverage tag:cython
+### @usage: NO_CYTHON_COVERAGE()
+###
+### Disable cython and cythonized python coverage (CYTHONIZE_PY)
+### Implies NO_CLANG_COVERAGE() - right now, we can't disable instrumentation for .py.cpp files, but enable for .cpp
+macro NO_CYTHON_COVERAGE() {
+ DISABLE(CYTHON_COVERAGE)
+ NO_CLANG_COVERAGE()
+}
+
+# tag:lua-specific
+LUAJIT_PATH=${ARCADIA_ROOT}/contrib/libs/luajit
+macro _LUAJIT_OBJDUMP(Src, OUT="") {
+ .CMD=${cwd:LUAJIT_PATH} ${tool:"contrib/libs/luajit/compiler"} -b -g ${input:Src} ${output;noauto:OUT} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
+}
+
+# tag:lua-specific
+LUAJIT_21_PATH=${ARCADIA_ROOT}/contrib/libs/luajit_21
+macro _LUAJIT_21_OBJDUMP(Src, OUT="") {
+ .CMD=${cwd:LUAJIT_21_PATH} ${tool:"contrib/libs/luajit_21/compiler"} -b -g ${input:Src} ${output;noauto:OUT} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
+}
+
+macro _MX_BIN_TO_INFO(Src) {
+ .CMD=${tool:"tools/mx_bin2info"} ${input:Src} ${output;nopath;noext;noauto:Src.info} ${kv;hide:"p MX"} ${kv;hide:"pc yellow"}
+}
+
+MX_GEN_TABLE_INCLS=${output_include;hide:"yabs_mx_calc_table.h"} \
+${output_include;hide:"kernel/matrixnet/mn_sse.h"} \
+${output_include;hide:"library/cpp/archive/yarchive.h"} \
+${output_include;hide:"util/memory/blob.h"} \
+${output_include;hide:"util/generic/hash.h"} \
+${output_include;hide:"util/generic/ptr.h"} \
+${output_include;hide:"util/generic/singleton.h"}
+
+macro _MX_GEN_TABLE(Srcs...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_mx_table.py"} $Srcs ${output;stdout:"mx_tables.cpp"} $MX_GEN_TABLE_INCLS ${kv;hide:"p MX"} ${kv;hide:"pc yellow"}
+ PEERDIR(kernel/matrixnet)
+ PEERDIR(library/cpp/archive)
+}
+
+RELEV_FML_CODEGEN_INCLS=${output_include;hide:"kernel/relevfml/relev_fml.h"} ${output_include;hide:"library/cpp/sse/sse.h"}
+
+### @usage: GENERATE_ENUM_SERIALIZATION(File.h)
+###
+### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+macro GENERATE_ENUM_SERIALIZATION(File) {
+ .CMD=$ENUM_PARSER_TOOL ${input:File} --include-path ${input;rootrel:File} --output ${output;chksum;suf=_serialized.cpp:File} ${output_include;hide:File} ${output_include;hide:"util/generic/serialized_enum.h"} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+ .SEM=generate_enum_serilization ${input:File} ${output;hide;suf=_serialized.o:File} INCLUDE_HEADERS ${input;rootrel:File} ${tool;hide:"tools/enum_parser/enum_parser/bin"}
+ PEERDIR(tools/enum_parser/enum_serialization_runtime)
+}
+
+### @usage: GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File.h)
+###
+### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module
+### Provide access to serialization functions via generated header File_serialized.h
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+macro GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File) {
+ .CMD=$ENUM_PARSER_TOOL ${input:File} --include-path ${input;rootrel:File} --output ${output;chksum;suf=_serialized.cpp:File} --header ${output;chksum;suf=_serialized.h:File} ${output_include;hide:File} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+ .SEM=generate_enum_serilization ${input:File} ${output;hide;suf=_serialized.o:File} GEN_HEADER ${output;suf=_serialized.h:File} INCLUDE_HEADERS ${input;rootrel:File} ${tool;hide:"tools/enum_parser/enum_parser/bin"}
+ PEERDIR(tools/enum_parser/enum_serialization_runtime)
+}
+
+### @usage: DEB_VERSION(File)
+###
+### Creates a header file DebianVersion.h define the DEBIAN_VERSION taken from the File.
+macro DEB_VERSION(File) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/mkver.py"} ${input:File} ${output;stdout:"DebianVersion.h"} ${kv;hide:"p CL"} ${kv;hide:"pc yellow"}
+}
+
+BUILD_MN_SCRIPT=build/scripts/build_mn.py
+
+# tag:matrixnet
+### @usage: BUILD_MN([CHECK] [PTR] [MULTI] mninfo mnname) # matrixnet
+###
+### Generate MatrixNet data and access code using single command.
+### Alternative macro BUILD_MNS() works faster and better for large files.
+macro BUILD_MN(MnInfo, MnName, CHECK?"fml_tool=$FML_UNUSED_TOOL CHECK":"", MULTI?, PTR?, RANKING_SUFFIX="") {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnF $ARCADIA_ROOT $ARCH_TOOL ${input:MnInfo} $MnName ranking_suffix=$RANKING_SUFFIX ${output;chksum;pre=mn.:MnName.cpp} ${output;hide;pre=MN_External_;suf=.rodata:MnName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} $CHECK $MULTI $PTR ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
+}
+
+macro _BUILD_MNS_FILE(Input, Name, Output, Suffix, Check, Fml_tool, AsmDataName) {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsFilesF $ARCADIA_ROOT $BINDIR $ARCH_TOOL fml_tool=$Fml_tool $Name ranking_suffix=$Suffix ${input:Input} ${output;hide:Output} ${output;hide;pre=MN_External_;suf=.rodata:AsmDataName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
+}
+
+MNS_OUTPUT=mnmodels
+
+macro _BUILD_MNS_CPP(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsCppF $NAME ranking_suffix=$RANKING_SUFFIX ${input:MNS_OUTPUT.h} ${output:MNS_OUTPUT.cpp} ${input:Files} ${output_include;hide:MNS_OUTPUT.h} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
+}
+
+macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsHeaderF $NAME ranking_suffix=$RANKING_SUFFIX ${output:MNS_OUTPUT.h} ${input:Files} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${output_include;hide:"kernel/matrixnet/mn_multi_categ.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
+}
+
+# TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES)
+
+# tag:matrixnet
+### @usage: BUILD_MNS([CHECK] NAME listname mninfos...) # matrixnet
+###
+### Generate MatrixNet data and access code using separate commands for support code, interface and data.
+### Faster version of BUILD_MN() macro for large files.
+macro BUILD_MNS(Files...) {
+ _BUILD_MNS_HEADER($Files)
+ _BUILD_MNS_CPP($Files)
+ _BUILD_MNS_FILES($Files)
+}
+
+### @usage: BUILD_PLNS(Src...)
+###
+### Generate interface header plnmodels.h for Relev model (PLN).
+### Relev specific macro.
+macro BUILD_PLNS(Src...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/build_pln_header.py"} ${output:"plnmodels.h"} ${input:Src} $RELEV_FML_CODEGEN_INCLS ${kv;hide:"p PN"} ${kv;hide:"pc yellow"}
+ .PEERDIR=kernel/relevfml library/cpp/sse
+}
+
+### @usage: COMPILE_NLG(Src...)
+###
+### Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
+###
+### Alice-specific macro
+macro COMPILE_NLG(Src...) {
+ PEERDIR(alice/nlg/runtime)
+ RUN_PROGRAM(alice/nlg/bin compile-cpp --import-dir ${ARCADIA_ROOT} --out-dir ${ARCADIA_BUILD_ROOT} --include-prefix ${MODDIR} ${Src} IN ${Src} OUT register.cpp register.h ${suf=.cpp:Src} ${suf=.h:Src} OUT_NOAUTO ${suf=.pb.txt: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)
+}
+
+### @usage: NO_NEED_CHECK()
+###
+### Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.
+macro NO_NEED_CHECK(Flags...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:deprecated
+### @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.
+### Details can be found here: https://clubs.at.yandex-team.ru/arcadia/6104
+macro NEED_REVIEW(Flags...) {
+ # TODO: FIXME
+ ENABLE(UNUSED_MACRO)
+}
+
+### @usage: VERSION(Args...)
+###
+### Specify version of a module. Currently unused by build system, only informative.
+macro VERSION(Flags...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+DATAWORK_SCHEEME_EXPORT_FLAGS=
+
+when ($UNIX == "yes") {
+ SCHEEME2_CFLAGS= -E -x c++
+}
+
+when ($WIN32 == "yes") {
+ SCHEEME2_CFLAGS= /E /TP
+}
+
+SCHEEME2_STRUCT_INFO_FLAGS=-f "const static ui32 RecordSig" -u "RecordSig" --gcc44_no_typename --no_complex_overloaded_func_export
+### @usage: GEN_SCHEEME2(scheeme_name from_file dependent_files...)
+###
+### Generates a C++ description for structure(contains the field RecordSig) in the specified file (and connected).
+###
+### 1. ${scheeme_name}.inc - the name of the generated file.
+### 2. Use an environment variable - DATAWORK_SCHEEME_EXPORT_FLAGS that allows to specify flags to tools/structparser
+###
+### @example:
+###
+### SET(DATAWORK_SCHEEME_EXPORT_FLAGS --final_only -m "::")
+###
+### all options are passed to structparser (in this example --final_only - do not export heirs with public base that contains the required field,,- m "::" only from the root namespace)
+### sets in extra option
+###
+### @example:
+###
+### SET(EXTRACT_STRUCT_INFO_FLAGS -f \"const static ui32 RecordSig\"
+### -u \"RecordSig\" -n${scheeme_name}SchemeInfo ----gcc44_no_typename no_complex_overloaded_func_export
+### ${DATAWORK_SCHEEME_EXPORT_FLAGS})
+###
+### for compatibility with C++ compiler and the external environment.
+### See tools/structparser for more details.
+macro GEN_SCHEEME2(ScheemeName, FromFile) {
+ .CMD=$CXX_COMPILER $C_FLAGS_PLATFORM -c ${tmp;stdout:FromFile.cph} $SCHEEME2_CFLAGS ${input:FromFile} ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-error && ${tool:"tools/structparser"} -o ${output:ScheemeName.inc} -n N${ScheemeName}SchemeInfo $SCHEEME2_STRUCT_INFO_FLAGS $DATAWORK_SCHEEME_EXPORT_FLAGS ${tmp:FromFile.cph} ${output;stdout;noauto:ScheemeName.inc.log} ${kv;hide:"p SH"} ${kv;hide:"pc yellow"}
+}
+
+### @usage: SYMLINK(from to)
+### Add symlink
+macro SYMLINK(From, To) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/symlink.py"} ${input;dirallowed:From} ${output;noauto:To} ${kv;hide:"p LN"} ${kv;hide:"pc light-cyan"}
+}
+
+### @usage: RUN_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
+###
+### Run a program from arcadia.
+### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
+###
+### Parameters:
+### - tool_path - Path to the directory of the tool.
+### - args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+### - CWD dir - Absolute path of the working directory.
+### - ENV key=value... - Environment variables.
+### - TOOL tools... - Auxiliary tool directories.
+### - IN inputs... - Input files
+### - OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+### - STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
+### - OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.
+### - REQUIREMENTS - Override default requirements for CPU and RAM
+###
+### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
+### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+### Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows).
+macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PR"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+}
+
+# tag:lua-specific
+### @usage: LUA(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...][ REQUIREMENTS reqs])
+###
+### Run a lua script.
+### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
+###
+### Parameters:
+### - script_path - Path to the script.3
+### - args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+### - CWD dir - Absolute path of the working directory.
+### - ENV key=value... - Environment variables.
+### - TOOL tools... - Auxiliary tool directories.
+### - IN inputs... - Input files.
+### - OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+### - STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
+### - OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.
+### - REQUIREMENTS - Override default requirements for CPU and RAM
+###
+### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
+### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+macro LUA(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} $LUA_TOOL ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p LU"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+}
+
+# tag:python-specific
+### @usage: PYTHON(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
+###
+### Run a python script with $(PYTHON)/python built from devtools/huge_python.
+### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
+###
+### Parameters:
+### - script_path - Path to the script.
+### - args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
+### - CWD dir - Absolute path of the working directory.
+### - ENV key=value... - Environment variables.
+### - TOOL tools... - Auxiliary tool directories.
+### - IN inputs... - Input files.
+### - OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
+### - STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
+### - OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.
+### - REQUIREMENTS - Override default requirements for CPU and RAM
+###
+### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
+### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
+macro PYTHON(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+}
+
+# tag:java-specific
+macro _RUN_JAVA(IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], TOOL[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], HIDE_OUTPUT?"stderr2stdout":"stdout2stderr", REQUIREMENTS[], Args...) {
+ PEERDIR(build/platform/java/jdk $JDK_RESOURCE_PEERDIR)
+ .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $JDK_RESOURCE/bin/java $Args ${tool;hide:TOOL} ${input;hide:IN} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+}
+
+### @usage: FROM_SANDBOX([FILE] resource_id [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE] [OUTPUT_INCLUDES <include files>])
+###
+### Download the resource from the Sandbox, unpack (if not explicitly specified word FILE) and add OUT files to the build. EXECUTABLE makes them executable.
+### You may specify extra dependencies that output files bring using OUTPUT_INCLUDES. The change of these may e.g. lead to recompilation of .cpp files extracted from resource.
+### If there is no default processing for OUT files or you need process them specially use OUT_NOAUTO instead of OUT.
+###
+### It is disallowed to specify directory as OUT/OUT_NOAUTO since all outputs of commands shall be known to build system.
+###
+### RENAME renames files to the corresponding OUT and OUT_NOAUTO outputs:
+### FROM_SANDBOX(resource_id RENAME in_file1 in_file2 OUT out_file1 out_file2 out_file3)
+### FROM_SANDBOX(resource_id RENAME in_file1 OUT out_file1 RENAME in_file2 OUT out_file2)
+### FROM_SANDBOX(FILE resource_id RENAME resource_file OUT out_name)
+###
+### RENAME RESOURCE allows to rename the resource without specifying its file name.
+###
+### If AUTOUPDATED is specified than macro will be regularly updated according to autoupdate script. The dedicated Sandbox task scans the arcadia and
+### changes resource_ids in such macros if newer resource of specified type is available. Note that the task seeks AUTOUPDATED in specific position,
+### so you shall place it immediately after resource_id.
+macro FROM_SANDBOX(Id, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE?"--copy-to-dir":"--untar-to", AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", SBR="sbr:", REQUIREMENTS[]) {
+ .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id $FILE $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+ ADD_CHECK(check.resource $Id)
+}
+
+### @usage: FROM_MDS([FILE] key [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE])
+###
+### Download resource from MDS with the specified key and process like [FROM_SANDBOX()](#macro_FROM_SANDBOX).
+macro FROM_MDS(Key, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE?"--copy-to-dir":"--untar-to", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"") {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_mds.py"} --key $Key $FILE $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p MD"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+ ADD_CHECK(check.mds $Key)
+}
+
+# tag:internal
+### @usage: _FROM_EXTERNAL(ExtFile [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE]) #internal
+###requirements;hide
+### Use resource described as .external file as [FROM_SANDBOX()](#macro_FROM_SANDBOX)/[FROM_MDS()](#macro_FROM_MDS).
+macro _FROM_EXTERNAL(File, OutFile, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", EXT="ext:") {
+ .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$EXT;suf=.external:OutFile} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_external.py"} --external-file ${input:File} --resource-file $(RESOURCE_ROOT)/ext/$OutFile --copy-to-dir $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/fetch_from_sandbox.py"} ${input;hide:"build/scripts/fetch_from_mds.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p XT"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+
+#FIXME: add '${resource;pre=$EXT:OutFile}' when support of the scheme is added to executors
+#FIXME: add 'ADD_CHECK(check.external $File)' when proper testing is implemented
+}
+
+### @usage LARGE_FILES([AUTOUPDATED] Files...)
+###
+### Use large file ether from working copy or from remote storage via placeholder <File>.external
+### If <File> is present locally (and not a symlink!) it will be copied to build directory.
+### Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
+macro LARGE_FILES(AUTOUPDATED?, Files...) {
+ # This is needed to correctly switch between remote and local modes
+ _GLOB($LF $Files)
+}
+
+
+### @usage: FROM_ARCHIVE(Src [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE])
+###
+### Process file archive as [FROM_SANDBOX()](#macro_FROM_SANDBOX).
+macro FROM_ARCHIVE(Src, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], PREFIX=".", RENAME[], EXECUTABLE?"--executable":"") {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_archive.py"} "--archive" ${input:Src} "--file-name" ${suf=-:Src} "--untar-to" $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p FA"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+}
+
+when ($MSVC == "yes") {
+ C_AS_CXX_FLAGS=/TP /std:c++17
+}
+otherwise {
+ C_AS_CXX_FLAGS=-x c++ -std=c++17
+}
+
+# tag:cpp-specific
+### @usage: COMPILE_C_AS_CXX()
+###
+### Compile .c files as .cpp ones within a module.
+macro COMPILE_C_AS_CXX() {
+ SET(EXTRA_C_FLAGS $C_AS_CXX_FLAGS)
+}
+
+### @usage: NO_DEBUG_INFO()
+###
+### Compile files without debug info collection.
+macro NO_DEBUG_INFO() {
+ SET(NO_DEBUGINFO yes)
+}
+
+### @usage: CTEMPLATE_VARNAMES(File)
+###
+### Generate File.varnames.h using contrib/libs/ctemplate/make_tpl_varnames_h
+###
+### Documentation: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/ctemplate/README.md
+macro CTEMPLATE_VARNAMES(File) {
+ .CMD=${tool:"contrib/libs/ctemplate/make_tpl_varnames_h"} -f ${output;addincl;nopath;noallext:File.varnames.h} ${input:File}
+}
+
+LLVM_OPTS=
+CLANG_ROOT=$CLANG_RESOURCE_GLOBAL
+
+### @usage: GENERATED_SRCS(srcs... PARSE_META_FROM cpp_srcs... [OUTPUT_INCLUDES output_includes...] [OPTIONS])
+###
+### Generate sources using Jinja 2 template engine.
+###
+### srcs... - list of text files which will be generated during build time by templates. Each template must be
+### placed to the place in source tree where corresponding source file should be generated. Name of
+### template must be "<name_of_src_file>.markettemplate". For example if you want to generate file "example.cpp"
+### then template should be named "example.cpp.markettemplate".
+### PARSE_META_FROM cpp_srcs... - list of C++ source files (.cpp, .h) which will be parsed using clang library
+### and metainformation extracted from the files will be made available for templates. Example of
+### template code fragment using metainformation: {{ meta.objects["@N@std@S@string"].name }}
+### OUTPUT_INCLUDES output_includes... - in cases when build system parser fails to determine all headers
+### which generated files include, you can specify additional headers here. In a normal situation this should
+### not be needed and this feature could be removed in the future.
+### OPTIONS - additional options for code_generator utility
+###
+### Examples of templates can be found in directory market/tools/code_generator/templates.
+### Metainformation does not contain entries for every object declared in C++ files specified in PARSE_META_FROM
+### parameter. To include some object into consideration you need to mark it by attribute. Attributes can
+### automatically add more attributes to dependent objects. This behavior depends on attribute definition.
+###
+### More information will be available (eventually:) here: https://wiki.yandex-team.ru/Users/denisk/codegenerator/
+macro GENERATED_SRCS(PARSE_META_FROM{input}[], OUTPUT_INCLUDES[], OPTIONS[], TEMPLATES...) {
+ .CMD=${tool:"market/tools/code_generator"} --cpp-file ${input:PARSE_META_FROM} --templates-dir / ${ARCADIA_ROOT} --templates ${input:TEMPLATES.markettemplate} --generated-files ${output:TEMPLATES} ${output_include;hide:OUTPUT_INCLUDES} ${output_include;hide:PARSE_META_FROM} --arcadia-root ${ARCADIA_ROOT} --arcadia-build-root ${ARCADIA_BUILD_ROOT} --clang-root $CLANG_ROOT ${OPTIONS} -- $C_FLAGS_PLATFORM $CXXFLAGS ${pre=-I:_C__INCLUDE} -std=c++17 -Wno-unknown-warning-option -Wno-unused-parameter -Wno-undefined-inline -Wno-undefined-internal -Wno-unused-function $LLVM_OPTS -fno-lto
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: CLANG_EMIT_AST_CXX(Input Output Opts...)
+###
+### Emit Clang AST from .cpp file. CXXFLAGS and LLVM_OPTS are passed in, while CFLAGS and C_FLAGS_PLATFORM are not.
+### Note: Output name is used as is, no extension added.
+macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-unknown-warning-option $LLVM_OPTS -std=c++17 -fno-lto -emit-ast -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p ST"} ${kv;hide:"pc light-green"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: LLVM_COMPILE_CXX(Input Output Opts...)
+###
+### Emit LLVM bytecode from .cpp file. BC_CXXFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
+### Note: Output name is used as is, no extension added.
+macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS -std=c++17 -fno-lto -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: LLVM_COMPILE_C(Input Output Opts...)
+###
+### Emit LLVM bytecode from .c file. BC_CFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
+### Note: Output name is used as is, no extension added.
+macro LLVM_COMPILE_C(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -fno-lto -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: BPF(Input Output Opts...)
+###
+### Emit eBPF bytecode from .c file.
+### Note: Output name is used as is, no extension added.
+macro BPF(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: BPF_STATIC(Input Output Opts...)
+###
+### Emit eBPF bytecode from .c file.
+### Note: Output name is used as is, no extension added.
+macro BPF_STATIC(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"} && ${cwd:BINDIR} $LLD_ROOT_RESOURCE_GLOBAL/ld -r -b binary -m elf_x86_64 -o ${output;noauto;suf=.bpf.o:Input} ${noauto;nopath:Output}
+ PEERDIR(build/platform/clang build/platform/lld)
+}
+
+### @usage: LLVM_COMPILE_LL(Input Output Opts...)
+###
+### Compile LLVM bytecode to object representation.
+### Note: Output name is used as is, no extension added.
+macro LLVM_COMPILE_LL(Input, Output, Opts...) {
+ .CMD=$CLANG_ROOT/bin/llvm-as ${input:Input} -o ${output;noauto:Output} ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: LLVM_LINK(Output Inputs...)
+###
+### Call llvm-link on set of Inputs to produce Output.
+### Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
+macro LLVM_LINK(Output, Inputs...) {
+ .CMD=$CLANG_ROOT/bin/llvm-link ${input:Inputs} -o ${output;noauto:Output} ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-red"}
+ PEERDIR(build/platform/clang)
+}
+
+### @usage: LLVM_OPT(Input Output Opts...)
+###
+### Call llvm-opt with set of Opts on Input to produce Output.
+### Note: Output name is used as is, no extension added.
+macro LLVM_OPT(Input, Output, Opts...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/llvm_opt_wrapper.py"} $CLANG_ROOT/bin/opt ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p OP"} ${kv;hide:"pc yellow"}
+ PEERDIR(build/platform/clang)
+}
+
+when ($NO_DEBUGINFO == "yes") {
+ DEBUG_INFO_FLAGS=
+}
+
+when ($CLANG && $DEBUGINFO_LINES_ONLY == "yes" && $NO_DEBUGINFO != "yes") {
+ DEBUG_INFO_FLAGS=-gline-tables-only
+}
+
+# TODO: configurable tar and touch
+PACK_TGZ=${cwd:ARCADIA_BUILD_ROOT} tar -czf ${rootrel:OUTPUT} ${rootrel:INPUT} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
+
+# tag:internal
+### @usage TOUCH(Outputs...) # internal
+### Just introduce outputs
+macro TOUCH(Outputs...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${output:Outputs}
+}
+TOUCH_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p UN"} ${kv;hide:"pc light-cyan"} $TARGET
+TOUCH_PACKAGE=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"pc light-red"} $TARGET && $YMAKE_PYTHON ${input:"build/scripts/copy_to_dir.py"} --dest-dir $BINDIR --build-root $ARCADIA_BUILD_ROOT $PACKED_PACKAGE_ARGS $SRCS_GLOBAL $PEERS
+_P_PK=${kv;hide:"p PK"}
+TOUCH_PACKAGE_MF=$GENERATE_MF && $TOUCH_PACKAGE $_P_PK
+TOUCH_JAVA_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"java $CURDIR"} $TARGET
+
+NO_CHECK_IMPORTS_FOR_VALUE=None
+### @usage: NO_CHECK_IMPORTS([patterns])
+###
+### Do not run checks on imports of Python modules.
+### Optional parameter mask patterns describes the names of the modules that do not need to check.
+macro NO_CHECK_IMPORTS(Masks...) {
+ SET(NO_CHECK_IMPORTS_FOR_VALUE $Masks)
+}
+
+
+# tag:yasm-specific
+_YASM_FMT_VALUE=
+_YASM_PLATFORM_FLAGS_VALUE=
+_YASM_PREDEFINED_FLAGS_VALUE=
+when ($OS_DARWIN || $OS_IOS) {
+ _YASM_FMT_VALUE=macho
+ _YASM_PLATFORM_FLAGS_VALUE=-D DARWIN -D UNIX
+}
+elsewhen ($OS_WINDOWS && $ARCH_X86_64) {
+ _YASM_FMT_VALUE=win
+ _YASM_PLATFORM_FLAGS_VALUE=-D WIN64
+}
+elsewhen ($OS_WINDOWS && $ARCH_I386) {
+ _YASM_FMT_VALUE=win
+ _YASM_PLATFORM_FLAGS_VALUE=-D WIN32
+}
+otherwise {
+ _YASM_FMT_VALUE=elf
+ _YASM_PLATFORM_FLAGS_VALUE=-D UNIX
+ _YASM_PREDEFINED_FLAGS_VALUE=-g dwarf2
+}
+
+when ($ASM_PREFIX) {
+ ASM_PREFIX_VALUE=--prefix=$ASM_PREFIX
+}
+otherwise {
+ ASM_PREFIX_VALUE=
+}
+
+# tag:yasm-specific
+YASM_FLAGS=
+YASM_PREINCLUDES_VALUE=
+
+# tag:yasm-specific
+macro _SRC_yasm(SRC, PREINCLUDES[], SRCFLAGS...) {
+ .CMD=${tool:"contrib/tools/yasm"} -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE $YASM_DEBUG_INFO $YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__ -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS -o ${output;noext;suf=${OBJECT_SUF}:SRC} ${pre=-P :PREINCLUDES} ${input;hide:PREINCLUDES} ${input:SRC} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p AS"} ${kv;hide:"pc light-green"}
+}
+
+### @usage: ASM_PREINCLUDE(AsmFiles...)
+###
+### Supply additional .asm files to all assembler calls within a module
+macro ASM_PREINCLUDE(PREINCLUDES...) {
+ SET_APPEND(YASM_PREINCLUDES_VALUE $PREINCLUDES)
+}
+
+# tag:python-specific
+### @usage: RUN_PYTHON(Args...)
+###
+### Version of RUN() macro to invoke Python scripts
+### @see: [RUN()](#macro_RUN)
+macro RUN_PYTHON(Args...) {
+ SETUP_RUN_PYTHON()
+ RUN(${PYTHON_BIN} $Args)
+}
+
+### @usage: RUN_ANTLR(Args...)
+###
+### Macro to invoke ANTLR3 generator (general case)
+macro RUN_ANTLR(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
+ PEERDIR(build/external_resources/antlr3)
+ _RUN_JAVA(-jar $ANTLR3_RESOURCE_GLOBAL/antlr-3.5.2-complete-no-st3.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
+}
+
+### @usage: RUN_ANTLR4(Args...)
+###
+### Macro to invoke ANTLR4 generator (general case)
+macro RUN_ANTLR4(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
+ PEERDIR(build/external_resources/antlr4)
+ _RUN_JAVA(-jar $ANTLR4_RESOURCE_GLOBAL/antlr-4.9-complete.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
+}
+
+_ANTLR4_LISTENER_GRAMMAR=-listener
+_ANTLR4_LISTENER__ANTLR4_EMPTY=-no-listener
+_ANTLR4_VISITOR_GRAMMAR=-visitor
+_ANTLR4_VISITOR__ANTLR4_EMPTY=-no-visitor
+
+### @usage: RUN_ANTLR4_CPP(GRAMMAR, OUTPUT_INCLUDES, LISTENER, VISITOR, Args...)
+###
+### Macro to invoke ANTLR4 generator (Cpp)
+macro RUN_ANTLR4_CPP(GRAMMAR, OUTPUT_INCLUDES[], LISTENER?"GRAMMAR":"_ANTLR4_EMPTY", VISITOR?"GRAMMAR":"_ANTLR4_EMPTY", _ANTLR4_EMPTY="", Args...) {
+ RUN_ANTLR4(${GRAMMAR} -Dlanguage=Cpp -o ${BINDIR} ${Args} ${_ANTLR4_VISITOR_$VISITOR} ${_ANTLR4_LISTENER_$LISTENER} CWD ${BINDIR} IN ${GRAMMAR} OUT ${noext;suf=Lexer.cpp:GRAMMAR} ${noext;suf=Lexer.h:GRAMMAR} ${noext;suf=Parser.cpp:GRAMMAR} ${noext;suf=Parser.h:GRAMMAR} ${noext;suf=Listener.h:$LISTENER} ${noext;suf=BaseListener.h:$LISTENER} ${noext;suf=Visitor.h:$VISITOR} ${noext;suf=BaseVisitor.h:$VISITOR} OUTPUT_INCLUDES ${ARCADIA_ROOT}/contrib/libs/antlr4_cpp_runtime/src/antlr4-runtime.h ${OUTPUT_INCLUDES})
+ PEERDIR(contrib/libs/antlr4_cpp_runtime)
+}
+
+### @usage: RUN_ANTLR4_GO(GRAMMAR, OUTPUT_INCLUDES, LISTENER, VISITOR, Args...)
+###
+### Macro to invoke ANTLR4 generator (Go)
+macro RUN_ANTLR4_GO(GRAMMAR, OUTPUT_INCLUDES[], LISTENER?"GRAMMAR":"_ANTLR4_EMPTY", VISITOR?"GRAMMAR":"_ANTLR4_EMPTY", _ANTLR4_EMPTY="", Args...) {
+ RUN_ANTLR4(${GRAMMAR} -Dlanguage=Go -o ${BINDIR} ${Args} ${_ANTLR4_VISITOR_$VISITOR} ${_ANTLR4_LISTENER_$LISTENER} CWD ${BINDIR} IN ${GRAMMAR} OUT ${noext;tolower;suf=_lexer.go:GRAMMAR} ${noext;tolower;suf=_parser.go:GRAMMAR} ${noext;tolower;suf=_listener.go:$LISTENER} ${noext;tolower;suf=_base_listener.go:$LISTENER} ${noext;tolower;suf=_visitor.go:$VISITOR} ${noext;tolower;suf=_base_visitor.go:$VISITOR} OUTPUT_INCLUDES ${OUTPUT_INCLUDES})
+ PEERDIR(${GOSTD}/fmt ${GOSTD}/reflect ${GOSTD}/strconv ${GOSTD}/unicode vendor/github.com/antlr/antlr4/runtime/Go/antlr)
+}
+
+# tag:cpp-specific
+macro CPP_ADDINCL(Dirs...) {
+ ADDINCL($Dirs)
+}
+
+# tag:internal
+_WHOLE_ARCHIVE_PEERS_VALUE=
+### @usage: WHOLE_ARCHIVE(dirnames...) # internal
+macro WHOLE_ARCHIVE(PEERS...) {
+ SET_APPEND(_WHOLE_ARCHIVE_PEERS_VALUE ${PEERS})
+ REQUIRES(${PEERS})
+}
+
+ANDROID_SDK_ROOT=${ANDROID_SDK_RESOURCE_GLOBAL}/android_sdk
+
+macro TASKLET() {
+ PEERDIR(tasklet/api)
+
+ # CPP
+ CPP_PROTO_PLUGIN(tasklet_cpp tasklet/gen/cpp .tasklet.h)
+
+ # Python
+ PY_PROTO_PLUGIN2(tasklet_py _tasklet.py _sbtask.py tasklet/gen/python DEPS tasklet/domain/sandbox tasklet/runtime sandbox/sdk2)
+
+ #Java
+ JAVA_PROTO_PLUGIN(tasket_java tasklet/gen/java DEPS tasklet/runtime/java/lib $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
+}
+
+TASKLET_REG_INCLUDES= \
+ ${output_include;hide:"tasklet/runtime/lib/cpp_wrapper.h"} \
+ ${output_include;hide:"tasklet/runtime/lib/go_wrapper.h"} \
+ ${output_include;hide:"tasklet/runtime/lib/py_wrapper.h"} \
+ ${output_include;hide:"tasklet/runtime/lib/js_wrapper.h"} \
+ ${output_include;hide:"tasklet/runtime/lib/registry.h"}
+
+macro TASKLET_REG(Name, Lang, Impl, Includes...) {
+ PEERDIR(tasklet/domain sandbox/bin sandbox/taskbox/worker)
+
+ when($Lang == "js") {
+ # JS runtime links the Node.js from contrib as a library, which is a bit heavy,
+ # so we do it, only if any JS tasklets are linked into the target
+ PEERDIR+=tasklet/runtime/js
+ }
+
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"}
+ SRCS(GLOBAL $Name.task.cpp)
+}
+
+# TEMPORARY METHOD FOR EXTENDED REGISTRY SETUP
+# NOT COMPLETE
+macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) {
+ PEERDIR(tasklet/domain sandbox/bin sandbox/taskbox/worker)
+
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl -w $Wrapper ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"}
+ SRCS(GLOBAL $Name.task.cpp)
+}
+
+# tag:cpp-specific
+_CPP_PROTO_MODULE_PREFIX=
+_CPP_PROTO_MODULE_SUFFIX=
+when ($MSVC == "yes" || $CYGWIN == "yes") {
+ _CPP_PROTO_MODULE_PREFIX=
+ _CPP_PROTO_MODULE_SUFFIX=.lib
+}
+otherwise {
+ _CPP_PROTO_MODULE_PREFIX=lib
+ _CPP_PROTO_MODULE_SUFFIX=.a
+}
+
+### @usage: EXPOSE(OutputsToExport...)
+###
+### Allows to mark outputs of macro command as unused in the current module but intended
+### to be used in modules consuming current via PEERDIR.
+###
+### TODO(DEVTOOLS-9000) proper implementation needed
+macro EXPOSE(Args...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${output;suf=$_HASH_HELPER($Args).cpp:"empty_"} ${input;hide:Args}
+}
+
+
+# tag:proto
+macro _PROTO_DESC_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --descriptor_set_out=${output;suf=.desc:File} --include_source_info ${input;rootrel:File}
+}
+
+_PROTO_DESC_MERGE_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $AUTO_INPUT ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
+_PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $PEERS $SRCS_GLOBAL ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
+
+NEED_GOOGLE_PROTO_PEERDIRS=yes
+
+# 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.
+###
+### Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+### When PEERDIR comes from module for particular language appropriate variant is selected.
+### PROTO_LIBRARY also supports emission of GRPC code if GRPC() macro is specified.
+### Notes:
+### - Python versions emit C++ code in addition to Python as optimization.
+### - In some PROTO_LIBRARY-es Java or Python versions are excluded via EXCLUDE_TAGS macros due to incompatibilities.
+### - Use from DEPENDS or BUNDLE is not allowed
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/proto_library/
+###
+### See: [GRPC()](#macro_GRPC), [OPTIMIZE_PY_PROTOS()](#macro_OPTIMIZE_PY_PROTOS), [INCLUDE_TAGS()](#macro_INCLUDE_TAGS), [EXCLUDE_TAGS()](#macro_EXCLUDE_TAGS)
+multimodule PROTO_LIBRARY {
+ module CPP_PROTO : LIBRARY {
+ .ALLOWED=EXPOSE
+ # TODO(svidyuk): think about marker which forces semantics inheritance
+ .SEM=CPP_LIBRARY_SEM
+ ENABLE(CPP_PROTO)
+ ENABLE(GEN_PROTO)
+ NO_CLANG_TIDY()
+ SET(PEERDIR_TAGS CPP_PROTO)
+
+ when ($BUILD_PROTO_AS_EVLOG == "yes" && $USE_VANILLA_PROTOC == "yes") {
+ _OK=no
+ }
+ ASSERT(_OK BUILD_PROTO_AS_EVLOG and USE_VANILLA_PROTOC are incompatible yet)
+
+ MODULE_SUFFIX=$_CPP_PROTO_MODULE_SUFFIX
+ MODULE_PREFIX=$_CPP_PROTO_MODULE_PREFIX
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+ }
+
+ module JAVA_PROTO: EXTERNAL_JAVA_LIBRARY {
+ .EXTS=.jsrc
+ .ALLOWED=GRPC
+ .SEM=ignored
+ SET(PEERDIR_TAGS JAVA_PROTO)
+ ENABLE(JAVA_PROTO)
+ PEERDIR+=$JAVA_PROTOBUF_PEERS contrib/java/javax/annotation/javax.annotation-api/1.3.1
+
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_SKIFF CPP_PROTO_PLUGIN2 PY_PROTO_PLUGIN YMAPS_SPROTO RESOURCE
+ ADDINCL(FOR proto $PROTOBUF_PATH)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/java/com/google/api/grpc/proto-google-common-protos/${JAVA_PROTO_COMMON_VERSION}
+ ADDINCL += FOR proto ${ARCADIA_ROOT}/contrib/libs/googleapis-common-protos
+ }
+ }
+
+ module PY_PROTO: PY2_LIBRARY {
+ .ALIASES=SRCS=PY_SRCS
+ .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ .PEERDIRSELF=CPP_PROTO
+ .SEM=ignored
+ SET(PEERDIR_TAGS PY2 PY_PROTO)
+ ENABLE(PY_PROTO)
+ OPTIMIZE_PY_PROTOS()
+ OBJ_SUF=.py2
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ SET(LINT_LEVEL_VALUE none_internal)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+
+ _IGNORE_SELF_PEERS=
+ _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
+ when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
+ _IGNORE_PEERDIRSELF=CPP_PROTO
+ }
+ SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
+ }
+
+ module PY3_PROTO: PY3_LIBRARY {
+ .ALIASES=SRCS=PY_SRCS
+ .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
+ .PEERDIRSELF=CPP_PROTO
+ .SEM=ignored
+ SET(PEERDIR_TAGS PY3 PY3_PROTO)
+ ENABLE(PY3_PROTO)
+ OPTIMIZE_PY_PROTOS()
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
+ OBJ_SUF=.py3
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ SET(LINT_LEVEL_VALUE none_internal)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+
+ _IGNORE_SELF_PEERS=
+ _CPP_PROTO_LIBRARY=${MODDIR}/$_CPP_PROTO_MODULE_PREFIX$REALPRJNAME$_CPP_PROTO_MODULE_SUFFIX
+ when ($OPTIMIZE_PY_PROTOS_FLAG == "no") {
+ _IGNORE_PEERDIRSELF=CPP_PROTO
+ }
+ SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
+ }
+
+ module GO_PROTO: GO_LIBRARY {
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO
+ .SEM=ignored
+ SET(PEERDIR_TAGS GO GO_PROTO)
+ ENABLE(GO_PROTO)
+
+ when ($_COMMON_GOOGLE_APIS == "None") {
+ }
+ elsewhen ($_COMMON_GOOGLE_APIS == "") {
+ PEERDIR += $_GO_COMMON_GOOGLE_APIS
+ ADDINCL += FOR proto ${ARCADIA_ROOT}/contrib/libs/googleapis-common-protos
+ }
+ otherwise {
+ PEERDIR += $_COMMON_GOOGLE_APIS
+ ADDINCL += FOR proto ${ARCADIA_ROOT}/contrib/libs/googleapis-common-protos
+ }
+ }
+
+ module EXT_PROTO: _BARE_UNIT {
+ .ALIASES=SRCS=_RAW_PROTO_SRCS
+ .CMD=TOUCH_UNIT_MF
+ .SEM=ignored
+ .EXTS=.*
+ .PROXY=yes
+ .PEERDIR_POLICY=as_build_from
+ SET(PEERDIR_TAGS EXT_PROTO)
+ ENABLE(EXT_PROTO)
+ SET(MODULE_SUFFIX .raw.fake.pkg)
+ SET(MODULE_TYPE LIBRARY)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+ SET(CREDITS_FILE_EXTRA_EXT .ext_proto)
+ }
+
+ module DESC_PROTO: _BARE_UNIT {
+ .CMD=_PROTO_DESC_MERGE_CMD
+ .SEM=ignored
+ .EXTS=.desc
+ .NODE_TYPE=Library
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO RESOURCE GO_PROTO_PLUGIN GRPC
+
+ SET(PEERDIR_TAGS DESC_PROTO)
+ ENABLE(DESC_PROTO)
+ MODULE_SUFFIX=.self.protodesc
+ SET(MODULE_TYPE LIBRARY)
+
+ MACRO_ALIAS(EVLOG_CMD _PROTO_DESC_CMD)
+ MACRO_ALIAS(PROTO_CMD _PROTO_DESC_CMD)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+
+ when ($NEED_GOOGLE_PROTO_PEERDIRS == "yes") {
+ when ($USE_VANILLA_PROTOC == "yes") {
+ PEERDIR += contrib/libs/protobuf_std/builtin_proto/protos_from_protobuf
+ }
+ otherwise {
+ PEERDIR += contrib/libs/protobuf/builtin_proto/protos_from_protoc
+ }
+ }
+ }
+
+ module PB_PY_PROTO: _PY_PACKAGE {
+ .INCLUDE_TAG=no
+ .PROXY=yes
+ .SEM=ignored
+ SET(MODULE_SUFFIX .pb_py.fake.pkg)
+ ENABLE(PB_PY_PROTO)
+
+ # WARN:
+ # _COMMON_GOOGLE_APIS aren't handled intentionally.
+ # PB_PY_PROTO is a legacy module type, stop using it.
+ }
+}
+
+# tag:proto
+_EXT_PROTO_DIR=_RAW_
+
+# tag:proto
+### This var defines the root of the tree for copied proto files from EXT_PROTO
+### submodule of PROTO_LIBRARY module
+EXT_PROTO_ROOT=${ARCADIA_BUILD_ROOT}/${_EXT_PROTO_DIR}
+
+# tag:proto
+### @usage: USE_EXT_PROTO(peerdir_tag...)
+###
+### Configure module to use proto files from existing PROTO_LIBRARY module.
+### Additional PEERDIR tags required to build a module can be passed through
+### EXTRA_TAGS vararg parameter.
+macro USE_EXT_PROTO(EXTRA_TAGS...) {
+ SET(PEERDIR_TAGS EXT_PROTO ${EXTRA_TAGS})
+ SRCDIR(${EXT_PROTO_ROOT})
+}
+
+# tag:proto tag:internal
+### @usage: _RAW_PROTO_SRCS(files...) # internal
+###
+### _RAW_PROTO_SRCS is a proxy macro to FILES macro which filters out
+### GLOBAL keyword from the list of files (NOTE! The order of files listed
+### originally in call to _RAW_PROTO_SRCS() macro is changed in call to
+### FILES() macro). Currently this macro copies only files with the following
+### extensions: .proto, .gztproto, .ev
+macro _RAW_PROTO_SRCS(FILES...) {
+ COPY_FILES_TO_BUILD_PREFIX(${ext=.proto:FILES} PREFIX ${_EXT_PROTO_DIR})
+ COPY_FILES_TO_BUILD_PREFIX(${ext=.gztproto:FILES} PREFIX ${_EXT_PROTO_DIR})
+ COPY_FILES_TO_BUILD_PREFIX(${ext=.ev:FILES} PREFIX ${_EXT_PROTO_DIR})
+}
+
+module PROTO_DESCRIPTIONS: _BARE_UNIT {
+ .CMD=_PROTO_DESC_MERGE_PEERS_CMD
+ .PEERDIR_POLICY=as_build_from
+ .NODE_TYPE=Library
+ .RESTRICTED=SRCS
+ .FINAL_TARGET=yes
+
+ SET(PEERDIR_TAGS DESC_PROTO)
+ SET(MODULE_SUFFIX .protodesc)
+ SET(MODULE_TYPE PROTO_DESCRIPTIONS)
+}
+
+module PROTO_REGISTRY: PROTO_DESCRIPTIONS {
+ SET(MODULE_TYPE PROTO_REGISTRY)
+}
+
+# tag:fbs
+_FBS_NAMESPACE_MAP_GLOBAL=
+
+# tag:fbs
+macro _FBS_NAMESPACE_IMPL(NAMESPACE, PATH, DUMMY...) {
+ SET_APPEND(_FBS_NAMESPACE_MAP_GLOBAL ${NAMESPACE}=${PATH})
+}
+
+# tag:fbs
+macro FBS_NAMESPACE(NAMESPACE, PATH...) {
+ _FBS_NAMESPACE_IMPL($NAMESPACE $PATH $MODDIR)
+}
+
+# tag:fbs
+### @usage: FBS_LIBRARY()
+###
+### Build some variant of Flatbuffers library.
+###
+### The particular variant is selected based on where PEERDIR to FBS_LIBRARY
+### comes from.
+###
+### Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+### When PEERDIR comes from module for particular language appropriate variant
+### is selected.
+###
+### Notes: FBS_NAMESPACE must be specified in all dependent FBS_LIBRARY modules
+### if build of Go code is requested.
+multimodule FBS_LIBRARY {
+ module CPP_FBS: LIBRARY {
+ ENABLE(CPP_FBS)
+ SET(PEERDIR_TAGS CPP_FBS)
+ }
+
+ module GO_FBS: GO_LIBRARY {
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ ENABLE(GO_FBS)
+ SET(PEERDIR_TAGS GO GO_FBS)
+ }
+
+ module JAVA_FBS: EXTERNAL_JAVA_LIBRARY {
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ ENABLE(JAVA_FBS)
+ SET(PEERDIR_TAGS JAVA_FBS)
+ }
+
+ module PY2_FBS: PY2_LIBRARY {
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ .ALIASES=SRCS=PY_SRCS
+ ENABLE(PY2_FBS)
+ SET(PEERDIR_TAGS PY2 PY2_FBS)
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ SET(LINT_LEVEL_VALUE none_internal)
+ }
+
+ module PY3_FBS: PY3_LIBRARY {
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ .ALIASES=SRCS=PY_SRCS
+ ENABLE(PY3_FBS)
+ SET(PEERDIR_TAGS PY3 PY3_FBS)
+ # Can not use NO_LINT(), because is not allowed outside of contrib directory
+ SET(LINT_LEVEL_VALUE none_internal)
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
+ OBJ_SUF=.py3
+ }
+}
+
+# tag:java-specific
+_COMPILE_JSRC=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_jsrc.py"} --input $AUTO_INPUT --output $TARGET --prefix $BINDIR ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JC"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+# tag:java-specific
+COMPILE_JSRC_MF=$_COMPILE_JSRC && $GENERATE_MF
+
+# tag:java-specific tag:internal
+### @usage: JSRC_LIBRARY() # internal
+module JSRC_LIBRARY: _BARE_UNIT {
+ .CMD=COMPILE_JSRC_MF
+ .EXTS=.java
+ .ALL_INS_TO_OUT=no
+ .PEERDIR_POLICY=as_include
+ .FINAL_TARGET=no
+ .ALIASES=SRCS=FILES
+ PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL
+ MODULE_TYPE=Library
+ SET(MODULE_SUFFIX .jsrc)
+ SET(DONT_RESOLVE_INCLUDES yes)
+ SET(NEED_PLATFORM_PEERDIRS no)
+ SET(MODULE_LANG JAVA)
+
+ NO_RUNTIME()
+}
+
+# tag:maps-specific
+@import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf"
+
+# tag:internal
+### @usage: _PROXY_LIBRARY() # internal
+###
+### The use of this module is strictly prohibited!!!
+module _PROXY_LIBRARY: LIBRARY {
+ .EXTS=.a .lib
+ .PEERDIR_POLICY=as_build_from
+ .PROXY=yes
+ .FINAL_TARGET=yes
+ DISABLE(NEED_ADD_FAKE_SRC)
+
+ NO_UTIL()
+ NO_RUNTIME()
+}
+
+# tag:maps-specific
+@import "${CONF_ROOT}/conf/project_specific/maps/aar.conf"
+@import "${CONF_ROOT}/conf/project_specific/maps/sproto.conf"
+@import "${CONF_ROOT}/conf/project_specific/maps/mapkit.conf"
+
+_PRIMARY_OUTPUT_VALUE=
+
+# tag:internal
+### @usage: PRIMARY_OUTPUT_VALUE(Output) # internal
+###
+### The use of this module is strictly prohibited!!!
+macro PRIMARY_OUTPUT(OUTPUT) {
+ SET(_PRIMARY_OUTPUT_VALUE $OUTPUT)
+}
+
+_DLL_PROXY_LIBRARY_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${input;hide:_PRIMARY_OUTPUT_VALUE} ${TARGET}
+
+# tag:internal
+### @usage: DLL_PROXY_LIBRARY() # internal
+###
+### The use of this module is strictly prohibited!!!
+module DLL_PROXY_LIBRARY: _PROXY_LIBRARY {
+ .ALLOWED=PRIMARY_OUTPUT
+ .CMD=_DLL_PROXY_LIBRARY_CMD
+}
+
+_PREBUILT_PROGRAM_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${TARGET} ${kv;hide:"p ld"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+# tag:internal
+### @usage: PREBUILT_PROGRAM([programname]) # internal
+###
+### Program module which uses a prebuilt prgram as its output.
+module PREBUILT_PROGRAM: _LINK_UNIT {
+ .CMD=_PREBUILT_PROGRAM_CMD
+ .SYMLINK_POLICY=EXE
+ .ALLOWED=INDUCED_DEPS PRIMARY_OUTPUT
+ .RESTRICTED=SRCS
+
+ _BARE_LINK_MODULE()
+
+ SET(MODULE_TYPE PROGRAM)
+
+ when ($WIN32 == "yes" || $OS_CYGWIN == "yes") {
+ MODULE_SUFFIX=.exe
+ }
+}
+
+### @usage COLLECT_JINJA_TEMPLATES(varname path)
+###
+### This macro collects all jinja and yaml files in the directory specified by second argument and
+### stores result in the variable with mane specified by first parameter.
+macro COLLECT_JINJA_TEMPLATES(VAR, DIR) {
+ _GLOB($VAR ${DIR}/**/*.jinja ${DIR}/**/*.yaml)
+}
+
+# tag:go-specific
+GO_HOST_OS=unknown
+when ($HOST_OS_LINUX) {
+ GO_HOST_OS=linux
+}
+elsewhen ($HOST_OS_DARWIN) {
+ GO_HOST_OS=darwin
+}
+elsewhen($HOST_OS_WINDOWS) {
+ GO_HOST_OS=windows
+}
+
+# tag:go-specific
+GO_HOST_ARCH=unknown
+when ($HOST_ARCH_X86_64) {
+ GO_HOST_ARCH=amd64
+}
+elsewhen($HOST_ARCH_ARM64) {
+ GO_HOST_ARCH=arm64
+}
+
+# tag:go-specific
+GO_TARG_OS=unknown
+when ($OS_LINUX) {
+ GO_TARG_OS=linux
+}
+elsewhen ($OS_DARWIN) {
+ GO_TARG_OS=darwin
+}
+elsewhen ($OS_WINDOWS) {
+ GO_TARG_OS=windows
+}
+
+# tag:go-specific
+GO_TARG_ARCH=unknwon
+when ($ARCH_X86_64) {
+ GO_TARG_ARCH=amd64
+}
+elsewhen ($ARCH_I386) {
+ GO_TARG_ARCH=x86
+}
+elsewhen ($ARCH_ARM64) {
+ GO_TARG_ARCH=arm64
+}
+
+# tag:go-specific
+GO_HOST_TARG_PARAMS=++host-os $GO_HOST_OS ++host-arch $GO_HOST_ARCH ++targ-os $GO_TARG_OS ++targ-arch $GO_TARG_ARCH
+
+# tag:go-specific
+GOSTD_VERSION=1.17.6
+when ($GOSTD_VERSION == "1.17.6") {
+ GOSTD=contrib/go/_std/src
+}
+elsewhen ($GOSTD_VERSION == "1.18beta2") {
+ GOSTD=contrib/go/_std_1.18beta2/src
+}
+otherwise {
+ GOSTD=__unsupported_go_std_library_version_[$GOSTD_VERSION]__
+}
+
+# tag:go-specific
+GO_DEBUG_PATH_RELATIVE=no
+_GO_DEBUG_PATH__NO_UID__=
+_GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__=
+
+# tag:go-specific
+_GO_IMPORT_PATH=${MODDIR}
+
+# tag:go-specific
+GO_VET=yolint
+GO_VET_TOOL=
+GO_VET_FLAGS=
+GO_VET_EXTRA_FLAGS=
+
+# tag:go-specific
+_GO_VET_ADD_CHECK=yes
+_GO_FMT_ADD_CHECK=yes
+_GO_YDX_FILE=
+
+# tag:go-specific
+_GO_CGO1_WRAPPER_FLAGS=--build-prefix=/-B --source-prefix=/-S
+_GO_LINK_EXE_EXT_CMD=
+
+# tag:go-specific
+GO_WITH_MUSL=
+
+# tag:go-specific
+GO_TOOLS_ROOT=${GO_TOOLS_RESOURCE_GLOBAL}
+GO_TEST_MINER=${tool:"tools/go_test_miner"}
+GO_TEST_IMPORT_PATH=
+
+# tag:go-specific
+GO_STD_LIB_PREFIX=${GOSTD}/
+GO_ARCADIA_PROJECT_PREFIX=a.yandex-team.ru/
+GO_CONTRIB_PROJECT_PREFIX=vendor/
+GO_SKIP_IMPORTS=unsafe C
+GO_VET_INFO_EXT=.vet.out
+GO_VET_REPORT_EXT=.vet.txt
+GO_VET_OUTPUT_INFO=${output;rootrel;hide;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${GO_VET_INFO_EXT}:REALPRJNAME}
+GO_VET_OUTPUT_REPORT=${output;rootrel;hide;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${GO_VET_REPORT_EXT}:REALPRJNAME}
+
+# tag:go-specific tag:codenav
+_GO_YNDEXER_EXT=.ydx.pb2
+GO_YNDEXER_OUTPUT=${output;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${_GO_YNDEXER_EXT}:REALPRJNAME}
+
+# tag:go-specific
+GO_PROJECT_PREFIXES=++std-lib-prefix $GO_STD_LIB_PREFIX ++arc-project-prefix $GO_ARCADIA_PROJECT_PREFIX
+
+# tag:go-specific
+_GO_FAKEID=${FAKEID}.${BUILD_TYPE}.${GO_FAKEID}
+
+# tag:go-specific
+CGO2_CFLAGS_VALUE=
+CGO2_LDFLAGS_VALUE=
+
+# tag:go-specific
+GO_ASM_FLAGS_VALUE=
+### @usage: GO_ASM_FLAGS(flags)
+### Add the specified flags to the go asm compile command line.
+macro GO_ASM_FLAGS(Flags...) {
+ SET_APPEND(GO_ASM_FLAGS_VALUE $Flags)
+}
+
+# tag:go-specific
+GO_CGO1_FLAGS_VALUE=
+### @usage: GO_CGO1_FLAGS(flags)
+### Add the specified flags to the go cgo compile command line.
+macro GO_CGO1_FLAGS(Flags...) {
+ SET_APPEND(GO_CGO1_FLAGS_VALUE $Flags)
+}
+
+# tag:go-specific
+GO_CGO2_FLAGS_VALUE=
+### @usage: GO_CGO2_FLAGS(flags)
+### Add the specified flags to the go cgo compile command line.
+macro GO_CGO2_FLAGS(Flags...) {
+ SET_APPEND(GO_CGO2_FLAGS_VALUE $Flags)
+}
+
+# tag:go-specific
+GO_COMPILE_FLAGS_VALUE=$USER_GO_COMPILE_FLAGS
+### @usage: GO_COMPILE_FLAGS(flags)
+### Add the specified flags to the go compile command line.
+macro GO_COMPILE_FLAGS(Flags...) {
+ SET_APPEND(GO_COMPILE_FLAGS_VALUE $Flags)
+}
+
+# tag:go-specific
+GO_LINK_FLAGS_VALUE=$USER_GO_LINK_FLAGS
+### @usage: GO_LINK_FLAGS(flags)
+### Add the specified flags to the go link command line.
+macro GO_LINK_FLAGS(Flags...) {
+ SET_APPEND(GO_LINK_FLAGS_VALUE $Flags)
+}
+
+# tag:go-specific
+_GO_TOOL_MODE=
+
+# tag:go-specific
+_GO_TOOL_COMMON_FLAGS=\
+ ++mode $_GO_TOOL_MODE \
+ $GO_PROJECT_PREFIXES \
+ ++goversion $GOSTD_VERSION \
+ ++source-root $ARCADIA_ROOT \
+ ++build-root $ARCADIA_BUILD_ROOT \
+ ++output-root $BINDIR \
+ ++toolchain-root $GO_TOOLS_ROOT \
+ $GO_HOST_TARG_PARAMS \
+ ++output $TARGET \
+ $GO_VET_OUTPUT \
+ $_GO_YDX_FILE \
+ $_GO_DEBUG_PATH__NO_UID__ \
+ ++srcs $AUTO_INPUT ${input:GO_FILES} \
+ ++asm-flags $GO_ASM_FLAGS_VALUE \
+ ++compile-flags $GO_COMPILE_FLAGS_VALUE \
+ ++link-flags $GO_LINK_FLAGS_VALUE \
+ ++cgo-srcs ${input:CGO_FILES} \
+ $_GO_EMBED_VALUE \
+ $GO_TOOLCHAIN_ENV
+
+# tag:go-specific
+macro _GO_GEN_COVER_GO(GO_FILE, VAR_ID) {
+ .CMD=${hide:_GO_FAKEID} $GO_TOOLS_ROOT/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cover -mode set -var $VAR_ID -o ${output;noext;suf=.cover.go:GO_FILE} ${input:GO_FILE}
+}
+
+# tag:go-specific
+macro _GO_COMPILE_SYMABIS(FLAGS[], ASM_FILES...) {
+ .CMD=${hide:_GO_FAKEID} $GO_TOOLS_ROOT/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/asm $_GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__ ${pre=-I :_C__INCLUDE} -I $GO_TOOLS_ROOT/pkg/include -D GOOS_${GO_TARG_OS} -D GOARCH_${GO_TARG_ARCH} $FLAGS $GO_ASM_FLAGS_VALUE -gensymabis -o ${output:"gen.symabis"} ${input:ASM_FILES} ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+ .ADDINCL=build/scripts/go_fake_include
+}
+
+# tag:go-specific
+macro _GO_COMPILE_CGO1(NAME, FLAGS[], FILES...) {
+ .CMD=${hide:_GO_FAKEID} ${cwd:ARCADIA_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cgo1_wrapper.py"} $_GO_CGO1_WRAPPER_FLAGS --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT} --cgo1-files ${output;noext:FILES.cgo1.go} --cgo2-files ${output;noauto;noext:FILES.cgo2.c} -- ${GO_TOOLS_ROOT}/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cgo -objdir $BINDIR -importpath $NAME $GO_CGO1_FLAGS_VALUE $FLAGS -- $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} ${CGO_CFLAGS_VALUE} ${input:FILES} ${output;hide:"_cgo_export.h"} ${output;hide:"_cgo_export.c"} ${output;hide:"_cgo_gotypes.go"} ${output;noauto;hide:"_cgo_main.c"} ${output;noauto;hide:"_cgo_flags"} $GO_TOOLCHAIN_ENV ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+}
+
+# tag:go-specific
+macro _GO_COMPILE_CGO2(NAME, C_FILES[], S_FILES[], OBJ_FILES[], FILES...) {
+ .CMD=${hide:_GO_FAKEID} $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} $CGO_CFLAGS_VALUE ${input;tobindir:"_cgo_main.c"} -c -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} && $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} $LDFLAGS $LDFLAGS_GLOBAL $CGO2_LDFLAGS_VALUE ${input;hide:"_cgo_export.h"} ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} ${input;suf=${OBJECT_SUF}:"_cgo_export.c"} ${input;nopath;noext;suf=.cgo2.c${OBJECT_SUF}:FILES} ${input;suf=${OBJECT_SUF}:C_FILES} ${input;suf=.o:S_FILES} ${input:OBJ_FILES} $CGO_LDFLAGS_VALUE && ${GO_TOOLS_ROOT}/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cgo -dynpackage $NAME -dynimport ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} -dynout ${output:"_cgo_import.go"} -dynlinker $GO_CGO2_FLAGS_VALUE $GO_TOOLCHAIN_ENV ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+
+ _USE_LINKER()
+}
+
+# tag:go-specific
+macro _GO_LINK_LIB_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_FILES...) {
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LIB_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+}
+
+# tag:go-specific
+macro _GO_LINK_EXE_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_FILES...) {
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p LD"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"} $_GO_LINK_EXE_EXT_CMD
+}
+
+# tag:go-specific
+macro _GO_LINK_TEST_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_TEST_FILES[], GO_XTEST_FILES[], GO_FILES...) {
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++test-miner $GO_TEST_MINER ++test-import-path $GO_TEST_IMPORT_PATH ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} ++test_srcs ${input:GO_TEST_FILES} ++xtest_srcs ${input:GO_XTEST_FILES} ++cover_info $GO_COVER_INFO_VALUE ++skip-tests $_GO_SKIP_TEST_VALUE --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+}
+
+# tag:go-specific
+GO_LINK_LIB=$GENERATE_MF && $_GO_LINK_LIB_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS)
+GO_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS)
+GO_LINK_TEST=$GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE)
+GO_LINK_DLL=$GO_LINK_EXE && $COPY_CMD $BINDIR/_cgo_export.h ${output;pre=${MODULE_PREFIX};suf=.h:REALPRJNAME}
+
+# tag:go-specific
+CGO_ENABLED=yes
+when ($OS_WINDOWS == "yes" || $SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
+ CGO_ENABLED=no
+}
+
+# tag:go-specific
+GO_PACKAGE_VALUE=
+### @usage: GO_PACKAGE_NAME(Name)
+### Override name of a Go package.
+macro GO_PACKAGE_NAME(NAME) {
+ SET(GO_PACKAGE_VALUE $NAME)
+}
+
+# tag:go-specific tag:internal
+_GO_SRCS_VALUE=
+### @usage: _GO_SRCS(Files...) # internal
+### This macro shouldn't be used in ya.make files, use SRCS() instead.
+### This is internal macro collecting .go sources for processing within Go modules (GO_PROGRAM and GO_LIBRARY)
+macro _GO_SRCS(FILES...) {
+ GO_FAKE_OUTPUT($FILES)
+ SET_APPEND(_GO_SRCS_VALUE $FILES)
+}
+
+# tag:go-specific
+_GO_TEST_SRCS_VALUE=
+### @usage: GO_TEST_SRCS(Files...)
+### .go sources for internal tests of a module
+macro GO_TEST_SRCS(FILES...) {
+ GO_FAKE_OUTPUT($FILES)
+ SET_APPEND(_GO_TEST_SRCS_VALUE $FILES)
+}
+
+# tag:go-specific
+_GO_XTEST_SRCS_VALUE=
+### @usage: GO_XTEST_SRCS(Files...)
+### .go sources for external tests of a module
+macro GO_XTEST_SRCS(FILES...) {
+ GO_FAKE_OUTPUT($FILES)
+ SET_APPEND(_GO_XTEST_SRCS_VALUE $FILES)
+}
+
+# tag:go-specific
+macro _GO_UNUSED_SRCS(FLAGS...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:go-specific
+_CGO_SRCS_VALUE=
+### @usage: CGO_SRCS(Files...)
+### .go sources to be built with CGO
+macro CGO_SRCS(FILES...) {
+ SET_APPEND(_CGO_SRCS_VALUE $FILES)
+ PEERDIR(${GOSTD}/syscall)
+}
+
+# tag:go-specific
+GO_LDFLAGS_GLOBAL=
+### @usage: GO_LDFLAGS(Flags...)
+### Link flags for GO_PROGRAM linking from .go sources
+macro GO_LDFLAGS(FLAGS...) {
+ SET_APPEND(GO_LDFLAGS_GLOBAL $FLAGS)
+}
+
+# tag:go-specific
+CGO_CFLAGS_VALUE=
+### @usage: CGO_CFLAGS(Flags...)
+### Compiler flags specific to CGO compilation
+macro CGO_CFLAGS(FLAGS...) {
+ SET_APPEND(CGO_CFLAGS_VALUE $FLAGS)
+ CFLAGS($FLAGS)
+}
+
+# tag:go-specific
+CGO_LDFLAGS_VALUE=
+### @usage: CGO_LDFLAGS(Files...)
+### Linker flags specific to CGO linking
+macro CGO_LDFLAGS(FLAGS...) {
+ SET_APPEND(CGO_LDFLAGS_VALUE $FLAGS)
+ GO_LDFLAGS($FLAGS)
+}
+
+# tag:go-specific
+_GO_SKIP_TEST_VALUE=
+### @usage: GO_SKIP_TESTS(TestNames...)
+###
+### Define a set of tests that should not be run.
+### NB! Subtests are not taken into account!
+macro GO_SKIP_TESTS(TESTS...) {
+ SET_APPEND(_GO_SKIP_TEST_VALUE $TESTS)
+ RESTRICT_PATH(vendor MSG This macro is prohibited to be used outside the vendor/ directory)
+}
+
+# tag:go-specific tag:internal
+_GO_EMBED_VALUE=
+_GO_EMBED_INPUTS=
+### @usage: _GO_EMBED_PATTERN(PATTERN) # internal
+###
+### Define an embed pattern.
+macro _GO_EMBED_PATTERN(XTEST?"_xtest":"", PATTERN, IMPORT_PATH) {
+ SET(VAR_SALT1 $XTEST $PATTERN $IMPORT_PATH 1)
+ SET(_PATTERN_GLOB1 uniq_embed_${hash:VAR_SALT1})
+ _GLOB($_PATTERN_GLOB1 ${ARCADIA_ROOT}/${IMPORT_PATH}/${PATTERN}/**/* EXCLUDE ${ARCADIA_ROOT}/${IMPORT_PATH}/${PATTERN}/**/_* ${ARCADIA_ROOT}/${IMPORT_PATH}/${PATTERN}/**/.*)
+ SET(VAR_SALT2 $XTEST $PATTERN $IMPORT_PATH 2)
+ SET(_PATTERN_GLOB2 _uniq_embed_${hash:VAR_SALT2})
+ _GLOB($_PATTERN_GLOB2 ${ARCADIA_ROOT}/${IMPORT_PATH}/${PATTERN})
+ SET_APPEND(_GO_EMBED_VALUE ++embed$XTEST $PATTERN \$$_PATTERN_GLOB1 \$$_PATTERN_GLOB2)
+ SET_APPEND(_GO_EMBED_INPUTS \$$_PATTERN_GLOB1 \$$_PATTERN_GLOB2)
+}
+
+# tag:go-specific
+### @usage: GO_EMBED_PATTERN(PATTERN)
+###
+### Define an embed pattern.
+macro GO_EMBED_PATTERN(PATTERN) {
+ _GO_EMBED_PATTERN($PATTERN $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific
+### @usage: GO_TEST_EMBED_PATTERN(PATTERN)
+###
+### Define an embed pattern for internal go tests.
+macro GO_TEST_EMBED_PATTERN(PATTERN) {
+ _GO_EMBED_PATTERN($PATTERN $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific
+### @usage: GO_XTEST_EMBED_PATTERN(PATTERN)
+###
+### Define an embed pattern for external go tests.
+macro GO_XTEST_EMBED_PATTERN(PATTERN) {
+ _GO_EMBED_PATTERN(XTEST $PATTERN $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific tag:internal
+### @usage: _GO_EMBED_DIR(PATTERN) # internal
+###
+### Define an embed directory DIR.
+macro _GO_EMBED_DIR(XTEST?"_xtest":"", DIR, IMPORT_PATH) {
+ SET(VAR_SALT $XTEST $DIR $IMPORT_PATH)
+ SET(_PATTERN_GLOB uniq_embed_${hash:VAR_SALT})
+ _GLOB($_PATTERN_GLOB ${ARCADIA_ROOT}/${IMPORT_PATH}/${DIR}/**/* EXCLUDE ${ARCADIA_ROOT}/${IMPORT_PATH}/${DIR}/**/_* ${ARCADIA_ROOT}/${IMPORT_PATH}/${DIR}/**/.*)
+ SET_APPEND(_GO_EMBED_VALUE ++embed$XTEST $DIR \$$_PATTERN_GLOB)
+ SET_APPEND(_GO_EMBED_INPUTS \$$_PATTERN_GLOB)
+}
+
+# tag:go-specific
+### @usage: GO_EMBED_DIR(DIR)
+###
+### Define an embed directory DIR.
+macro GO_EMBED_DIR(DIR) {
+ _GO_EMBED_DIR($DIR $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific
+### @usage: GO_TEST_EMBED_DIR(DIR)
+###
+### Define an embed directory DIR for internal go tests.
+macro GO_EMBED_TEST_DIR(DIR) {
+ _GO_EMBED_DIR($DIR $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific
+### @usage: GO_XTEST_EMBED_DIR(DIR)
+###
+### Define an embed directory DIR for external go tests.
+macro GO_EMBED_XTEST_DIR(DIR) {
+ _GO_EMBED_DIR(XTEST $DIR $_GO_IMPORT_PATH)
+}
+
+# tag:go-specific
+_GO_TOOLCHAIN_ENV_GOARCH=unknown
+when ($ARCH_ARM64) {
+ _GO_TOOLCHAIN_ENV_GOARCH=${env:"GOARCH=arm64"}
+}
+elsewhen ($ARCH_X86_64) {
+ _GO_TOOLCHAIN_ENV_GOARCH=${env:"GOARCH=amd64"}
+}
+
+# tag:go-specific
+_GO_TOOLCHAIN_ENV_GOOS=unknown
+when ($OS_DARWIN) {
+ _GO_TOOLCHAIN_ENV_GOOS=${env:"GOOS=darwin"}
+}
+elsewhen ($OS_LINUX) {
+ _GO_TOOLCHAIN_ENV_GOOS=${env:"GOOS=linux"}
+}
+elsewhen ($OS_WINDOWS) {
+ _GO_TOOLCHAIN_ENV_GOOS=${env:"GOOS=windows"}
+}
+_GO_TOOLCHAIN_ENV_PATH=
+
+# tag:go-specific
+GO_TOOLCHAIN_ENV=$TOOLCHAIN_ENV $_GO_TOOLCHAIN_ENV_GOARCH $_GO_TOOLCHAIN_ENV_GOOS $_GO_TOOLCHAIN_ENV_PATH
+
+# tag:go-specific
+_GO_GRPC_WELLKNOWN=\
+ vendor/google.golang.org/grpc \
+ vendor/google.golang.org/grpc \
+ vendor/google.golang.org/grpc/codes \
+ vendor/google.golang.org/grpc/grpclog \
+ vendor/google.golang.org/grpc/status
+
+# tag:go-specific
+macro _GO_GRPC() {
+ SET(GO_PROTO_GEN_PLUGINS grpc)
+ PEERDIR(${GOSTD}/context ${_GO_GRPC_WELLKNOWN})
+}
+
+# tag:go-specific
+### @usage: GO_GRPC_GATEWAY_SRCS()
+###
+### Use of grpc-gateway plugin (Supported for Go only).
+macro GO_GRPC_GATEWAY_SRCS(FILE...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:go-specific
+### @usage: GO_GRPC_GATEWAY_SWAGGER_SRCS()
+###
+### Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
+macro GO_GRPC_GATEWAY_SWAGGER_SRCS(FILE...) {
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
+}
+
+# tag:go-specific
+_GO_PROTO_GRPC_GATEWAY_OPTS=
+_GO_PROTO_GRPC_GATEWAY_OUTS=
+
+# tag:go-specific
+macro _GO_GRPC_GATEWAY_SRCS_IMPL(Files...) {
+ foreach (File : $Files) {
+ [.proto]=$_GO_PROTO_CMD_IMPL($File OPTS $_GO_PROTO_GRPC_GATEWAY_OPTS OUTS $_GO_PROTO_GRPC_GATEWAY_OUTS)
+ }
+
+ PEERDIR(${GOSTD}/context ${GOSTD}/io ${GOSTD}/net/http)
+ PEERDIR(vendor/github.com/golang/protobuf/descriptor)
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/runtime)
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/utilities)
+ PEERDIR(vendor/google.golang.org/grpc/metadata)
+}
+
+# tag:go-specific
+macro _SETUP_GO_GRPC_GATEWAY() {
+ SET(_GO_PROTO_GRPC_GATEWAY_OPTS $_PROTO_PLUGIN_ARGS_BASE(go_grpc_gw vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway allow_repeated_fields_in_body=true:))
+ SET(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;nopath;noext;suf=.pb.gw.go:File})
+}
+
+# tag:go-specific
+macro _GO_GRPC_GATEWAY_SRCS(Files...) {
+ _SETUP_GO_GRPC_GATEWAY()
+ _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
+}
+
+# tag:go-specific
+macro _GO_GRPC_GATEWAY_SWAGGER_SRCS(Files...) {
+ _SETUP_GO_GRPC_GATEWAY()
+ SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OPTS $_PROTO_PLUGIN_ARGS_BASE(swagger vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger logtostderr=true:))
+ SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;noauto;nopath;noext;suf=.swagger.json:File})
+
+ _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
+}
+
+# tag:go-specific
+when ($MUSL == "yes") {
+ _GO_DEFAULT_ALLOCATOR=$DEFAULT_ALLOCATOR
+}
+otherwise {
+ _GO_DEFAULT_ALLOCATOR=FAKE
+}
+
+# tag:go-specific tag:internal
+### @usage _GO_BASE_UNIT # internal
+###
+### The base module of all golang modules. Defines common properties, dependencies and rules for go build.
+module _GO_BASE_UNIT: _BASE_UNIT {
+ .EXTS=.go .gosrc .o .obj .a .symabis .mf
+ .CMD=TOUCH_UNIT
+ .NODE_TYPE=Bundle
+ .GLOBAL=GO_LDFLAGS
+ .PEERDIR_POLICY=as_build_from
+ .ALIASES=SRCS=_GO_SRCS RESOURCE=_GO_RESOURCE GO_TEST_SRCS=_GO_UNUSED_SRCS GO_XTEST_SRCS=_GO_UNUSED_SRCS GRPC=_GO_GRPC GO_GRPC_GATEWAY_SRCS=_GO_GRPC_GATEWAY_SRCS GO_GRPC_GATEWAY_SWAGGER_SRCS=_GO_GRPC_GATEWAY_SWAGGER_SRCS CFLAGS=CGO_CFLAGS GO_TEST_EMBED_PATTERN=_GO_UNUSED_SRCS GO_XTEST_EMBED_PATTERN=_GO_UNUSED_SRCS GO_TEST_EMBED_DIR=_GO_UNUSED_SRCS GO_XTEST_EMBED_DIR=_GO_UNUSED_SRCS
+ .ALLOWED=GO_PROTO_PLUGIN USE_CXX USE_UTIL RESOURCE_FILES
+ .IGNORED=GO_SKIP_TESTS USE_SKIFF
+
+ ENABLE(_GO_MODULE)
+ SET(MODULE_TAG GO)
+ PEERDIR_TAGS=GO GO_PROTO GO_FBS __EMPTY__
+ DEFAULT(_GO_VET_TOOL)
+ DEFAULT(_GO_VET_FLAGS)
+ DEFAULT(_GO_VET_EXTS)
+ DEFAULT(_GO_SONAME)
+
+ NO_RUNTIME()
+
+ SET(COVERAGE_FLAGS)
+ SET(EXTRA_OUTPUT)
+ SET(MODULE_LANG GO)
+
+ PEERDIR(build/external_resources/go_tools)
+
+ GO_PROTO_OUTS+=${output;hide;norel;nopath;noext;suf=.pb.go:File}
+
+ when ($COMPILER_PLATFORM && $NEED_PLATFORM_PEERDIRS == "yes") {
+ PEERDIR+=$COMPILER_PLATFORM
+ }
+
+ when ($CLANG == "yes" || $GCC == "yes") {
+ CGO_CFLAGS_VALUE += -w -pthread -fpic
+ CGO2_CFLAGS_VALUE += -Wno-unused-variable
+ }
+
+ select ($GO_VET) {
+ "yes" | "on" ? {
+ _GO_VET=yes
+ _GO_VET_FLAGS+=-cgocall=false
+ }
+ "yndexer" ? {
+ _GO_VET=yes
+ PEERDIR+=build/external_resources/goyndexer
+ _GO_VET_TOOL=${GOYNDEXER_RESOURCE_GLOBAL}/goyndexer
+ _GO_YDX_FILE=++ydx-file ${_GO_YNDEXER_EXT}
+ _GO_VET_FLAGS=-indexer.arc ${ARCADIA_ROOT} -indexer.indexfile ${GO_YNDEXER_OUTPUT} -indexer.loglevel info
+ _GO_FMT_ADD_CHECK=no
+ _GO_VET_ADD_CHECK=no
+ GO_VET_INFO_EXT=.ydx.out
+ GO_VET_REPORT_EXT=.ydx.txt
+ _GO_VET_EXTS=++vet-info-ext .ydx.out ++vet-report-ext .ydx.txt
+ _GO_CGO1_WRAPPER_FLAGS=--build-prefix=__ARCADIA_BUILD_ROOT_PREFIX__ --source-prefix=__ARCADIA_SOURCE_ROOT_PREFIX__
+ }
+ "yolint" ? {
+ _GO_VET=yes
+ PEERDIR+=build/external_resources/yolint
+ _GO_VET_TOOL=${YOLINT_RESOURCE_GLOBAL}/yolint
+ _GO_VET_FLAGS=-migration.config=${input:"${ARCADIA_ROOT}/build/rules/go/migrations.yaml"} -importcheck=false -SA1019=false -copyproto=false -bodyclose=false -rowserrcheck=false -ytcheck=false
+ }
+ "yolint_next" ? {
+ _GO_VET=yes
+ PEERDIR+=build/external_resources/yolint
+ _GO_VET_TOOL=${YOLINT_NEXT_RESOURCE_GLOBAL}/yolint
+ _GO_VET_FLAGS=-copyproto=false
+ }
+ "local" ? {
+ _GO_VET=yes
+ _GO_VET_FLAGS=
+ }
+ default ? {
+ _GO_VET=no
+ _GO_VET_FLAGS=
+ }
+ }
+ SET(_GO_VET $_GO_VET)
+
+ when ($GO_VET_TOOL == "") {
+ _GO_VET_TOOL_REAL=$_GO_VET_TOOL
+ }
+ otherwise {
+ _GO_VET_TOOL_REAL=$GO_VET_TOOL
+ }
+
+ when ($GO_VET_FLAGS == "") {
+ _GO_VET_FLAGS_REAL=$_GO_VET_FLAGS
+ }
+ otherwise {
+ _GO_VET_FLAGS_REAL=$GO_VET_FLAGS
+ }
+
+ when ($_GO_VET == "yes" && $NO_GO_VET != "yes") {
+ GO_VET_OUTPUT=++vet $_GO_VET_TOOL_REAL ++vet-flags $_GO_VET_FLAGS_REAL $GO_VET_EXTRA_FLAGS $GO_VET_OUTPUT_INFO $GO_VET_OUTPUT_REPORT $_GO_VET_EXTS
+ }
+ otherwise {
+ GO_VET_OUTPUT=
+ _GO_VET_ADD_CHECK=no
+ }
+
+ when ($GO_DEBUG_PATH_RELATIVE == "yes") {
+ _GO_DEBUG_PATH__NO_UID__=++debug-root-map source=;build=;tools= ++tools-root $(TOOL_ROOT)
+ _GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__=-trimpath $ARCADIA_ROOT=>;$ARCADIA_BUILD_ROOT=>;$(TOOL_ROOT)=>
+ }
+ otherwise {
+ _GO_DEBUG_PATH__NO_UID__=++debug-root-map source=/-S;build=/-B;tools=/-T ++tools-root $(TOOL_ROOT)
+ _GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__=-trimpath $ARCADIA_ROOT=>/-S;$ARCADIA_BUILD_ROOT=>/-B;$(TOOL_ROOT)=>/-T
+ }
+
+ _GO_PROCESS_SRCS()
+
+ when ($CLANG == "yes") {
+ _GO_EXTLD=clang
+ GO_TOOLCHAIN_ENV += ${env:"CC=clang"}
+ }
+ otherwise {
+ _GO_EXTLD=gcc
+ GO_TOOLCHAIN_ENV += ${env:"CC=gcc"}
+ }
+
+ when ($OS_DARWIN) {
+ PEERDIR+=build/external_resources/go_fake_xcrun
+ GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $LD_SDK_VERSION -undefined dynamic_lookup $C_FLAGS_PLATFORM --sysroot=$MACOS_SDK_RESOURCE_GLOBAL --start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
+ CGO2_LDFLAGS_VALUE += $LD_SDK_VERSION -undefined dynamic_lookup -nodefaultlibs -lc
+ }
+ elsewhen ($OS_LINUX) {
+ GO_EXTLD = ++extld $_GO_EXTLD ++extldflags $_GO_SONAME $C_FLAGS_PLATFORM --sysroot=$OS_SDK_ROOT_RESOURCE_GLOBAL -Wl,--whole-archive ${rootrel;ext=.a:SRCS_GLOBAL} -Wl,--no-whole-archive ${rootrel;ext=.o:SRCS_GLOBAL} --cgo-peers $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
+ CGO2_LDFLAGS_VALUE += -Wl,--unresolved-symbols=ignore-all -nodefaultlibs -lc
+ }
+ otherwise {
+ GO_EXTLD = ++extld $_GO_EXTLD
+ }
+
+ when ($RACE == "yes") {
+ _GO_COMPILE_FLAGS_RACE=-race
+ _GO_LINK_FLAGS_RACE=-race
+ }
+ otherwise {
+ _GO_COMPILE_FLAGS_RACE=
+ _GO_LINK_FLAGS_RACE=
+ }
+
+ when ($PIC == "yes") {
+ _GO_COMPILE_FLAGS_SHARED=-shared
+ _GO_ASM_FLAGS_SHARED=-shared
+ }
+ otherwise {
+ _GO_COMPILE_FLAGS_SHARED=
+ _GO_ASM_FLAGS_SHARED=
+ }
+
+ GO_ASM_FLAGS_VALUE += $_GO_ASM_FLAGS_SHARED
+ GO_COMPILE_FLAGS_VALUE += $_GO_COMPILE_FLAGS_RACE $_GO_COMPILE_FLAGS_SHARED
+ GO_LINK_FLAGS_VALUE += $_GO_LINK_FLAGS_RACE
+
+ ADDINCL(${GOSTD}/runtime)
+}
+
+# tag:go-specific
+### @usage: GO_LIBRARY([name])
+###
+### Go library module definition.
+### Compile Go module as a library suitable for PEERDIR from other Go modules.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_LIBRARY: _GO_BASE_UNIT {
+ .CMD=GO_LINK_LIB
+ .NODE_TYPE=Bundle
+ .FINAL_TARGET=no
+ .ALIASES=GO_REQUIREMENTS=LIB_REQUIREMENTS
+ SET(_GO_TOOL_MODE lib)
+ SET(MODULE_TYPE LIBRARY)
+ _REQUIRE_EXPLICIT_LICENSE(vendor)
+
+ MODULE_SUFFIX=.a
+}
+
+# tag:go-specific
+### @usage: GO_PROGRAM([name])
+###
+### Go program module definition.
+### Compile and link Go module to an executable program.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_PROGRAM: _GO_BASE_UNIT {
+ .CMD=GO_LINK_EXE
+ .NODE_TYPE=Bundle
+ .SYMLINK_POLICY=EXE
+ .ALLOWED=INDUCED_DEPS
+ .FINAL_TARGET=yes
+ .ALIASES=GO_REQUIREMENTS=LD_REQUIREMENTS
+ SET(_GO_TOOL_MODE exe)
+ SET(MODULE_TYPE PROGRAM)
+ SET(GO_VET_OUTPUT_INFO)
+
+ ALLOCATOR($_GO_DEFAULT_ALLOCATOR)
+
+ _USE_LINKER()
+
+ ENABLE(COMMON_LINK_SETTINGS)
+
+ when ($MUSL == "yes") {
+ PEERDIR += contrib/libs/musl/full
+ }
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.exe
+ }
+
+ PEERDIR(${GOSTD}/runtime library/go/core/buildinfo)
+
+ when ($RACE == "yes") {
+ PEERDIR += ${GOSTD}/runtime/cgo
+ PEERDIR += ${GOSTD}/runtime/race
+ }
+
+ when ($MUSL == "yes") {
+ GO_WITH_MUSL = ++musl
+ }
+}
+
+# tag:go-specific
+module _GO_DLL_BASE_UNIT: GO_PROGRAM {
+ .CMD=GO_LINK_DLL
+ .SYMLINK_POLICY=SO
+ .ALLOWED=WHOLE_ARCHIVE
+ SET(_GO_TOOL_MODE dll)
+ SET(MODULE_TYPE DLL)
+
+ GO_PACKAGE_NAME(main)
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.dll
+ }
+ elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.dylib$MODULE_VERSION
+ }
+ otherwise {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.so$MODULE_VERSION
+ }
+
+ when ($OS_DARWIN) {
+ _GO_SONAME=-Wl,-install_name,$SONAME
+ }
+ elsewhen ($OS_LINUX) {
+ _GO_SONAME=-Wl,-soname,$SONAME
+ }
+
+ when ($MODULE_VERSION) {
+ when ($OS_LINUX || $OS_DARWIN) {
+ _GO_LINK_EXE_EXT_CMD+= && $LINK_OR_COPY_CMD $TARGET ${output;nopath;noext:SONAME}
+ }
+ }
+}
+
+# tag:go-specific
+### @usage: GO_DLL(name major_ver [minor_ver] [PREFIX prefix])
+###
+### Go ishared object module definition.
+### Compile and link Go module to a shared object.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_DLL: _GO_DLL_BASE_UNIT {
+}
+
+# tag:go-specific tag:test
+### @usage: GO_BENCH_TIMEOUT(x)
+###
+### Sets timeout in seconds for 1 Benchmark in go benchmark suite
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro GO_BENCH_TIMEOUT(bench_timeout) {
+ SET(GO_BENCH_TIMEOUT $bench_timeout)
+}
+
+# tag:go-specific tag:test
+### @usage: GO_TEST([name])
+###
+### Go test module definition.
+### Compile and link Go module as a test suitable for running with Arcadia testing support.
+### All usual testing support macros like DATA, DEPENDS, SIZE, REQUIREMENTS etc. are supported.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_TEST: GO_PROGRAM {
+ .CMD=GO_LINK_TEST
+ .ALIASES=GO_TEST_SRCS=GO_TEST_SRCS GO_XTEST_SRCS=GO_XTEST_SRCS GO_TEST_EMBED_PATTERN=GO_TEST_EMBED_PATTERN GO_XTEST_EMBED_PATTERN=GO_XTEST_EMBED_PATTERN GO_TEST_EMBED_DIR=GO_TEST_EMBED_DIR GO_XTEST_EMBED_DIR=GO_XTEST_EMBED_DIR
+ .ALLOWED=GO_SKIP_TESTS YT_SPEC
+ .FINAL_TARGET=no
+ SET(_GO_TOOL_MODE test)
+ SET(MODULE_TYPE PROGRAM)
+ ENABLE(GO_TEST_MODULE)
+ SET(GO_COVER_INFO_VALUE)
+
+ # We have to add uncoditionaly PEERDIR to ${GOSTD}/os here thouth it is really
+ # needed when TestMain is defined in the source code of the test
+ PEERDIR(${GOSTD}/os)
+
+ PEERDIR(${GOSTD}/testing/internal/testdeps)
+ PEERDIR(${GOSTD}/testing)
+
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.test)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.bench)
+
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+# tag:go-specific
+macro GO_MOCKGEN_FROM(Path) {
+ SET(MOCKGEN_FROM ${Path})
+}
+
+# tag:go-specific
+macro GO_MOCKGEN_TYPES(First, Rest...) {
+ SET(MOCKGEN_FIRST $First)
+ SET(MOCKGEN_REST $Rest)
+}
+
+# tag:go-specific
+macro GO_MOCKGEN_REFLECT() {
+ PEERDIR(${GOSTD}/encoding/gob)
+ PEERDIR(${GOSTD}/flag)
+ PEERDIR(${GOSTD}/fmt)
+ PEERDIR(${GOSTD}/os)
+ PEERDIR(${GOSTD}/path)
+ PEERDIR(${GOSTD}/reflect)
+ PEERDIR(vendor/github.com/golang/mock/mockgen/model)
+ PEERDIR(${MOCKGEN_FROM})
+
+ RUN_PROGRAM(vendor/github.com/golang/mock/mockgen -prog_only a.yandex-team.ru/${MOCKGEN_FROM} $MOCKGEN_FIRST${pre=$__COMMA__:MOCKGEN_REST} STDOUT main.go)
+}
+
+# tag:go-specific
+macro GO_MOCKGEN_MOCKS() {
+ PEERDIR(${GOSTD}/reflect)
+ PEERDIR(vendor/github.com/golang/mock/gomock)
+
+ RUN_PROGRAM(vendor/github.com/golang/mock/mockgen -package mocks -exec_only ${BINDIR}/gen/gen a.yandex-team.ru/${MOCKGEN_FROM} $MOCKGEN_FIRST${pre=$__COMMA__:MOCKGEN_REST} TOOL ${MODDIR}/gen STDOUT mocks.go)
+}
+
+# tag:java-specific
+JAVA_IGNORE_CLASSPATH_CLASH_VALUE=
+### @usage: JAVA_IGNORE_CLASSPATH_CLASH_FOR([classes])
+### Ignore classpath clash test fails for classes
+macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) {
+ SET_APPEND(JAVA_IGNORE_CLASSPATH_CLASH_VALUE $Args)
+}
+
+# tag:python-specific
+### @usage: PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...)
+###
+### Build specified Python sources according to Arcadia binary Python build. Basically creates precompiled and source resources keyed with module paths.
+### The resources eventually are linked into final program and can be accessed as regular Python modules.
+### This custom loader linked into the program will add them to sys.meta_path.
+###
+### PY_SRCS also support .proto, .ev, .pyx and .swg files. The .proto and .ev are compiled to .py-code by protoc and than handled as usual .py files.
+### .pyx and .swg lead to C/C++ Python extensions generation, that are automatically registered in Python as built-in modules.
+###
+### By default .pyx files are built as C++-extensions. Use CYTHON_C to build them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace).
+###
+### __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh.
+###
+### @example
+###
+### PY2_LIBRARY(mymodule)
+### PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
+### END()
+###
+### PY_SRCS honors Python2 and Python3 differences and adjusts itself to Python version of a current module.
+### PY_SRCS can be used in any Arcadia Python build modules like PY*_LIBRARY, PY*_PROGRAM, PY*TEST.
+### PY_SRCS in LIBRARY or PROGRAM effectively converts these into PY2_LIBRARY and PY2_PROGRAM respectively.
+### It is strongly advised to make this conversion explicit. Never use PY_SRCS in a LIBRARY if you plan to use it from external Python extension module.
+###
+### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
+macro PY_SRCS() {
+ DEFAULT(MODULE_TAG PY2)
+ DEFAULT(PYTHON2 yes)
+ DEFAULT(PYTHON3 no)
+}
+
+# tag:python-specific
+_ALL_PY_FILES=
+
+# tag:python-specific
+macro _ALL_PY_SRCS2(TOP_LEVEL?"TOP_LEVEL":"", RECURSIVE?"/**":"", NAMESPACE[], REST[]) {
+ _GLOB(_ALL_PY_FILES ${suf=${RECURSIVE}/*.py:REST} ${suf=${RECURSIVE}/ya.make:REST} EXCLUDE ya.make)
+ PY_SRCS(_MR ${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} $_ALL_PY_FILES)
+}
+
+# tag:python-specific
+### @usage: ALL_PY_SRCS([RECURSIVE] { | TOP_LEVEL | NAMESPACE ns} [Dirs...])
+###
+### Puts all .py-files from given Dirs (relative to projects') into PY_SRCS of the current module.
+### If Dirs is ommitted project directory is used
+###
+### `RECURSIVE` makes lookup recursive with resprect to Dirs
+### `TOP_LEVEL` and `NAMESPACE` are forwarded to `PY_SRCS`
+###
+### Note: Only one such macro per module is allowed
+### Note: Macro is designed to reject any ya.make files in Dirs except current one
+###
+### @see [PY_SRCS()](#macro_PY_SRCS)
+macro ALL_PY_SRCS(TOP_LEVEL?"TOP_LEVEL":"", NAMESPACE="", RECURSIVE?"RECURSIVE":"", Files...) {
+ _ALL_PY_SRCS2(${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} ${RECURSIVE} REST .${pre=/:Files})
+}
+
+# tag:python-specific
+_PY_EXTRA_LINT_FILES_VALUE=
+### @usage: PY_EXTRA_LINT_FILES(files...)
+###
+### Add extra Python files for linting. This macro allows adding
+### Python files which has no .py extension.
+macro PY_EXTRA_LINT_FILES(FILES...) {
+ SET_APPEND(_PY_EXTRA_LINT_FILES_VALUE $FILES)
+}
+
+# tag:python-specific
+### @usage: PY23_LIBRARY([name])
+###
+### Build PY2_LIBRARY or PY3_LIBRARY depending on incoming PEERDIR.
+### Direct build or build by RECURSE creates both variants.
+### This multimodule doesn't define any final targets, so use from DEPENDS or BUNDLE is not allowed.
+###
+### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs
+multimodule PY23_LIBRARY {
+ module PY2: PY2_LIBRARY {
+ OBJ_SUF=.py2
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ }
+ module PY3: PY3_LIBRARY {
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
+ OBJ_SUF=.py3
+ }
+}
+
+# tag:python-specific
+### @usage: PY23_NATIVE_LIBRARY([name])
+###
+### Build LIBRARY compatible with either Python 2.x or Python 3.x depending on incoming PEERDIR.
+###
+### This multimodule doesn't depend on Arcadia Python binary build. It is intended only for C++ code and cannot contain PY_SRCS and USE_PYTHON2 macros.
+### Use these multimodule instead of PY23_LIBRARY if the C++ extension defined in it will be used in PY2MODULE.
+### While it doesn't bring Arcadia Python dependency itself, it is still compatible with Arcadia Python build and can be PEERDIR-ed from PY2_LIBRARY and alikes.
+### Proper version will be selected according to Python version of the module PEERDIR comes from.
+###
+### This mulrtimodule doesn't define any final targets so cannot be used from DEPENDS or BUNDLE macros.
+###
+### For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary
+###
+### @see [LIBRARY()](#module_LIBRARY), [PY2MODULE()](#module_PY2MODULE)
+multimodule PY23_NATIVE_LIBRARY {
+ module PY2: LIBRARY {
+ .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL
+ OBJ_SUF=.py2
+ PYTHON2_ADDINCL()
+ SET(MODULE_LANG PY2)
+ }
+ module PY3: LIBRARY {
+ .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3
+ .ALIASES=PYTHON2_ADDINCL=PYTHON3_ADDINCL
+ PYTHON3_ADDINCL()
+ SET(MODULE_LANG PY3)
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3c
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3c
+ }
+ OBJ_SUF=.py3
+ }
+}
+
+IBTOOL_PATH=$XCODE_TOOLS_ROOT_RESOURCE_GLOBAL/Xcode/Contents/Developer/usr/bin/ibtool
+# tag:src-processing
+STORYBOARD_FLAGS=--errors --warnings --notices --auto-activate-custom-fonts --output-format human-readable-text
+macro _SRC("storyboard", SRC, SRCFLAGS...) {
+ .CMD=$IBTOOL_PATH $STORYBOARD_FLAGS --module $REALPRJNAME --output-partial-info-plist ${output;suf=.partial_plist:SRC} --compilation-directory $BINDIR ${input:SRC} && $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;tobindir;suf=.compiled_storyboard_tar:SRC} $BINDIR/${nopath;suf=c:SRC} $BINDIR/${nopath;suf=c:SRC}
+}
+
+# tag:src-processing
+macro _SRC("xib", SRC, SRCFLAGS...) {
+ .CMD=$IBTOOL_PATH $STORYBOARD_FLAGS --module $REALPRJNAME --output-partial-info-plist ${output;suf=.partial_plist:SRC} --compile ${output;tobindir;nopath;noext;suf=.nib:SRC} ${input:SRC}
+}
+
+ACTOOL_PATH=$XCODE_TOOLS_ROOT_RESOURCE_GLOBAL/Xcode/Contents/Developer/usr/bin/ibtool
+# tag:ios-specific
+ASSETS_FLAGS=--output-format human-readable-text --notices --warnings
+macro _IOS_ASSETS(AssetsDir, Content...) {
+ .CMD=$FS_TOOLS md $BINDIR/$REALPRJNAME && $ACTOOL_PATH $ASSETS_FLAGS --export-dependency-info $BINDIR/assetcatalog_dependencies --output-partial-info-plist ${output:"assetcatalog_generated_info.partial_plist"} --product-type com.apple.product-type.application --compile $BINDIR/$REALPRJNAME $AssetsDir ${input;hide:Content} && ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;suf=_assetes.resource_tar:REALPRJNAME} $REALPRJNAME $REALPRJNAME
+}
+
+# tag:ios-specific
+macro IOS_APP_COMMON_FLAGS(Flags...) {
+ SET_APPEND(STORYBOARD_FLAGS $Flags)
+ SET_APPEND(ASSETS_FLAGS $Flags)
+}
+
+# tag:ios-specific
+macro IOS_APP_ASSETS_FLAGS(Flags...) {
+ SET_APPEND(ASSETS_FLAGS $Flags)
+}
+
+macro DARWIN_STRINGS_RESOURCE(Resource, Relpath) {
+ .CMD=$COPY_CMD ${input:Resource} $BINDIR/$Relpath && $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;tobindir;suf=.strings_tar:Relpath} $BINDIR/$Relpath $BINDIR
+}
+
+macro DARWIN_SIGNED_RESOURCE(Resource, Relpath) {
+ .CMD=$COPY_CMD $Resource $BINDIR/$Relpath && $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;tobindir;suf=.signed_resource_tar:Relpath} $BINDIR/$Relpath $BINDIR
+}
+
+# tag:ios-specific
+DELIM=__DELIM__
+PACK_IOS_ARCHIVE=$GENERATE_MF && $YMAKE_PYTHON ${input:"build/scripts/ios_wrapper.py"} bin $IBTOOL_PATH $TARGET $REALPRJNAME $BINDIR $DELIM $AUTO_INPUT $DELIM $STORYBOARD_FLAGS
+### @usage: IOS_INTERFACE()
+### iOS GUI module definition
+module IOS_INTERFACE: _BARE_UNIT {
+ .CMD=PACK_IOS_ARCHIVE
+ .EXTS=.compiled_storyboard_tar .partial_plist .plist .xcent .nib .resource_tar .signed_resource_tar .strings_tar .plist_json
+ .NODE_TYPE=Library
+ .FINAL_TARGET=no
+ SET(MODULE_SUFFIX .ios.interface)
+
+ PEERDIR+=build/platform/xcode/tools
+}
+
+# tag:ios-specific
+module DEFAULT_IOS_INTERFACE: IOS_INTERFACE {
+ SET(MODULE_SUFFIX .default.ios.interface)
+}
+
+DEFAULT_IOS_TYPE=
+IOS_TYPE=
+when(!$IOS_TYPE) {
+ when($DEFAULT_IOS_TYPE) {
+ IOS_TYPE=$DEFAULT_IOS_TYPE
+ }
+ otherwise {
+ IOS_TYPE=com.apple.CoreSimulator.SimDeviceType.iPhone-X
+ }
+}
+DEFAULT_IOS_RUNTIME=
+IOS_RUNTIME=
+when(!$IOS_RUNTIME) {
+ when($DEFAULT_IOS_RUNTIME) {
+ IOS_RUNTIME=$DEFAULT_IOS_RUNTIME
+ }
+ otherwise {
+ IOS_RUNTIME=com.apple.CoreSimulator.SimRuntime.iOS-12-1
+ }
+}
+when ($ARCH_I386) {
+ TEST_IOS_DEVICE_TYPE_VALUE=com.apple.CoreSimulator.SimDeviceType.iPhone-5
+ TEST_IOS_RUNTIME_TYPE_VALUE=com.apple.CoreSimulator.SimRuntime.iOS-10-3
+}
+otherwise {
+ TEST_IOS_DEVICE_TYPE_VALUE=$IOS_TYPE
+ TEST_IOS_RUNTIME_TYPE_VALUE=$IOS_RUNTIME
+}
+
+# tag:java-specific
+### @usage: MODULE_JDK(Version)
+###
+### Specify JDK version for module
+macro JDK_VERSION(Arg) {
+ SET(JDK_VERSION $Arg)
+ _JDK_VERSION_MACRO_CHECK($Arg)
+}
+
+# tag:java-specific
+when ($JDK_VERSION == "10") {
+ JDK10=yes # remove this later
+}
+JAVA_PROGRAM_CP_USE_COMMAND_FILE=yes
+when ($JDK_VERSION == "8") {
+ JAVA_PROGRAM_CP_USE_COMMAND_FILE=no
+}
+
+# tag:kotlin-specific
+KOTLIN_JVM_TARGET=
+when ($JDK_VERSION == "8") {
+ KOTLIN_JVM_TARGET=1.8
+}
+elsewhen ($JDK_VERSION == "18") {
+ # remove when kotlin starts supporting jdk18 bytecode
+ # see also devtools/ya/jbuild/gen/actions/idea.py
+ KOTLIN_JVM_TARGET=17
+}
+otherwise {
+ KOTLIN_JVM_TARGET=$JDK_VERSION
+}
+
+# tag:frontend-specific
+### @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) {
+ _GLOB($Varname $Dir/**/*.(css|ejs|jpg|js|jsx|png|styl|svg|ts|tsx|json|html))
+}
+
+# tag:java-specific
+# local jdk and tools
+USE_SYSTEM_JDK=
+USE_SYSTEM_UBERJAR=
+USE_SYSTEM_ERROR_PRONE=
+
+# tag:swift-specific
+CPP_XCODE_TOOLCHAIN_VERSION=9.2
+SWIFT_XCODE_TOOLCHAIN_VERSION=9.2
+XCODE_TOOLS_VERSION=10.1
+macro COMPILE_SWIFT_MODULE(SRCS{input}[], BRIDGE_HEADER{input}="", Flags...) {
+ when ($BRIDGE_HEADER != "") {
+ SWIFT_BRIDGE_HEADER=-import-objc-header ${input:BRIDGE_HEADER}
+ }
+ otherwise {
+ SWIFT_BRIDGE_HEADER=
+ }
+
+ .PEERDIR+=build/platform/xcode/swift
+ # swift core libraries
+ LDFLAGS($SWIFT_LD_FLAGS)
+
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_swiftc_output_map.py"} $(SOURCE_ROOT) $(BUILD_ROOT) $BINDIR/swift_output_map.json ${input:SRCS} && $SWIFT_COMPILER -c $SWIFT_FLAGS_PLATFORM $Flags $SWIFT_BRIDGE_HEADER ${pre=-Xcc -I:_C__INCLUDE} ${input:SRCS} -emit-objc-header -emit-objc-header-path ${output;suf=-Swift.h:REALPRJNAME} -emit-module -module-name $REALPRJNAME -output-file-map $BINDIR/swift_output_map.json ${output;hide;suf=.o:SRCS}
+}
+
+TEST_TOOL_HOST_LOCAL=
+TEST_TOOL_TARGET_LOCAL=
+
+when ($TENSORFLOW_WITH_CUDA) {
+ CUDA_REQUIRED=yes
+}
+
+when (!$TENSORRT_VERSION) {
+ TENSORRT_VERSION=5
+}
+
+ANDROID_APK_TEST_ACTIVITY_VALUE=com.yandex.test.unittests/.RunTestsActivity
+
+MAVEN_BIN=$MAVEN_RESOURCE_GLOBAL/bin
+
+when ($QT_REQUIRED) {
+ QT_BIN=${HOST_QT_RESOURCE_GLOBAL}/bin
+}
+when ($OPENGL_REQUIRED) {
+ OPENGL_VERSION=18.0.5
+}
+
+# tag:python-specific
+multimodule PY23_TEST {
+ module PY2 : PYTEST_BIN {
+ MODULE_PREFIX=py2_
+ OBJ_SUF=.py2
+ CANONIZE_SUB_PATH=py2test
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ }
+ module PY3TEST_PROGRAM: PY3TEST_BIN {
+ .FINAL_TARGET=yes
+ OBJ_SUF=.py3
+ CANONIZE_SUB_PATH=py3test
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ }
+
+ module PY3TEST_LIBRARY: _PY3_LIBRARY {
+ PEERDIR+=library/python/pytest
+ _REQUIRE_EXPLICIT_LICENSE()
+ RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
+ }
+}
+
+# tag:windows-specific
+WINDOWS_MANIFEST=
+macro WINDOWS_MANIFEST(Manifest) {
+ SET(WINDOWS_MANIFEST $Manifest)
+}
+
+# tag:windows-specific
+when ($MSVC == "yes" && $WINDOWS_MANIFEST) {
+ LDFLAGS+=/MANIFEST:EMBED /MANIFESTINPUT:${input:WINDOWS_MANIFEST}
+}
+
+# tag:cpp-specific
+_VISIBILITY_LEVEL=
+### @usage: VISIBILITY(level)
+###
+### This macro sets visibility level for symbols compiled for the current module. 'level'
+### may take only one of the following values: DEFAULT, HIDDEN.
+macro VISIBILITY(LEVEL) {
+ SET(_VISIBILITY_LEVEL ${LEVEL})
+ select ($LEVEL) {
+ "DEFAULT" | "HIDDEN" ? {
+ }
+ default ? {
+ _OK = no
+ }
+ }
+ ASSERT(_OK Unsupported value [$LEVEL] passed to VISIBILITY macro, expected values are DEFAULT, HIDDEN.)
+}
+
+# tag:cpp-specific
+_CFLAGS_VISIBILITY=
+when ($_VISIBILITY_LEVEL != "" && $IGNORE_VISIBILITY != "yes") {
+ when ($CLANG == "yes" || $GCC == "yes") {
+ _CFLAGS_VISIBILITY=-fvisibility=${tolower:_VISIBILITY_LEVEL}
+ }
+}
+CFLAGS+=$_CFLAGS_VISIBILITY
+
+# tag:cpp-specific
+macro SDBUS_CPP_ADAPTOR(File) {
+ .CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --adaptor=${output;nopath;noext:File.adaptor.h} ${input:File}
+ .PEERDIR=contrib/libs/sdbus-cpp
+}
+
+# tag:cpp-specific
+macro SDBUS_CPP_PROXY(File) {
+ .CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --proxy=${output;nopath;noext:File.proxy.h} ${input:File}
+ .PEERDIR=contrib/libs/sdbus-cpp
+}
+
+
+# tag:python-specific
+macro _PY_SSQLS_SRC(EXT, SRC, SRCFLAGS...) {
+ #generic macro
+}
+
+# tag:python-specific
+macro _PY_SSQLS_SRC("ssqls", SRC, SRCFLAGS...) {
+ .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT -L "python" -D $MODDIR $SRCFLAGS ${output;tobindir;noext;hide;pre=autogenerated/$MODDIR/:SRC.py}
+}
+
+# tag:python-specific
+macro _PY_SSQLS_SRCS(Srcs...) {
+ foreach(Src: $Srcs) {
+ _PY_SSQLS_SRC(${lastext:Src} $Src)
+ }
+}
+
+# tag:python-specific
+macro PY_SSQLS_SRCS(Srcs...) {
+ _PY_SSQLS_SRCS(KEEP_DIR_STRUCT $Srcs)
+ PY_SRCS(${noext;pre=autogenerated/$MODDIR/:Srcs.py})
+}
+
+# tag:python-specific
+macro _PY_ENUM_SERIALIZATION_TO_JSON(File) {
+ .CMD=$ENUM_PARSER_TOOL ${input:File} --output ${output;chksum;noext;suf=.generated.h:File} --json-output ${output;noext:File.json} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+}
+
+# tag:python-specific
+macro _PY_ENUM_SERIALIZATION_TO_PY(File) {
+ .CMD=${tool:"metrika/core/tools/python_enum_generator"} ${input;noext:File.json} -D ${MODDIR} --output ${output;noext:File.py} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
+}
+
+# tag:metrika
+multimodule SSQLS_LIBRARY {
+ module CPP_SSQLS : LIBRARY {
+ .ALIASES=ENUMS_SERIALIZATION=CPP_ENUMS_SERIALIZATION
+ SET(PEERDIR_TAGS CPP_SSQLS)
+ PEERDIR(metrika/core/libs/appmetrica/types metrika/core/libs/types)
+ ADDINCL(GLOBAL ${ARCADIA_BUILD_ROOT}/metrika/core/common_tables/include)
+ }
+ module PY3_SSQLS : PY3_LIBRARY {
+ .ALIASES=SRCS=PY_SSQLS_SRCS ENUMS_SERIALIZATION=PY_ENUMS_SERIALIZATION
+ SET(PEERDIR_TAGS PY3 PY3_SSQLS)
+ }
+}
+
+macro NGINX_MODULES(Modules...) {
+ PEERDIR(${Modules})
+ RUN_PROGRAM(nginx/module_gen ${Modules} CWD ${ARCADIA_ROOT} IN ${suf=/modules.json:Modules} OUTPUT_INCLUDES contrib/nginx/core/src/core/ngx_config.h contrib/nginx/core/src/core/ngx_core.h STDOUT ngx_modules.c)
+}
+
+# Experimental: container as output. https://st.yandex-team.ru/DTCC-179
+
+# tag:external-build
+CONTAINER_LAYER_CMD=$YMAKE_PYTHON ${input:"devtools/experimental/solar/selfcontainer/scripts/make_container_layer.py"} -o $TARGET $AUTO_INPUT ${cwd:ARCADIA_BUILD_ROOT} ${kv;hide:"p CL"} ${kv;hide:"pc blue"}
+CONTAINER_CMD=$YMAKE_PYTHON ${input:"devtools/experimental/solar/selfcontainer/scripts/make_container.py"} -o $TARGET ${rootrel:PEERS} ${cwd:ARCADIA_BUILD_ROOT} ${kv;hide:"p CN"} ${kv;hide:"pc blue"}
+
+# tag:external-build
+module CONTAINER_LAYER: _BARE_UNIT {
+ .CMD=CONTAINER_LAYER_CMD
+
+ MODULE_SUFFIX=.container_layer
+}
+
+# tag:external-build
+module CONTAINER: _BARE_UNIT {
+ .NODE_TYPE=Bundle
+ .PEERDIR_POLICY=as_build_from
+ .FINAL_TARGET=yes
+ .CMD=CONTAINER_CMD
+}
+
+# tag:external-build
+CUSTOM_BUILD_LIBRARY_USE=
+CUSTOM_BUILD_LIBRARY_CMD=$GENERATE_MF && ${tool:"devtools/experimental/solar/outbuild/runner"} ${hide:PEERS} --script=${input:CUSTOM_SCRIPT} --output $TARGET --python=${tool:"contrib/tools/python3"} --isolator=${tool:"devtools/experimental/solar/outbuild/isolator"} $CUSTOM_BUILD_LIBRARY_USE
+
+# tag:external-build
+module CUSTOM_BUILD_LIBRARY: LIBRARY {
+ .NODE_TYPE=Bundle
+ .PEERDIR_POLICY=as_build_from
+ .PROXY=yes
+ .CMD=CUSTOM_BUILD_LIBRARY_CMD
+ DISABLE(NEED_ADD_FAKE_SRC)
+}
+
+### @usage: ORIGINAL_SOURCE(Source)
+###
+### This macro specifies the source repository for contrib
+### Does nothing now (just a placeholder for future functionality)
+### See https://st.yandex-team.ru/DTCC-316
+macro ORIGINAL_SOURCE(Source) {
+ ENABLE(UNUSED_MACRO)
+}
+
+CMAKE_PACKAGE=
+CMAKE_PACKAGE_COMPONENT=
+CMAKE_PACKAGE_TARGET=
+CONAN_REFERENCE=
+### @usage: OPENSOURCE_EXPORT_REPLACEMENT(CMAKE PkgName CMAKE_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE_COMPONENT OptCmakePkgComponent)
+###
+### Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
+### for opensource publication.
+macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENET[], CONAN[]) {
+ SET(CMAKE_PACKAGE $CMAKE)
+ SET(CMAKE_PACKAGE_COMPONENT $CMAKE_COMPONENET)
+ SET(CMAKE_LINK_TARGET $CMAKE_TARGET)
+ SET(CONAN_REFERENCE $CONAN)
+}
+
+# tag:licence
+CREDITS_FILE_EXTRA_EXT=
+CREDITS_FLAGS=
+CREDITS_TEXTS_FILE=
+NO_CREDITS_TEXTS_FILE=
+WITH_CREDITS=
+### @usage: LICENSE_TEXTS(File)
+###
+### This macro specifies the filename with all library licenses texts
+macro LICENSE_TEXTS(Source) {
+ SET(CREDITS_TEXTS_FILE $Source)
+}
+
+# tag:licence
+### @usage: WITHOUT_LICENSE_TEXTS()
+###
+### This macro indicates that the module has no license text
+macro WITHOUT_LICENSE_TEXTS() {
+ ENABLE(NO_CREDITS_TEXTS_FILE)
+}
+
+# tag:licence
+when ($WITH_CREDITS) {
+ CREDITS_FLAGS+=--credits-output ${output;suf=${CREDITS_FILE_EXTRA_EXT}".CREDITS.txt":REALPRJNAME}
+}
+
+GENERATE_MF=
+when ($WITH_CREDITS) {
+ GENERATE_MF=$GENERATE_MF_CMD
+}
+
+macro _MCU_CONVERT(Bin) {
+ .CMD=${cwd:BINDIR} $OBJCOPY_TOOL -O ihex $Bin ${output;noext:Bin.hex} && ${cwd:BINDIR} $OBJCOPY_TOOL -O srec $Bin ${output;noext:Bin.s37}
+}
+
+MCU_LINK_EXE=$LINK_EXE && $_MCU_CONVERT($MODULE_PREFIX$REALPRJNAME)
+
+### @usage: MCU_PROGRAM([progname])
+###
+### Program module for microcontrollers. Converts binary to Intel HEX and Motorola S-record file formats.
+### If name is not specified it will be generated from the name of the containing project directory.
+module MCU_PROGRAM: PROGRAM {
+ .CMD=MCU_LINK_EXE
+}
+
+# tag:deprecated
+### @usage: METAQUERYFILES(filenames...) #deprecated
+###
+### This macro does nothing and will be removed
+macro METAQUERYFILES(Files...) {
+ ENABLE(UNUSED_MACRO)
+}
+
+# tag:flags tag:internal tag:windows-specific
+### @usage: _MSVC_FLAGS_WINDOWS_IMPL(target_platform compiler_flags) # internal
+###
+### Add CFLAGS when the firts argument is WINDOWS
+macro _MSVC_FLAGS_WINDOWS_IMPL(WINDOWS[], FLAGS...) {
+ CFLAGS($WINDOWS)
+}
+
+# tag:flags tag:windows-specific tag:cpp-specific
+### @usage: MSVC_FLAGS([GLOBAL compiler_flag]* compiler_flags)
+###
+### Add the specified flags to the compilation line of C/C++files.
+### Flags apply only if the compiler used is MSVC (cl.exe)
+macro MSVC_FLAGS(FLAGS...) {
+ _MSVC_FLAGS_WINDOWS_IMPL($TARGET_PLATFORM $FLAGS)
+}
+
+### @usage: COLLECT_YDB_API_SPECS_LEGACY(VarName Paths...) #deprecated
+###
+### This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited
+macro COLLECT_YDB_API_SPECS_LEGACY(FILES_VAR, PATHS...) {
+ _GLOB($FILES_VAR ${suf=/*.proto:PATHS})
+ RESTRICT_PATH(kikimr/public/sdk/go/ydb/api MSG This is ugly hack for legacy YDB go API codegen, any other uses are probibited)
+}
+
+
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
new file mode 100755
index 0000000000..819870ed1c
--- /dev/null
+++ b/build/ymake_conf.py
@@ -0,0 +1,3245 @@
+#!/usr/bin/env python
+# coding=utf-8
+
+from __future__ import print_function
+
+import base64
+import itertools
+import json
+import logging
+import ntpath
+import optparse
+import os
+import posixpath
+import re
+import subprocess
+import sys
+import tempfile
+
+import six
+
+logger = logging.getLogger(__name__ if __name__ != '__main__' else 'ymake_conf.py')
+
+
+def init_logger(verbose):
+ logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)
+
+
+class DebugString(object):
+ def __init__(self, get_string_func):
+ self.get_string_func = get_string_func
+
+ def __str__(self):
+ return self.get_string_func()
+
+
+class ConfigureError(Exception):
+ pass
+
+
+class Platform(object):
+ def __init__(self, name, os, arch):
+ """
+ :type name: str
+ :type os: str
+ :type arch: str
+ """
+ self.name = name
+ self.os = self._parse_os(os)
+ self.arch = arch.lower()
+
+ self.is_i386 = self.arch in ('i386', 'x86')
+ self.is_i686 = self.arch == 'i686'
+ self.is_x86 = self.is_i386 or self.is_i686
+ self.is_x86_64 = self.arch in ('x86_64', 'amd64')
+ self.is_intel = self.is_x86 or self.is_x86_64
+
+ self.is_armv7 = self.arch in ('armv7', 'armv7a', 'armv7a_neon', 'arm', 'armv7a_cortex_a9', 'armv7ahf_cortex_a35', 'armv7ahf_cortex_a53')
+ self.is_armv8 = self.arch in ('armv8', 'armv8a', 'arm64', 'aarch64', 'armv8a_cortex_a35', 'armv8a_cortex_a53')
+ self.is_armv8m = self.arch in ('armv8m_cortex_m33',)
+ self.is_arm64 = self.arch in ('arm64',)
+ self.is_arm = self.is_armv7 or self.is_armv8 or self.is_armv8m
+ self.is_armv7_neon = self.arch in ('armv7a_neon', 'armv7a_cortex_a9', 'armv7ahf_cortex_a35', 'armv7ahf_cortex_a53')
+ self.is_armv7hf = self.arch in ('armv7ahf_cortex_a35', 'armv7ahf_cortex_a53')
+
+ self.armv7_float_abi = None
+ if self.is_armv7:
+ if self.is_armv7hf:
+ self.armv7_float_abi = 'hard'
+ else:
+ self.armv7_float_abi = 'softfp'
+
+ self.is_cortex_a9 = self.arch in ('armv7a_cortex_a9',)
+ self.is_cortex_a35 = self.arch in ('armv7ahf_cortex_a35', 'armv8a_cortex_a35')
+ self.is_cortex_a53 = self.arch in ('armv7ahf_cortex_a53', 'armv8a_cortex_a53')
+ self.is_cortex_m33 = self.arch in ('armv8m_cortex_m33',)
+
+ self.is_power8le = self.arch == 'ppc64le'
+ self.is_power9le = self.arch == 'power9le'
+ self.is_powerpc = self.is_power8le or self.is_power9le
+
+ self.is_32_bit = self.is_x86 or self.is_armv7 or self.is_armv8m
+ self.is_64_bit = self.is_x86_64 or self.is_armv8 or self.is_powerpc
+
+ assert self.is_32_bit or self.is_64_bit
+ assert not (self.is_32_bit and self.is_64_bit)
+
+ self.is_linux = self.os == 'linux' or 'yocto' in self.os
+ self.is_linux_x86_64 = self.is_linux and self.is_x86_64
+ self.is_linux_armv8 = self.is_linux and self.is_armv8
+ self.is_linux_armv7 = self.is_linux and self.is_armv7
+ self.is_linux_power8le = self.is_linux and self.is_power8le
+ self.is_linux_power9le = self.is_linux and self.is_power9le
+ self.is_linux_powerpc = self.is_linux_power8le or self.is_linux_power9le
+
+ self.is_macos = self.os == 'macos'
+ self.is_macos_x86_64 = self.is_macos and self.is_x86_64
+ self.is_macos_arm64 = self.is_macos and self.is_arm64
+ self.is_iossim = self.os == 'iossim' or (self.os == 'ios' and self.is_intel)
+ self.is_ios = self.os == 'ios' or self.is_iossim
+ self.is_apple = self.is_macos or self.is_ios
+
+ self.is_windows = self.os == 'windows'
+ self.is_windows_x86_64 = self.is_windows and self.is_x86_64
+
+ self.is_android = self.os == 'android'
+ if self.is_android:
+ # This is default Android API level unless `ANDROID_API` is specified
+ # 18 is the smallest level with OpenGL support
+ # 21 is the smallest level for 64-bit platforms
+ default_android_api = 21 if self.is_64_bit else 18
+ self.android_api = int(preset('ANDROID_API', default_android_api))
+
+ self.is_cygwin = self.os == 'cygwin'
+ self.is_yocto = self.os == 'yocto'
+
+ self.is_none = self.os == 'none'
+
+ self.is_posix = self.is_linux or self.is_apple or self.is_android or self.is_cygwin or self.is_yocto
+
+ @staticmethod
+ def from_json(data):
+ name = data.get('visible_name', data['toolchain'])
+ return Platform(name, os=data['os'], arch=data['arch'])
+
+ @property
+ def os_variables(self):
+ # 'LINUX' variable, for backward compatibility
+ yield self.os.upper()
+
+ # 'OS_LINUX' variable
+ yield 'OS_{}'.format(self.os.upper())
+
+ # yocto is linux
+ if 'yocto' in self.os:
+ yield 'LINUX'
+ yield 'OS_LINUX'
+
+ if self.is_macos:
+ yield 'DARWIN'
+ yield 'OS_DARWIN'
+ if self.is_iossim:
+ yield 'IOS'
+ yield 'OS_IOS'
+ yield 'OS_IOSSIM'
+
+ @property
+ def arch_variables(self):
+ return select_multiple((
+ (self.is_i386 or self.is_i686, 'ARCH_I386'),
+ (self.is_i686, 'ARCH_I686'),
+ (self.is_x86_64, 'ARCH_X86_64'),
+ (self.is_armv7, 'ARCH_ARM7'),
+ (self.is_armv7_neon, 'ARCH_ARM7_NEON'),
+ (self.is_armv8, 'ARCH_ARM64'),
+ (self.is_armv8m, 'ARCH_ARM8M'),
+ (self.is_arm, 'ARCH_ARM'),
+ (self.is_linux_armv8 or self.is_macos_arm64, 'ARCH_AARCH64'),
+ (self.is_powerpc, 'ARCH_PPC64LE'),
+ (self.is_power8le, 'ARCH_POWER8LE'),
+ (self.is_power9le, 'ARCH_POWER9LE'),
+ (self.is_32_bit, 'ARCH_TYPE_32'),
+ (self.is_64_bit, 'ARCH_TYPE_64'),
+ ))
+
+ @property
+ def library_path_variables(self):
+ return ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH']
+
+ def find_in_dict(self, dict_, default=None):
+ if dict_ is None:
+ return default
+ for key in six.iterkeys(dict_):
+ if self._parse_os(key) == self.os:
+ return dict_[key]
+ return default
+
+ @property
+ def os_compat(self):
+ if self.is_macos:
+ return 'DARWIN'
+ else:
+ return self.os.upper()
+
+ def exe(self, *paths):
+ if self.is_windows:
+ return ntpath.join(*itertools.chain(paths[:-1], (paths[-1] + '.exe',)))
+ else:
+ return posixpath.join(*paths)
+
+ def __str__(self):
+ return '{name}-{os}-{arch}'.format(name=self.name, os=self.os, arch=self.arch)
+
+ def __cmp__(self, other):
+ return cmp((self.name, self.os, self.arch), (other.name, other.os, other.arch))
+
+ def __hash__(self):
+ return hash((self.name, self.os, self.arch))
+
+ @staticmethod
+ def _parse_os(os):
+ os = os.lower()
+
+ if os == 'darwin':
+ return 'macos'
+ if os in ('win', 'win32', 'win64'):
+ return 'windows'
+ if os.startswith('cygwin'):
+ return 'cygwin'
+
+ return os
+
+
+def which(prog):
+ if os.path.exists(prog) and os.access(prog, os.X_OK):
+ return prog
+
+ # Ищем в $PATH только простые команды, без путей.
+ if os.path.dirname(prog) != '':
+ return None
+
+ path = os.getenv('PATH', '')
+
+ pathext = os.environ.get('PATHEXT')
+ # На Windows %PATHEXT% указывает на список расширений, которые нужно проверять
+ # при поиске команды в пути. Точное совпадение без расширения имеет приоритет.
+ pathext = [''] if pathext is None else [''] + pathext.lower().split(os.pathsep)
+
+ for dir_ in path.split(os.path.pathsep):
+ for ext in pathext:
+ p = os.path.join(dir_, prog + ext)
+ if os.path.exists(p) and os.path.isfile(p) and os.access(p, os.X_OK):
+ return p
+
+ return None
+
+
+def get_stdout(command):
+ stdout, code = get_stdout_and_code(command)
+ return stdout if code == 0 else None
+
+
+def get_stdout_and_code(command):
+ # noinspection PyBroadException
+ try:
+ process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout, _ = process.communicate()
+ return stdout, process.returncode
+ except Exception:
+ return None, None
+
+
+def to_strings(o):
+ if isinstance(o, (list, tuple)):
+ for s in o:
+ for ss in to_strings(s):
+ yield ss
+ else:
+ if o is not None:
+ if isinstance(o, bool):
+ yield 'yes' if o else 'no'
+ elif isinstance(o, (str, int)):
+ yield str(o)
+ else:
+ raise ConfigureError('Unexpected value {} {}'.format(type(o), o))
+
+
+def emit(key, *value):
+ print('{0}={1}'.format(key, ' '.join(to_strings(value))))
+
+
+def emit_with_comment(comment, key, *value):
+ print('# {}'.format(comment))
+ emit(key, *value)
+
+
+def emit_with_ignore_comment(key, *value):
+ emit_with_comment('IGNORE YMAKE CONF CONTEXT', key, *value)
+
+
+def append(key, *value):
+ print('{0}+={1}'.format(key, ' '.join(to_strings(value))))
+
+
+def emit_big(text):
+ prefix = None
+ first = True
+ for line in text.split('\n'):
+ if prefix is None:
+ if not line:
+ continue
+
+ prefix = 0
+ while prefix < len(line) and line[prefix] == ' ':
+ prefix += 1
+
+ if first: # Be pretty, prepend an empty line before the output
+ print()
+ first = False
+
+ print(line[prefix:])
+
+
+class Variables(dict):
+ def emit(self, with_ignore_comment=[]):
+ with_ignore_comment_set = set(with_ignore_comment)
+ for k in sorted(self.keys()):
+ if k in with_ignore_comment_set:
+ emit_with_ignore_comment(k, self[k])
+ else:
+ emit(k, self[k])
+
+ def update_from_presets(self):
+ for k in six.iterkeys(self):
+ v = preset(k)
+ if v is not None:
+ self[k] = v
+
+ def reset_if_any(self, value_check=None, reset_value=None):
+ if value_check is None:
+ def value_check(v_):
+ return v_ is None
+
+ if any(map(value_check, six.itervalues(self))):
+ for k in six.iterkeys(self):
+ self[k] = reset_value
+
+
+def format_env(env, list_separator=':'):
+ def format_value(value):
+ return value if isinstance(value, str) else ('\\' + list_separator).join(value)
+
+ def format(kv):
+ return '${env:"%s=%s"}' % (kv[0], format_value(kv[1]))
+
+ return ' '.join(map(format, sorted(six.iteritems(env))))
+
+
+# TODO(somov): Проверить, используется ли это. Может быть, выпилить.
+def userify_presets(presets, keys):
+ for key in keys:
+ user_key = 'USER_{}'.format(key)
+ values = [presets.pop(key, None), presets.get(user_key)]
+ presets[user_key] = ' '.join(filter(None, values))
+
+
+def preset(key, default=None):
+ return opts().presets.get(key, default)
+
+
+def is_positive(key):
+ return is_positive_str(preset(key, ''))
+
+
+def is_positive_str(s):
+ return s.lower() in ('yes', 'true', 'on', '1')
+
+
+def is_negative(key):
+ return is_negative_str(preset(key, ''))
+
+
+def is_negative_str(s):
+ return s.lower() in ('no', 'false', 'off', '0')
+
+
+def to_bool(s, default=None):
+ if isinstance(s, six.string_types):
+ if is_positive_str(s):
+ return True
+ if is_negative_str(s):
+ return False
+ if default is None:
+ raise ConfigureError('{} is not a bool value'.format(s))
+ return default
+
+
+def select(selectors, default=None, no_default=False):
+ for enabled, value in selectors:
+ if enabled:
+ return value
+ if no_default:
+ raise ConfigureError()
+ return default
+
+
+def select_multiple(selectors):
+ for enabled, value in selectors:
+ if enabled:
+ yield value
+
+
+def unique(it):
+ known = set()
+ for i in it:
+ if i not in known:
+ known.add(i)
+ yield i
+
+
+class Options(object):
+ def __init__(self, argv):
+ def parse_presets(raw_presets):
+ presets = {}
+ for p in raw_presets:
+ toks = p.split('=', 1)
+ name = toks[0]
+ value = toks[1] if len(toks) >= 2 else ''
+ presets[name] = value
+ return presets
+
+ parser = optparse.OptionParser(add_help_option=False)
+ opt_group = optparse.OptionGroup(parser, 'Conf script options')
+ opt_group.add_option('--toolchain-params', dest='toolchain_params', action='store', help='Set toolchain params via file')
+ opt_group.add_option('-D', '--preset', dest='presets', action='append', default=[], help='set or override presets')
+ opt_group.add_option('-l', '--local-distbuild', dest='local_distbuild', action='store_true', default=False, help='conf for local distbuild')
+ parser.add_option_group(opt_group)
+
+ self.options, self.arguments = parser.parse_args(argv)
+
+ argv = self.arguments
+ if len(argv) < 4:
+ print('Usage: ArcRoot, --BuildType--, Verbosity, [Path to local.ymake]', file=sys.stderr)
+ sys.exit(1)
+
+ self.arcadia_root = argv[1]
+ init_logger(argv[3] == 'verbose')
+
+ # Эти переменные не надо использоваться напрямую. Их значения уже разбираются в других местах.
+ self.build_type = argv[2].lower()
+ self.local_distbuild = self.options.local_distbuild
+ self.toolchain_params = self.options.toolchain_params
+
+ self.presets = parse_presets(self.options.presets)
+ userify_presets(self.presets, ('CFLAGS', 'CXXFLAGS', 'CONLYFLAGS', 'LDFLAGS', 'GO_COMPILE_FLAGS', 'GO_LINK_FLAGS', 'USE_LOCAL_SWIG', 'SWIG_TOOL', 'SWIG_LIBRARY'))
+
+ Instance = None
+
+
+def opts():
+ if Options.Instance is None:
+ Options.Instance = Options(sys.argv)
+ return Options.Instance
+
+
+class Profiler(object):
+ Generic = 'generic'
+ GProf = 'gprof'
+
+
+class Arcadia(object):
+ def __init__(self, root):
+ self.root = root
+
+
+class Build(object):
+ def __init__(self, arcadia, build_type, toolchain_params, force_ignore_local_files=False):
+ self.arcadia = arcadia
+ self.params = self._load_json_from_base64(toolchain_params)
+ self.build_type = build_type
+
+ platform = self.params['platform']
+ self.host = Platform.from_json(platform['host'])
+ self.target = Platform.from_json(platform['target'])
+
+ self.tc = self._get_toolchain_options()
+
+ # TODO(somov): Удалить, когда перестанет использоваться.
+ self.build_system = 'ymake'
+
+ self.ignore_local_files = False
+
+ dist_prefix = 'dist-'
+ if self.build_type.startswith(dist_prefix):
+ self.build_system = 'distbuild'
+ self.build_type = self.build_type[len(dist_prefix):]
+
+ if force_ignore_local_files:
+ self.ignore_local_files = True
+
+ if self.is_ide_build_type(self.build_type):
+ self.ignore_local_files = True
+
+ self.pic = not is_positive('FORCE_NO_PIC')
+
+ @property
+ def host_target(self):
+ return self.host, self.target
+
+ def print_build(self):
+ self._print_build_settings()
+
+ host_os = System(self.host)
+ host_os.print_host_settings()
+
+ target_os = System(self.target)
+ target_os.print_target_settings()
+
+ if self.pic:
+ emit('PIC', 'yes')
+
+ emit('COMPILER_ID', self.tc.type.upper())
+
+ if self.is_valgrind:
+ emit('WITH_VALGRIND', 'yes')
+
+ toolchain_type, compiler_type, linker_type = Compilers[self.tc.type]
+ toolchain = toolchain_type(self.tc, self)
+ compiler = compiler_type(self.tc, self)
+ linker = linker_type(self.tc, self)
+
+ toolchain.print_toolchain()
+ compiler.print_compiler()
+ linker.print_linker()
+
+ self._print_other_settings(compiler)
+
+ def _print_build_settings(self):
+ emit('BUILD_TYPE', self.build_type.upper())
+ emit('BT_' + self.build_type.upper().replace('-', '_'), 'yes')
+
+ if self.build_system == 'distbuild':
+ emit('DISTBUILD', 'yes')
+ elif self.build_system != 'ymake':
+ raise ConfigureError()
+
+ python_bin = preset('BUILD_PYTHON_BIN', '$(PYTHON)/python')
+
+ emit('YMAKE_PYTHON', python_bin)
+ emit('YMAKE_UNPICKLER', python_bin, '$ARCADIA_ROOT/build/plugins/_unpickler.py')
+
+ @property
+ def is_release(self):
+ # TODO(somov): Проверить, бывают ли тут суффиксы на самом деле
+ return self.build_type in ('release', 'relwithdebinfo', 'minsizerel', 'profile', 'gprof') or self.build_type.endswith('-release')
+
+ @property
+ def is_debug(self):
+ return self.build_type in ('debug', 'debugnoasserts', 'fastdebug') or self.build_type.endswith('-debug')
+
+ @property
+ def is_fast_debug(self):
+ return self.build_type == 'fastdebug'
+
+ @property
+ def is_size_optimized(self):
+ return self.build_type == 'minsizerel'
+
+ @property
+ def is_coverage(self):
+ return self.build_type == 'coverage'
+
+ @property
+ def is_sanitized(self):
+ sanitizer = preset('SANITIZER_TYPE')
+ return bool(sanitizer) and not is_negative_str(sanitizer)
+
+ @property
+ def with_ndebug(self):
+ return self.build_type in ('release', 'minsizerel', 'valgrind-release', 'profile', 'gprof', 'debugnoasserts')
+
+ @property
+ def is_valgrind(self):
+ return self.build_type == 'valgrind' or self.build_type == 'valgrind-release'
+
+ @property
+ def is_ide(self):
+ return self.is_ide_build_type(self.build_type)
+
+ @property
+ def profiler_type(self):
+ if self.build_type == 'profile':
+ return Profiler.Generic
+ elif self.build_type == 'gprof':
+ return Profiler.GProf
+ else:
+ return None
+
+ @staticmethod
+ def is_ide_build_type(build_type):
+ return build_type == 'nobuild'
+
+ def _configure_runtime_versions(self):
+ res = subprocess.check_output(['xcrun', 'simctl', 'list', '--json', 'runtimes'])
+ raw_object = json.loads(res)
+ raw_object = raw_object['runtimes']
+ for runtime in raw_object:
+ if runtime['isAvailable']:
+ if "iOS" in runtime['identifier']:
+ emit('DEFAULT_IOS_RUNTIME', '{}'.format(runtime['identifier']))
+
+ def _get_toolchain_options(self):
+ type_ = self.params['params']['type']
+
+ if self.params['params'].get('local') and type_ == 'xcode':
+ detector = CompilerDetector()
+ detector.detect(self.params['params']['c_compiler'], self.params['params']['cxx_compiler'])
+ emit('LOCAL_XCODE_TOOLS', 'yes')
+ emit('XCODE', 'yes')
+ emit('ACTOOL_PATH', self.params['params']['actool'])
+ emit('IBTOOL_PATH', self.params['params']['ibtool'])
+ self._configure_runtime_versions()
+ elif type_ == 'system_cxx':
+ detector = CompilerDetector()
+ detector.detect(self.params['params'].get('c_compiler'), self.params['params'].get('cxx_compiler'))
+ type_ = detector.type
+ else:
+ detector = None
+
+ if type_ == 'msvc':
+ return MSVCToolchainOptions(self, detector)
+ else:
+ return GnuToolchainOptions(self, detector)
+
+ def _print_other_settings(self, compiler):
+ host = self.host
+
+ emit('USE_LOCAL_TOOLS', 'no' if self.ignore_local_files else 'yes')
+
+ ragel = Ragel()
+ ragel.configure_toolchain(self, compiler)
+ ragel.print_variables()
+
+ perl = Perl()
+ perl.configure_local()
+ perl.print_variables('LOCAL_')
+
+ swiftc = SwiftCompiler(self)
+ swiftc.configure()
+ swiftc.print_compiler()
+
+ if host.is_linux or host.is_macos or host.is_cygwin:
+ if is_negative('USE_ARCADIA_PYTHON'):
+ python = Python(self.tc)
+ python.configure_posix()
+ python.print_variables()
+
+ cuda = Cuda(self)
+ cuda.print_()
+ CuDNN(cuda).print_()
+
+ print_swig_config()
+
+ if self.ignore_local_files or host.is_windows or is_positive('NO_SVN_DEPENDS'):
+ emit_with_ignore_comment('SVN_DEPENDS')
+ emit_with_ignore_comment('SVN_DEPENDS_CACHE__NO_UID__')
+ else:
+ def find_svn():
+ for i in range(0, 3):
+ for path in (['.svn', 'wc.db'], ['.svn', 'entries'], ['.git', 'logs', 'HEAD']):
+ path_parts = [os.pardir] * i + path
+ full_path = os.path.join(self.arcadia.root, *path_parts)
+ # HACK(somov): No "normpath" here. ymake fails with the "source file name is outside the build tree" error
+ # when .svn/wc.db found in "trunk" instead of "arcadia". But $ARCADIA_ROOT/../.svn/wc.db is ok.
+ if os.path.exists(full_path):
+ out_path = os.path.join('${ARCADIA_ROOT}', *path_parts)
+ return '${input;hide:"%s"}' % out_path
+
+ # Special processing for arc repository since .arc may be a symlink.
+ dot_arc = os.path.realpath(os.path.join(self.arcadia.root, '.arc'))
+ full_path = os.path.join(dot_arc, 'TREE')
+ if os.path.exists(full_path):
+ out_path = os.path.join('${ARCADIA_ROOT}', os.path.relpath(full_path, self.arcadia.root))
+ return '${input;hide:"%s"}' % out_path
+
+ return ''
+
+ emit_with_ignore_comment('SVN_DEPENDS', find_svn())
+ emit_with_ignore_comment('SVN_DEPENDS_CACHE__NO_UID__', '${hide;kv:"disable_cache"}')
+
+ @staticmethod
+ def _load_json_from_base64(base64str):
+ """
+ :rtype: dict[str, Any]
+ """
+
+ def un_unicode(o):
+ if isinstance(o, six.text_type):
+ return six.ensure_str(o)
+ if isinstance(o, list):
+ return [un_unicode(oo) for oo in o]
+ if isinstance(o, dict):
+ return {un_unicode(k): un_unicode(v) for k, v in six.iteritems(o)}
+ return o
+
+ return un_unicode(json.loads(base64.b64decode(base64str)))
+
+
+class YMake(object):
+ def __init__(self, arcadia):
+ self.arcadia = arcadia
+
+ def print_presets(self):
+ presets = opts().presets
+ if presets and 'YMAKE_JAVA_MODULES' not in presets:
+ if 'YA_IDE_IDEA' in presets or 'MAVEN_EXPORT' in presets:
+ presets['YMAKE_JAVA_MODULES'] = 'no'
+ else:
+ presets['YMAKE_JAVA_MODULES'] = 'yes'
+ if presets and 'YMAKE_JAVA_MODULES' in presets and presets['YMAKE_JAVA_MODULES'] == "yes":
+ print('@import "${CONF_ROOT}/conf/java.ymake.conf"')
+ else:
+ print('@import "${CONF_ROOT}/conf/jbuild.ymake.conf"')
+
+ if presets:
+ print('# Variables set from command line by -D options')
+ for key in sorted(presets):
+ if key in ('MY_YMAKE_BIN', 'REAL_YMAKE_BIN'):
+ emit_with_ignore_comment(key, opts().presets[key])
+ elif key == 'YMAKE_JAVA_MODULES':
+ continue
+ else:
+ emit(key, opts().presets[key])
+
+ @staticmethod
+ def _print_conf_content(path):
+ with open(path, 'r') as fin:
+ print(fin.read())
+
+ def print_core_conf(self):
+ emit('YMAKE_YNDEXER_IGNORE_BUILD_ROOT', 'yes')
+ print('@import "${CONF_ROOT}/ymake.core.conf"')
+
+ def print_settings(self):
+ emit_with_ignore_comment('ARCADIA_ROOT', self.arcadia.root)
+
+ @staticmethod
+ def _find_conf(conf_file):
+ script_dir = os.path.dirname(__file__)
+ full_path = os.path.join(script_dir, conf_file)
+ if os.path.exists(full_path):
+ return full_path
+ return None
+
+ def _find_core_conf(self):
+ return self._find_conf('ymake.core.conf')
+
+
+class System(object):
+ def __init__(self, platform):
+ """
+ :type platform: Platform
+ """
+ self.platform = platform
+
+ def print_windows_target_const(self):
+ # TODO(somov): Remove this variables, use generic OS/arch variables in makelists.
+ emit('WINDOWS', 'yes')
+ emit('WIN32', 'yes')
+ if self.platform.is_64_bit == 64:
+ emit('WIN64', 'yes')
+
+ def print_nix_target_const(self):
+ emit('JAVA_INCLUDE', '-I{0}/include -I{0}/include/{1}'.format('/usr/lib/jvm/default-java', self.platform.os_compat))
+
+ emit('UNIX', 'yes')
+ emit('REALPRJNAME')
+ emit('SONAME')
+
+ @staticmethod
+ def print_nix_host_const():
+ emit('WRITE_COMMAND', '/bin/echo', '-e')
+
+ print('''
+when ($USE_PYTHON) {
+ C_DEFINES+= -DUSE_PYTHON
+}''')
+
+ @staticmethod
+ def print_linux_const():
+ print('''
+when (($USEMPROF == "yes") || ($USE_MPROF == "yes")) {
+ C_SYSTEM_LIBRARIES_INTERCEPT+=-ldmalloc
+}
+''')
+
+ def print_target_settings(self):
+ emit('TARGET_PLATFORM', self.platform.os_compat)
+ emit('HARDWARE_ARCH', '32' if self.platform.is_32_bit else '64')
+ emit('HARDWARE_TYPE', self.platform.arch)
+
+ for variable in self.platform.arch_variables:
+ emit(variable, 'yes')
+
+ for variable in self.platform.os_variables:
+ emit(variable, 'yes')
+
+ if self.platform.is_armv7:
+ emit('ARM7_FLOAT_ABI', self.platform.armv7_float_abi)
+
+ if self.platform.is_android:
+ emit('ANDROID_API', str(self.platform.android_api))
+
+ if self.platform.is_posix:
+ self.print_nix_target_const()
+ if self.platform.is_linux:
+ self.print_linux_const()
+ elif self.platform.is_windows:
+ self.print_windows_target_const()
+
+ def print_host_settings(self):
+ emit('HOST_PLATFORM', self.platform.os_compat)
+ if not self.platform.is_windows:
+ self.print_nix_host_const()
+
+ for variable in itertools.chain(self.platform.os_variables, self.platform.arch_variables):
+ emit('HOST_{var}'.format(var=variable), 'yes')
+
+
+class CompilerDetector(object):
+ def __init__(self):
+ self.type = None
+ self.c_compiler = None
+ self.cxx_compiler = None
+ self.version_list = None
+
+ @staticmethod
+ def preprocess_source(compiler, source):
+ # noinspection PyBroadException
+ try:
+ fd, path = tempfile.mkstemp(suffix='.cpp')
+ try:
+ with os.fdopen(fd, 'wb') as output:
+ output.write(source)
+ stdout, code = get_stdout_and_code([compiler, '-E', path])
+ finally:
+ os.remove(path)
+ return stdout, code
+
+ except Exception as e:
+ logger.debug('Preprocessing failed: %s', e)
+ return None, None
+
+ @staticmethod
+ def get_compiler_vars(compiler, names):
+ prefix = '____YA_VAR_'
+ source = '\n'.join(['{prefix}{name}={name}\n'.format(prefix=prefix, name=n) for n in names])
+
+ # Некоторые препроцессоры возвращают ненулевой код возврата. Поэтому его проверять нельзя.
+ # Мы можем только удостовериться после разбора stdout, что в нём
+ # присутствовала хотя бы одна подставленная переменная.
+ # TODO(somov): Исследовать, можно ли проверять ограниченный набор кодов возврата.
+ stdout, _ = CompilerDetector.preprocess_source(compiler, source)
+
+ if stdout is None:
+ return None
+
+ vars_ = {}
+ for line in stdout.split('\n'):
+ parts = line.split('=', 1)
+ if len(parts) == 2 and parts[0].startswith(prefix):
+ name, value = parts[0][len(prefix):], parts[1]
+ if value == name:
+ continue # Preprocessor variable was not substituted
+ vars_[name] = value
+
+ return vars_
+
+ def detect(self, c_compiler=None, cxx_compiler=None):
+ c_compiler = c_compiler or os.environ.get('CC')
+ cxx_compiler = cxx_compiler or os.environ.get('CXX') or c_compiler
+ c_compiler = c_compiler or cxx_compiler
+
+ logger.debug('e=%s', os.environ)
+ if c_compiler is None:
+ raise ConfigureError('Custom compiler was requested but not specified')
+
+ c_compiler_path = which(c_compiler)
+
+ clang_vars = ['__clang_major__', '__clang_minor__', '__clang_patchlevel__']
+ gcc_vars = ['__GNUC__', '__GNUC_MINOR__', '__GNUC_PATCHLEVEL__']
+ msvc_vars = ['_MSC_VER']
+ apple_var = '__apple_build_version__'
+
+ compiler_vars = self.get_compiler_vars(c_compiler_path, clang_vars + [apple_var] + gcc_vars + msvc_vars)
+
+ if not compiler_vars:
+ raise ConfigureError('Could not determine custom compiler version: {}'.format(c_compiler))
+
+ def version(version_names):
+ def iter_version():
+ for name in version_names:
+ yield int(compiler_vars[name])
+
+ # noinspection PyBroadException
+ try:
+ return list(iter_version())
+ except Exception:
+ return None
+
+ clang_version = version(clang_vars)
+ apple_build = apple_var in compiler_vars
+ # TODO(somov): Учитывать номера версий сборки Apple компилятора Clang.
+ _ = apple_build
+ gcc_version = version(gcc_vars)
+ msvc_version = version(msvc_vars)
+
+ if clang_version:
+ logger.debug('Detected Clang version %s', clang_version)
+ self.type = 'clang'
+ elif gcc_version:
+ logger.debug('Detected GCC version %s', gcc_version)
+ # TODO(somov): Переименовать в gcc.
+ self.type = 'gnu'
+ elif msvc_version:
+ logger.debug('Detected MSVC version %s', msvc_version)
+ self.type = 'msvc'
+ else:
+ raise ConfigureError('Could not determine custom compiler type: {}'.format(c_compiler))
+
+ self.version_list = clang_version or gcc_version or msvc_version
+
+ self.c_compiler = c_compiler_path
+ self.cxx_compiler = cxx_compiler and which(cxx_compiler) or c_compiler_path
+
+
+class ToolchainOptions(object):
+ def __init__(self, build, detector):
+ """
+ :type build: Build
+ """
+ self.host = build.host
+ self.target = build.target
+
+ tc_json = build.params
+
+ logger.debug('Toolchain host %s', self.host)
+ logger.debug('Toolchain target %s', self.target)
+ logger.debug('Toolchain json %s', DebugString(lambda: json.dumps(tc_json, indent=4, sort_keys=True)))
+
+ self.params = tc_json['params']
+ self._name = tc_json.get('name', 'theyknow')
+
+ if detector:
+ self.type = detector.type
+ self.from_arcadia = False
+
+ self.c_compiler = detector.c_compiler
+ self.cxx_compiler = detector.cxx_compiler
+ self.compiler_version_list = detector.version_list
+ self.compiler_version = '.'.join(map(lambda part: six.ensure_str(str(part)), self.compiler_version_list))
+
+ else:
+ self.type = self.params['type']
+ self.from_arcadia = True
+
+ self.c_compiler = self.params['c_compiler']
+ self.cxx_compiler = self.params['cxx_compiler']
+
+ # TODO(somov): Требовать номер версии всегда.
+ self.compiler_version = self.params.get('gcc_version') or self.params.get('version') or '0'
+ self.compiler_version_list = list(map(int, self.compiler_version.split('.')))
+
+ # TODO(somov): Посмотреть, можно ли спрятать это поле.
+ self.name_marker = '$(%s)' % self.params.get('match_root', self._name.upper())
+
+ self.arch_opt = self.params.get('arch_opt', [])
+ self.triplet_opt = self.params.get('triplet_opt', {})
+ self.target_opt = self.params.get('target_opt', [])
+
+ # TODO(somov): Убрать чтение настройки из os.environ.
+ self.werror_mode = preset('WERROR_MODE') or os.environ.get('WERROR_MODE') or self.params.get('werror_mode') or 'compiler_specific'
+
+ # default C++ standard is set here, some older toolchains might need to redefine it in ya.conf.json
+ self.cxx_std = self.params.get('cxx_std', 'c++20')
+
+ self._env = tc_json.get('env', {})
+
+ self.android_ndk_version = self.params.get('android_ndk_version', None)
+
+ logger.debug('c_compiler=%s', self.c_compiler)
+ logger.debug('cxx_compiler=%s', self.cxx_compiler)
+
+ self.compiler_platform_projects = self.target.find_in_dict(self.params.get('platform'), [])
+
+ def version_at_least(self, *args):
+ return args <= tuple(self.compiler_version_list)
+
+ def version_exactly(self, *args):
+ if not args or len(args) > len(self.compiler_version_list):
+ return False
+ for l, r in zip(args, list(self.compiler_version_list)[:len(args)]):
+ if l != r:
+ return False
+ return True
+
+ @property
+ def is_gcc(self):
+ return self.type == 'gnu'
+
+ @property
+ def is_clang(self):
+ return self.type in ('clang', 'xcode')
+
+ @property
+ def is_xcode(self):
+ return self.type == 'xcode'
+
+ @property
+ def is_from_arcadia(self):
+ return self.from_arcadia
+
+ def get_env(self, convert_list=None):
+ convert_list = convert_list or (lambda x: x)
+ r = {}
+ for k, v in six.iteritems(self._env):
+ if isinstance(v, str):
+ r[k] = v
+ elif isinstance(v, list):
+ r[k] = convert_list(v)
+ else:
+ logger.debug('Unexpected values in environment: %s', self._env)
+ raise ConfigureError('Internal error')
+ return r
+
+
+class GnuToolchainOptions(ToolchainOptions):
+ def __init__(self, build, detector):
+ super(GnuToolchainOptions, self).__init__(build, detector)
+
+ self.ar = self.params.get('ar')
+ self.ar_plugin = self.params.get('ar_plugin')
+ self.inplace_tools = self.params.get('inplace_tools', False)
+ self.strip = self.params.get('strip')
+ self.objcopy = self.params.get('objcopy')
+ self.isystem = self.params.get('isystem')
+
+ self.dwarf_tool = self.target.find_in_dict(self.params.get('dwarf_tool'))
+
+ # TODO(somov): Унифицировать формат sys_lib
+ self.sys_lib = self.params.get('sys_lib', {})
+ if isinstance(self.sys_lib, dict):
+ self.sys_lib = self.target.find_in_dict(self.sys_lib, [])
+
+ self.os_sdk = preset('OS_SDK') or self._default_os_sdk()
+ self.os_sdk_local = self.os_sdk == 'local'
+
+ def _default_os_sdk(self):
+ if self.target.is_linux:
+ if self.target.is_armv8:
+ return 'ubuntu-16'
+
+ if self.target.is_armv7 and self.target.armv7_float_abi == 'hard':
+ return 'ubuntu-16'
+
+ if self.target.is_armv7 and self.target.armv7_float_abi == 'softfp':
+ return 'ubuntu-18'
+
+ if self.target.is_powerpc:
+ return 'ubuntu-14'
+
+ # Default OS SDK for Linux builds
+ return 'ubuntu-14'
+
+
+class Toolchain(object):
+ def __init__(self, tc, build):
+ """
+ :type tc: ToolchainOptions
+ :type build: Build
+ """
+ self.tc = tc
+ self.build = build
+ self.platform_projects = self.tc.compiler_platform_projects
+
+ def print_toolchain(self):
+ if self.platform_projects:
+ emit('COMPILER_PLATFORM', list(unique(self.platform_projects)))
+
+
+class Compiler(object):
+ def __init__(self, tc, compiler_variable):
+ self.compiler_variable = compiler_variable
+ self.tc = tc
+
+ def print_compiler(self):
+ # CLANG and CLANG_VER variables
+ emit(self.compiler_variable, 'yes')
+ emit('{}_VER'.format(self.compiler_variable), self.tc.compiler_version)
+ if self.tc.is_xcode:
+ emit('XCODE', 'yes')
+
+
+class GnuToolchain(Toolchain):
+ def __init__(self, tc, build):
+ """
+ :type tc: GnuToolchainOptions
+ :type build: Build
+ """
+
+ def get_os_sdk(target):
+ sdk_native_version = 10.11 if not preset('EXPERIMENTAL_MACOS_M1_SUPPORT') else '11.1'
+ if target.is_macos:
+ return '$MACOS_SDK_RESOURCE_GLOBAL/MacOSX{}.sdk'.format(sdk_native_version)
+ elif target.is_yocto:
+ return '$YOCTO_SDK_RESOURCE_GLOBAL'
+ return '$OS_SDK_ROOT_RESOURCE_GLOBAL'
+
+ super(GnuToolchain, self).__init__(tc, build)
+ self.tc = tc
+
+ host = build.host
+ target = build.target
+
+ self.c_flags_platform = list(tc.target_opt)
+
+ self.default_os_sdk_root = get_os_sdk(target)
+
+ self.env = self.tc.get_env()
+
+ self.env_go = {}
+ if self.tc.is_clang:
+ self.env_go = {'PATH': ['{}/bin'.format(self.tc.name_marker)]}
+ if self.tc.is_gcc:
+ self.env_go = {'PATH': ['{}/gcc/bin'.format(self.tc.name_marker)]}
+ if 'PATH' in self.env_go:
+ if target.is_linux:
+ self.env_go['PATH'].append('$OS_SDK_ROOT_RESOURCE_GLOBAL/usr/bin')
+ elif target.is_macos:
+ self.env_go['PATH'].extend([
+ '$MACOS_SDK_RESOURCE_GLOBAL/usr/bin',
+ '$CCTOOLS_ROOT_RESOURCE_GLOBAL/bin',
+ '$GO_FAKE_XCRUN_RESOURCE_GLOBAL',
+ ])
+
+ self.swift_flags_platform = []
+ self.swift_lib_path = None
+
+ if self.tc.is_from_arcadia:
+ for lib_path in build.host.library_path_variables:
+ self.env.setdefault(lib_path, []).append('{}/lib'.format(self.tc.name_marker))
+
+ macos_version_min = '10.11'
+ macos_arm64_version_min = '11.0'
+ ios_version_min = '11.0'
+ # min ios simulator version for Metal App is 13.0
+ # https://developer.apple.com/documentation/metal/supporting_simulator_in_a_metal_app
+ # Mapkit (MAPSMOBI_BUILD_TARGET) uses Metal Framework
+ if preset('MAPSMOBI_BUILD_TARGET') and target.is_iossim and target.is_armv8:
+ ios_version_min = '13.0'
+
+ swift_target = select(default=None, selectors=[
+ (target.is_iossim and target.is_x86_64, 'x86_64-apple-ios{}-simulator'.format(ios_version_min)),
+ (target.is_iossim and target.is_x86, 'i386-apple-ios{}-simulator'.format(ios_version_min)),
+ (target.is_iossim and target.is_armv8, 'arm64-apple-ios{}-simulator'.format(ios_version_min)),
+ (not target.is_iossim and target.is_ios and target.is_armv8, 'arm64-apple-ios9'),
+ (not target.is_iossim and target.is_ios and target.is_armv7, 'armv7-apple-ios9'),
+ ])
+ if swift_target:
+ self.swift_flags_platform += ['-target', swift_target]
+
+ if self.tc.is_from_arcadia:
+ self.swift_lib_path = select(default=None, selectors=[
+ (host.is_macos and target.is_iossim, '$SWIFT_XCODE_TOOLCHAIN_ROOT_RESOURCE_GLOBAL/usr/lib/swift/iphonesimulator'),
+ (host.is_macos and not target.is_iossim and target.is_ios and (target.is_armv8 or target.is_armv7), '$SWIFT_XCODE_TOOLCHAIN_ROOT_RESOURCE_GLOBAL/usr/lib/swift/iphoneos'),
+ ])
+
+ if self.tc.is_clang:
+ target_triple = self.tc.triplet_opt.get(target.arch, None)
+ if not target_triple:
+ target_triple = select(default=None, selectors=[
+ (target.is_linux and target.is_x86_64, 'x86_64-linux-gnu'),
+ (target.is_linux and target.is_armv8, 'aarch64-linux-gnu'),
+ (target.is_linux and target.is_armv7 and target.armv7_float_abi == 'hard', 'arm-linux-gnueabihf'),
+ (target.is_linux and target.is_armv7 and target.armv7_float_abi == 'softfp', 'arm-linux-gnueabi'),
+ (target.is_linux and target.is_powerpc, 'powerpc64le-linux-gnu'),
+ (target.is_iossim and target.is_arm64, 'arm64-apple-ios{}-simulator'.format(ios_version_min)),
+ (target.is_apple and target.is_x86, 'i386-apple-darwin14'),
+ (target.is_apple and target.is_x86_64, 'x86_64-apple-darwin14'),
+ (target.is_apple and target.is_macos_arm64, 'arm64-apple-macos11'),
+ (target.is_apple and target.is_armv7, 'armv7-apple-darwin14'),
+ (target.is_apple and target.is_armv8, 'arm64-apple-darwin14'),
+ (target.is_yocto and target.is_armv7, 'arm-poky-linux-gnueabi'),
+ (target.is_android and target.is_x86, 'i686-linux-android'),
+ (target.is_android and target.is_x86_64, 'x86_64-linux-android'),
+ (target.is_android and target.is_armv7, 'armv7a-linux-androideabi'),
+ (target.is_android and target.is_armv8, 'aarch64-linux-android'),
+ ])
+
+ if target.is_android:
+ # Android NDK allows specification of API level in target triple, e.g.:
+ # armv7a-linux-androideabi16, aarch64-linux-android21
+ target_triple += str(target.android_api)
+
+ if target_triple:
+ self.c_flags_platform.append('--target={}'.format(target_triple))
+
+ if self.tc.isystem:
+ for root in list(self.tc.isystem):
+ self.c_flags_platform.extend(['-isystem', root])
+
+ if target.is_android:
+ self.c_flags_platform.extend(['-isystem', '{}/sources/cxx-stl/llvm-libc++abi/include'.format(self.tc.name_marker)])
+
+ if target.is_cortex_a9:
+ self.c_flags_platform.append('-mcpu=cortex-a9')
+
+ if target.is_cortex_a35:
+ self.c_flags_platform.append('-mcpu=cortex-a35')
+
+ elif target.is_cortex_a53:
+ self.c_flags_platform.append('-mcpu=cortex-a53')
+
+ elif target.is_cortex_m33:
+ self.c_flags_platform.append('-mcpu=cortex-m33 -mfpu=fpv5-sp-d16')
+
+ elif target.is_armv7_neon:
+ self.c_flags_platform.append('-mfpu=neon')
+
+ if (target.is_armv7 or target.is_armv8m) and build.is_size_optimized:
+ # Enable ARM Thumb2 variable-length instruction encoding
+ # to reduce code size
+ self.c_flags_platform.append('-mthumb')
+
+ if target.is_arm or target.is_powerpc:
+ # On linux, ARM and PPC default to unsigned char
+ # However, Arcadia requires char to be signed
+ self.c_flags_platform.append('-fsigned-char')
+
+ if self.tc.is_clang or self.tc.is_gcc and self.tc.version_at_least(8, 2):
+ target_flags = select(default=[], selectors=[
+ (target.is_linux and target.is_power8le, ['-mcpu=power8', '-mtune=power8', '-maltivec']),
+ (target.is_linux and target.is_power9le, ['-mcpu=power9', '-mtune=power9', '-maltivec']),
+ (target.is_linux and target.is_armv8, ['-march=armv8a']),
+ (target.is_macos_arm64, ['-mmacosx-version-min={}'.format(macos_arm64_version_min)]),
+ (target.is_macos, ['-mmacosx-version-min={}'.format(macos_version_min)]),
+ (target.is_ios and not target.is_iossim, ['-mios-version-min={}'.format(ios_version_min)]),
+ (target.is_iossim, ['-mios-simulator-version-min={}'.format(ios_version_min)]),
+ (target.is_android and target.is_armv7, ['-march=armv7-a', '-mfloat-abi=softfp']),
+ (target.is_android and target.is_armv8, ['-march=armv8-a']),
+ (target.is_yocto and target.is_armv7, ['-march=armv7-a', '-mfpu=neon', '-mfloat-abi=hard', '-mcpu=cortex-a9', '-O1'])
+ ])
+
+ if target_flags:
+ self.c_flags_platform.extend(target_flags)
+
+ if target.is_ios:
+ self.c_flags_platform.append('-D__IOS__=1')
+
+ if self.tc.is_from_arcadia:
+ if target.is_apple:
+ if target.is_ios:
+ self.setup_sdk(project='build/platform/ios_sdk', var='${IOS_SDK_ROOT_RESOURCE_GLOBAL}')
+ self.platform_projects.append('build/platform/macos_system_stl')
+ if target.is_macos:
+ self.setup_sdk(project='build/platform/macos_sdk', var='${MACOS_SDK_RESOURCE_GLOBAL}')
+ self.platform_projects.append('build/platform/macos_system_stl')
+
+ if not self.tc.inplace_tools:
+ self.setup_tools(project='build/platform/cctools', var='${CCTOOLS_ROOT_RESOURCE_GLOBAL}', bin='bin', ldlibs=None)
+
+ if target.is_linux:
+ if not tc.os_sdk_local:
+ self.setup_sdk(project='build/platform/linux_sdk', var='$OS_SDK_ROOT_RESOURCE_GLOBAL')
+
+ if target.is_x86_64:
+ if host.is_linux and not self.tc.is_gcc:
+ self.setup_tools(project='build/platform/linux_sdk', var='$OS_SDK_ROOT_RESOURCE_GLOBAL', bin='usr/bin', ldlibs='usr/lib/x86_64-linux-gnu')
+ elif host.is_macos:
+ self.setup_tools(project='build/platform/binutils', var='$BINUTILS_ROOT_RESOURCE_GLOBAL', bin='x86_64-linux-gnu/bin', ldlibs=None)
+ elif target.is_powerpc:
+ self.setup_tools(project='build/platform/linux_sdk', var='$OS_SDK_ROOT_RESOURCE_GLOBAL', bin='usr/bin', ldlibs='usr/x86_64-linux-gnu/powerpc64le-linux-gnu/lib')
+ elif target.is_armv8:
+ self.setup_tools(project='build/platform/linux_sdk', var='$OS_SDK_ROOT_RESOURCE_GLOBAL', bin='usr/bin', ldlibs='usr/lib/x86_64-linux-gnu')
+
+ if target.is_yocto:
+ self.setup_sdk(project='build/platform/yocto_sdk/yocto_sdk', var='${YOCTO_SDK_ROOT_RESOURCE_GLOBAL}')
+ elif self.tc.params.get('local'):
+ if target.is_apple:
+ if not tc.os_sdk_local:
+ if target.is_ios:
+ self.setup_sdk(project='build/platform/ios_sdk', var='${IOS_SDK_ROOT_RESOURCE_GLOBAL}')
+ self.platform_projects.append('build/platform/macos_system_stl')
+ if target.is_macos:
+ self.setup_sdk(project='build/platform/macos_sdk', var='${MACOS_SDK_RESOURCE_GLOBAL}')
+ self.platform_projects.append('build/platform/macos_system_stl')
+ else:
+ if target.is_iossim:
+ self.env.setdefault('SDKROOT', subprocess.check_output(['xcrun', '-sdk', 'iphonesimulator', '--show-sdk-path']).strip())
+ elif target.is_ios:
+ self.env.setdefault('SDKROOT', subprocess.check_output(['xcrun', '-sdk', 'iphoneos', '--show-sdk-path']).strip())
+ elif target.is_macos:
+ self.env.setdefault('SDKROOT', subprocess.check_output(['xcrun', '-sdk', 'macosx', '--show-sdk-path']).strip())
+
+ def setup_sdk(self, project, var):
+ self.platform_projects.append(project)
+ self.c_flags_platform.append('--sysroot={}'.format(var))
+ self.swift_flags_platform += ['-sdk', var]
+
+ # noinspection PyShadowingBuiltins
+ def setup_tools(self, project, var, bin, ldlibs):
+ self.platform_projects.append(project)
+ self.c_flags_platform.append('-B{}/{}'.format(var, bin))
+ if ldlibs:
+ for lib_path in self.build.host.library_path_variables:
+ self.env.setdefault(lib_path, []).append('{}/{}'.format(var, ldlibs))
+
+ def print_toolchain(self):
+ super(GnuToolchain, self).print_toolchain()
+
+ emit('TOOLCHAIN_ENV', format_env(self.env, list_separator=':'))
+ emit('_GO_TOOLCHAIN_ENV_PATH', format_env(self.env_go, list_separator=':'))
+ emit('C_FLAGS_PLATFORM', self.c_flags_platform)
+ emit('SWIFT_FLAGS_PLATFORM', self.swift_flags_platform)
+ emit('SWIFT_LD_FLAGS', '-L{}'.format(self.swift_lib_path) if self.swift_lib_path else '')
+
+ emit('PERL_SDK', preset('OS_SDK') or self.tc.os_sdk)
+ if preset('OS_SDK') is None:
+ emit('OS_SDK', self.tc.os_sdk)
+ emit('OS_SDK_ROOT', None if self.tc.os_sdk_local else self.default_os_sdk_root)
+
+
+class GnuCompiler(Compiler):
+ gcc_fstack = ['-fstack-protector']
+
+ def __init__(self, tc, build):
+ """
+ :type tc: GnuToolchainOptions
+ :type build: Build
+ """
+ compiler_variable = 'CLANG' if tc.is_clang else 'GCC'
+ super(GnuCompiler, self).__init__(tc, compiler_variable)
+
+ self.build = build
+ self.host = self.build.host
+ self.target = self.build.target
+ self.tc = tc
+
+ self.c_foptions = [
+ # Enable C++ exceptions (and allow them to be throw through pure C code)
+ '-fexceptions',
+ # Enable standard-conforming behavior and generate duplicate symbol error in case of duplicated global constants.
+ # See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678#c0
+ '-fno-common',
+ ]
+
+ if self.tc.is_clang and self.target.is_linux:
+ # Use .init_array instead of .ctors (default for old clang versions)
+ # See: https://maskray.me/blog/2021-11-07-init-ctors-init-array
+ self.c_foptions.append('-fuse-init-array')
+
+ if self.tc.is_clang:
+ self.c_foptions += [
+ # Set up output colorization
+ '-fcolor-diagnostics',
+ # Enable aligned allocation
+ '-faligned-allocation',
+ ]
+ elif self.tc.is_gcc:
+ self.c_foptions += [
+ # Set up output colorization
+ '-fdiagnostics-color=always',
+ # It looks like there is no way to enable aligned allocation in gcc
+ ]
+
+ self.c_warnings = [
+ # Enable default warnings subset
+ '-Wall',
+ '-Wextra',
+ ]
+ self.cxx_warnings = [
+ # Issue a warning if certain overload is hidden due to inheritance
+ '-Woverloaded-virtual',
+ ]
+
+ # Disable some warnings which will fail compilation at the time
+ self.c_warnings += [
+ '-Wno-parentheses'
+ ]
+
+ self.c_defines = ['-DFAKEID=$CPP_FAKEID']
+ if self.target.is_android:
+ self.c_defines.append('-DANDROID_FAKEID=$ANDROID_FAKEID')
+
+ self.c_defines.extend([
+ '-DARCADIA_ROOT=${ARCADIA_ROOT}',
+ '-DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT}',
+ ])
+
+ self.c_defines.extend([
+ '-D_THREAD_SAFE', '-D_PTHREADS', '-D_REENTRANT', '-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES',
+ '-D_LARGEFILE_SOURCE', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS',
+ ])
+
+ if not self.target.is_android:
+ # There is no usable _FILE_OFFSET_BITS=64 support in Androids until API 21. And it's incomplete until at least API 24.
+ # https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
+ # Arcadia have API 16 for 32-bit Androids.
+ self.c_defines.append('-D_FILE_OFFSET_BITS=64')
+
+ if self.target.is_linux or self.target.is_android or self.target.is_cygwin:
+ self.c_defines.append('-D_GNU_SOURCE')
+
+ if self.tc.is_clang and self.target.is_linux and self.target.is_x86_64:
+ self.c_defines.append('-D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE')
+
+ if self.target.is_ios:
+ self.c_defines.extend(['-D_XOPEN_SOURCE', '-D_DARWIN_C_SOURCE'])
+ if preset('MAPSMOBI_BUILD_TARGET') and self.target.is_arm:
+ self.c_foptions.append('-fembed-bitcode')
+
+ self.extra_compile_opts = []
+
+ self.c_flags = ['$CL_DEBUG_INFO', '$CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__']
+ self.c_flags += self.tc.arch_opt + ['-pipe']
+
+ self.sfdl_flags = ['-E', '-C', '-x', 'c++']
+
+ if self.target.is_x86:
+ self.c_flags.append('-m32')
+ if self.target.is_x86_64:
+ self.c_flags.append('-m64')
+
+ self.debug_info_flags = ['-g']
+ if self.target.is_linux:
+ self.debug_info_flags.append('-ggnu-pubnames')
+
+ self.cross_suffix = '' if is_positive('FORCE_NO_PIC') else '.pic'
+
+ self.optimize = None
+
+ self.configure_build_type()
+
+ if self.tc.is_clang:
+ self.sfdl_flags.append('-Qunused-arguments')
+
+ self.cxx_warnings += [
+ '-Wimport-preprocessor-directive-pedantic',
+ '-Wno-undefined-var-template',
+ '-Wno-return-std-move',
+ '-Wno-address-of-packed-member',
+ '-Wno-defaulted-function-deleted',
+ '-Wno-pessimizing-move',
+ '-Wno-range-loop-construct',
+ '-Wno-deprecated-anon-enum-enum-conversion',
+ '-Wno-deprecated-enum-enum-conversion',
+ '-Wno-deprecated-enum-float-conversion',
+ '-Wno-ambiguous-reversed-operator',
+ '-Wno-deprecated-volatile',
+ ]
+
+ self.c_warnings += [
+ '-Wno-implicit-const-int-float-conversion',
+ # For nvcc to accept the above.
+ '-Wno-unknown-warning-option',
+ ]
+
+ elif self.tc.is_gcc:
+ self.c_foptions.append('-fno-delete-null-pointer-checks')
+ self.c_foptions.append('-fabi-version=8')
+
+ # Split all functions and data into separate sections for DCE and ICF linker passes
+ # NOTE: iOS build uses -fembed-bitcode which conflicts with -ffunction-sections (only relevant for ELF targets)
+ if not self.target.is_ios:
+ self.c_foptions.extend(['-ffunction-sections', '-fdata-sections'])
+
+ def configure_build_type(self):
+ if self.build.is_valgrind:
+ self.c_defines.append('-DWITH_VALGRIND=1')
+
+ if self.build.is_debug:
+ self.c_foptions.append('$FSTACK')
+
+ if self.build.is_fast_debug:
+ self.c_flags.append('-Og')
+
+ if self.build.is_release:
+ self.c_flags.append('$OPTIMIZE')
+ if self.build.is_size_optimized:
+ # -Oz is clang's more size-aggressive version of -Os
+ # For ARM specifically, clang -Oz is on par with gcc -Os:
+ # https://github.com/android/ndk/issues/133#issuecomment-365763507
+ if self.tc.is_clang:
+ self.optimize = '-Oz'
+ else:
+ self.optimize = '-Os'
+
+ # Generate sections with address significance tables for ICF linker pass
+ if self.tc.is_clang:
+ self.c_foptions.extend(['-faddrsig'])
+ else:
+ self.optimize = '-O3'
+
+ if self.build.with_ndebug:
+ self.c_defines.append('-DNDEBUG')
+ else:
+ self.c_defines.append('-UNDEBUG')
+
+ if self.build.profiler_type in (Profiler.Generic, Profiler.GProf):
+ self.c_foptions.append('-fno-omit-frame-pointer')
+
+ if self.build.profiler_type == Profiler.GProf:
+ self.c_flags.append('-pg')
+
+ def print_compiler(self):
+ super(GnuCompiler, self).print_compiler()
+
+ emit('C_COMPILER_UNQUOTED', self.tc.c_compiler)
+ emit('C_COMPILER', '${quo:C_COMPILER_UNQUOTED}')
+ emit('OPTIMIZE', self.optimize)
+ emit('WERROR_MODE', self.tc.werror_mode)
+ emit('FSTACK', self.gcc_fstack)
+ append('C_DEFINES', self.c_defines)
+ emit('DUMP_DEPS')
+ emit('GCC_PREPROCESSOR_OPTS', '$DUMP_DEPS', '$C_DEFINES')
+ append('C_WARNING_OPTS', self.c_warnings)
+ append('CXX_WARNING_OPTS', self.cxx_warnings)
+
+ # PIE is only valid for executables, while PIC implies a shared library
+ # `-pie` with a shared library is either ignored or fails to link
+ emit_big('''
+ when ($PIC == "yes") {
+ CFLAGS+=-fPIC
+ LDFLAGS+=-fPIC
+ }
+ elsewhen ($PIE == "yes") {
+ CFLAGS+=-fPIE
+ LDFLAGS+=-fPIE -pie
+ }''')
+
+ append('CFLAGS', self.c_flags, '$DEBUG_INFO_FLAGS', self.c_foptions, '$C_WARNING_OPTS', '$GCC_PREPROCESSOR_OPTS', '$USER_CFLAGS', '$USER_CFLAGS_GLOBAL')
+ append('CXXFLAGS', '$CFLAGS', '-std=' + self.tc.cxx_std, '$CXX_WARNING_OPTS', '$USER_CXXFLAGS', '$USER_CXXFLAGS_GLOBAL')
+ append('CONLYFLAGS', '$USER_CONLYFLAGS', '$USER_CONLYFLAGS_GLOBAL')
+ emit('CXX_COMPILER_UNQUOTED', self.tc.cxx_compiler)
+ emit('CXX_COMPILER', '${quo:CXX_COMPILER_UNQUOTED}')
+ emit('NOGCCSTACKCHECK', 'yes')
+ emit('SFDL_FLAG', self.sfdl_flags, '-o', '$SFDL_TMP_OUT')
+ emit('WERROR_FLAG', '-Werror')
+ # TODO(somov): Убрать чтение настройки из os.environ
+ emit('USE_ARC_PROFILE', 'yes' if preset('USE_ARC_PROFILE') or os.environ.get('USE_ARC_PROFILE') else 'no')
+ emit('DEBUG_INFO_FLAGS', self.debug_info_flags)
+
+ emit_big('''
+ when ($NO_WSHADOW == "yes") {
+ C_WARNING_OPTS += -Wno-shadow
+ }
+ when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS = -w
+ CXX_WARNING_OPTS = -Wno-everything
+ }
+ when ($NO_OPTIMIZE == "yes") {
+ OPTIMIZE = -O0
+ }
+ when ($SAVE_TEMPS == "yes") {
+ CXXFLAGS += -save-temps
+ }
+ when ($NOGCCSTACKCHECK != "yes") {
+ FSTACK += -fstack-check
+ }''')
+
+ c_builtins = [
+ "-Wno-builtin-macro-redefined",
+ '-D__DATE__=\\""Sep 31 2019\\""',
+ '-D__TIME__=\\"00:00:00\\"',
+ ]
+ compiler_supports_macro_prefix_map = (
+ self.tc.is_clang and self.tc.version_at_least(10) or
+ self.tc.is_gcc and self.tc.version_at_least(8)
+ )
+ if compiler_supports_macro_prefix_map:
+ c_builtins += [
+ # XXX does not support non-normalized paths
+ "-fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/=",
+ "-fmacro-prefix-map=${ARCADIA_ROOT}/=",
+ "-fmacro-prefix-map=$(TOOL_ROOT)/=",
+ ]
+ else:
+ c_builtins += [
+ # XXX this macro substitution breaks __FILE__ in included sources
+ '-D__FILE__=\\""${input;qe;rootrel:SRC}\\""',
+ ]
+ c_debug_map = [
+ # XXX does not support non-normalized paths
+ "-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B",
+ "-fdebug-prefix-map=${ARCADIA_ROOT}=/-S",
+ "-fdebug-prefix-map=$(TOOL_ROOT)=/-T",
+ ]
+ c_debug_map_cl = c_debug_map + [
+ "-Xclang", "-fdebug-compilation-dir", "-Xclang", "/tmp",
+ ]
+ c_debug_map_light = [
+ # XXX does not support non-normalized paths
+ "-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B",
+ ]
+ c_debug_map_light_cl = c_debug_map_light + [
+ "-Xclang", "-fdebug-compilation-dir", "-Xclang", "/tmp",
+ ]
+ yasm_debug_map = [
+ # XXX does not support non-normalized paths
+ "--replace=${ARCADIA_BUILD_ROOT}=/-B",
+ "--replace=${ARCADIA_ROOT}=/-S",
+ "--replace=$(TOOL_ROOT)=/-T"
+ ]
+ emit_big('''
+ when ($FORCE_CONSISTENT_DEBUG == "yes") {{
+ when ($CLANG == "yes") {{
+ CL_DEBUG_INFO={c_debug_cl}
+ }}
+ otherwise {{
+ CL_DEBUG_INFO={c_debug}
+ }}
+ YASM_DEBUG_INFO={yasm_debug}
+ }}
+ elsewhen ($CONSISTENT_DEBUG == "yes") {{
+ when ($CLANG == "yes") {{
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__={c_debug_cl}
+ }}
+ otherwise {{
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__={c_debug}
+ }}
+ YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__={yasm_debug}
+ }}
+ elsewhen ($CONSISTENT_DEBUG_LIGHT == "yes") {{
+ when ($CLANG == "yes") {{
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__={c_debug_light_cl}
+ }}
+ otherwise {{
+ CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__={c_debug_light}
+ }}
+ YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__={yasm_debug_light}
+ }}
+
+ when ($FORCE_CONSISTENT_BUILD == "yes") {{
+ CL_MACRO_INFO={macro}
+ }}
+ elsewhen ($CONSISTENT_BUILD == "yes") {{
+ CL_MACRO_INFO_DISABLE_CACHE__NO_UID__={macro}
+ }}
+ '''.format(c_debug=' '.join(c_debug_map),
+ c_debug_cl=' '.join(c_debug_map_cl),
+ yasm_debug=' '.join(yasm_debug_map),
+ c_debug_light=' '.join(c_debug_map_light), # build_root substitution only
+ c_debug_light_cl=' '.join(c_debug_map_light_cl), # build_root substitution only
+ yasm_debug_light=yasm_debug_map[0], # build_root substitution only
+ macro=' '.join(c_builtins)))
+
+ # TODO(somov): Check whether this specific architecture is needed.
+ if self.target.arch == 'i386':
+ append('CFLAGS', '-march=pentiumpro')
+ append('CFLAGS', '-mtune=pentiumpro')
+
+ append('BC_CFLAGS', '$CFLAGS')
+ append('BC_CXXFLAGS', '$CXXFLAGS')
+
+ append('C_DEFINES', '-D__LONG_LONG_SUPPORTED')
+
+ emit('OBJ_CROSS_SUF', '$OBJ_SUF%s' % self.cross_suffix)
+ emit('OBJECT_SUF', '$OBJ_SUF%s.o' % self.cross_suffix)
+ emit('GCC_COMPILE_FLAGS', '$EXTRA_C_FLAGS -c -o $_COMPILE_OUTPUTS', '${pre=-I:_C__INCLUDE}')
+
+ if is_positive('DUMP_COMPILER_DEPS'):
+ emit('DUMP_DEPS', '-MD', '${output;hide;noauto;suf=${OBJ_SUF}.o.d:SRC}')
+ elif is_positive('DUMP_COMPILER_DEPS_FAST'):
+ emit('DUMP_DEPS', '-E', '-M', '-MF', '${output;noauto;suf=${OBJ_SUF}.o.d:SRC}')
+
+ compiler_time_trace_requested = is_positive('TIME_TRACE') or is_positive('COMPILER_TIME_TRACE')
+ compiler_supports_time_trace = self.tc.is_clang and self.tc.version_at_least(9)
+ if compiler_time_trace_requested and compiler_supports_time_trace:
+ compiler_time_trace_granularity = preset('TIME_TRACE_GRANULARITY', '500')
+ emit('COMPILER_TIME_TRACE_FLAGS', '-ftime-trace -ftime-trace-granularity=' + compiler_time_trace_granularity)
+ emit('COMPILER_TIME_TRACE_POSTPROCESS', '${YMAKE_PYTHON}', '${input:"build/scripts/find_time_trace.py"}', '$_COMPILE_OUTPUTS', '$_COMPILE_TIME_TRACE_OUTPUTS')
+ else:
+ emit('COMPILER_TIME_TRACE_FLAGS')
+ emit('COMPILER_TIME_TRACE_POSTPROCESS')
+
+ append('EXTRA_OUTPUT')
+
+ style = ['${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"p CC"} ${hide;kv:"pc green"}']
+ cxx_args = [
+ '$CLANG_TIDY_ARGS',
+ '$YNDEXER_ARGS',
+ '$CXX_COMPILER',
+ '$C_FLAGS_PLATFORM',
+ '$GCC_COMPILE_FLAGS',
+ '$CXXFLAGS',
+ '$CL_MACRO_INFO',
+ '$CL_MACRO_INFO_DISABLE_CACHE__NO_UID__',
+ '$COMPILER_TIME_TRACE_FLAGS',
+ '$EXTRA_OUTPUT',
+ '$SRCFLAGS',
+ '$_LANG_CFLAGS_VALUE',
+ '${input:SRC}',
+ '$TOOLCHAIN_ENV',
+ '$YNDEXER_OUTPUT',
+ '&& $COMPILER_TIME_TRACE_POSTPROCESS',
+ ] + style
+
+ c_args = [
+ '$CLANG_TIDY_ARGS',
+ '$YNDEXER_ARGS',
+ '$C_COMPILER',
+ '$C_FLAGS_PLATFORM',
+ '$GCC_COMPILE_FLAGS',
+ '$CFLAGS',
+ '$CL_MACRO_INFO',
+ '$CL_MACRO_INFO_DISABLE_CACHE__NO_UID__',
+ '$CONLYFLAGS',
+ '$COMPILER_TIME_TRACE_FLAGS',
+ '$EXTRA_OUTPUT',
+ '$SRCFLAGS',
+ '${input:SRC}',
+ '$TOOLCHAIN_ENV',
+ '$YNDEXER_OUTPUT',
+ '&& $COMPILER_TIME_TRACE_POSTPROCESS',
+ ] + style
+
+ ignore_c_args_no_deps = [
+ '${input:SRC}',
+ '$SRCFLAGS',
+ '$CLANG_TIDY_ARGS',
+ '$YNDEXER_ARGS',
+ '$YNDEXER_OUTPUT',
+ '$COMPILER_TIME_TRACE_FLAGS',
+ '$EXTRA_OUTPUT',
+ '$CL_MACRO_INFO',
+ '$CL_MACRO_INFO_DISABLE_CACHE__NO_UID__',
+ '&& $COMPILER_TIME_TRACE_POSTPROCESS',
+ ]
+ c_args_nodeps = [c if c != '$GCC_COMPILE_FLAGS' else '$EXTRA_C_FLAGS -c -o ${OUTFILE} ${SRC} ${pre=-I:INC}' for c in c_args if c not in ignore_c_args_no_deps]
+
+ emit('_SRC_C_NODEPS_CMD', ' '.join(c_args_nodeps))
+ emit('_SRC_CPP_CMD', ' '.join(cxx_args))
+ emit('_SRC_C_CMD', ' '.join(c_args))
+ emit('_SRC_M_CMD', '$SRC_c($SRC $SRCFLAGS)')
+ emit('_SRC_MASM_CMD', '$_EMPTY_CMD')
+
+ # fuzzing configuration
+ if self.tc.is_clang:
+ if self.tc.version_at_least(12):
+ emit('LIBFUZZER_PATH', 'contrib/libs/libfuzzer12')
+
+
+class SwiftCompiler(object):
+ def __init__(self, build):
+ self.host = build.host
+ self.compiler = None
+
+ def configure(self):
+ if self.host.is_macos:
+ self.compiler = '$SWIFT_XCODE_TOOLCHAIN_ROOT_RESOURCE_GLOBAL/usr/bin/swiftc'
+
+ def print_compiler(self):
+ emit('SWIFT_COMPILER', self.compiler or '')
+
+
+class Linker(object):
+ BFD = 'bfd'
+ LLD = 'lld'
+ GOLD = 'gold'
+
+ def __init__(self, tc, build):
+ """
+ :type tc: ToolchainOptions
+ :type build: Build
+ """
+ self.tc = tc
+ self.build = build
+ self.type = self._get_default_linker_type()
+
+ def _get_default_linker_type(self):
+ if not self.tc.is_from_arcadia:
+ # External (e.g. system) toolchain: disable linker selection logic
+ return None
+
+ if self.build.target.is_android:
+ # Android toolchain is NDK, LLD works on all supported platforms
+ return Linker.LLD
+
+ elif self.build.target.is_linux:
+ # DEVTOOLS-6782: LLD8 fails to link LTO builds with in-memory ELF objects larger than 4 GiB
+ blacklist_lld = is_positive('CLANG7') and is_positive('USE_LTO') and not is_positive('MUSL')
+ if self.tc.is_clang and not blacklist_lld:
+ return Linker.LLD
+ else:
+ # GCC et al.
+
+ if self.tc.is_gcc and is_positive('MUSL'):
+ # See MUSL_BFD comment below
+ return Linker.BFD
+
+ return Linker.GOLD
+
+ # There is no linker choice on Darwin (ld64) or Windows (link.exe)
+ return None
+
+ def print_linker(self):
+ self._print_linker_selector()
+
+ def _print_linker_selector(self):
+ # if self.type is None then _DEFAULT_LINKER is set to empty string value
+ emit('_DEFAULT_LINKER_ID', self.type)
+
+
+class LD(Linker):
+ def __init__(self, tc, build):
+ """
+ :type tc: GnuToolchainOptions
+ :type build: Build
+ """
+ super(LD, self).__init__(tc, build)
+
+ self.build = build
+ self.host = self.build.host
+ self.target = self.build.target
+ self.tc = tc
+
+ target = self.target
+
+ self.ar = preset('AR') or self.tc.ar
+ self.ar_plugin = self.tc.ar_plugin
+ self.strip = self.tc.strip
+ self.objcopy = self.tc.objcopy
+
+ self.musl = Setting('MUSL', convert=to_bool)
+
+ if self.ar is None:
+ if target.is_apple:
+ # Use libtool. cctools ar does not understand -M needed for archive merging
+ self.ar = '${CCTOOLS_ROOT_RESOURCE_GLOBAL}/bin/libtool'
+ elif self.tc.is_from_arcadia:
+ if self.tc.is_clang:
+ self.ar = '{}/bin/llvm-ar'.format(self.tc.name_marker)
+ if self.tc.is_gcc:
+ self.ar = '{}/gcc/bin/gcc-ar'.format(self.tc.name_marker)
+ else:
+ self.ar = 'ar'
+
+ self.ar_type = 'GNU_AR'
+ self.llvm_ar_format = 'None'
+
+ if 'libtool' in self.ar:
+ self.ar_type = 'LIBTOOL'
+ elif 'llvm-ar' in self.ar:
+ self.ar_type = 'LLVM_AR'
+ if target.is_apple:
+ self.llvm_ar_format="darwin"
+ else:
+ self.llvm_ar_format="gnu"
+
+ self.ld_flags = []
+
+ # Save linker's stdout to an additional .txt output file
+ # e.g. LLD writes `--print-gc-sections` or `--print-icf-sections` to stdout
+ self.save_linker_output = False
+
+ # Enable section-level DCE (dead code elimination):
+ # remove whole unused code and data sections
+ # (needs `-ffunction-sections` and `-fdata-sections` to be useful)
+ #
+ # NOTE: CGO linker doesn't seem to support DCE, but shares common LDFLAGS
+ if target.is_macos:
+ self.ld_dce_flag = '-Wl,-dead_strip'
+ elif target.is_linux or target.is_android:
+ self.ld_dce_flag = '-Wl,--gc-sections'
+ if preset('LINKER_DCE_PRINT_SECTIONS'):
+ self.save_linker_output = True
+ self.ld_dce_flag += ' -Wl,--print-gc-sections'
+ else:
+ self.ld_dce_flag = ''
+
+ if self.type == Linker.LLD:
+ # Enable ICF (identical code folding pass) in safe mode
+ # https://research.google/pubs/pub36912/
+ self.ld_icf_flag = '-Wl,-icf=safe'
+ if preset('LINKER_ICF_PRINT_SECTIONS'):
+ self.save_linker_output = True
+ self.ld_icf_flag += ' -Wl,--print-icf-sections'
+ else:
+ self.ld_icf_flag = ''
+
+ if self.musl.value:
+ self.ld_flags.extend(['-Wl,--no-as-needed'])
+ if self.tc.is_gcc:
+ # MUSL_BFD: musl build uses --no-dynamic-linker linker flag
+ # which gold doesn't know about. And we can only specify linker
+ # type, not it's path as we do for Clang through linker selector.
+ self.ld_flags.append('-fuse-ld=bfd')
+ elif target.is_linux:
+ self.ld_flags.extend(['-ldl', '-lrt', '-Wl,--no-as-needed'])
+ if self.tc.is_gcc:
+ self.ld_flags.extend(('-Wl,-Bstatic', '-latomic', '-Wl,-Bdynamic'))
+ elif target.is_android:
+ self.ld_flags.extend(['-ldl', '-Wl,--no-as-needed'])
+ if self.type == Linker.LLD and target.android_api < 29:
+ # https://github.com/android/ndk/issues/1196
+ self.ld_flags.append('-Wl,--no-rosegment')
+ elif target.is_macos:
+ self.ld_flags.append('-Wl,-no_deduplicate')
+ if not self.tc.is_clang:
+ self.ld_flags.append('-Wl,-no_compact_unwind')
+
+ self.thread_library = select([
+ (target.is_linux or target.is_macos, '-lpthread'),
+ ])
+
+ self.ld_export_dynamic_flag = None
+ self.start_group = None
+ self.end_group = None
+ self.whole_archive = None
+ self.no_whole_archive = None
+ self.ld_stripflag = None
+ self.use_stdlib = None
+ self.soname_option = None
+ self.dwarf_command = None
+ self.libresolv = '-lresolv' if target.is_linux or target.is_macos or target.is_android else None
+
+ if target.is_linux or target.is_android:
+ self.ld_export_dynamic_flag = '-rdynamic'
+ self.use_stdlib = '-nodefaultlibs'
+
+ if target.is_linux or target.is_android or target.is_cygwin or target.is_none:
+ self.start_group = '-Wl,--start-group'
+ self.end_group = '-Wl,--end-group'
+ self.whole_archive = '-Wl,--whole-archive'
+ self.no_whole_archive = '-Wl,--no-whole-archive'
+ self.ld_stripflag = '-s'
+ self.soname_option = '-soname'
+
+ if target.is_macos or target.is_ios:
+ self.use_stdlib = '-nodefaultlibs'
+ self.soname_option = '-install_name'
+ if not preset('NO_DEBUGINFO'):
+ self.dwarf_command = '$DWARF_TOOL $TARGET -o ${output;pre=$MODULE_PREFIX$REALPRJNAME.dSYM/Contents/Resources/DWARF/$MODULE_PREFIX:REALPRJNAME}'
+
+ if self.target.is_ios and preset('MAPSMOBI_BUILD_TARGET') and self.target.is_arm:
+ self.ld_flags.extend(('-fembed-bitcode', '-Wl,-bitcode_verify'))
+
+ if self.build.profiler_type == Profiler.GProf:
+ self.ld_flags.append('-pg')
+
+ # TODO(somov): Единое условие на coverage.
+ if self.build.is_coverage or is_positive('GCOV_COVERAGE') or is_positive('CLANG_COVERAGE') or self.build.is_sanitized:
+ self.use_stdlib = None
+
+ self.ld_sdk = select(default=None, selectors=[
+ (target.is_macos_arm64, '-Wl,-sdk_version,11.0'),
+ (target.is_macos, '-Wl,-sdk_version,10.15'),
+ (not target.is_iossim and target.is_ios, '-Wl,-sdk_version,13.1'),
+ (target.is_iossim, '-Wl,-sdk_version,14.5'),
+ ])
+
+ if self.ld_sdk:
+ self.ld_flags.append(self.ld_sdk)
+
+ self.sys_lib = self.tc.sys_lib
+
+ if target.is_android:
+ if target.is_armv7 and self.type != Linker.LLD:
+ self.sys_lib.append('-Wl,--fix-cortex-a8')
+
+ # NDK r23 onwards has stopped using libgcc:
+ # - https://github.com/android/ndk/wiki/Changelog-r23#changes
+ # - https://github.com/android/ndk/issues/1230
+ # LLVM's libunwind is now used instead of libgcc for all architectures rather than just 32-bit Arm.
+ # - https://github.com/android/ndk/issues/1231
+ # LLVM's libclang_rt.builtins is now used instead of libgcc.
+ if self.tc.android_ndk_version >= 23:
+ # Use toolchain defaults to link with libunwind/clang_rt.builtins
+ self.use_stdlib = '-nostdlib++'
+ else:
+ # Preserve old behaviour: specify runtime libs manually
+ self.use_stdlib = '-nodefaultlibs'
+ if target.is_armv7:
+ self.sys_lib.append('-lunwind')
+ self.sys_lib.append('-lgcc')
+
+ if self.tc.is_clang and not self.tc.version_at_least(4, 0) and target.is_linux_x86_64:
+ self.sys_lib.append('-L/usr/lib/x86_64-linux-gnu')
+
+ def print_linker(self):
+ super(LD, self).print_linker()
+
+ emit('AR_TOOL', self.ar)
+ emit('AR_TYPE', self.ar_type)
+
+ emit('STRIP_TOOL_VENDOR', self.strip)
+ emit('OBJCOPY_TOOL_VENDOR', self.objcopy)
+
+ append('LDFLAGS', '$USER_LDFLAGS', self.ld_flags)
+ append('LDFLAGS_GLOBAL', '')
+
+ emit('LD_STRIP_FLAG', self.ld_stripflag)
+ emit('STRIP_FLAG')
+
+ emit('LD_DCE_FLAG', self.ld_dce_flag)
+ emit('DCE_FLAG')
+
+ emit('LD_ICF_FLAG', self.ld_icf_flag)
+ emit('ICF_FLAG')
+
+ emit('C_LIBRARY_PATH')
+ emit('C_SYSTEM_LIBRARIES_INTERCEPT')
+ if self.musl.value:
+ emit('C_SYSTEM_LIBRARIES', '-nostdlib')
+ else:
+ emit('C_SYSTEM_LIBRARIES', self.use_stdlib, self.thread_library, self.sys_lib, '-lc')
+
+ emit('START_WHOLE_ARCHIVE_VALUE', self.whole_archive)
+ emit('END_WHOLE_ARCHIVE_VALUE', self.no_whole_archive)
+
+ if self.ld_sdk:
+ emit('LD_SDK_VERSION', self.ld_sdk)
+
+ dwarf_tool = self.tc.dwarf_tool
+ if dwarf_tool is None and self.tc.is_clang and (self.target.is_macos or self.target.is_ios):
+ dsymutil = '{}/bin/{}dsymutil'.format(self.tc.name_marker, '' if self.tc.version_at_least(7) else 'llvm-')
+ dwarf_tool = '${YMAKE_PYTHON} ${input:"build/scripts/run_llvm_dsymutil.py"} ' + dsymutil
+ if self.tc.version_at_least(5, 0):
+ dwarf_tool += ' -flat'
+
+ if dwarf_tool is not None:
+ emit('DWARF_TOOL', dwarf_tool)
+ emit('OBJADDE')
+
+ emit('LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG', self.ld_export_dynamic_flag)
+ emit_big('''
+ NO_EXPORT_DYNAMIC_SYMBOLS=
+ EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG
+ when ($EXPORTS_FILE) {
+ EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG -Wl,--version-script=${input:EXPORTS_FILE}
+ }
+ when ($NO_EXPORT_DYNAMIC_SYMBOLS == "yes") {
+ EXPORTS_VALUE=
+ }''')
+
+ emit('LINKER_SCRIPT_VALUE', '${ext=.ld;pre=-T:SRCS_GLOBAL}')
+
+ linker_time_trace_requested = is_positive('TIME_TRACE') or is_positive('LINKER_TIME_TRACE')
+ linker_supports_time_trace = self.type == Linker.LLD # XXX: Should really check the linker version if we had one
+ if linker_time_trace_requested and linker_supports_time_trace:
+ linker_time_trace_granularity = preset('TIME_TRACE_GRANULARITY', '500')
+ emit('LINKER_TIME_TRACE_FLAG', ' '.join([
+ '-Wl,--time-trace',
+ '-Wl,--time-trace-granularity=' + linker_time_trace_granularity,
+ '-Wl,--time-trace-file=${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.time_trace.json:REALPRJNAME}',
+ ]))
+ else:
+ emit('LINKER_TIME_TRACE_FLAG')
+
+ exe_flags = [
+ '$C_FLAGS_PLATFORM', '$BEFORE_PEERS', self.start_group, '${rootrel:PEERS}', self.end_group, '$AFTER_PEERS',
+ '$EXPORTS_VALUE $LINKER_SCRIPT_VALUE $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB',
+ '$C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG $DCE_FLAG $ICF_FLAG $LINKER_TIME_TRACE_FLAG']
+
+ arch_flag = '--arch={arch}'.format(arch=self.target.os_compat)
+ soname_flag = '-Wl,{option},${{_SONAME}}'.format(option=self.soname_option)
+ shared_flag = '-shared'
+ exec_shared_flag = '-pie -fPIE -Wl,--unresolved-symbols=ignore-all -rdynamic' if self.target.is_linux else ''
+ if self.whole_archive:
+ srcs_globals = self.whole_archive + ' ${rootrel;ext=.a:SRCS_GLOBAL} ' + self.no_whole_archive \
+ + ' ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
+ else:
+ srcs_globals = '--start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL}'
+
+ ld_env_style = '${cwd:ARCADIA_BUILD_ROOT} $TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}'
+
+ # Program
+ 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',
+ )
+ if is_positive("TIDY"):
+ emit(
+ 'REAL_LINK_EXE',
+ '$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"}',
+ '--build-root $ARCADIA_BUILD_ROOT',
+ '--source-root $ARCADIA_ROOT',
+ '--output-file',
+ '$TARGET',
+ '$AUTO_INPUT',
+ ld_env_style
+ )
+ else:
+ emit('LINK_SCRIPT_EXE_FLAGS')
+ emit('REAL_LINK_EXE_CMDLINE',
+ '$YMAKE_PYTHON ${input:"build/scripts/link_exe.py"}',
+ '--source-root $ARCADIA_ROOT',
+ '--linker-output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.linker.txt:REALPRJNAME}' if self.save_linker_output else '',
+ '${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS}',
+ '${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}',
+ arch_flag,
+ '$LINK_SCRIPT_EXE_FLAGS',
+ '$CXX_COMPILER',
+ srcs_globals,
+ '$VCS_C_OBJ $AUTO_INPUT -o $TARGET',
+ exe_flags,
+ ld_env_style,
+ )
+ emit('REAL_LINK_EXE', '$REAL_LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ # Executable Shared Library
+
+ emit('REAL_LINK_EXEC_DYN_LIB_CMDLINE',
+ '$YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"}',
+ '--target $TARGET',
+ '--linker-output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.linker.txt:REALPRJNAME}' if self.save_linker_output else '',
+ '${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS}',
+ '${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}',
+ arch_flag,
+ '$LINK_DYN_LIB_FLAGS',
+ '$CXX_COMPILER',
+ srcs_globals,
+ '$VCS_C_OBJ $AUTO_INPUT -o $TARGET',
+ exec_shared_flag,
+ soname_flag,
+ exe_flags,
+ ld_env_style,
+ )
+ emit('REAL_LINK_EXEC_DYN_LIB', '$REAL_LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ # Shared Library
+
+ emit('LINK_DYN_LIB_FLAGS')
+ emit('REAL_LINK_DYN_LIB_CMDLINE',
+ '$YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"}',
+ '--target $TARGET',
+ '--linker-output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION.linker.txt:REALPRJNAME}' if self.save_linker_output else '',
+ '${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS}',
+ '${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}',
+ arch_flag,
+ '$LINK_DYN_LIB_FLAGS',
+ '$CXX_COMPILER',
+ srcs_globals,
+ '$VCS_C_OBJ $AUTO_INPUT -o $TARGET',
+ shared_flag,
+ soname_flag,
+ exe_flags,
+ ld_env_style)
+ emit('REAL_LINK_DYN_LIB', '$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ if self.dwarf_command is None or self.target.is_ios:
+ emit('DWARF_COMMAND')
+ else:
+ emit('DWARF_COMMAND', self.dwarf_command, ld_env_style)
+ if is_positive("TIDY"):
+ emit('LINK_EXE', '$REAL_LINK_EXE')
+ else:
+ emit('LINK_EXE', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_EXE && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND && $PACK_IOS_CMD')
+ if is_positive("TIDY"):
+ emit('LINK_DYN_LIB', "$REAL_LINK_EXE")
+ else:
+ emit('LINK_DYN_LIB', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND')
+ emit('LINK_EXEC_DYN_LIB', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_EXEC_DYN_LIB && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND')
+ emit('SWIG_DLL_JAR_CMD', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD && $DWARF_COMMAND')
+
+ tail_link_lib = '$AUTO_INPUT ${requirements;hide:LIB_REQUIREMENTS} ${kv;hide:"p AR"} $TOOLCHAIN_ENV ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}'
+ if is_positive("TIDY"):
+ archiver = '$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --output-file'
+ emit('LINK_LIB', archiver, "$TARGET", tail_link_lib)
+ else:
+ archiver = '$YMAKE_PYTHON ${input:"build/scripts/link_lib.py"} ${quo:AR_TOOL} $AR_TYPE %s $ARCADIA_BUILD_ROOT %s' % (self.llvm_ar_format, self.ar_plugin or 'None')
+ # Static Library
+ emit('LINK_LIB', '$GENERATE_MF &&', archiver, '$TARGET', tail_link_lib)
+ emit('GLOBAL_LINK_LIB', archiver, '$GLOBAL_TARGET', tail_link_lib)
+
+ # "Fat Object" : pre-linked global objects and static library with all dependencies
+ def emit_link_fat_obj(cmd_name, need_wa_option, *extended_flags):
+ prefix = ['$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP &&',
+ '$YMAKE_PYTHON ${input:"build/scripts/link_fat_obj.py"} --build-root $ARCADIA_BUILD_ROOT']
+ globals_libs = srcs_globals if need_wa_option else '${rootrel;ext=.a:SRCS_GLOBAL} ${rootrel;ext=.o:SRCS_GLOBAL}'
+ suffix = [arch_flag,
+ '-Ya,input $AUTO_INPUT $VCS_C_OBJ -Ya,global_srcs', globals_libs, '-Ya,peers $PEERS',
+ '-Ya,linker $CXX_COMPILER $LDFLAGS_GLOBAL $C_FLAGS_PLATFORM', self.ld_sdk, '-Ya,archiver', archiver,
+ '$TOOLCHAIN_ENV ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}']
+ emit(cmd_name, *(prefix + list(extended_flags) + suffix))
+
+ # TODO(somov): Проверить, не нужны ли здесь все остальные флаги компоновки (LDFLAGS и т. д.).
+ emit_link_fat_obj('LINK_FAT_OBJECT', True, '--obj=$TARGET', '--lib=${output:REALPRJNAME.a}')
+ emit_link_fat_obj('LINK_RECURSIVE_LIBRARY', False, '--lib=$TARGET', '--with-own-obj', '--with-global-srcs')
+ emit_link_fat_obj('LINK_FAT_OBJECT_LIBRARY', False, '--lib=$TARGET', '$FAT_OBJECT_ARGS', '$FAT_OBJECT_OUTS')
+
+ emit('LIBRT', '-lrt')
+ emit('MD5LIB', '-lcrypt')
+ emit('LIBRESOLV', self.libresolv)
+ emit('PROFFLAG', '-pg')
+
+
+class MSVCToolchainOptions(ToolchainOptions):
+ def __init__(self, build, detector):
+ super(MSVCToolchainOptions, self).__init__(build, detector)
+
+ # C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428
+ self.vc_root = None
+
+ # C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0
+ self.kit_includes = None
+
+ # C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0
+ self.kit_libs = None
+
+ self.under_wine = 'wine' in self.params
+ self.system_msvc = 'system_msvc' in self.params
+ self.ide_msvs = 'ide_msvs' in self.params
+ self.use_clang = self.params.get('use_clang', False)
+ self.use_arcadia_toolchain = self.params.get('use_arcadia_toolchain', False)
+
+ self.sdk_version = None
+
+ if build.host.is_windows:
+ self.under_wine = False
+
+ if self.ide_msvs:
+ bindir = '$(VC_ExecutablePath_x64_x64)\\'
+ self.c_compiler = bindir + 'cl.exe'
+ self.cxx_compiler = self.c_compiler
+
+ self.link = bindir + 'link.exe'
+ self.lib = bindir + 'lib.exe'
+ self.masm_compiler = bindir + 'ml64.exe'
+
+ self.vc_root = None
+
+ sdk_dir = '$(WindowsSdkDir)'
+ self.sdk_version = '$(WindowsTargetPlatformVersion)'
+ self.kit_includes = os.path.join(sdk_dir, 'Include', self.sdk_version)
+ self.kit_libs = os.path.join(sdk_dir, 'Lib', self.sdk_version)
+
+ elif detector:
+ self.masm_compiler = which('ml64.exe')
+ self.link = which('link.exe')
+ self.lib = which('lib.exe')
+
+ 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'
+
+ 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.')
+
+ self.vc_root = os.path.normpath(vc_install_dir)
+ self.kit_includes = os.path.normpath(os.path.join(sdk_dir, 'Include', self.sdk_version))
+ self.kit_libs = os.path.normpath(os.path.join(sdk_dir, 'Lib', self.sdk_version))
+
+ # TODO(somov): Определять автоматически self.version в этом случае
+
+ else:
+ if self.version_at_least(2019):
+ self.sdk_version = '10.0.18362.0'
+ sdk_dir = '$(WINDOWS_KITS-sbr:1939557911)'
+ if is_positive('MSVC20'): # XXX: temporary flag, remove after DTCC-123 is completed
+ self.cxx_std = 'c++latest'
+ else:
+ self.sdk_version = '10.0.16299.0'
+ sdk_dir = '$(WINDOWS_KITS-sbr:1379398385)'
+
+ self.vc_root = self.name_marker if not self.use_clang else '$MSVC_FOR_CLANG_RESOURCE_GLOBAL'
+ self.kit_includes = os.path.join(sdk_dir, 'Include', self.sdk_version)
+ self.kit_libs = os.path.join(sdk_dir, 'Lib', self.sdk_version)
+
+ bindir = os.path.join(self.vc_root, 'bin', 'Hostx64')
+
+ tools_name = select(selectors=[
+ (build.target.is_x86, 'x86'),
+ (build.target.is_x86_64, 'x64'),
+ (build.target.is_armv7, 'arm'),
+ ])
+
+ asm_name = select(selectors=[
+ (build.target.is_x86, 'ml.exe'),
+ (build.target.is_x86_64, 'ml64.exe'),
+ (build.target.is_armv7, 'armasm.exe'),
+ ])
+
+ def prefix(_type, _path):
+ if not self.under_wine:
+ return _path
+ return '{wine} {type} $WINE_ENV ${{ARCADIA_ROOT}} ${{ARCADIA_BUILD_ROOT}} {path}'.format(
+ wine='${YMAKE_PYTHON} ${input:\"build/scripts/run_msvc_wine.py\"} $(WINE_TOOL-sbr:1093314933)/bin/wine64 -v140',
+ type=_type,
+ path=_path
+ )
+
+ self.masm_compiler = prefix('masm', os.path.join(bindir, tools_name, asm_name))
+ self.link = prefix('link', os.path.join(bindir, tools_name, 'link.exe'))
+ self.lib = prefix('lib', os.path.join(bindir, tools_name, 'lib.exe'))
+
+
+class MSVC(object):
+ # noinspection PyPep8Naming
+ class WIN32_WINNT(object):
+ Macro = '_WIN32_WINNT'
+ Windows7 = '0x0601'
+ Windows8 = '0x0602'
+
+ def __init__(self, tc, build):
+ """
+ :type tc: MSVCToolchainOptions
+ :type build: Build
+ """
+ if not isinstance(tc, MSVCToolchainOptions):
+ raise TypeError('Got {} ({}) instead of an MSVCToolchainOptions'.format(tc, type(tc)))
+
+ self.build = build
+ self.tc = tc
+
+
+class MSVCToolchain(MSVC, Toolchain):
+ def __init__(self, tc, build):
+ """
+ :type tc: MSVCToolchainOptions
+ :param build: Build
+ """
+ Toolchain.__init__(self, tc, build)
+ MSVC.__init__(self, tc, build)
+
+ if self.tc.from_arcadia and not self.tc.ide_msvs:
+ self.platform_projects.append('build/platform/msvc')
+ if tc.under_wine:
+ self.platform_projects.append('build/platform/wine')
+
+ def print_toolchain(self):
+ super(MSVCToolchain, self).print_toolchain()
+
+ emit('TOOLCHAIN_ENV', format_env(self.tc.get_env(), list_separator=';'))
+
+ if self.tc.sdk_version:
+ emit('WINDOWS_KITS_VERSION', self.tc.sdk_version)
+
+ # TODO(somov): Заглушка для тех мест, где C_FLAGS_PLATFORM используется
+ # для любых платформ. Нужно унифицировать с GnuToolchain.
+ emit('C_FLAGS_PLATFORM')
+
+ if self.tc.under_wine:
+ emit('WINE_ENV', format_env({'WINEPREFIX_SUFFIX': '4.0'}))
+
+
+class MSVCCompiler(MSVC, Compiler):
+ def __init__(self, tc, build):
+ Compiler.__init__(self, tc, 'MSVC')
+ MSVC.__init__(self, tc, build)
+
+ def print_compiler(self):
+ super(MSVCCompiler, self).print_compiler()
+
+ target = self.build.target
+
+ win32_winnt = self.WIN32_WINNT.Windows7
+
+ warns_enabled = [
+ 4018, # 'expression' : signed/unsigned mismatch
+ 4265, # 'class' : class has virtual functions, but destructor is not virtual
+ 4296, # 'operator' : expression is always false
+ 4431, # missing type specifier - int assumed
+ ]
+ warns_as_error = [
+ 4013, # 'function' undefined; assuming extern returning int
+ ]
+ warns_disabled = [
+ 4127, # conditional expression is constant
+ 4200, # nonstandard extension used : zero-sized array in struct/union
+ 4201, # nonstandard extension used : nameless struct/union
+ 4351, # elements of array will be default initialized
+ 4355, # 'this' : used in base member initializer list
+ 4503, # decorated name length exceeded, name was truncated
+ 4510, # default constructor could not be generated
+ 4511, # copy constructor could not be generated
+ 4512, # assignment operator could not be generated
+ 4554, # check operator precedence for possible error; use parentheses to clarify precedence
+ 4610, # 'object' can never be instantiated - user defined constructor required
+ 4706, # assignment within conditional expression
+ 4800, # forcing value to bool 'true' or 'false' (performance warning)
+ 4996, # The POSIX name for this item is deprecated
+ 4714, # function marked as __forceinline not inlined
+ 4197, # 'TAtomic' : top-level volatile in cast is ignored
+ 4245, # 'initializing' : conversion from 'int' to 'ui32', signed/unsigned mismatch
+ 4324, # 'ystd::function<void (uint8_t *)>': structure was padded due to alignment specifier
+ 5033, # 'register' is no longer a supported storage class
+ ]
+
+ defines = [
+ '/DARCADIA_ROOT=${ARCADIA_ROOT}',
+ '/DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT}',
+ '/DFAKEID=$CPP_FAKEID',
+ '/DWIN32',
+ '/D_WIN32',
+ '/D_WINDOWS',
+ '/D_CRT_SECURE_NO_WARNINGS',
+ '/D_CRT_NONSTDC_NO_WARNINGS',
+ '/D_USE_MATH_DEFINES',
+ '/D__STDC_CONSTANT_MACROS',
+ '/D__STDC_FORMAT_MACROS',
+ '/D_USING_V110_SDK71_',
+ '/D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES',
+ '/DNOMINMAX',
+ '/DWIN32_LEAN_AND_MEAN',
+ ]
+
+ cxx_defines = [
+ # Use builtin offsetof implementation
+ # instead of a crutcy macro defined in ucrt/stddef.h.
+ # The latter can not be used in constexpr statements.
+ '/D_CRT_USE_BUILTIN_OFFSETOF',
+ ]
+
+ if target.is_x86_64:
+ defines.extend(('/D_WIN64', '/DWIN64'))
+
+ if target.is_armv7:
+ defines.extend(('/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE', '/D__arm__'))
+
+ winapi_unicode = False
+
+ emit_big('''
+ MSVC_INLINE_OPTIMIZED=yes
+ when ($MSVC_INLINE_OPTIMIZED == "yes") {
+ MSVC_INLINE_FLAG=/Zc:inline
+ }
+ when ($MSVC_INLINE_OPTIMIZED == "no") {
+ MSVC_INLINE_FLAG=/Zc:inline-
+ }''')
+
+ flags = [
+ '/nologo', '/Zm500', '/GR', '/bigobj', '/FC', '/EHs', '/errorReport:prompt', '$MSVC_INLINE_FLAG', '/utf-8',
+ # enable standard conforming mode
+ '/permissive-'
+ ]
+ flags += self.tc.arch_opt
+
+ c_warnings = ['/we{}'.format(code) for code in warns_as_error]
+ c_warnings += ['/w1{}'.format(code) for code in warns_enabled]
+ c_warnings += ['/wd{}'.format(code) for code in warns_disabled]
+ cxx_warnings = []
+
+ flags_debug = ['/Ob0', '/Od', '/D_DEBUG']
+ flags_release = ['/Ox', '/Ob2', '/Oi', '/DNDEBUG']
+
+ flags_c_only = []
+ cxx_flags = [
+ # Provide proper __cplusplus value
+ # https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
+ "/Zc:__cplusplus"
+ ]
+
+ if self.tc.use_clang:
+ flags += [
+ # Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems.
+ '-fcase-insensitive-paths',
+ # Enable standard-conforming behavior and generate duplicate symbol error in case of duplicated global constants.
+ # See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678#c0
+ '-fno-common',
+ ]
+ if target.is_x86:
+ flags.append('-m32')
+ if target.is_x86_64:
+ flags.append('-m64')
+
+ # Some warnings are getting triggered even when NO_COMPILER_WARNINGS is enabled
+ flags.extend((
+ '-Wno-c++11-narrowing',
+ '-Wno-register',
+ ))
+
+ c_warnings.extend((
+ '-Wno-absolute-value',
+ '-Wno-bitwise-op-parentheses',
+ '-Wno-dll-attribute-on-redeclaration',
+ '-Wno-extern-initializer',
+ '-Wno-format',
+ '-Wno-ignored-pragma-optimize',
+ '-Wno-inconsistent-dllimport',
+ '-Wno-int-conversion',
+ '-Wno-int-to-void-pointer-cast',
+ '-Wno-invalid-noreturn',
+ '-Wno-logical-op-parentheses',
+ '-Wno-macro-redefined',
+ '-Wno-parentheses',
+ '-Wno-pragma-pack',
+ '-Wno-tautological-constant-out-of-range-compare',
+ '-Wno-unknown-argument',
+ '-Wno-unknown-warning-option',
+ ))
+
+ cxx_warnings += [
+ '-Woverloaded-virtual', '-Wno-attributes',
+ '-Wno-register', # IGNIETFERRO-722 needed for contrib
+ '-Wimport-preprocessor-directive-pedantic',
+ '-Wno-undefined-var-template',
+ ]
+ if self.tc.version_at_least(2019):
+ cxx_warnings += [
+ '-Wno-deprecated-volatile',
+ '-Wno-deprecated-anon-enum-enum-conversion',
+ '-Wno-defaulted-function-deleted',
+ '-Wno-deprecated-enum-enum-conversion',
+ '-Wno-ambiguous-reversed-operator',
+ '-Wno-deprecated-enum-float-conversion',
+ '-Wno-pointer-to-int-cast', # didn't fail on linux
+ ]
+
+ # heretic: на момент коммита в нашей конфигурации указано, что тулчейн clang11-windows - аналог msvc 2019
+ # https://a.yandex-team.ru/arc/trunk/arcadia/build/ya.conf.json?rev=r7910792#L2185
+ # сам clang11 по дефолту представляется msvc2017 (#define _MSC_VER 1911)
+ # https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/clang11/lib/Driver/ToolChains/MSVC.cpp?rev=r7913127#L1352
+ # вручную заставляем его представляться msvc2019 (#define _MSC_VER 1921)
+ # значение версии взято вот отсюда:
+ # https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/llvm11/include/llvm/Support/Compiler.h?blame=true&rev=r7913127#L89
+ if self.tc.version_exactly(2019):
+ flags.append('-fms-compatibility-version=19.21')
+
+ if self.tc.ide_msvs:
+ cxx_warnings += [
+ '-Wno-unused-command-line-argument',
+ ]
+
+ if target.is_armv7:
+ masm_io = '-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}'
+ else:
+ masm_io = '/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}'
+
+ emit('OBJ_CROSS_SUF', '$OBJ_SUF')
+ emit('OBJECT_SUF', '$OBJ_SUF.obj')
+ emit('WIN32_WINNT', '{value}'.format(value=win32_winnt))
+ defines.append('/D{name}=$WIN32_WINNT'.format(name=self.WIN32_WINNT.Macro))
+
+ if winapi_unicode:
+ defines += ['/DUNICODE', '/D_UNICODE']
+ else:
+ defines += ['/D_MBCS']
+
+ # https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
+ if is_positive('DLL_RUNTIME'): # XXX
+ flags_debug += ['/MDd']
+ flags_release += ['/MD']
+ else:
+ flags_debug += ['/MTd']
+ flags_release += ['/MT']
+
+ vc_include = os.path.join(self.tc.vc_root, 'include') if not self.tc.ide_msvs else "$(VC_VC_IncludePath.Split(';')[0].Replace('\\','/'))"
+
+ if not self.tc.ide_msvs:
+ def include_flag(path):
+ return '{flag}"{path}"'.format(path=path, flag='/I ' if not self.tc.use_clang else '-imsvc')
+
+ for name in ('shared', 'ucrt', 'um', 'winrt'):
+ flags.append(include_flag(os.path.join(self.tc.kit_includes, name)))
+ flags.append(include_flag(vc_include))
+
+ flags_msvs_only = []
+
+ if self.tc.ide_msvs:
+ if not self.tc.use_clang:
+ flags_msvs_only += ['/FD', '/MP']
+ debug_info_flags = '/Zi /FS'
+ else:
+ debug_info_flags = '/Z7'
+
+ if self.tc.use_clang:
+ emit('CLANG_CL', 'yes')
+ if self.tc.ide_msvs:
+ emit('IDE_MSVS', 'yes')
+ if self.tc.use_arcadia_toolchain:
+ emit('USE_ARCADIA_TOOLCHAIN', 'yes')
+
+ emit('CXX_COMPILER', self.tc.cxx_compiler)
+ emit('C_COMPILER', self.tc.c_compiler)
+ emit('MASM_COMPILER', self.tc.masm_compiler)
+ append('C_DEFINES', defines)
+ emit('CFLAGS_DEBUG', flags_debug)
+ emit('CFLAGS_RELEASE', flags_release)
+ emit('MASMFLAGS', '')
+ emit('DEBUG_INFO_FLAGS', debug_info_flags)
+ append('C_WARNING_OPTS', c_warnings)
+ append('CXX_WARNING_OPTS', cxx_warnings)
+
+ if self.build.is_release:
+ emit('CFLAGS_PER_TYPE', '$CFLAGS_RELEASE')
+ if self.build.is_debug:
+ emit('CFLAGS_PER_TYPE', '$CFLAGS_DEBUG')
+ if self.build.is_ide:
+ emit('CFLAGS_PER_TYPE', '@[debug|$CFLAGS_DEBUG]@[release|$CFLAGS_RELEASE]')
+
+ append('CFLAGS', flags, flags_msvs_only, '$CFLAGS_PER_TYPE', '$DEBUG_INFO_FLAGS', '$C_WARNING_OPTS', '$C_DEFINES', '$USER_CFLAGS', '$USER_CFLAGS_GLOBAL')
+ append('CXXFLAGS', '$CFLAGS', '/std:' + self.tc.cxx_std, cxx_flags, cxx_defines, '$CXX_WARNING_OPTS', '$USER_CXXFLAGS', '$USER_CXXFLAGS_GLOBAL')
+ append('CONLYFLAGS', flags_c_only, '$USER_CONLYFLAGS', '$USER_CONLYFLAGS_GLOBAL')
+
+ append('BC_CFLAGS', '$CFLAGS')
+ append('BC_CXXFLAGS', '$BC_CFLAGS', '$CXXFLAGS')
+
+ ucrt_include = os.path.join(self.tc.kit_includes, 'ucrt') if not self.tc.ide_msvs else "$(UniversalCRT_IncludePath.Split(';')[0].Replace('\\','/'))"
+
+ # clang-cl has '#include_next', and MSVC hasn't. It needs separately specified CRT and VC include directories for libc++ to include second in order standard C and C++ headers.
+ if not self.tc.use_clang:
+ append('CFLAGS', '/DY_UCRT_INCLUDE="%s"' % ucrt_include)
+ append('CFLAGS', '/DY_MSVC_INCLUDE="%s"' % vc_include)
+
+ emit_big('''
+ when ($NO_WSHADOW == "yes") {
+ C_WARNING_OPTS += /wd4456 /wd4457
+ }
+ when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS = /w
+ CXX_WARNING_OPTS =
+ }
+ when ($NO_OPTIMIZE == "yes") {
+ OPTIMIZE = /Od
+ }''')
+
+ emit('SFDL_FLAG', ['/E', '/C', '/P', '/TP', '/Fi$SFDL_TMP_OUT'])
+ emit('WERROR_FLAG', '/WX')
+ emit('WERROR_MODE', self.tc.werror_mode)
+
+ if not self.tc.under_wine:
+ emit('CL_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'cl')
+ emit('ML_WRAPPER', '${YMAKE_PYTHON}', '${input:"build/scripts/fix_msvc_output.py"}', 'ml')
+ else:
+ emit('CL_WRAPPER')
+ emit('ML_WRAPPER')
+
+ emit('_SRC_C_NODEPS_CMD',
+ '${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo${OUTFILE} ${SRC} ${EXTRA_C_FLAGS} ${pre=/I :INC} '
+ '${CFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}'
+ )
+ emit('_SRC_CPP_CMD',
+ '${TOOLCHAIN_ENV} ${CL_WRAPPER} ${CXX_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} '
+ '${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CXXFLAGS} ${SRCFLAGS} ${_LANG_CFLAGS_VALUE} ${requirements;hide:CC_REQUIREMENTS} '
+ '${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}'
+ )
+ emit('_SRC_C_CMD',
+ '${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} '
+ '${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CFLAGS} ${CONLYFLAGS} ${SRCFLAGS} ${requirements;hide:CC_REQUIREMENTS} '
+ '${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"}'
+ )
+ emit('_SRC_M_CMD', '$_EMPTY_CMD')
+ emit('_SRC_MASM_CMD',
+ '${cwd:ARCADIA_BUILD_ROOT} ${TOOLCHAIN_ENV} ${ML_WRAPPER} ${MASM_COMPILER} ${MASMFLAGS} ${SRCFLAGS} ' +
+ masm_io + '${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p AS"} ${kv;hide:"pc yellow"}'
+ )
+
+
+class MSVCLinker(MSVC, Linker):
+ def __init__(self, tc, build):
+ MSVC.__init__(self, tc, build)
+ Linker.__init__(self, tc, build)
+
+ def print_linker(self):
+ super(MSVCLinker, self).print_linker()
+
+ target = self.build.target
+
+ linker = self.tc.link
+ linker_lib = self.tc.lib
+
+ arch = select(no_default=True, selectors=(
+ (target.is_x86, 'x86'),
+ (target.is_x86_64, 'x64'),
+ (target.is_armv7, 'arm'),
+ ))
+
+ libpaths = []
+ if not self.tc.ide_msvs:
+ if self.tc.kit_libs:
+ libpaths.extend([os.path.join(self.tc.kit_libs, name, arch) for name in ('um', 'ucrt')])
+ libpaths.append(os.path.join(self.tc.vc_root, 'lib', arch))
+
+ ignored_errors = [
+ 4221
+ ]
+
+ flag_machine = '/MACHINE:{}'.format(arch.upper())
+
+ flags_ignore = ['/IGNORE:{}'.format(code) for code in ignored_errors]
+
+ flags_common = ['/NOLOGO', '/ERRORREPORT:PROMPT', '/SUBSYSTEM:CONSOLE', '/TLBID:1', '$MSVC_DYNAMICBASE', '/NXCOMPAT']
+ flags_common += flags_ignore
+ flags_common += [flag_machine]
+
+ flags_debug_only = []
+ flags_release_only = []
+
+ if self.tc.ide_msvs:
+ flags_common += ['/INCREMENTAL']
+ else:
+ flags_common += ['/INCREMENTAL:NO']
+
+ if self.tc.use_clang:
+ flags_debug_only.append('/STACK:4194304')
+
+ if is_negative_str(preset('NO_DEBUGINFO', 'no')):
+ if self.tc.ide_msvs:
+ flags_debug_only.append('/DEBUG:FASTLINK' if not self.tc.use_clang else '/DEBUG')
+ flags_release_only.append('/DEBUG')
+ else:
+ # No FASTLINK for ya make, because resulting PDB would require .obj files (build_root's) to persist
+ flags_common.append('/DEBUG')
+
+ if not self.tc.ide_msvs:
+ flags_common += ['/LIBPATH:"{}"'.format(path) for path in libpaths]
+
+ link_flags_debug = flags_common + flags_debug_only
+ link_flags_release = flags_common + flags_release_only
+ link_flags_lib = flags_ignore + [flag_machine]
+
+ stdlibs = [
+ 'advapi32.lib',
+ 'comdlg32.lib',
+ 'crypt32.lib',
+ 'dnsapi.lib',
+ 'gdi32.lib',
+ 'iphlpapi.lib',
+ 'kernel32.lib',
+ 'mswsock.lib',
+ 'ole32.lib',
+ 'oleaut32.lib',
+ 'psapi.lib',
+ 'rpcrt4.lib',
+ 'secur32.lib',
+ 'shell32.lib',
+ 'shlwapi.lib',
+ 'user32.lib',
+ 'userenv.lib',
+ 'uuid.lib',
+ 'version.lib',
+ 'winmm.lib',
+ 'winspool.lib',
+ 'ws2_32.lib',
+ ]
+
+ emit('LINK_LIB_CMD', linker_lib)
+ emit('LINK_EXE_CMD', linker)
+ emit('LINK_LIB_FLAGS', link_flags_lib)
+ emit('LINK_EXE_FLAGS_RELEASE', link_flags_release)
+ emit('LINK_EXE_FLAGS_DEBUG', link_flags_debug)
+ emit('LINK_STDLIBS', stdlibs)
+ emit('LDFLAGS_GLOBAL', '')
+ emit('LDFLAGS', '')
+ emit('OBJADDE', '')
+
+ if self.build.is_release:
+ emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_RELEASE')
+ if self.build.is_debug:
+ emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_DEBUG')
+ if self.build.is_ide and self.tc.ide_msvs:
+ emit('LINK_EXE_FLAGS_PER_TYPE', '@[debug|$LINK_EXE_FLAGS_DEBUG]@[release|$LINK_EXE_FLAGS_RELEASE]')
+
+ emit('LINK_EXE_FLAGS', '$LINK_EXE_FLAGS_PER_TYPE')
+
+ 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')
+ else:
+ emit('LIB_WRAPPER')
+ emit('LINK_WRAPPER')
+
+ emit('LINK_WRAPPER_DYNLIB', '${YMAKE_PYTHON}', '${input:"build/scripts/link_dyn_lib.py"}', '--arch', 'WINDOWS', '--target', '$TARGET')
+ emit_big('''
+ EXPORTS_VALUE=
+ when ($EXPORTS_FILE) {
+ LINK_IMPLIB_VALUE=$LINK_IMPLIB
+ EXPORTS_VALUE=/DEF:${input:EXPORTS_FILE}
+ }''')
+
+ 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
+ # the tail of link commands will be added in the third command file
+ srcs_globals = '--start-wa --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} --ya-end-command-file --end-wa \
+ --ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file'
+ emit('REAL_LINK_DYN_LIB_CMDLINE', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LINK_WRAPPER} ${LINK_WRAPPER_DYNLIB} ${LINK_EXE_CMD} \
+ ${LINK_IMPLIB_VALUE} /DLL /OUT:${qe;rootrel:TARGET} ${LINK_EXTRA_OUTPUT} ${EXPORTS_VALUE} \
+ ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+ ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}',
+ srcs_globals, '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+ $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE --ya-end-command-file')
+ emit('REAL_LINK_DYN_LIB', '$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ emit('SWIG_DLL_JAR_CMD', '$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD')
+
+ head_link_lib = '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD}'
+ tail_link_lib = '--ya-start-command-file ${qe;rootrel:AUTO_INPUT} $LINK_LIB_FLAGS --ya-end-command-file \
+ ${requirements;hide:LIB_REQUIREMENTS} ${hide;kv:"soe"} ${hide;kv:"p AR"} ${hide;kv:"pc light-red"}'
+ emit('LINK_LIB', '${GENERATE_MF} &&', head_link_lib, '/OUT:${qe;rootrel:TARGET}', tail_link_lib)
+ emit('GLOBAL_LINK_LIB', head_link_lib, '/OUT:${qe;rootrel:GLOBAL_TARGET}', tail_link_lib)
+
+ emit('LINK_EXE_CMDLINE', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && ${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LINK_WRAPPER}',
+ '${LINK_EXE_CMD} /OUT:${qe;rootrel:TARGET} \
+ ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+ ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} ',
+ '${LINK_EXTRA_OUTPUT}', srcs_globals, '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE \
+ ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} --ya-end-command-file \
+ ${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}')
+ emit('LINK_EXE', '$LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ emit('LINK_DYN_LIB', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB ${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}')
+
+ emit('LINK_EXEC_DYN_LIB_CMDLINE', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && ${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LINK_WRAPPER} ${LINK_WRAPPER_DYNLIB} ${LINK_EXE_CMD} \
+ /OUT:${qe;rootrel:TARGET} ${LINK_EXTRA_OUTPUT} ${EXPORTS_VALUE} \
+ ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \
+ ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL}', srcs_globals,
+ '--ya-start-command-file ${VCS_C_OBJ_RR} ${qe;rootrel:AUTO_INPUT} ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+ $LINK_EXE_FLAGS $LINK_STDLIBS $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE --ya-end-command-file \
+ ${hide;kv:"soe"} ${hide;kv:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${hide;kv:"pc blue"}')
+ emit('LINK_EXEC_DYN_LIB', '$LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)')
+
+ emit('LINK_GLOBAL_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel:TARGET} \
+ --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} ${qe;rootrel;ext=.obj:SRCS_GLOBAL} ${qe;rootrel:AUTO_INPUT} $LINK_LIB_FLAGS --ya-end-command-file')
+ emit('LINK_PEERS_FAT_OBJECT', '${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} /OUT:${qe;rootrel;output:REALPRJNAME.lib} \
+ --ya-start-command-file ${qe;rootrel:PEERS} $LINK_LIB_FLAGS --ya-end-command-file')
+ emit('LINK_FAT_OBJECT', '${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $LINK_GLOBAL_FAT_OBJECT && $LINK_PEERS_FAT_OBJECT ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}') # noqa E501
+
+
+# TODO(somov): Rename!
+Compilers = {
+ 'gnu': (GnuToolchain, GnuCompiler, LD),
+ 'clang': (GnuToolchain, GnuCompiler, LD),
+ 'xcode': (GnuToolchain, GnuCompiler, LD),
+ 'msvc': (MSVCToolchain, MSVCCompiler, MSVCLinker),
+}
+
+
+class Ragel(object):
+ def __init__(self):
+ self.rlgen_flags = []
+ self.ragel_flags = []
+ self.ragel6_flags = []
+
+ def configure_toolchain(self, build, compiler):
+ if isinstance(compiler, MSVCCompiler):
+ self.set_default_flags(optimized=False)
+ elif isinstance(compiler, GnuCompiler):
+ self.set_default_flags(optimized=build.is_release and not build.is_sanitized)
+ else:
+ raise ConfigureError('Unexpected compiler {}'.format(compiler))
+
+ def set_default_flags(self, optimized):
+ if optimized:
+ self.rlgen_flags.append('-G2')
+ self.ragel6_flags.append('-CG2')
+ else:
+ self.rlgen_flags.append('-T0')
+ self.ragel6_flags.append('-CT0')
+
+ def print_variables(self):
+ emit('RLGEN_FLAGS', self.rlgen_flags)
+ emit('RAGEL_FLAGS', self.ragel_flags)
+ emit('RAGEL6_FLAGS', self.ragel6_flags)
+
+
+class Python(object):
+ def __init__(self, tc):
+ self.python = None
+ self.flags = None
+ self.ldflags = None
+ self.libraries = None
+ self.includes = None
+ self.tc = tc
+
+ def configure_posix(self, python=None, python_config=None):
+ python = python or preset('PYTHON_BIN') or which('python')
+ python_config = python_config or preset('PYTHON_CONFIG') or which('python-config')
+
+ if python is None or python_config is None:
+ return
+
+ # python-config dumps each option on one line in the specified order
+ config = get_stdout([python_config, '--cflags', '--ldflags', '--includes']) or ''
+ config = config.split('\n')
+ if len(config) < 3:
+ return
+
+ self.python = python
+ self.flags = config[0]
+ self.ldflags = config[1]
+ self.includes = config[2]
+ # Do not split libraries from ldflags.
+ # They are not used separately and get overriden together, so it is safe.
+ # TODO(somov): Удалить эту переменную и PYTHON_LIBRARIES из makelist-ов.
+ self.libraries = ''
+ if preset('USE_ARCADIA_PYTHON') == 'no' and not preset('USE_SYSTEM_PYTHON') and not self.tc.os_sdk_local:
+ raise Exception("Use fixed python (see https://clubs.at.yandex-team.ru/arcadia/15392) or set OS_SDK=local flag")
+
+ def print_variables(self):
+ variables = Variables({
+ 'PYTHON_BIN': self.python,
+ 'PYTHON_FLAGS': self.flags,
+ 'PYTHON_LDFLAGS': self.ldflags,
+ 'PYTHON_LIBRARIES': self.libraries,
+ 'PYTHON_INCLUDE': self.includes
+ })
+
+ variables.update_from_presets()
+ variables.reset_if_any(reset_value='PYTHON-NOT-FOUND')
+ variables.emit()
+
+
+class Perl(object):
+ # Parse (key, value) from "version='5.26.0';" lines
+ PERL_CONFIG_RE = re.compile(r"^(?P<key>\w+)='(?P<value>.*)';$", re.MULTILINE)
+
+ def __init__(self):
+ self.perl = None
+ self.version = None
+ self.privlib = None
+ self.archlib = None
+
+ def configure_local(self, perl=None):
+ self.perl = perl or preset('PERL') or which('perl')
+ if self.perl is None:
+ return
+
+ # noinspection PyTypeChecker
+ config = dict(self._iter_config(['version', 'privlibexp', 'archlibexp']))
+ self.version = config.get('version')
+ self.privlib = config.get('privlibexp')
+ self.archlib = config.get('archlibexp')
+
+ def print_variables(self, prefix=''):
+ variables = Variables({
+ prefix + 'PERL': self.perl,
+ prefix + 'PERL_VERSION': self.version,
+ prefix + 'PERL_PRIVLIB': self.privlib,
+ prefix + 'PERL_ARCHLIB': self.archlib,
+ })
+
+ variables.reset_if_any(reset_value='PERL-NOT-FOUND')
+ variables.emit(with_ignore_comment=variables.keys())
+
+ def _iter_config(self, config_keys):
+ # Run perl -V:version -V:etc...
+ perl_config = [self.perl] + ['-V:{}'.format(key) for key in config_keys]
+ config = six.ensure_str(get_stdout(perl_config) or '')
+
+ start = 0
+ while True:
+ match = Perl.PERL_CONFIG_RE.search(config, start)
+ if match is None:
+ break
+ yield match.group('key', 'value')
+ start = match.end()
+
+
+class Setting(object):
+ def __init__(self, key, auto=None, convert=None, rewrite=False):
+ self.key = key
+
+ self.auto = auto
+ self.convert = convert
+
+ self.preset = preset(key)
+ self.from_user = self.preset is not None
+ self.rewrite = rewrite
+
+ self._value = Setting.no_value
+
+ @property
+ def value(self):
+ if self._value is Setting.no_value:
+ self._value = self.calculate_value()
+ return self._value
+
+ def calculate_value(self):
+ if not self.from_user:
+ return self.auto if not callable(self.auto) else self.auto()
+ else:
+ return self.preset if not self.convert else self.convert(self.preset)
+
+ @value.setter
+ def value(self, value):
+ if self.from_user:
+ raise ConfigureError("Variable {key} already set by user to {old}. Can not change it's value to {new}".format(key=self.key, old=self._value, new=value))
+ self._value = value
+
+ def emit(self):
+ if not self.from_user or self.rewrite:
+ emit(self.key, self.value)
+
+ no_value = object()
+
+
+class Cuda(object):
+ def __init__(self, build):
+ """
+ :type build: Build
+ """
+ self.build = build
+
+ self.have_cuda = Setting('HAVE_CUDA', auto=self.auto_have_cuda, convert=to_bool)
+
+ self.cuda_root = Setting('CUDA_ROOT')
+ self.cuda_version = Setting('CUDA_VERSION', auto=self.auto_cuda_version, convert=self.convert_major_version, rewrite=True)
+ self.use_arcadia_cuda = Setting('USE_ARCADIA_CUDA', auto=self.auto_use_arcadia_cuda, convert=to_bool)
+ self.use_arcadia_cuda_host_compiler = Setting('USE_ARCADIA_CUDA_HOST_COMPILER', auto=self.auto_use_arcadia_cuda_host_compiler, convert=to_bool)
+ self.cuda_use_clang = Setting('CUDA_USE_CLANG', auto=False, convert=to_bool)
+ self.cuda_host_compiler = Setting('CUDA_HOST_COMPILER', auto=self.auto_cuda_host_compiler)
+ self.cuda_host_compiler_env = Setting('CUDA_HOST_COMPILER_ENV')
+ self.cuda_host_msvc_version = Setting('CUDA_HOST_MSVC_VERSION')
+ self.cuda_nvcc_flags = Setting('CUDA_NVCC_FLAGS', auto=[])
+
+ self.peerdirs = ['build/platform/cuda']
+
+ self.nvcc_std = '-std=c++14'
+ if self.build.tc.type == 'msvc':
+ self.nvcc_std = self.nvcc_std.replace('-std=', '/std:')
+
+ self.nvcc_flags = []
+
+ if not self.have_cuda.value:
+ return
+
+ if self.cuda_host_compiler.value:
+ self.nvcc_flags.append('--compiler-bindir=$CUDA_HOST_COMPILER')
+
+ if self.use_arcadia_cuda.value:
+ self.cuda_root.value = '$CUDA_RESOURCE_GLOBAL'
+
+ if self.build.target.is_linux_x86_64 and self.build.tc.is_clang:
+ # TODO(somov): Эта настройка должна приезжать сюда автоматически из другого места
+ self.nvcc_flags.append('-I$OS_SDK_ROOT/usr/include/x86_64-linux-gnu')
+
+ def print_(self):
+ self.print_variables()
+ self.print_macros()
+
+ def print_variables(self):
+ self.have_cuda.emit()
+ if not self.have_cuda.value:
+ return
+
+ if self.use_arcadia_cuda.value and self.cuda_host_compiler.value is None:
+ logger.warning('$USE_ARCADIA_CUDA is set, but no $CUDA_HOST_COMPILER')
+
+ self.setup_vc_root()
+
+ self.cuda_root.emit()
+ self.cuda_version.emit()
+ self.use_arcadia_cuda.emit()
+ self.use_arcadia_cuda_host_compiler.emit()
+ self.cuda_use_clang.emit()
+ self.cuda_host_compiler.emit()
+ self.cuda_host_compiler_env.emit()
+ self.cuda_host_msvc_version.emit()
+ self.cuda_nvcc_flags.emit()
+
+ emit('NVCC_UNQUOTED', self.build.host.exe('$CUDA_ROOT', 'bin', 'nvcc'))
+ emit('NVCC', '${quo:NVCC_UNQUOTED}')
+ emit('NVCC_STD', self.nvcc_std)
+ emit('NVCC_FLAGS', self.nvcc_flags, '$CUDA_NVCC_FLAGS')
+ emit('NVCC_OBJ_EXT', '.o' if not self.build.target.is_windows else '.obj')
+
+ def print_macros(self):
+ if not self.cuda_use_clang.value:
+ cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"} ${tool:"tools/mtime0"} $NVCC $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $SRCFLAGS ${input;hide:"build/platform/cuda/cuda_runtime_include.h"} $CUDA_HOST_COMPILER_ENV ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p CC"} ${kv;hide:"pc light-green"}' # noqa E501
+ else:
+ cmd = '$CXX_COMPILER --cuda-path=$CUDA_ROOT $C_FLAGS_PLATFORM -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} $CXXFLAGS $SRCFLAGS $TOOLCHAIN_ENV ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p CU"} ${kv;hide:"pc green"}' # noqa E501
+
+ emit('_SRC_CU_CMD', cmd)
+ emit('_SRC_CU_PEERDIR', ' '.join(sorted(self.peerdirs)))
+
+ def have_cuda_in_arcadia(self):
+ host, target = self.build.host_target
+
+ if not any((host.is_linux_x86_64, host.is_macos_x86_64, host.is_windows_x86_64, host.is_linux_powerpc)):
+ return False
+
+ if host != target:
+ if not(host.is_linux_x86_64 and target.is_linux_armv8):
+ return False
+ if not self.cuda_version.from_user:
+ return False
+ if self.cuda_version.value not in ('11.3',):
+ raise ConfigureError('Only CUDA 11.3 are available for cross compilation from linux-x86 to linux-aarch64.\nUse -DCUDA_VERSION=11.3 flag.')
+
+ if self.cuda_version.value in ('8.0', '9.0', '9.1', '9.2', '10.0'):
+ raise ConfigureError('CUDA versions 8.x, 9.x and 10.0 are no longer supported.\nSee DEVTOOLS-7108.')
+
+ if self.cuda_version.value in ('10.1', '11.0', '11.1', '11.2', '11.3', '11.4'):
+ return True
+
+ return False
+
+ def auto_have_cuda(self):
+ if is_positive('MUSL'):
+ return False
+ if self.build.is_sanitized:
+ return False
+ return self.cuda_root.from_user or self.use_arcadia_cuda.value and self.have_cuda_in_arcadia()
+
+ def auto_cuda_version(self):
+ if self.use_arcadia_cuda.value:
+ return '10.1'
+
+ if not self.have_cuda.value:
+ return None
+
+ nvcc_exe = self.build.host.exe(os.path.expanduser(self.cuda_root.value), 'bin', 'nvcc')
+
+ def error():
+ raise ConfigureError('Failed to get CUDA version from {}'.format(nvcc_exe))
+
+ version_output = get_stdout([nvcc_exe, '--version']) or error()
+ match = re.search(r'^Cuda compilation tools, release (\d+)\.\d+,', version_output, re.MULTILINE) or error()
+
+ return match.group(1)
+
+ def convert_major_version(self, value):
+ if value == '10':
+ return '10.1'
+ elif value == '11':
+ return '11.3'
+ else:
+ return value
+
+ def auto_use_arcadia_cuda(self):
+ return not self.cuda_root.from_user
+
+ def auto_use_arcadia_cuda_host_compiler(self):
+ return not self.cuda_host_compiler.from_user and not self.cuda_use_clang.value
+
+ def auto_cuda_host_compiler(self):
+ if not self.use_arcadia_cuda_host_compiler.value:
+ return None
+
+ host, target = self.build.host_target
+
+ if host.is_windows_x86_64 and target.is_windows_x86_64:
+ return self.cuda_windows_host_compiler()
+
+ return select((
+ (host.is_linux_x86_64 and target.is_linux_x86_64, '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang'),
+ (host.is_linux_x86_64 and target.is_linux_armv8, '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang'),
+ (host.is_linux_powerpc and target.is_linux_powerpc, '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/bin/clang'),
+ (host.is_macos_x86_64 and target.is_macos_x86_64, '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/usr/bin/clang'),
+ ))
+
+ def cuda_windows_host_compiler(self):
+ vc_version = '14.28.29910'
+
+ env = {
+ 'Y_VC_Version': vc_version,
+ 'Y_VC_Root': '$CUDA_HOST_TOOLCHAIN_RESOURCE_GLOBAL/VC/Tools/MSVC/{}'.format(vc_version),
+ 'Y_SDK_Version': self.build.tc.sdk_version,
+ 'Y_SDK_Root': '$WINDOWS_KITS_RESOURCE_GLOBAL',
+ }
+
+ if not self.build.tc.ide_msvs:
+ self.peerdirs.append('build/platform/msvc')
+ self.cuda_host_compiler_env.value = format_env(env)
+ self.cuda_host_msvc_version.value = vc_version
+ return '%(Y_VC_Root)s/bin/HostX64/x64/cl.exe' % env
+
+ def setup_vc_root(self):
+ if not self.cuda_host_compiler.from_user:
+ return # Already set in cuda_windows_host_compiler()
+
+ if self.cuda_host_compiler_env.from_user:
+ return # We won't override user setting
+
+ def is_root(dir):
+ return all(os.path.isdir(os.path.join(dir, name)) for name in ('bin', 'include', 'lib'))
+
+ def get_root():
+ path, old_path = os.path.normpath(self.cuda_host_compiler.value), None
+ while path != old_path:
+ if is_root(path):
+ return path
+ path, old_path = os.path.dirname(path), path
+
+ vc_root = get_root()
+ if vc_root:
+ self.cuda_host_compiler_env.value = format_env({'Y_VC_Root': vc_root})
+
+
+class CuDNN(object):
+ def __init__(self, cuda):
+ """
+ :type cuda: Cuda
+ """
+ self.cuda = cuda
+
+ self.cudnn_version = Setting('CUDNN_VERSION', auto=self.auto_cudnn_version)
+
+ def have_cudnn(self):
+ return self.cudnn_version.value in ('7.6.5', '8.0.5')
+
+ def auto_cudnn_version(self):
+ return '7.6.5'
+
+ def print_(self):
+ if self.cuda.have_cuda.value and self.have_cudnn():
+ self.cudnn_version.emit()
+
+
+def print_swig_config():
+ def get_swig_tool():
+ tool = preset('USER_SWIG_TOOL')
+ if not tool:
+ tool = which('swig')
+ if not tool:
+ raise ConfigureError('SWIG_TOOL is not specified and "swig" is not found in PATH')
+ return os.path.abspath(tool)
+
+ def get_swig_library(tool):
+ library = preset('USER_SWIG_LIBRARY')
+ if not library:
+ library, code = get_stdout_and_code((tool, '-swiglib'))
+ if code != 0:
+ raise ConfigureError('SWIG_LIBRARY is not specified and "{} -swiglib" failed'.format(tool))
+ library = library.split('\n')[0]
+ return os.path.abspath(library)
+
+ use_local_swig = to_bool(preset('USER_USE_LOCAL_SWIG'), False) or bool(preset('USER_SWIG_TOOL'))
+ if use_local_swig:
+ tool = get_swig_tool()
+ library = get_swig_library(tool)
+
+ emit('USE_LOCAL_SWIG', True)
+ emit('SWIG_TOOL', tool)
+ emit('SWIG_LIBRARY', library)
+
+
+def main():
+ options = opts()
+
+ arcadia = Arcadia(options.arcadia_root)
+
+ ymake = YMake(arcadia)
+
+ ymake.print_core_conf()
+ ymake.print_presets()
+ ymake.print_settings()
+
+ build = Build(arcadia, options.build_type, options.toolchain_params, force_ignore_local_files=not options.local_distbuild)
+ build.print_build()
+
+ emit_with_ignore_comment('CONF_SCRIPT_DEPENDS', __file__)
+
+
+if __name__ == '__main__':
+ main()