Skip to content

Latest commit

 

History

History

build

Table of contents

Multimodules

Multimodule DOCS()

Definition of the documentation multimodule.

The output artifact is docs.tar.gz with statically generated site (using mkdocs as builder) when built directly When PEERDIRed from other DOCS() behaves like a library (supplying own content and dependencies to build target). Is only used together with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS(). @see: DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS().

Multimodule PROTO_LIBRARY()

Definition of multimodule that builds various variants of libraries. 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 Python versions emit C++ code in addition to Python as optimization PROTO_LIBRARY also supports emission of GRPC code if GRPC() macro is specified. Documentation: https://wiki.yandex-team.ru/yatool/proto\_library/ See: GRPC(), OPTIMIZE_PY_PROTOS()

Multimodule PY23_LIBRARY([name])

Build PY_LIBRARY or PY3_LIBRARY depending on incoming PEERDIR Direct build or build by RECURSE creates both variants For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs

Multimodule PY23_NATIVE_LIBRARY([name])

Build LIBRARY compatible with either Puthon 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_PYTHON macros. This is needed to steer proper headers selection in PYMODULE builds. For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary

Multimodule SANDBOX_TASK([Name])

Multimodule describing Sandbox task (Python code that can be executed by Sandbox system)

As a final target this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX_TASKs as libraries. As PEERDIR target it works like normal PY_LIBRARY with predefined dependency on Sanbox SDK

Currenly Sandbox supports only Python 2.x, so both variants will be compatible only with Python 2.x modules and will select mutimodule variants accordingly. Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary

Multimodule YQL_UDF(name)

Definition of multimodule which is YQL_UDF_MODULE when built directly or referred by BUNDLE and DEPENDS and static LIBRARY is used by PEERDIR

Modules

Module BENCHMARK([benchmarkname])

Benchmark test based on library library/testing/benchmark For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark

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. No new module of this type should be introduced unless it is explicitly approved by C++ committee

Module DEV_DLL_PROXY() # deprecated

The use of this module is strictly prohibited!!! This is a temporary and project-specific solution.

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

Definition of the project is a dynamic library.

  1. major_ver and minor_ver must be integers.
  2. EXPORTS allows you to explicitly specify the list of exported functions.
  3. PREFIX allows you to change the prefix of the output file (default DLL has the prefix "lib").

DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).

Module DLL_JAVA()

DLL built using swig for Java produces dynamic library and a .jar. Dynamic library is treated the same as in the case of PEERDIR from Java to DLL. .jar goes on the classpath.

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

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

Definition of 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. It is recommended not to specify the name

Module FUZZ()

