arcadia-devtools c4f810ee97 intermediate changes | 2 лет назад | |
---|---|---|
.. | ||
all.md | 2 лет назад | |
readme.md | 2 лет назад |
Do not edit, this file is generated from comments to macros definitions using ya dump conf-docs
.
General info: How to write ya.make files
Macros YABS_GENERATE_PHANTOM_CONF_TEST_CHECK .. YT_SPEC
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
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().
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.
Not documented yet.
Not documented yet.
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/
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
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
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().
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:
Documentation: https://wiki.yandex-team.ru/yatool/proto_library/
See: GRPC(), OPTIMIZE_PY_PROTOS(), INCLUDE_TAGS(), EXCLUDE_TAGS()
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
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
Not documented yet.
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/
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/
Not documented yet.
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 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
Not documented yet.
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.
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.
Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation
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().
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Dynamic library module definition.
DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
DLL_TOOL is a DLL that can be used as a LD_PRELOAD tool.
Not documented yet.
Module definition of generic test that executes a binary. Use macro RUN to specify binary to run.
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
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.
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.
Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
Go ishared object module definition. Compile and link Go module to a shared object. Will select Go implementation on PEERDIR to PROTO_LIBRARY.
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.
Go program module definition. Compile and link Go module to an executable program. Will select Go implementation on PEERDIR to PROTO_LIBRARY.
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.
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
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/
Benchmark test based on the google benchmark.
For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md
iOS GUI module definition
Not documented yet.
Not documented yet.
The module describing java library build.
Documentation: https://wiki.yandex-team.ru/yatool/java/
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.
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 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/
Regular program module. If name is not specified it will be generated from the name of the containing project directory.
Not documented yet.
Not documented yet.
The Python external module for Python2 and any system Python
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/
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/
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/
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/
The Python external module for Python3 and any system Python
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/
Same as PY3TEST. Don't use this, use PY3TEST instead.
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/
Use instead of PY3_PROGRAM only if ya.make with PY3_PROGRAM() included in another ya.make In all other cases use PY3_PROGRAM
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.
Same as PY2TEST. Don't use this, use PY2TEST instead.
The Python external module for any versio of Arcadia or system Python.
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/
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.
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()
The external module for R language.
Executable dynamic library module definition.
The Webpack bundle, bundles JavaScript code. Build results are bundle.tar, typings and source mappings (depending on local tsconfig.json settings).
TS_BUNDLE()
SRCS(src/index.ts)
NODE_MODULES()
END()
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).
TS_LIBRARY()
SRCS(src/index.ts)
NODE_MODULES()
END()
The KiWi UDF module. Processing EXPORTS and PREFIX is the same as for DLL.
https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc
The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib.
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/
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
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/
Generic unit test module.
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.
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/
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/
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/
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/
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
The extension module for YQL with C++ UDF (User Defined Function YQL)
https://yql.yandex-team.ru/docs/yt/udf/cpp/
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/
YT Unit test module based on mapreduce/yt/library/utlib
Benchmark test based on the library/cpp/testing/benchmark.
For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
This macro is strictly prohibited to use outside of mapsmobi project
Not documented yet.
Not documented yet.
Not documented yet.
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.
The macro adds the -I flag to the source compilation flags of the current project.
Not documented yet.
Not documented yet.
Not documented yet.
Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
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.
Add dependency on specified Perl module to the library
Not documented yet.
Not documented yet.
Not documented yet.
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/
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
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
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
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.
LIBRARY()
SET(MAKE_IT_GLOBAL GLOBAL)
ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
END()
The macro is in development. Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY().
Emit APPHOST service code for all .proto files in a PROTO_LIBRARY. This works only for C++ and Java at the moment.
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
Similar to the macro ARCHIVE, but:
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
Supply additional .asm files to all assembler calls within a module
Not documented yet.
Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
Emit eBPF bytecode from .c file. Note: Output name is used as is, no extension added.
Emit eBPF bytecode from .c file. Note: Output name is used as is, no extension added.
Generates .c file from .pyx.
Generates .cpp file from .pyx.
Compile .rl file using Ragel6.
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.
Generate MatrixNet data and access code using single command. Alternative macro BUILD_MNS() works faster and better for large files.
Generate MatrixNet data and access code using separate commands for support code, interface and data. Faster version of BUILD_MN() macro for large files.
Print warning if all variables are false. For example, BUILD_ONLY_IF(LINUX WIN32)
Generate a descriptor for a Symbol located in a ydl module Input, and put it to the file Output.
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.
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.
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).
Compiler flags specific to CGO compilation
Linker flags specific to CGO linking
.go sources to be built with CGO
Not documented yet.
Specify project transitive dependencies constraints.
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)
Check for different classes with duplicate name in classpath.
Documentation: https://wiki.yandex-team.ru/yatool/test/
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.
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.
Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
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.
This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited
Compile .c files as .cpp ones within a module.
Compile LUA source file to object code using LUA 2.0 Optionally override import name which is by default reflects Src name
Compile LUA source file to object code using LUA 2.1 Optionally override import name which is by default reflects Src name
Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
Alice-specific macro
Not documented yet.
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.
Loads conftest.py files in a way that pytest does it
Add the specified flags to the compilation command of .c (but not .cpp) files. @params: GLOBAL - Distributes these flags on dependent projects
Not documented yet.
Copy file to build root. It is possible to change both location and the name.
Parameters:
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 dependenciesThe 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.
Copy file to build root the same way as it is done for COPY_FILE, but also propagates the context of the source file.
Not documented yet.
Not documented yet.
Define protoc plugin for C++ with given Name that emits code into 1 extra output using Tool. Extra dependencies are passed via DEPS.
Define protoc plugin for C++ with given Name that emits code into regular outputs using Tool. Extra dependencies are passed via DEPS.
Define protoc plugin for C++ with given Name that emits code into 2 extra outputs using Tool. Extra dependencies are passed via DEPS.
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
Not documented yet.
Not documented yet.
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
Add the specified flags to the compile line .cu-files.
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@.
Add the specified flags to the compilation command of .cpp (but not .c) files.
Not documented yet.
Not documented yet.
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
Creates a header file DebianVersion.h define the DEBIAN_VERSION taken from the File.
Generates .cpp file with one defined function 'const char* () { return ""; }'. will be md5 hash for all inputs passed to this macro.
Associate name with sbr-id on platform.
Ask devtools@yandex-team.ru if you need more information
Associate name with sbr-id on platform.
Ask devtools@yandex-team.ru if you need more information
Associate name with sbr-id.
Ask devtools@yandex-team.ru if you need more information
Sets varname to value if value is not set yet
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
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/
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.
Add direct PEERDIR's only in java compile classpath
Sets varname to 'no'
Not documented yet.
DLL module definition based on specified LIBRARY
Not documented yet.
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.
Copy files from src_dir to $BINDIR/dst_dir
Specify directory with source .md files for DOCS multimodule if it differs from project directory. Path must be Arcadia root relative.
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.
Specify a set of default values of template variables for DOCS multimodule. There must be no spaces around "=". Values will be treated as strings.
A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
Use specified libraries as sources of DLL
Apply macros if none of previous conditions hold
Apply macros if other_condition holds while none of previous conditions hold
Embed manifest with vcs info into EXTERNAL\_JAVA\_LIBRARY
By default this is disabled.
Sets varname to 'yes'
Enable java preview features.
The end of the module
End of conditional construct
Sets env variable key to value (gets value from system env by default).
EXCLUDE(prefixes)
The macro is in development. Specifies which libraries should be excluded from the classpath.
Instantiate from multimodule all variants except ones with tags listed
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.
Export all non-hidden symbols as dynamic when linking a PROGRAM.
Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace.
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
Not documented yet.
Don't use this. Use RESOURCE_LIBRARY or FROM_SANDBOX instead
Ignored
Add external dynamic libraries during program linkage stage
Add the specified external static libraries to the program link
Not documented yet.
Not documented yet.
Not documented yet.
Add flags to flatc command line
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.
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/
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/
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/
Process file archive as FROM_SANDBOX().
Download resource from MDS with the specified key and process like FROM_SANDBOX().
Not documented yet.
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.
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/
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.
FUZZ_OPTS (
-max_len=1024
-rss_limit_mb=8192
)
Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
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/
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/
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
Generates a C++ description for structure(contains the field RecordSig) in the specified file (and connected).
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
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.
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()
Add the specified flags to the go asm compile command line.
Sets timeout in seconds for 1 Benchmark in go benchmark suite
Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
Add the specified flags to the go cgo compile command line.
Add the specified flags to the go cgo compile command line.
Add the specified flags to the go compile command line.
Define an embed directory DIR.
Define an embed pattern.
Define an embed directory DIR for internal go tests.
Define an embed directory DIR for external go tests.
Not documented yet.
Use of grpc-gateway plugin (Supported for Go only).
Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
Link flags for GO_PROGRAM linking from .go sources
Add the specified flags to the go link command line.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Override name of a Go package.
Define protoc plugin for GO with given Name that emits extra output with provided extension Ext using Tool. Extra dependencies are passed via DEPS.
Define a set of tests that should not be run. NB! Subtests are not taken into account!
Define an embed pattern for internal go tests.
Produces go test for specified module
.go sources for internal tests of a module
Define an embed pattern for external go tests.
.go sources for external tests of a module
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).
Exclude specified directories from an idea project generated by ya ide idea Have no effect on regular build.
Not documented yet.
Set module name in an idea project generated by ya ide idea Have no effect on regular build.
Set specified resource directories in an idea project generated by ya ide idea Have no effect on regular build.
Apply macros if condition holds
Include file textually and process it as a part of the ya.make
Additionally instantiate from multimodule all variants with tags listed (overrides default)
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}.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
Filter .jar file content: remove matched files * and ** patterns are supported (like JAVA_SRCS)
Filter .jar file content: keep only matched files * and ** patterns are supported (like JAVA_SRCS)
Not documented yet.
Set additional Java compilation flags.
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)
Add non-source java external build dependency (like lombok config file)
Ignore classpath clash test fails for classes
Not documented yet.
Define protoc plugin for Java with given Name that emits extra outputs using Tool. Extra dependencies are passed via DEPS
Not documented yet.
Specify java source files and resources. A macro can be contained in any of four java modules. Keywords:
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
Not documented yet.
Not documented yet.
Specify JDK version for module
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.
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.
Arguments to run Java programs in tests.
Documentation: https://wiki.yandex-team.ru/yatool/test/
Set additional Kotlin compilation flags.
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.
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.
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
This macro specifies the filename with all library licenses texts
Specify files to be used as a linker script
$usage: LINK_EXEC_DYN_LIB_IMPL(peers...) # internal
$usage: LINK_EXE_IMPL(peers...) # internal
Set linting levem for sources of the module
Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys
Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys
Not documented yet.
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.
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.
Compile LLVM bytecode to object representation. Note: Output name is used as is, no extension added.
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.
Call llvm-opt with set of Opts on Input to produce Output. Note: Output name is used as is, no extension added.
Not documented yet.
Not documented yet.
Not documented yet.
Not documented yet.
[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)
Not documented yet.
Add the specified flags to the compilation command of .masm files.
Set maven export group id for JAVA_PROGRAM() and JAVA_LIBRARY(). Have no effect on regular build.
Print message with given severity level (STATUS, FATAL_ERROR)
This macro does nothing and will be removed
Add the specified flags to the compilation line of C/C++files. Flags apply only if the compiler used is MSVC (cl.exe)
Create MatrixNet formulas archive
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.
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
Not documented yet.
Materializes node\_modules.tar
bundle according to the module's lockfile.
Print warning if some variable is true
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
Not documented yet.
Disable all compiler warnings in the module. Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
Compile module without startup CPU features check
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
Compile files without debug info collection.
Disable doctests in PY[|3|23_]TEST
Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM.
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
This macro currently does nothing. This is default behavior which cannot be overridden at module level.
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.
Do not check for style files included in PY_SRCS, TEST_SRCS, JAVA_SRCS.
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.
Not documented yet.
Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.
Build code without any optimizations (-O0 mode).
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.
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.
Disable python coverage for module
This macro:
Disable all sanitizers for the module.
Disable lightweight coverage (-fsanitize-coverage) for the module.
Compile module without SSE4
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.
Override WERROR() behavior Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
Disable C++ shadowing warnings.
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.
Instantiate from multimodule only variants with tags listed
Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project for opensource publication.
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
Add reviewers/responsibles of the code. In the OWNER macro you can use:
Ask devtools@yandex-team.ru if you need more information
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().
Not documented yet.
Not documented yet.
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
Add directories to the build if tests are demanded. Arguments are processed in chunks
In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA_ROOT}). Arguments are processed in chunks
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:
Not documented yet.
Not documented yet.
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...]}
Not documented yet.
Not documented yet.
Not documented yet.
This macro is strictly prohibited to use outside of mapsmobi project
Produce flatbuf schema out of protobuf description.
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
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.
Specifies provided features. The names must be correct C identifiers. This prevents different libraries providing the same features to be linked into one program.
Run a python script with $(PYTHON)/python built from devtools/huge_python. These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON.
Parameters:
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 dependenciesFor absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
This macro adds include path for Python headers (Python 2.x variant) without PEERDIR. This should be used in 2 cases only:
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
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:
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
Use in PY_ANY_MODULE to set it up for Python 3.x.
Set path to Python that will be used to runs scripts in tests
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
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).
Not documented yet.
Add extra Python files for linting. This macro allows adding Python files which has no .py extension.
Specifies the module or function from which to start executing a python program
Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain
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.
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
Define protoc plugin for python with given Name that emits extra output with provided Extension using Tool. Extra dependencies are passed via 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
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
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.
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
Not documented yet.
$usage: REAL_LINK_DYN_LIB_IMPL(peers...) # internal
$usage: REAL_LINK_EXEC_DYN_LIB_IMPL(peers...) # internal
$usage: REAL_LINK_EXE_IMPL(peers...) # internal
Add directories to the build All projects must be reachable from the root chain RECURSE() for monorepo continuous integration functionality
Add directories to the build if tests are demanded. Use --force-build-depends flag if you want to build testing modules without tests running
In comparison with RECURSE(), in dirlist there must be a directory relative to the root (${ARCADIA_ROOT})
Not documented yet.
Not documented yet.
Allows you to specify the requirements of the test.
Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
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).
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.
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
LIBRARY()
OWNER(user1)
RESOURCE(
path/to/file1 /key/in/program/1
path/to/file2 /key2
)
END()
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/
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)
Not documented yet.
Not documented yet.
Macro to invoke ANTLR3 generator (general case)
Macro to invoke ANTLR4 generator (general case)
Macro to invoke ANTLR4 generator (Cpp)
Macro to invoke ANTLR4 generator (Go)
Not documented yet.
Run a lua script. These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON.
Parameters:
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 dependenciesFor absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
Run a program from arcadia. These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON.
Parameters:
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 dependenciesFor 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).
Version of RUN() macro to invoke Python scripts @see: RUN()
Run a python script with prebuilt python3 interpretor built from devtools/huge_python3. These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON.
Parameters:
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 dependenciesFor absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
Not documented yet.
Not documented yet.
Sets varname to value
Not documented yet.
Not documented yet.
Not documented yet.
Appends appendvalue to varname's value using space as a separator
Appends appendvalue to varname's value using space as a separator. New value is propagated to dependants
Not documented yet.
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/
Skip the suite defined by test module. Provide a reason to be output in test execution report.
Ignored
Generator of a certain number of parts of the .cpp file + one header .h file from .in
Supports keywords:
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).
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/
Compile single file with extra Flags. Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
Add the specified directories to the list of those in which the source files will be searched Available only for arcadia/contrib
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)
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.
@uasge SRC_C_AVX(File Flags...)
Compile a single C/C++ file with AVX and additional Flags
@uasge SRC_C_AVX2(File Flags...)
Compile a single C/C++ file with AVX2 and additional Flags
@uasge SRC_C_AVX512(File Flags...)
Compile a single C/C++ file with AVX512 and additional Flags
@uasge SRC_C_NO_LTO(File Flags...)
Compile a single C/C++ file with link-time-optimization disabling and additional Flags
@uasge SRC_C_PCLMUL(File Flags...)
Compile a single C/C++ file with PCLMUL and additional Flags
@uasge SRC_C_PIC(File Flags...)
Compile a single C/C++ file with -fPIC and additional Flags
@uasge SRC_C_SSE2(File Flags...)
Compile a single C/C++ file with SSE2 and additional Flags
@uasge SRC_C_SSE3(File Flags...)
Compile a single C/C++ file with SSE3 and additional Flags
@uasge SRC_C_SSE4(File Flags...)
Compile a single C/C++ file with SSE4 and additional Flags
@uasge SRC_C_SSE41(File Flags...)
Compile a single C/C++ file with SSE4.1 and additional Flags
@uasge SRC_C_SSSE3(File Flags...)
Compile a single C/C++ file with SSSE3 and additional Flags
@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
Not documented yet.
Strip debug info from a PROGRAM, DLL or TEST. This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
A special case BASE_CODEGEN, in which the kernel/struct_codegen/codegen_tool tool is used.
Not documented yet.
Check python3 sources for style issues using black.
Add observers of the code. In the SUBSCRIBER macro you can use:
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
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.
Add symlink
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/
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
Not documented yet.
Not documented yet.
Not documented yet.
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/
Not documented yet.
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
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
Sets a timeout on test execution
Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
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:
Documentation: https://wiki.yandex-team.ru/yatool/java/
@see: JAVA_PROGRAM, UBERJAR_HIDING_PREFIX, UBERJAR_HIDE_EXCLUDE_PATTERN, UBERJAR_PATH_EXCLUDE_PREFIX
Add AppendingTransformer for UBERJAR() java programs
Parameters:
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
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.
Transform manifest.mf for UBERJAR() java programs, set attribute
Transform manifest.mf for UBERJAR() java programs, set main-class attribute
Exclude classes matching this patterns from UBERJAR. By default all dependencies of UBERJAR program will lend in a .jar archive.
Add ServicesResourceTransformer for UBERJAR() java programs
Disable UDF import check at build stage
Not documented yet.
Not documented yet.
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
Enable linking of PROGRAM with dynamic CUDA. By default CUDA uses static linking
Use errorprone instead of javac for .java compilation.
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.
Use protobuf-javalite for Java
Use gold linker for a program. This doesn't work in libraries
Add dependency on Perl 5.14 to your LIBRARY
Add dependency on Perl to your LIBRARY
Use PlantUML plug-in for yfm builder to render UML diagrams into documentation
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
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
Provides prepared environment via recipe for test.
Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
Use mapreduce/yt/skiff_proto/plugin for C++
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
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.
Specify version of a module. Currently unused by build system, only informative.
This macro sets visibility level for symbols compiled for the current module. 'level' may take only one of the following values: DEFAULT, HIDDEN.
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.
Not documented yet.
This macro indicates that the module has no license text
$usage: WITH_DYNAMIC_LIBS() # restricted
Include dynamic libraries as extra PROGRAM/DLL outputs
Compile groovy source code in this java module
Add directory with JDK to JAVA_PROGRAM output
Compile kotlin source code in this java module
Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html
Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html
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.
Used in conjunction with BUILD_YDL_DESC. When enabled, all generated descriptors are binary.
PACKAGE()
YDL_DESC_USE_BINARY()
BUILD_YDL_DESC(../types.ydl Event Event.ydld)
END()
This will generate descriptor Event.ydld in a binary format.
Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
Generate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
Specifying the supported ABI for YQL_UDF.
Use the last ABI for YQL_UDF
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/