arcadia-devtools c4f810ee97 intermediate changes 2 лет назад
..
all.md c4f810ee97 intermediate changes 2 лет назад
readme.md c4f810ee97 intermediate changes 2 лет назад

readme.md

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

Table of contents

Multimodule 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 DOCS()

Documentation project multimodule.

When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site. 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().

@see: DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS().

Multimodule 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 JAR_PROGRAM

Not documented yet.

Multimodule JAVA_CONTRIB_PROGRAM

Not documented yet.

Multimodule 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 JTEST

Not documented yet.

Multimodule JTEST_FOR

Not documented yet.

Multimodule JTEST_YMAKE

Not documented yet.

Multimodule JUNIT5

Not documented yet.

Multimodule JUNIT5_YMAKE

Not documented yet.

Multimodule 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 MKDOCS()

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 MKDOCS() module behaves like a UNION (supplying own content and dependencies to build target). Peerdirs from modules other than MKDOCS are not accepted. Most usual macros are not accepted, only used with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS().

@see: DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS().

Multimodule 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(), OPTIMIZE_PY_PROTOS(), INCLUDE_TAGS(), EXCLUDE_TAGS()

Multimodule 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_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(), PY2MODULE()

Multimodule PY23_TEST

Not documented yet.

Multimodule 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 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 SANDBOX_PY23_TASK

Not documented yet.

Multimodule 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_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 SSQLS_LIBRARY

Not documented yet.

Multimodule 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()

Modules

Module 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_WITH_MAIN([name]) #deprecated

Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation

Module 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 primarily 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

Not documented yet.

Module CONTAINER_LAYER: _BARE_UNIT

Not documented yet.

Module CPP_STYLE_TEST: PY3TEST_BIN

Not documented yet.

Module CUSTOM_BUILD_LIBRARY: LIBRARY

Not documented yet.

Module DEFAULT_IOS_INTERFACE: IOS_INTERFACE

Not documented yet.

Module DLL(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])