In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput() (example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2\_fuzzer.cc?rev=2919463#L58) This module should be reachable by RECURSE from /autocheck project in Arcadia supported AFL and Libfuzzer on top of a single interface, but the automatic fuzzing still works only through Libfuzzer.

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

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

Definition of the test module based on gtest (contrib/libs/gtest contrib/libs/gmock)

Use publict documentation on gtest for details Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/

Module IOS_APP()

iOS application module definition

Module JAVA_LIBRARY()

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

Module JAVA_PROGRAM()

JAVA_PROGRAM() - module for describing java programs. Output artifacts: .jar and directory with all the jar to the classpath of the formation.

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

Module JTEST()

Java tests module based on JUnit 4 framework

If requested, build system will scan the source code of the module for the presence of junit tests and run them. Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.

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

Module JTEST_FOR(ModuleDir)

Java tests module based on JUnit 4 framework for specified library or program

In contrast to the JTEST, the build system will scan for the presence of the test sources of the module in ModuleDir . As ModuleDir should contain JAVA_PROGRAM or JAVA_LIBRARY . JTEST_FOR also can have its own source, in this case they will be compiled and added to the classpath of a test run. Output artifacts: a jar, a directory of exhaust tests(if requested tests are run).

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

Module JUNIT5()

Java tests module based on JUnit 5 framework

If requested, build system will scan the source code of the module for the presence of junit tests and run them. Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.

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

Module LIBRARY()

Definition of the static library module. This is C++ library, and it selects peers from multimodules accordingly

It is recommended not to specify the name.

Module METAQUERY()

Project Definition - KIWI Meta query. (Objected) https://wiki.yandex-team.ru/robot/manual/kiwi/techdoc/design/metaquery/

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.

Is only used together with the macros FILES(), PACK(), COPY(), CONFIGURE_FILE(), FROM_SANDBOX(), PEERDIR().

Documentation: https://wiki.yandex-team.ru/yatool/large-data/

Module PROGRAM([progname])

Regular program module. If name is not specified it will be generated from the name of the containing project directory.

Module PY3TEST([name])

Definition of the test module for Python 3.x based on py.test

This module is compatible only with PYTHON3-tagged modules and slects peers from multimodules accordingly This module is only compatible with Arcadia Python (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/

Module PY3TEST_BIN() #deprecated

Same as PY3TEST. Don't use this

Module PY3_LIBRARY()

Python 3.x binary library. Builds sources from PY_SRCS to data suitable for PY_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([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. Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/ This only compatible with PYTHON3-tagged modules and selects those from multimodules

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

Definition of 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

Note: this module will always PEERDIR Python2 version of PY23_NATIVE_LIBRARY Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/

Module PYTEST([name])

Definition of the test module for Python 2.x based on py.test

This module is compatible only with PYTHON2-tagged modules and slects peers from multimodules accordingly This module is compatible with non-Arcadia Python

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

Module PYTEST_BIN() #deprecated

Same as PYTEST. Don't use this

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

Definition of the Python external module for any arcadia and 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

Note: Use PYTHON2_MODULE()/PYTHON3_MODULE in order to PEERDIR proper version of PY23_NATIVE_LIBRARY Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/

Module PY_LIBRARY()

Python 2.x binary library. Builds sources from PY_SRCS to data suitable for PY_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 PY_PROGRAM([progname])

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. Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs/ This only compatible with PYTHON2-tagged modules and selects those from multimodules

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

It is recommended not to specify the name. @see: DECLARE_EXTERNAL_RESOURCE()

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

Definition of 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
Module TESTNG()

Java tests module based on TestNG framework

If requested, build system will scan the source code of the module for the presence of junit tests and run them. Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.

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

Module UDF(name [EXPORTS symlist_file] [PREFIX prefix]) # deprecated

Definition of 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 It is recommended not to specify a name

Module UNION(name)

Module is able to collect what is described directly inside it, remember PEERDIRs listed in it, go there and build them. However PEERDIRs build results are not used themselves, semantics of PEERDIR is the same as for LIBRARY. When built directly PEEDIRs won't be built unless it is built via DEPENDS macro, which treats the UNION specially.

Is only used together with the macros FILES(), PEERDIR(), COPY(), FROM_SANDBOX().

Documentation: https://wiki.yandex-team.ru/yatool/large-data/

Module UNITTEST([name])

Unit test module based on library/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 module declaration - extension of UNITTEST module Module UNITTEST_FOR automatically makes 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/

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)

Definition of the extension module for YQL with Python 3.x UDF (User Defined Function YQL) Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/

Module YQL_PYTHON_UDF(name)

Definition of the extension module for YQL with Python 2.x UDF (User Defined Function YQL) https://yql.yandex-team.ru/docs/yt/udf/python/

Module YQL_PYTHON_UDF_TEST(name)

Definition of the Python test for UDF (User Defined Function YQL) 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

Module YQL_UDF_MODULE(name)

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

Definition of 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

Macros

Macro ACCELEO

Not documented yet.

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

The macro adds the -I flag to the source compilation flags of the current project. @params: GLOBAL - extends the search for headers (-I) on the dependent projects

Not documented yet.

Macro ADD_CHECK

Not documented yet.

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

Not documented yet.

Macro ADD_PERL_MODULE(Dir ModuleName)

Add dependency on specified Perl module to the library

Not documented yet.

Not documented yet.

Macro ADD_TEST

Not documented yet.

Macro ADD_WAR([INCLUDE Path Pattern...] [EXCLUDE Path Pattern...] [INCLUDE_DEFAULT Pattern...] [EXCLUDE_DEFAULT Pattern...])

Pack Java module (JAVA_PROGRAM or JAVA_LIBRARY) into war. Parameters control what should be added or shouldn't be added to war archive. Documentation: https://wiki.yandex-team.ru/yatool/java/war

Macro ADD_YTEST

Not documented yet.

Macro ALLOCATOR(Alloc) # Default: LF

Set allocator implementation for a program This may only be specified for programs. Use inside LIBRARY ALLOCATOR() END() leads to errors and stop the build. Available allocators are: "LF", "LF_YT", "LF_DBG", "J", "B", "BS", "BM", "C", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE"

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

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: Consider the file to ya.make:

    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 ARCHIVE(NAME, archive_name files...)

To add data (resources, arbitrary files) Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive

Macro ARCHIVE_ASM(NAME archive_name files...)

Similar to the macro ARCHIVE, but ARCHIVE_ASM:

  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(NAME="", KEYS="", DONTCOMPRESS?"-p":"", Files...)

Not documented yet.

Macro ASM_PREINCLUDE(AsmFiles...)

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

Macro BASE_CODEGEN(tool_path prefix)

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

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_CB(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_PLNS(Src...)

Generate interface header plnmodels.h for Relev model (PLN) Relev specific macro

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

Run a python script with ymake python. These macros are similar: RUN_PROGRAM, LUA, PYTHON, BUILTIN_PYTHON.

Parameters:

  • script_path - Path to the script.
  • args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
  • CWD dir - Absolute path of the working directory.
  • ENV key=value... - Environment variables.
  • TOOL tools... - Auxiliary tool directories.
  • IN inputs... - Input files.
  • OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
  • STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
  • OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.

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

Macro BUNDLE(<Dir [NAME Name]>...)

Brings build artefact from module Dir under optional Name to the current module (e.g. UNION) If NAME is not specified, the name of the Dir's build artefact will be preserved It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice. Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one.

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 gcc 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_DEPENDENT_DIRS(...) #bultin, deprecated

Ignored

Macro CHECK_JAVA_DEPS(<yes|no>)

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 CGFLAGS and C_FLAGS_PLATFORM are not. Note: Output name is used as is, no extension added

Compile .c files ad .cpp ones within a module

Macro COMPILE_SWIFT_MODULE(SRCS{input}[], BRIDGE_HEADER{input}="", Flags...)

Not documented yet.

Macro CONFIGURE_FILE(from to @ONLY)

Copy files with the replacement @CMakeListsVar@ variable CMakeListsVar from ya.make during the build. Similar to the processing of files with the extension .in

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)

Copy file to build root. It is possible to change both location and the name. The file will be just copied. You should explicitly mention it in SRCS under new name for further processing

Macro COPY_FILE_WITH_DEPS(File Destination [OUTPUT_INCLUDES Deps...])

Copy file to build root and specify additional dependencies for it. It is possible to change both location and the name. The file will be just copied. You should explicitly mention it in SRCS under new name for further compilation. File will be recompiled (but not re-copied) if any of specified dependencies changes

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

Creates a .go-file with information about the svn revision and various other things

Can lead to frequent rebuilding programs. Partly off by setting to yes NO_SVN_DEPENDS

Not documented yet.

Not documented yet.

Not documented yet.

Creates a .java-file with information about the svn revision and various other things

Can lead to frequent rebuilding programs. Partly off by setting to yes NO_SVN_DEPENDS

Creates a .h-file with information about the svn revision and various other things

Can lead to frequent rebuilding programs. Partly off by setting to yes NO_SVN_DEPENDS

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 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: arcadia/ , arcadia_tests_data/.

You can also specify the number of the resource required test in cbr format:// (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 "<calculated_md5_hash>"; }'. <calculated_md5_hash> will be md5 hash for all inputs passed to this macro.

Macro DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(name sbr:id platform name1 sbr:id1 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 ...)

It allow you to lock the versions of the libraries from the contrib/java in one place, and all modules of the project when writing PEERDIR not specify a version. For example, if the module says PEERDIR (contrib/java/junit/junit), and

  1. written DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12), the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12
  2. not written appropriate DEPENDENCY_MANAGEMENT, PEERDIR automatically replaced with the default from contrib/java/junit/junit/ya.make. These defaults are always there and are supported in maven-import, which is put there the maximum(available in contrib/java ) version. The property is transitive. That is, if module a depends on module B, and PEERDIR is written in B(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B. Allows you to lock the versions of the libraries from the contrib/java falling in the classpath transitive. For example, if a module written DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12), but not written appropriate PEERDIR(contrib/java/junit/junit),
  3. if you are attracted by dependencies, such as contrib/java/junit/junit/4.11, it will be replaced by contrib/java/junit / junit / 4.12
  4. if the dependency does not extend any junit DEPENDENCY_MANAGEMENT this has no effect This property is not passed transitively. That is, if module a depends on B, and B replaced itself transitively arriving junit-4.11 on junit-4.12, in a through B all the same will arrive junit-4.11.

In the case when the module is written at the same time DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11) PEERDIR wins.

Macro DEPENDS(path1 [path2...])

Buildable targets that should be brought to the test run. It is reasonable to specify only final targets (like programs, DLLs or packages here). And only such targets are taken from multimodules DEPENDS to UNION is the only exception from the rule above: UNIONs are transitively closed at DEPENDS bringing all dependencies to the test

Macro DISABLE(varname) #builtin

Sets varname to 'false'

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

DLL module definition based on specified LIBRARY

Macro DOCS_CONFIG(path)

Specify path to config .yml file for DOCS multimodule if it differs from "%%project_directory%%/mkdocs.yml". Path must be either Arcadia root relative or lie in project directory. @see: DOCS

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_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 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 ENABLE(varname) #builtin

Sets varname to 'true'

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

This allows to specify exports script using separate macro within DLL and DLL-derived modules The other option use EXPORTS parameter of the module itself @see: DLL

Macro EXPORT_YMAPS_PROTO() # maps-specific

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

Macro EXTERNAL_JAR(library.jar)

Is used to indicate the collected external java libraries inside the project JAVA_LIBRARY()

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

Macro EXTERNAL_RESOURCE(...) #builtin, deprecated

Don't use this. Use RESOURCE_LIBRARY or FROM_SANDBOX instead

Macro EXTRADIR(...) #bultin, 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

Not documented yet.

Macro FILES

Not documented yet.

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

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 C++ ut and PyTest.

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

Macro FORK_TESTS()

Splits a test run on chunks classes. The number of chunks can be overridden using the macro SPLIT_FACTOR.

Allows to run tests in parallel. Supported C++ ut and PyTest.

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

Only for PYTEST: 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_MDS([FILE] key OUT_[NOAUTO] )

Downloads the file from MDS using key, unpacks (if not explicitly specified word FILE) and adds the files with the specified names in the build. If the files do not compile, then you need to use the parameter OUT_NOAUTO. Specify the directory, as it build models - input and output data for the node assemblies must be determined.

Macro FROM_SANDBOX([FILE] resource_id is OUT_[NOAUTO] )

Downloads the file from the sandbox to the resource number, unpacks (if not explicitly specified word FILE) and adds the files with the specified names in the build. If the files do not compile, then you need to use the parameter OUT_NOAUTO. Specify the directory, as it build models - input and output data for the node assemblies must be determined.

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. Example: Fuzz_opts ( -Max_len = 1024 -RSS_LIMIT_MB = 8192 )

Should only be used in FUZZ modules Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/

Macro GENERATED_SRCS(srcs... PARSE_META_FROM cpp_srcs... [OUTPUT_INCLUDES output_includes...] [OPTIONS])

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>.template". For example if you want to generate file "example.cpp" then template should be named "example.cpp.template". 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

Jinja 2 template engine is used for template generation. 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/

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/

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!

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. (the details necessary to look in tools/structparser)

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 icommand line.

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_FAKE_OUTPUT(go-src-files...)

Not documented yet.

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

Override name of a Go package.

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_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 excludes specified directories from an idea project generated by ya ide idea

Macro sets specified resource directories in an idea project generated by ya ide idea

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

Apply macros if condition holds

Macro IMPORT_YMAPS_PROTO() # maps-specific

Maps-specific .proto handling: base proto dicrectory setup

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

Macro IOS_APP_ASSETS_FLAGS(Flags...)

Not documented yet.

Macro IOS_APP_COMMON_FLAGS(Flags...)

Not documented yet.

Not documented yet.

Macro IOS_ASSETS

Not documented yet.

Macro JAVAC_FLAGS(Args...)

Set additional Java compilation flags

Ignore classpath clash test fails for classes

Not documented yet.

Macro JAVA_SRCS(srcs)

Using the macro JAVA_SRCS() specifies the 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!"); } }

    macro JAVA_SRCS(Args...) { SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) } Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs

