aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsnermolaev <snermolaev@yandex-team.com>2023-08-30 07:58:12 +0300
committersnermolaev <snermolaev@yandex-team.com>2023-08-30 08:15:23 +0300
commit73827c1035a52ae29cf0cff4a2bc28673e94c6bb (patch)
treee47047688f6de00ba436b32624e62bc8157e5261 /build
parentaa865973c865c4313d2dbdf6ecf05b14b2fc56ef (diff)
downloadydb-73827c1035a52ae29cf0cff4a2bc28673e94c6bb.tar.gz
Diffstat (limited to 'build')
-rw-r--r--build/ymake.core.conf19
1 files changed, 19 insertions, 0 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 5a0547da72..cffa4006af 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -5836,4 +5836,23 @@ macro ALICE_CAPABILITY() {
JAVA_PROTO_PLUGIN(alice_capability_java alice/library/go/java_marker_interface_protoc_plugin DEPS alice/protos/endpoint/java_interface alice/megamind/protos/scenarios/java_interface)
}
+### @usage: CLANG_EMIT_AST_CXX_RUN_TOOL(Tool Args... [SOURCES ...] [OPTS ...] [IN ...] [IN_NOPARSE ...] [TOOL ...] [OUTPUT_INCLUDES ...] [INDUCED_DEPS ...] [IN_DEPS ...] [STDOUT out-file-name] [STDOUT_NOAUTO out-file-name] [CWD cwd])
+###
+### Emit Clang ASTs from .cpp files listed in SOURCES parameter (CXXFLAGS and LLVM_OPTS are passed in, while CFLAGS and C_FLAGS_PLATFORM are not) and run tool Tool with Args... .
+### OPTS[] parameter is used to pass additional flags to clang. Parameters other than OPTS[] and SOURCES[] are used for runnig a generator (Tool):
+### - Tool - path to the directory of the tool
+### - Args... - Tool's arguments
+### - IN[] - input files required for running the Tool
+### - IN_NOPARSE[] - input files required for running the Tool, but these files are not parsed for dependencies
+### - TOOL[] - list of directories of axiliary tools used by Tool
+### - OUTPUT_INCLUDES[] - includes of the output files which are needed to "build" them
+### - STDOUT - redirect stdout of the Tool to the output file
+### - STDOUT_NOAUTO - redirect stdout of the Tool to the output file, but do not chain this file automatically to the processing queue
+### - CWD - path to the working directory of the Tool
+### Note: Generated AST files generated into BINDIR according to corresponding .cpp file names listed in SOURCES parameter.
+macro CLANG_EMIT_AST_CXX_RUN_TOOL(SOURCES[], OPTS[], Tool, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_CPP_COMPILER_BIN} ${pre=-I:_C__INCLUDE} $CXXFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -emit-ast -c ${input:SOURCES} -o ${tmp;noext:SOURCES.ast} $OPTS ${kv;hide:"p ST"} ${kv;hide:"pc light-green"} && ${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${input;hide:IN} ${input;context=TEXT;hide:IN_NOPARSE} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} $INDUCED_DEPS ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${kv;hide:"p PR"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+ PEERDIR(build/platform/clang)
+}
+
@import "${CONF_ROOT}/conf/misc.conf"