Dynamic library module definition.

  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 pairs and JSON-line .symlist files
  3. PREFIX allows you to change the prefix of the output file (default DLL has the prefix "lib").
  4. DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).

    Module DLL_TOOL

    DLL_TOOL is a DLL that can be used as a LD_PRELOAD tool.

    Module DOCS_LIBRARY: _DOCS_BARE_UNIT

    Not documented yet.

    Module 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()

    Module 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 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 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_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_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_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 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_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 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 IOS_INTERFACE()

    iOS GUI module definition

    Module JAVA_CONTRIB: _JAR_BASE

    Not documented yet.

    Module JAVA_CONTRIB_PROXY: _JAR_BASE

    Not documented yet.

    Module JAVA_LIBRARY()

    The module describing java library build.

    Documentation: https://wiki.yandex-team.ru/yatool/java/

    Module 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 MCU_PROGRAM([progname])

    Program module for microcontrollers. Converts ELF to Intel HEX, Motorola S-record and raw binary file formats. If name is not specified it will be generated from the name of the containing project directory.

    Module 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()

    Module PROGRAM([progname])

    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

    Not documented yet.

    Module PROTO_REGISTRY: PROTO_DESCRIPTIONS

    Not documented yet.

    Module 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 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 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_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 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 PY3TEST_BIN() #deprecated

    Same as PY3TEST. Don't use this, use PY3TEST instead.

    Module 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_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 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 PYTEST_BIN() #deprecated

    Same as PY2TEST. Don't use this, use PY2TEST instead.

    Module 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 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 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()

    Module 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 SO_PROGRAM(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])

    Executable dynamic library module definition.

    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 pairs and JSON-line .symlist files
    3. PREFIX allows you to change the prefix of the output file.
    4. Module TS_BUNDLE([name])

      The Webpack bundle, bundles JavaScript code. Build results are bundle.tar, typings and source mappings (depending on local tsconfig.json settings).

      @see NODE_MODULES() @example

      TS_BUNDLE()
          SRCS(src/index.ts)
          NODE_MODULES()
      END()
      
      Module 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() @example

      TS_LIBRARY()
          SRCS(src/index.ts)
          NODE_MODULES()
      END()
      
      Module 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_LIB([name]) # deprecated

      The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib.

      Module UNION(name)

      Collection of PEERDIR dependencies, files and artifacts. UNION doesn't build its peers, just provides those to modules depending on it. When specified 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])

      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)

      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])

      Generic unit test module.

      Module 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 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_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_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_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_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_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_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 YT_UNITTEST([name])

      YT Unit test module based on mapreduce/yt/library/utlib

      Module Y_BENCHMARK([benchmarkname])

      Benchmark test based on the library/cpp/testing/benchmark.

      For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark

      Macros

      Macro AARS(Aars...)

      This macro is strictly prohibited to use outside of mapsmobi project

      Macro AAR_GRADLE_SCRIPT_GENERATOR(python_script)

      Not documented yet.

      Macro AAR_LOCAL_MAVEN_REPO(repo...)

      Not documented yet.

      Macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout")

      Not documented yet.

      Macro ADDINCL([FOR ][GLOBAL dir]* dirlist) # builtin

      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 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()

      The macro adds the -I flag to the source compilation flags of the current project.

      Macro ADD_CHECK

      Not documented yet.

      Macro ADD_CHECK_PY_IMPORTS

      Not documented yet.

      Macro ADD_CLANG_TIDY()

      Not documented yet.

      Macro 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_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_DLLS_TO_JAR()

      Not documented yet.

      Macro ADD_PERL_MODULE(Dir ModuleName)

      Add dependency on specified Perl module to the library

      Macro ADD_PYTEST_BIN

      Not documented yet.

      Macro ADD_PYTEST_SCRIPT

      Not documented yet.

      Macro ADD_YTEST

      Not documented yet.

      Macro 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".

      More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/

      Macro ALL_PYTEST_SRCS([RECURSIVE] [Dirs...])

      Puts all .py-files from given Dirs (relative to projects') into TEST_SRCS of the current module. If Dirs is omitted project directory is used

      RECURSIVE makes lookup recursive with respect to Dirs

      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 TEST_SRCS()

      Macro 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 ALL_RESOURCE_FILES(Ext [PREFIX {prefix}] [STRIP {strip}] Dirs...)

      This macro collects all files with extension Ext and Passes them to RESOURCE\_FILES macro as relative to current directory

      PREFIX and STRIP have the same meaning as in ROURCES\_FILES, both are applied over moddir-relative paths

      Note: This macro can be used multiple times per ya.make, but only once for each Ext value Note: Wildcards are not allowed neither as Ext nor in Dirs

      Macro 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(), SRCS()

      Macro ANNOTATION_PROCESSOR(processors...)

      The macro is in development. Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY().

      Macro APPHOST()

      Emit APPHOST service code for all .proto files in a PROTO_LIBRARY. This works only for C++ and Java at the moment.

      Macro 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_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_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 ASM_PREINCLUDE(AsmFiles...)

      Supply additional .asm files to all assembler calls within a module

      Macro ASSERT

      Not documented yet.

      Macro BASE_CODEGEN(tool_path prefix)

      Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.

      Macro BPF(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...)

      Emit eBPF bytecode from .c file. Note: Output name is used as is, no extension added.

      Macro BUILDWITH_CYTHON_C(Src Options...)

      Generates .c file from .pyx.

      Macro BUILDWITH_CYTHON_CPP(Src Options...)

      Generates .cpp file from .pyx.

      Macro BUILDWITH_RAGEL6(Src Options...)

      Compile .rl file using Ragel6.

      Macro 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_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_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_ONLY_IF(variables) # builtin

      Print warning if all variables are false. For example, BUILD_ONLY_IF(LINUX WIN32)

      Macro 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 BUNDLE(...)

      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 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 CGO_CFLAGS(Flags...)

      Compiler flags specific to CGO compilation

      Macro CGO_LDFLAGS(Files...)

      Linker flags specific to CGO linking

      Macro CGO_SRCS(Files...)

      .go sources to be built with CGO

      Macro CHECK_CONTRIB_CREDITS

      Not documented yet.

      Macro 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 exception for the rest of other rules.

      Directory 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()

      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...)

      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 CMAKE_EXPORTED_TARGET_NAME(Name)

      Forces to use the name given as cmake target name without changing the name of output artefact. This macro should be used to resolve target name conflicts in exported cmake project when changing module name is not applicable. For example both CUDA and non-CUDA py modules for catboost should have same name lib_catboost.so and both of them are defined as PY_ANY_MODULE(_catboost). adding CMAKE_EXPORTED_TARGET_NAME(_catboost_non_cuda) to the non CUDA module ya.make file changes exported cmake target name but preserve generated artefact file name.

      Macro COLLECT_FRONTEND_FILES(Varname, Dir)

      Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname

      Macro 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_YDB_API_SPECS_LEGACY(VarName Paths...) #deprecated

      This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited

      Macro COMPILE_C_AS_CXX()

      Compile .c files as .cpp ones within a module.

      Macro COMPILE_LUA(Src, [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_21(Src, [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_NLG(Src...)

      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...)

      Not documented yet.

      Macro 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 CONFTEST_LOAD_POLICY_LOCAL()

      Loads conftest.py files in a way that pytest does it

      Macro 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 COPY

      Not documented yet.

      Macro 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 automatically.
      • OUTPUT_INCLUDES output_includes... - Output file dependencies.
      • INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain. In order to do so VAR should be filled by PREPARE_INDUCED_DEPS macro, stating target files (by type) and set of 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_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 CPP_ADDINCL(Dirs...)

      Not documented yet.

      Macro CPP_ENUMS_SERIALIZATION

      Not documented yet.

      Macro CPP_PROTO_PLUGIN(Name Tool Suf DEPS )

      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 )

      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 )

      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)

      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

      Not documented yet.

      Macro CREDITS_DISCLAIMER

      Not documented yet.

      Macro 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 CUDA_NVCC_FLAGS(compiler flags)

      Add the specified flags to the compile line .cu-files.

      Macro 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 CXXFLAGS(compiler_flags)

      Add the specified flags to the compilation command of .cpp (but not .c) files.

      Macro DARWIN_SIGNED_RESOURCE(Resource, Relpath)

      Not documented yet.

      Macro DARWIN_STRINGS_RESOURCE(Resource, Relpath)

      Not documented yet.

      Macro DATA([path...])

      Specifies the path to the data necessary test. Valid values are: arcadia/ , arcadia_tests_data/ and sbr://. 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)

      Creates a header file DebianVersion.h define the DEBIAN_VERSION taken from the File.

      Macro DECIMAL_MD5_LOWER_32_BITS( [FUNCNAME funcName] [inputs...])

      Generates .cpp file with one defined function 'const char* () { return ""; }'. 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

      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

      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

      Associate name with sbr-id.

      Ask devtools@yandex-team.ru if you need more information

      Macro DEFAULT(varname value) #builtin

      Sets varname to value if value is not set yet

      Macro 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 module 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

      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

      Add direct PEERDIR's only in java compile classpath

      Macro DISABLE(varname) #builtin

      Sets varname to 'no'

      Macro DISABLE_DATA_VALIDATION()

      Not documented yet.

      Macro DLL_FOR(path/to/lib [libname] [major_ver [minor_ver]] [EXPORTS symlist_file]) #builtin

      DLL module definition based on specified LIBRARY

      Macro DOCS_BUILDER(tool) # deprecated

      Not documented yet.

      Macro DOCS_CONFIG(path)

      Specify path to config file for DOCS multimodule if it differs from default path. If used for MKDOCS multimodule the default path is "%%project_directory%%/mkdocs.yml". If used for DOCS multimodule the default path is "%%project_directory%%/.yfm". Path must be either Arcadia root relative.

      @see: DOCS

      Macro DOCS_COPY_FILE(FROM src_dir [NAMESPCE dst_dir] files...)

      Copy files from src_dir to $BINDIR/dst_dir

      Macro 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

      Macro 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

      Macro 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

      Macro DUMPERF_CODEGEN(Prefix)

      A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used

      Macro DYNAMIC_LIBRARY_FROM(Paths)

      Use specified libraries as sources of DLL

      Macro IF(condition) .. ELSEIF(other_condition) .. ELSE() .. ENDIF() #builtin

      Apply macros if none of previous conditions hold

      Macro IF(condition) .. ELSEIF(other_condition) .. ELSE() .. ENDIF() #builtin

      Apply macros if other_condition holds while none of previous conditions hold

      Macro EMBED_JAVA_VCS_INFO()

      Embed manifest with vcs info into EXTERNAL\_JAVA\_LIBRARY By default this is disabled.

      Macro ENABLE(varname) #builtin

      Sets varname to 'yes'

      Macro ENABLE_PREVIEW()

      Enable java preview features.

      Macro END() # builtin

      The end of the module

      Macro IF(condition) .. ELSEIF(other_condition) .. ELSE() .. ENDIF() #builtin

      End of conditional construct

      Macro ENV(key[=value])

      Sets env variable key to value (gets value from system env by default).

      Macro EXCLUDE

      EXCLUDE(prefixes)

      The macro is in development. Specifies which libraries should be excluded from the classpath.

      Macro EXCLUDE_TAGS(tags...) # builtin

      Instantiate from multimodule all variants except ones with tags listed

      Macro EXPORTS_SCRIPT(exports_file)

      Specify exports script within PROGRAM, DLL and DLL-derived modules. This accepts 2 kind of files: .exports with pairs and JSON-line .symlist files. The other option use EXPORTS parameter of the DLL module itself.

      @see: DLL

      Macro EXPORT_ALL_DYNAMIC_SYMBOLS()

      Export all non-hidden symbols as dynamic when linking a PROGRAM.

      Macro EXPORT_YMAPS_PROTO() # maps-specific

      Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace.

      Macro 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 EXTERNAL_JAR

      Not documented yet.

      Macro EXTERNAL_RESOURCE(...) #builtin, deprecated

      Don't use this. Use RESOURCE_LIBRARY or FROM_SANDBOX instead

      Macro EXTRADIR(...) #builtin, deprecated

      Ignored

      Macro EXTRALIBS(liblist) # builtin

      Add external dynamic libraries during program linkage stage

      Macro EXTRALIBS_STATIC(Libs...)

      Add the specified external static libraries to the program link

      Macro FAT_RESOURCE

      Not documented yet.

      Macro FBS_NAMESPACE(NAMESPACE, PATH...)

      Not documented yet.

      Macro FILES

      Not documented yet.

      Macro FLATC_FLAGS(flags...)

      Add flags to flatc command line

      Macro 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 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_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_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 FROM_ARCHIVE(Src [RENAME ] OUT_[NOAUTO] [EXECUTABLE] [OUTPUT_INCLUDES ] [INDUCED_DEPS $VARs...])

      Process file archive as FROM_SANDBOX().

      Macro FROM_MDS([FILE] key [RENAME ] OUT_[NOAUTO] [EXECUTABLE] [OUTPUT_INCLUDES ] [INDUCED_DEPS $VARs...])

      Download resource from MDS with the specified key and process like FROM_SANDBOX().

      Macro FROM_NPM(NAME VERSION SKY_ID INTEGRITY INTEGRITY_ALGO TARBALL_PATH)

      Not documented yet.

      Macro FROM_SANDBOX([FILE] resource_id [AUTOUPDATED script] [RENAME ] OUT_[NOAUTO] [EXECUTABLE] [OUTPUT_INCLUDES ] [INDUCED_DEPS $VARs...])

      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 or INDUCED_DEPS. 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.

      OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them. INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain.

                          In order to do so VAR should be filled by PREPARE\_INDUCED\_DEPS macro, stating target files (by type) and set of dependencies
      

      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...])

      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...])

      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])

      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)

      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)

      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

      Generate python bindings for protobuf files. Macro is obsolete and not recommended for use!

      Macro GENERATE_SCRIPT

      heretic@ promised to make tutorial here Don't forget Feel free to remind

      Macro 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 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 GO_ASM_FLAGS(flags)

      Add the specified flags to the go asm compile command line.

      Macro 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_CGO1_FLAGS(flags)

      Add the specified flags to the go cgo compile command line.

      Macro GO_CGO2_FLAGS(flags)

      Add the specified flags to the go cgo compile command line.

      Macro GO_COMPILE_FLAGS(flags)

      Add the specified flags to the go compile command line.

      Macro GO_EMBED_DIR(DIR)

      Define an embed directory DIR.

      Macro GO_EMBED_PATTERN(PATTERN)

      Define an embed pattern.

      Macro GO_TEST_EMBED_DIR(DIR)

      Define an embed directory DIR for internal go tests.

      Macro GO_XTEST_EMBED_DIR(DIR)

      Define an embed directory DIR for external go tests.

      Macro GO_FAKE_OUTPUT(go-src-files...)

      Not documented yet.

      Macro GO_GRPC_GATEWAY_SRCS()

      Use of grpc-gateway plugin (Supported for Go only).

      Macro GO_GRPC_GATEWAY_SWAGGER_SRCS()

      Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).

      Macro GO_LDFLAGS(Flags...)

      Link flags for GO_PROGRAM linking from .go sources

      Macro GO_LINK_FLAGS(flags)

      Add the specified flags to the go link command line.

      Macro GO_MOCKGEN_FROM(Path)

      Not documented yet.

      Macro GO_MOCKGEN_MOCKS()

      Not documented yet.

      Macro GO_MOCKGEN_REFLECT()

      Not documented yet.

      Macro GO_MOCKGEN_TYPES(First, Rest...)

      Not documented yet.

      Macro GO_PACKAGE_NAME(Name)

      Override name of a Go package.

      Macro 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_SKIP_TESTS(TestNames...)

      Define a set of tests that should not be run. NB! Subtests are not taken into account!

      Macro GO_TEST_EMBED_PATTERN(PATTERN)

      Define an embed pattern for internal go tests.

      Macro GO_TEST_FOR(path/to/module) #builtin

      Produces go test for specified module

      Macro GO_TEST_SRCS(Files...)

      .go sources for internal tests of a module

      Macro GO_XTEST_EMBED_PATTERN(PATTERN)

      Define an embed pattern for external go tests.

      Macro GO_XTEST_SRCS(Files...)

      .go sources for external tests of a module

      Macro 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 IDEA_EXCLUDE_DIRS()

      Exclude specified directories from an idea project generated by ya ide idea Have no effect on regular build.

      Macro IDEA_JAR_SRCS(Args...)

      Not documented yet.

      Macro 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_RESOURCE_DIRS()

      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

      Apply macros if condition holds

      Macro INCLUDE(filename) #builtin

      Include file textually and process it as a part of the ya.make

      Macro INCLUDE_TAGS(tags...) # builtin

      Additionally instantiate from multimodule all variants with tags listed (overrides default)

      Macro INDUCED_DEPS(Extension Path...) #builtin

      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...)

      Not documented yet.

      Macro IOS_APP_COMMON_FLAGS(Flags...)

      Not documented yet.

      Macro IOS_APP_SETTINGS

      Not documented yet.

      Macro IOS_ASSETS

      Not documented yet.

      Macro JAR_ANNOTATION_PROCESSOR(Classes...)

      Not documented yet.

      Macro JAR_EXCLUDE(Filters...)

      Filter .jar file content: remove matched files * and ** patterns are supported (like JAVA_SRCS)

      Macro JAR_INCLUDE(Filters...)

      Filter .jar file content: keep only matched files * and ** patterns are supported (like JAVA_SRCS)

      Macro JAR_RESOURCE(Id)

      Not documented yet.

      Macro JAVAC_FLAGS(Args...)

      Set additional Java compilation flags.

      Macro 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_EXTERNAL_DEPENDENCIES(file1 file2 ...)

      Add non-source java external build dependency (like lombok config file)

      Macro JAVA_IGNORE_CLASSPATH_CLASH_FOR([classes])

      Ignore classpath clash test fails for classes

      Macro JAVA_MODULE

      Not documented yet.

      Macro JAVA_PROTO_PLUGIN(Name Tool DEPS )

      Define protoc plugin for Java with given Name that emits extra outputs using Tool. Extra dependencies are passed via DEPS

      Macro JAVA_RESOURCE(JAR, SOURCES="")

      Not documented yet.

      Macro 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_TEST

      Not documented yet.

      Macro JAVA_TEST_DEPS

      Not documented yet.

      Macro MODULE_JDK(Version)

      Specify JDK version for module

      Macro 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... Use the for C++ source files only. You should specify file name with the extension as Out. Further processing will be done according this extension.

      Macro 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... 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...)

      Arguments to run Java programs in tests.

      Documentation: https://wiki.yandex-team.ru/yatool/test/

      Macro KOTLINC_FLAGS(-flags)

      Set additional Kotlin compilation flags.

      Macro LARGE_FILES([AUTOUPDATED] Files...)

      Use large file ether from working copy or from remote storage via placeholder .external If is present locally (and not a symlink!) it will be copied to build directory. Otherwise macro will try to locate .external, parse it retrieve ot during build phase.

      Macro 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 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_TEXTS(File)

      This macro specifies the filename with all library licenses texts

      Macro LINKER_SCRIPT(Files...)

      Specify files to be used as a linker script

      Macro LINK_EXEC_DYN_LIB_IMPL

      $usage: LINK_EXEC_DYN_LIB_IMPL(peers...) # internal

      Macro LINK_EXE_IMPL

      $usage: LINK_EXE_IMPL(peers...) # internal

      Macro LINT()

      Set linting levem for sources of the module

      Macro 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

      Macro LJ_ARCHIVE(NAME Name LuaFiles...)

      Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys

      Macro LLVM_BC

      Not documented yet.

      Macro 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_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_LL(Input Output Opts...)

      Compile LLVM bytecode to object representation. Note: Output name is used as is, no extension added.

      Macro 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_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 LOCAL_JAR(File)

      Not documented yet.

      Macro LOCAL_SOURCES_JAR(File)

      Not documented yet.

      Macro MACROS_WITH_ERROR

      Not documented yet.

      Macro MANUAL_GENERATION(Outs...)

      Not documented yet.

      Macro MAPKITIDL(idl-file-name...

      [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...)

      Not documented yet.

      Macro MASMFLAGS(compiler flags)

      Add the specified flags to the compilation command of .masm files.

      Macro 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 MESSAGE([severity] message) # builtin

      Print message with given severity level (STATUS, FATAL_ERROR)

      Macro METAQUERYFILES(filenames...) #deprecated

      This macro does nothing and will be removed

      Macro 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 MX_FORMULAS(BinFiles...) # deprecated, matrixnet

      Create MatrixNet formulas archive

      Macro 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_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 NGINX_MODULES(Modules...)

      Not documented yet.

      Macro NODE_MODULES()

      Materializes node\_modules.tar bundle according to the module's lockfile.

      @see NPM_CONTRIBS()

      Macro NO_BUILD_IF(variables) # builtin

      Print warning if some variable is true

      Macro 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_CLANG_COVERAGE()

      Disable heavyweight clang coverage for the module

      Macro NO_CLANG_TIDY()

      Not documented yet.

      Macro NO_COMPILER_WARNINGS()

      Disable all compiler warnings in the module. Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.

      Macro NO_CPU_CHECK()

      Compile module without startup CPU features check

      Macro 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_DEBUG_INFO()

      Compile files without debug info collection.

      Macro NO_DOCTESTS()

      Disable doctests in PY[|3|23_]TEST

      Macro NO_EXPORT_DYNAMIC_SYMBOLS()

      Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM.

      Macro 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 useful 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

      This macro currently does nothing. This is default behavior which cannot be overridden at module level.

      Macro 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_LINT()

      Do not check for style files included in PY_SRCS, TEST_SRCS, JAVA_SRCS.

      Macro NO_LTO()

      Disable any lto (link-time optimizations) for the module. This will compile module source files as usual (without LTO) but will not prevent lto-enabled linking of entire program if global settings say so.

      Macro NO_MYPY()

      Not documented yet.

      Macro NO_NEED_CHECK()

      Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.

      Macro NO_OPTIMIZE()

      Build code without any optimizations (-O0 mode).

      Macro 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_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_PYTHON_COVERAGE()

      Disable python coverage for module

      Macro 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_SANITIZE()

      Disable all sanitizers for the module.

      Macro NO_SANITIZE_COVERAGE()

      Disable lightweight coverage (-fsanitize-coverage) for the module.

      Macro NO_SSE4()

      Compile module without SSE4

      Macro 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_WERROR()

      Override WERROR() behavior Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.

      Macro NO_WSHADOW()

      Disable C++ shadowing warnings.

      Macro 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 ONLY_TAGS(tags...) # builtin

      Instantiate from multimodule only variants with tags listed

      Macro 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 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 OWNER(owners...) # builtin

      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)

      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()

      Macro PACKAGE_STRICT()

      Not documented yet.

      Macro PACK_GLOBALS_IN_LIBRARY()

      Not documented yet.

      Macro PARTITIONED_RECURSE([BALANCING_CONFIG config] [LOCAL] dirs...) # builtin

      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

      Add directories to the build if tests are demanded. Arguments are processed in chunks

      Macro PARTITIONED_RECURSE_ROOT_RELATIVE([BALANCING_CONFIG config] dirlist) # builtin

      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

      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 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)
      3. Macro PIRE_INLINE(FILES...)

        Not documented yet.

        Macro PIRE_INLINE_CMD(SRC)

        Not documented yet.

        Macro PREPARE_INDUCED_DEPS(VAR Type Files...)

        Format value for INDUCED\_DEPS param in certain macros and assign to VAR This tells that files of Type resulted from code generation macros (not neccessarily directly, but in processing chain of generated files) should have extra dependencies from list of Files...

        Prominent example here is Cython: one can generate .pyx file that may depend on .pxd and have cimpot from certain .h. The former is dependency for .pyx itself, while the latter is dependency for .pyx.cpp resulted from Cython-processing of generated pyx. The code ganeration will look like:

        PREPARE_INDUCED_DEPS(PYX_DEPS pyx imported.pxd)
        PREPARE_INDUCED_DEPS(CPP_DEPS cpp cdefed.h)
        RUN_PYTHON3(generate_pyx.py genereted.pyx OUT generated.pyx INDUCED_DEPS $PYX_DEPS $CPP_DEPS)
        

        The VAR will basically contain pair of Type:[Files...] in a form suitable for passing as an element of array parameter. This is needed because language of ya.make doesn't support Dict params right now and so it is impossible to directly pass something like {Type1:[Files2...], Type2:[Files2...]}

        Macro PRINT_MODULE_TYPE

        Not documented yet.

        Macro PROCESS_DOCS

        Not documented yet.

        Macro PROCESS_MKDOCS

        Not documented yet.

        Macro PROGURAD_RULES(ProguardRuleFiles...)

        This macro is strictly prohibited to use outside of mapsmobi project

        Macro PROTO2FBS(InputProto)

        Produce flatbuf schema out of protobuf description.

        Macro 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_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 dependency management it sets ADDINCLs for both .cpp headers includes and .proto imports. If .proto expected to be used outside 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...)

        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[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])

        Run a python script with $(PYTHON)/python built from devtools/huge_python. These macros are similar: RUN_PROGRAM, RUN_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[_NOPARSE] inputs... - Input files. NOPARSE inputs are treated as textual and not parsed for dependencies regardless of file extensions.
        • 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.
        • INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain. In order to do so VAR should be filled by PREPARE_INDUCED_DEPS macro, stating target files (by type) and set of dependencies

        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()

        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()

        Use in PY_ANY_MODULE to set it up for Python 2.x.

        Macro 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_MODULE()

        Use in PY_ANY_MODULE to set it up for Python 3.x.

        Macro PYTHON_PATH(Path)

        Set path to Python that will be used to runs scripts in tests

        Macro 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

        Macro 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).

        Macro PY_ENUMS_SERIALIZATION

        Not documented yet.

        Macro PY_EXTRA_LINT_FILES(files...)

        Add extra Python files for linting. This macro allows adding Python files which has no .py extension.

        Macro 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

        Macro 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_PROTOS_FOR(path/to/module) #builtin, deprecated

        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 )

        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 )

        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)

        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_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_SSQLS_SRCS(Srcs...)

        Not documented yet.

        Macro REAL_LINK_DYN_LIB_IMPL

        $usage: REAL_LINK_DYN_LIB_IMPL(peers...) # internal

        Macro REAL_LINK_EXEC_DYN_LIB_IMPL

        $usage: REAL_LINK_EXEC_DYN_LIB_IMPL(peers...) # internal

        Macro REAL_LINK_EXE_IMPL

        $usage: REAL_LINK_EXE_IMPL(peers...) # internal

        Macro RECURSE([LOCAL] dirs...) # builtin

        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

        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

        In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA_ROOT})

        Macro REGISTER_SANDBOX_IMPORT

        Not documented yet.

        Macro REGISTER_YQL_PYTHON_UDF

        Not documented yet.

        Macro REQUIREMENTS([cpu:] [disk_usage:] [ram:] [ram_disk:] [container:] [network:] [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 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 RESOLVE_PROTO()

        Enable include resolving within UNIONs and let system .proto being resolved among .proto/.gztproto imports

        Note: it is currently impossible to enable 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

        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})

        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...)

        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

        Not documented yet.

        Macro RUN

        Not documented yet.

        Macro RUN_ANTLR(Args...)

        Macro to invoke ANTLR3 generator (general case)

        Macro RUN_ANTLR4(Args...)

        Macro to invoke ANTLR4 generator (general case)

        Macro RUN_ANTLR4_CPP(GRAMMAR, OUTPUT_INCLUDES, LISTENER, VISITOR, Args...)

        Macro to invoke ANTLR4 generator (Cpp)

        Macro RUN_ANTLR4_GO(GRAMMAR, OUTPUT_INCLUDES, LISTENER, VISITOR, Args...)

        Macro to invoke ANTLR4 generator (Go)

        Macro RUN_JAVA_PROGRAM(Args...)

        Not documented yet.

        Macro RUN_LUA(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])

        Run a lua script. These macros are similar: RUN_PROGRAM, RUN_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[_NOPARSE] inputs... - Input files. NOPARSE inputs are treated as textual and not parsed for dependencies regardless of file extensions.
        • 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.
        • INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain. In order to do so VAR should be filled by PREPARE_INDUCED_DEPS macro, stating target files (by type) and set of dependencies

        For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.

        Macro RUN_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])

        Run a program from arcadia. These macros are similar: RUN_PROGRAM, RUN_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[_NOPARSE] inputs... - Input files. NOPARSE inputs are treated as textual and not parsed for dependencies regardless of file extensions.
        • 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.
        • INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain. In order to do so VAR should be filled by PREPARE_INDUCED_DEPS macro, stating target files (by type) and set of dependencies

        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...)

        Version of RUN() macro to invoke Python scripts @see: RUN()

        Macro RUN_PYTHON3(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...])

        Run a python script with prebuilt python3 interpretor built from devtools/huge_python3. These macros are similar: RUN_PROGRAM, RUN_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[_NOPARSE] inputs... - Input files. NOPARSE inputs are treated as textual and not parsed for dependencies regardless of file extensions.
        • 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.
        • INDUCED_DEPS $VARs... - Dependencies for generated files. Unlike OUTPUT\_INCLUDES these may target files further in processing chain. In order to do so VAR should be filled by PREPARE_INDUCED_DEPS macro, stating target files (by type) and set of dependencies

        For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.

        Macro SDBUS_CPP_ADAPTOR(File)

        Not documented yet.

        Macro SDBUS_CPP_PROXY(File)

        Not documented yet.

        Macro SET(varname value) #builtin

        Sets varname to value

        Macro SETUP_EXECTEST

        Not documented yet.

        Macro SETUP_PYTEST_BIN

        Not documented yet.

        Macro SETUP_RUN_PYTHON

        Not documented yet.

        Macro SET_APPEND(varname appendvalue) #builtin

        Appends appendvalue to varname's value using space as a separator

        Macro SET_APPEND_WITH_GLOBAL(varname appendvalue) #builtin

        Appends appendvalue to varname's value using space as a separator. New value is propagated to dependants

        Macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"")

        Not documented yet.

        Macro 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 SKIP_TEST(Reason)

        Skip the suite defined by test module. Provide a reason to be output in test execution report.

        Macro SOURCE_GROUP(...) #builtin, deprecated

        Ignored

        Macro 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
        2. OUTPUT_INCLUDES
        3. Macro SPLIT_DWARF()

          Emit debug info for the PROGRAM/DLL as a separate file .debug. NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).

          Macro 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 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 SRCDIR(dirlist) # builtin

          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> ...)

          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_C_AVX

          @uasge SRC_C_AVX(File Flags...)

          Compile a single C/C++ file with AVX and additional Flags

          Macro SRC_C_AVX2

          @uasge SRC_C_AVX2(File Flags...)

          Compile a single C/C++ file with AVX2 and additional Flags

          Macro SRC_C_AVX512

          @uasge SRC_C_AVX512(File Flags...)

          Compile a single C/C++ file with AVX512 and additional Flags

          Macro SRC_C_NO_LTO

          @uasge SRC_C_NO_LTO(File Flags...)

          Compile a single C/C++ file with link-time-optimization disabling and additional Flags

          Macro SRC_C_PCLMUL

          @uasge SRC_C_PCLMUL(File Flags...)

          Compile a single C/C++ file with PCLMUL and additional Flags

          Macro SRC_C_PIC

          @uasge SRC_C_PIC(File Flags...)

          Compile a single C/C++ file with -fPIC and additional Flags

          Macro SRC_C_SSE2

          @uasge SRC_C_SSE2(File Flags...)

          Compile a single C/C++ file with SSE2 and additional Flags

          Macro SRC_C_SSE3

          @uasge SRC_C_SSE3(File Flags...)

          Compile a single C/C++ file with SSE3 and additional Flags

          Macro SRC_C_SSE4

          @uasge SRC_C_SSE4(File Flags...)

          Compile a single C/C++ file with SSE4 and additional Flags

          Macro SRC_C_SSE41

          @uasge SRC_C_SSE41(File Flags...)

          Compile a single C/C++ file with SSE4.1 and additional Flags

          Macro SRC_C_SSSE3

          @uasge SRC_C_SSSE3(File Flags...)

          Compile a single C/C++ file with SSSE3 and additional Flags

          Macro SRC_C_XOP

          @uasge SRC_C_XOP(File Flags...)

          Compile a single C/C++ file with (an AMD-specific instruction set, see https://en.wikipedia.org/wiki/XOP_instruction_set) and additional Flags

          Macro SRC_RESOURCE(Id)

          Not documented yet.

          Macro STRIP()

          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 special case BASE_CODEGEN, in which the kernel/struct_codegen/codegen_tool tool is used.

          Macro STYLE(Globs...)

          Not documented yet.

          Macro STYLE_PYTHON()

          Check python3 sources for style issues using black.

          Macro SUBSCRIBER(subscribers...) # builtin

          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

          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)

          Add symlink

          Macro SYSTEM_PROPERTIES([...] [...])

          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...])

          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()

          Not documented yet.

          Macro TASKLET_REG(Name, Lang, Impl, Includes...)

          Not documented yet.

          Macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...)

          Not documented yet.

          Macro TEST_CWD(path)

          Defines working directory for test runs. Often 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

          Not documented yet.

          Macro TEST_JAVA_CLASSPATH_CMD_TYPE(Type)

          Available 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 contains Class-Path attribute COMMAND_FILE via @command_file LIST via flat args

          Macro 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 TIMEOUT(TIMEOUT)

          Sets a timeout on test execution

          Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/

          Macro 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, UBERJAR_HIDING_PREFIX, UBERJAR_HIDE_EXCLUDE_PATTERN, UBERJAR_PATH_EXCLUDE_PREFIX

          Macro UBERJAR_APPENDING_TRANSFORMER(Resource)

          Add AppendingTransformer for UBERJAR() java programs

          Parameters:

          • Resource - Resource name

          @see: UBERJAR

          Macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...)

          Exclude 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, UBERJAR_HIDING_PREFIX

          Macro 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_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value)

          Transform manifest.mf for UBERJAR() java programs, set attribute

          @see: UBERJAR

          Macro UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main)

          Transform manifest.mf for UBERJAR() java programs, set main-class attribute

          @see: UBERJAR

          Macro UBERJAR_PATH_EXCLUDE_PREFIX(Args...)

          Exclude classes matching this patterns from UBERJAR. By default all dependencies of UBERJAR program will lend in a .jar archive.

          @see: UBERJAR

          Macro UBERJAR_SERVICES_RESOURCE_TRANSFORMER()

          Add ServicesResourceTransformer for UBERJAR() java programs

          @see: UBERJAR

          Macro UDF_NO_PROBE()

          Disable UDF import check at build stage

          Macro UPDATE_VCS_JAVA_INFO_NODEP(Jar)

          Not documented yet.

          Macro USE_COMMON_GOOGLE_APIS(APIS...)

          Not documented yet.

          Macro 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_DYNAMIC_CUDA()

          Enable linking of PROGRAM with dynamic CUDA. By default CUDA uses static linking

          Macro USE_ERROR_PRONE()

          Use errorprone instead of javac for .java compilation.

          Macro 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_JAVALITE()

          Use protobuf-javalite for Java

          Macro USE_LINKER_GOLD()

          Use gold linker for a program. This doesn't work in libraries

          Macro USE_PERL_514_LIB()

          Add dependency on Perl 5.14 to your LIBRARY

          Macro USE_PERL_LIB()

          Add dependency on Perl to your LIBRARY

          Macro USE_PLANTUML()

          Use PlantUML plug-in for yfm builder to render UML diagrams into documentation

          Macro 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 with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY. If you'd like to use #include with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY. If you'd like to use #include with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.

          @see: PY2_LIBRARY, PY3_LIBRARY, PY23_LIBRARY

          Macro 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 with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY. If you'd like to use #include with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY. If you'd like to use #include with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.

          @see: PY2_LIBRARY, PY3_LIBRARY, PY23_LIBRARY

          Macro USE_RECIPE(path [arg1 arg2...])

          Provides prepared environment via recipe for test.

          Documentation: https://wiki.yandex-team.ru/yatool/test/recipes

          Macro USE_SKIFF() #wip, do not use

          Use mapreduce/yt/skiff_proto/plugin for C++

          Macro 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 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 VERSION(Args...)

          Specify version of a module. Currently unused by build system, only informative.

          Macro 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 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 WINDOWS_MANIFEST(Manifest)

          Not documented yet.

          Macro WITHOUT_LICENSE_TEXTS()

          This macro indicates that the module has no license text

          Macro WITH_DYNAMIC_LIBS

          $usage: WITH_DYNAMIC_LIBS() # restricted

          Include dynamic libraries as extra PROGRAM/DLL outputs

          Macro WITH_GROOVY()

          Compile groovy source code in this java module

          Macro WITH_JDK()

          Add directory with JDK to JAVA_PROGRAM output

          Macro WITH_KOTLIN()

          Compile kotlin source code in this java module

          Macro WITH_KOTLINC_ALLOPEN(-flags)

          Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html

          Macro WITH_KOTLINC_NOARG(-flags)

          Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html

          Macro 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 YABS_GENERATE_CONF

          Not documented yet.

          Macro YABS_GENERATE_PHANTOM_CONF_PATCH

          Not documented yet.

          Macro YABS_GENERATE_PHANTOM_CONF_TEST_CHECK

          Not documented yet.

          Macro 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 YMAPS_SPROTO(ProtoFiles...) # maps-specific

          Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.

          Macro YP_PROTO_YSON(Files... OUT_OPTS Opts...)

          Generate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen

          Macro YQL_ABI_VERSION(major minor release))

          Specifying the supported ABI for YQL_UDF.

          @see: YQL_UDF()

          Macro YQL_LAST_ABI_VERSION()

          Use the last ABI for YQL_UDF

          Macro 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/