Macro JAVA_TEST

Not documented yet.

Not documented yet.

Macro JOINSRC() # deprecated, does-nothing

This macro currently does nothing. Use JOIN_SRCS and similar macros to make one file of set of sources.

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

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

Macro JVM_ARGS(Args...)

Arguments to run Java programs in tests Documentation: https://wiki.yandex-team.ru/yatool/test/

Macro LDFLAGS(LinkerFlags...)

Add flags to the linkage command line of executable or shared library/dll. Note: LDFLAGS are always global - when set in the library module they will affect all programs/dlls/tests the library is linked into. Note: remember about the incompatibility of flags for gcc and cl.

Macro LDFLAGS_FIXED(LinkerFlags...)

Fixed version of LDFLAGS "macro" which does not substitute build variables in some cases. Use this fixed version to workaround. 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 license of the module, separated by spaces

A license must be prescribed for contribs

Macro LINT(<none|base|strict>)

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

LSAN_SUPPRESSIONS() - allows to specify files with suppression notation which will be used by default. See https://clang.llvm.org/docs/AddressSanitizer.html#suppressing-memory-leaks for details.

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

Run a lua script. These macros are similar: RUN_PROGRAM, LUA, PYTHON, BUILTIN_PYTHON.

Parameters:

  • script_path - Path to the script.
  • args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
  • CWD dir - Absolute path of the working directory.
  • ENV key=value... - Environment variables.
  • TOOL tools... - Auxiliary tool directories.
  • IN inputs... - Input files.
  • OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
  • STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
  • OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.

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

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 extentions used to filter outputs and output includes
Macro MAPKIT_ADDINCL(Dirs...)

