aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-16 14:01:00 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-16 14:01:00 +0300
commit4627c12a1c586679dc977bf881d478a9b44ea83e (patch)
tree6930f183ec36db1290fa0e8493c444c0e3c42a00
parent4516bb7f4c963cb13cbc9dcc6d12ff8225b1a384 (diff)
downloadydb-4627c12a1c586679dc977bf881d478a9b44ea83e.tar.gz
intermediate changes
ref:3c037292b4ae37b47510b30d74a8f0881d262c8d
-rw-r--r--build/ymake.core.conf29
1 files changed, 24 insertions, 5 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 999636661ef..f745b63fac9 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -516,6 +516,11 @@ JAVA_PROTO_ARGS=
# tag:proto tag:python-specific
OPTIMIZE_PY_PROTOS_FLAG=no
+macro _RESOURCE_SEM(INPUTS[], KEYS[]) {
+ SET(RESOURCE_OUTPUT ${hash:INPUTS}.cpp)
+ .SEM=resources ${output;global:RESOURCE_OUTPUT} INPUTS ${input:INPUTS} KEYS $KEYS ${tool;hide:"tools/rescompiler/bin"}
+}
+
# tag:built-in
### @usage: RESOURCE([FORCE_TEXT ][Src Key]* [- Key=Value]*) # built-in
### Add data (resources, random files, strings) to the program)
@@ -541,7 +546,6 @@ OPTIMIZE_PY_PROTOS_FLAG=no
### END()
###
macro RESOURCE(Args...) {
- .SEM=resources ${hash:Args}.cpp $Args ${output;hide;suf=.fake.o:Args} ${tool;hide:"tools/rescompiler/bin"}
PEERDIR(library/cpp/resource)
}
@@ -5724,6 +5728,21 @@ macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"") {
SET(_COMPILE_TIME_TRACE_OUTPUTS \${output;noauto;suf=\${OBJECT_SUF}.time_trace.json$NOREL:SRC})
}
+# tag:internal
+### @usage: _ADD_EXTRA_FLAGS_IMPL([GENERATE] Args...) # internal
+### Generate prefix = " && set_property SOURCE ${input:SRC} APPEND PROPERTY COMPILE_OPTIONS " before $Args when GENERATE
+### is specified in the list of actual arguments
+macro _ADD_EXTRA_FLAGS_IMPL(GENERATE?" && set_property SOURCE ${input:SRC} APPEND PROPERTY COMPILE_OPTIONS ":"", Args...) {
+ .SEM=$GENERATE $Args
+}
+
+# tag:internal
+### @usage: _ADD_EXTRA_FLAGS([GENERATE] Args...) # internal
+### Generate prefix = " && set_property SOURCE ${input:SRC} APPEND PROPERTY COMPILE_OPTIONS " if Args is not empty
+macro _ADD_EXTRA_FLAGS(COMPILE_OUT_SUFFIX="", Args...) {
+ .SEM=$_ADD_EXTRA_FLAGS_IMPL(${pre=GENERATE :Args})
+}
+
_EMPTY_CMD=
# tag:src-processing tag:internal
@@ -5740,7 +5759,7 @@ macro _SRC(EXT, SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("S", SRC, SRCFLAGS...) {
.CMD=$C_COMPILER $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output:SRC.o} ${input:SRC} ${pre=-I:_C__INCLUDE}
- .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS)
}
# tag:src-processing
@@ -5902,7 +5921,7 @@ macro _SRC("f", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("cpp", SRC, SRCFLAGS...) {
.CMD=$_SRC_cpp($SRC $SRCFLAGS)
- .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS)
}
# tag:src-processing
@@ -5913,7 +5932,7 @@ macro _SRC("cxx", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("cc", SRC, SRCFLAGS...) {
.CMD=$_SRC(cpp $SRC $SRCFLAGS)
- .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS)
}
# tag:src-processing
@@ -5924,7 +5943,7 @@ macro _SRC("C", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("c", SRC, SRCFLAGS...) {
.CMD=$_SRC_c($SRC $SRCFLAGS)
- .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC}
+ .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS)
}
# tag:src-processing