Not documented yet.

Macro MAPSMOBI_SRCS(filenames...)

Make all source files listed as GLOBAL or not (depending on the value of MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a call to SRCS() macro with additional iargument which is the value of MAPSMOBI_USE_SRCS_GLOBAL variable

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

Macro MESSAGE([severity] message) # builtin

Print message with given severity level (STATUS, FATAL_ERROR)

Macro METAQUERYFILES(filenames...) #deprecated

Deprecated

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

Disable heavyweight clang coverage for the module

Macro NO_CODENAVIGATION() # incternal

Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support. Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.

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

Macro NO_DEBUG_INFO()

Compile files without debug info collection

Macro NO_GPL()

To check the license of the dependencies, indicated by macro LICENSE, and fail the build in case of detection of GPL-like licenses. Do not use with LIBRARY(). Issues a warning if the detected dependencies from contrib-ov in which the license is not specified.

Macro NO_JOIN_SRC() # deprecated, does-nothing

This macro currently does nothing. This is default behavior which cannot be overriden 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_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_PLATFORM()

Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO_PLATFORM variable for special processing. Note: use this with care. libc most likely will be linked into executable anyway, so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.

Macro NO_PLATFORM_RESOURCES() # incternal

Exlude dependency on platform resources libraries. Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.

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

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

Instantiate from multimodule only variants with tags listed

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)

Is placed inside the PACKAGE module, packs the build results tree to the archive with specified extension.

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

Not documented yet.

yweb specific

Not documented yet.

Not documented yet.

Not documented yet.

Macro PROTO2FBS(InputProto)

Produce flatbuf schema out of protobuf descrition

Macro PROVIDES(Name...)

Specifies provided features. The names must be C identifiers. Different libraries providing the same features can not be linked into one program.

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

Run a python script with contrib/tools/python. These macros are similar: RUN_PROGRAM, LUA, PYTHON, BUILTIN_PYTHON.

Parameters:

  • script_path - Path to the script.
  • args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
  • CWD dir - Absolute path of the working directory.
  • ENV key=value... - Environment variables.
  • TOOL tools... - Auxiliary tool directories.
  • IN inputs... - Input files.
  • OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
  • STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
  • OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.

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

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

This macro adds include path for Python headers (Python 3.x variant) This should be used in 2 cases only:

  • In PYMODULE since it compiles into .so and uses external Python runtime
  • In system Python libraries themselves since peerdir there may create a loop

Never use this macro in PY3_PROGRAM and PY3_LIBRARY and PY23_LIBRARY: they have everything by default In all other cases use USE_PYTHON3() macro instead

Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs

Macro PYTHON2_MODULE()

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

This macro adds include path for Python headers (Python 2.x variant) This should be used in 2 cases only:

  • In PYMODULE since it compiles into .so and uses external Python runtime
  • In system Python libraries themselves since proper PEERDIR there may create a loop

Never use this macro in PY_PROGRAM, PY_LIBRARY and PY23_LIBRARY: they have everything by default In all other cases use USE_PYTHON macro instead

Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py\_srcs

Macro PYTHON_PATH(Path)

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

Macro PY_CODENAV(Program) # deprecated

Collect codenavigation information from Program (specified as Program's module directory) and write it as Program.xref file Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.

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_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_REGISTER([package.]module_name[=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 using package-specific initialization using init7package11module_name PY_REGISTER(package.module_name=module_name) redeclares global initialization of a module to use package-specific initialization within package CFLAGS(-Dinitmodule_name=init7package11module_name)

PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister

Macro PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...)

PY_SRCS() - is rule to build extended versions of Python interpreters and containing all application code in its executable file. It can be used to collect only the executables but not shared libraries, and, in particular, not to collect the modules that are imported using import directive. The main disadvantage is the lack of IDE support; There is also no readline yet. The application can be collect from any of the sources from which the C library, and with the help of PY_SRCS .py , .pyx,.proto and .swg files. At the same time extensions for Python on C language generating from .pyx and .swg, will be registered in Python's as built-in modules, and sources on .py are stored as static data: when the interpreter starts, the initialization code will add a custom loader of these modules to sys.meta_path. By default .pyx files are collected as C++-extensions. To collect them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace), you must specify the Directive CYTHON_C. Building with pyx automatically registers modules, you do not need to call PY_REGISTER for them __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh.

Example of library declaration with PY_SRCS():

PY\_LIBRARY(mymodule)
PY\_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
END()

PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs

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

Macro RECURSE_ROOT_RELATIVE(dirlist) # builtin

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

Not documented yet.

Macro REQUIREMENTS([cpu:] [disk_usage:] [ram:] [ram_disk:] [container:] [network:<restricted|full>] [dns:dns64])

Allows you to specify the requirements of the test.

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

Macro RESOURCE(file name file name...)

Add data (resources, random files) to the program)

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 falls through SRCS(GLOBAL). Therefore, there is no static data library from RESOURCE(), they are added only at the program linking stage.

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

RESOURCE_FILES([PREFIX {prefix}] {path}) expands into RESOURCE({path} resfs/file/{prefix}{path} - resfs/src/resfs/file/{prefix}{path}={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.

This form is for use from other plugins: RESOURCE_FILES([DEST {dest}] {path}) expands into RESOURCE({path} resfs/file/{dest})

Macro RUN

Not documented yet.

Macro RUN_ANTLR

Not documented yet.

Macro RUN_ANTLR4

Not documented yet.

Not documented yet.

Macro RUN_JAVA

Not documented yet.

Custom code generation @link: https://wiki.yandex-team.ru/yatool/java/#kodogeneracijarunjavaprogram

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

Run a program from arcadia. These macros are similar: RUN_PROGRAM, LUA, PYTHON, BUILTIN_PYTHON.

Parameters:

  • tool_path - Path to the directory of the tool.
  • args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
  • CWD dir - Absolute path of the working directory.
  • ENV key=value... - Environment variables.
  • TOOL tools... - Auxiliary tool directories.
  • IN inputs... - Input files.
  • OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
  • STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
  • OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.

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

Macro RUN_PYTHON(Args...)

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

Macro SET(varname value) #builtin

Sets varname to value

Not documented yet.

Not documented yet.

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 SIZE(SMALL/MEDIUM/LARGE)

Marks a test of the specified size.

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(...) #bultin, 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 <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)>
  2. OUTPUT_INCLUDES
Macro SPLIT_DWARF()

Emit debug info for the PROGRAM as a separate file <module_name>.debug This may only be specified for programs. Use inside LIBRARY ALLOCATOR() END() leads to errors and stop the build.

Macro SPLIT_FACTOR(x)

Sets the number of chunks for parallel run tests when using FORK_TESTS, FORK_SUBTESTS As yourself use means the macro 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 Arcadia Paths from the root and is relative to the project's LIST are supported

GLOBAL marks next file as direct input link of the program/shared library project built into The scope of the GLOBAL keyword - the following file (that is, in the case of SRCS(GLOBAL foo.the cpp bar.cpp) global will be only foo.cpp)

@example: Consider the file to ya.make:

    LIBRARY(test\_global)
    SRCS(GLOBAL foo.cpp)
    END()

SRCS(GLOBAL foo.cpp) - use to PROGRAM and DLL that is implicitly* peerdir Yat test_global had clearly been linked with foo.cpp.o.

  • we say that prog1 (or dll1) implicitly peerdirs libN, if there is a relationship of the form: "prog1 (or dll1) peerdirs lib1, lib1 peerdirs lib2, ..., libN-1 peerdirs libN"
Macro SRC_CPP_AVX(File Flags...)

Compile single .cpp-file with AVX and extra Flags

Macro SRC_CPP_AVX2(File Flags...)

Compile single .cpp-file with AVX2 and extra Flags

Macro SRC_CPP_SSE2(File Flags...)

Compile single .cpp-file with SSE2 and extra Flags

Macro SRC_CPP_SSE3(File Flags...)

Compile single .cpp-file with SSE3 and extra Flags

Macro SRC_CPP_SSE4(File Flags...)

Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags

Macro SRC_CPP_SSE41(File Flags...)

Compile single .cpp-file with SSE4.1 and extra Flags

Macro SRC_CPP_SSSE3(File Flags...)

Compile single .cpp-file with SSSE3 and extra Flags

Macro SRC_C_AVX(File Flags...)

Compile single .c-file with AVX and extra Flags

Macro SRC_C_AVX2(File Flags...)

Compile single .c-file with AVX2 and extra Flags

Macro SRC_C_SSE2(File Flags...)

Compile single .c-file with SSE2 and extra Flags

Macro SRC_C_SSE3(File Flags...)

Compile single .c-file with SSE3 and extra Flags

Macro SRC_C_SSE4(File Flags...)

Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags

Macro SRC_C_SSE41(File Flags...)

Compile single .c-file with SSE4.1 and extra Flags

Macro SRC_C_SSSE3(File Flags...)

Compile single .c-file with SSSE3 and extra Flags

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

Defines cwd test. Used in conjunction with DATA()

Is only used inside of the TEST modules

Macro TEST_DATA

Not documented yet.

Macro TEST_SRCS(Files...)

In PYTEST, 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 (achievable PERDIR). 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 exculude 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) Documentation: https://wiki.yandex-team.ru/yatool/java/ @see: JAVA_PROGRAM, UBERJAR_HIDING_PREFIX, UBERJAR_HIDE_EXCLUDE_PATTERN, UBERJAR_PATH_EXCLUDE_PREFIX

Exculude classes matching this patterns from shading (if enabled) Pattern may contain '*' and '**' globs Shading is enabled for UBERJAR program using UBERJAR_HIDING_PREFIX macro. If this macro is not specified all classes are shaded. @see: UBERJAR, UBERJAR_HIDING_PREFIX

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

Exculude classes matching this patterns from UBERJAR. By default all dependencies of UBERJAR program will lend in a .jar archive. @see: UBERJAR

Use errorprone instead of javac for .java compilation

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

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

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

Macro USE_PERL_LIB()

Add dependency on Perl to your LIBRARY

Macro USE_PYTHON()

This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON or better make it PY_LIBRARY If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY @see: PY_LIBRARY, PY3_LIBRARY, PY23_LIBRARY

Macro USE_PYTHON3()

This adds Python3 library to your LIBRARY and makes it Python3-compatible If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON or better make it PY_LIBRARY If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY @see: PY_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_YQL()

Add required PEERDIRs for YQL module. Can be used for in-place module definition in user LIBRARY.

Macro VERSION(Args...)

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

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

Not documented yet.

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

Not documented yet.

Not documented yet.

Not documented yet.

Not documented yet.

Not documented yet.

Macro YDB_GRPC() # reserved

Reserved for YDB specific GRPC plugin

Macro YMAPS_SPROTO(ProtoFiles...) # maps-specific

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

Macro YQL_ABI_VERSION(major minor release))

Specifying the supported ABI for YQL_UDF. @see: YQL_UDF()