aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-03-20 13:03:08 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-03-20 14:15:04 +0300
commit74e58239b8cbb4b8e235693bfc2d12b7c9675c74 (patch)
tree1bccc2a9b79136cf2a5a57b4d61c062304ea9e93
parent905778d78077740288b8a35d29e74e15861714ef (diff)
downloadydb-74e58239b8cbb4b8e235693bfc2d12b7c9675c74.tar.gz
Replace remaining contrib/tools/flatc with FLATC variable
Also: introduce FLATC64 variable 0a03ef0ea9dfd4427230a2f5cba8358884ce28b3
-rw-r--r--build/conf/fbs.conf17
1 files changed, 9 insertions, 8 deletions
diff --git a/build/conf/fbs.conf b/build/conf/fbs.conf
index 798c8b27bc..81ce899dc1 100644
--- a/build/conf/fbs.conf
+++ b/build/conf/fbs.conf
@@ -1,4 +1,5 @@
-FLATC=${tool:"contrib/tools/flatc"}
+FLATC=contrib/tools/flatc
+FLATC64=contrib/tools/flatc64
# tag:fbs
FLATC_FLAGS_VALUE=
@@ -21,7 +22,7 @@ _PY_FBS_DEPS=contrib/python/flatbuffers
### processed when --add-flatbuf-result flag is specified on the command line
### for 'ya make ...' (tar archive is extracted to output directory).
macro FBS_TO_PYSRC(OUT_NAME, IN_FBS_FILES...) {
- .CMD=${cwd:ARCADIA_BUILD_ROOT} $FLATC --python --python-typing --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.py3.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:FLATC} --python --python-typing --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.py3.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
}
macro FBS_TO_PY2SRC(OUT_NAME, IN_FBS_FILES...) {
@@ -37,14 +38,14 @@ _GO_FLATC_IMPORTS=\
# tag:fbs tag:cpp-specific
macro _CPP_FLATC_CMD(SRC, SRCFLAGS...) {
- .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${output;main;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${kv;hide:"p FL"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
- .SEM=target_fbs_source PRIVATE ${input:SRC} ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} ${output;hide;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${hide;tool:"contrib/tools/flatc"} && set_global_flags FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${input;hide:"build/scripts/cpp_flatc_wrapper.py"}
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:FLATC} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${output;main;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${kv;hide:"p FL"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
+ .SEM=target_fbs_source PRIVATE ${input:SRC} ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} ${output;hide;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${hide;tool:FLATC} && set_global_flags FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${input;hide:"build/scripts/cpp_flatc_wrapper.py"}
.PEERDIR=contrib/libs/flatbuffers
}
# tag:fbs tag:cpp-specific
macro _CPP_FLATC64_CMD(SRC, SRCFLAGS...) {
- .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc64"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --filename-suffix .fbs64 ${FLATC_FLAGS_VALUE} -I ${ARCADIA_ROOT} -I ${ARCADIA_BUILD_ROOT} -o ${output;main;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;noauto;hide;noext;norel:SRC.bfbs64} ${kv;hide:"p FL64"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:FLATC64} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --filename-suffix .fbs64 ${FLATC_FLAGS_VALUE} -I ${ARCADIA_ROOT} -I ${ARCADIA_BUILD_ROOT} -o ${output;main;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;noauto;hide;noext;norel:SRC.bfbs64} ${kv;hide:"p FL64"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
.PEERDIR=contrib/libs/flatbuffers64
}
@@ -56,7 +57,7 @@ macro _CPP_FLATC64_CMD(SRC, SRCFLAGS...) {
### --add-protobuf-result flag is specified on the command line for 'ya make ...'
### (tar archive is extracted to output directory).
macro _GO_FLATC_CMD(SRC, PACKAGE_NAME) {
- .CMD=${cwd:ARCADIA_BUILD_ROOT} $FLATC --go --gen-mutable --go-namespace ${PACKAGE_NAME} ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR}/_generated ${input:SRC} && $YMAKE_PYTHON3 ${input:"build/scripts/postprocess_go_fbs.py"} --arcadia-prefix ${GO_ARCADIA_PROJECT_PREFIX} --input-dir ${BINDIR} --map $_FBS_NAMESPACE_MAP_GLOBAL && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --flat --input ${BINDIR}/_generated --output ${output;noext;tared:SRC.fbs.gosrc} --exts .go ${kv;hide:"p FG"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:FLATC} --go --gen-mutable --go-namespace ${PACKAGE_NAME} ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR}/_generated ${input:SRC} && $YMAKE_PYTHON3 ${input:"build/scripts/postprocess_go_fbs.py"} --arcadia-prefix ${GO_ARCADIA_PROJECT_PREFIX} --input-dir ${BINDIR} --map $_FBS_NAMESPACE_MAP_GLOBAL && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --flat --input ${BINDIR}/_generated --output ${output;noext;tared:SRC.fbs.gosrc} --exts .go ${kv;hide:"p FG"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
.PEERDIR=${_GO_FLATC_IMPORTS}
}
@@ -68,7 +69,7 @@ macro _GO_FLATC_CMD(SRC, PACKAGE_NAME) {
### be added to results when --add-flatbuf-result flag is specified on the command
### line for 'ya make ...'
macro _JAVA_FLATC_CMD(SRC, SRCFLAGS...) {
- .CMD=${cwd:ARCADIA_BUILD_ROOT} $FLATC --java --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:SRC} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --input $BINDIR --output ${output;nopath;noext:SRC.fbs.jsrc} --exts .java ${kv;hide:"p FJ"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
+ .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:FLATC} --java --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:SRC} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --input $BINDIR --output ${output;nopath;noext:SRC.fbs.jsrc} --exts .java ${kv;hide:"p FJ"} ${kv;hide:"pc light-green"} ${hide:FBS_FAKEID}
.PEERDIR=contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION}
}
@@ -148,7 +149,7 @@ macro FBS_CMD(SRC, SRCFLAGS...) {
###
### Produce flatbuf schema out of protobuf description.
macro PROTO2FBS(File) {
- .CMD=${cwd:BINDIR} $FLATC -I . -I ${ARCADIA_ROOT} --proto ${input:File} ${output;hide;norel;noext:File.fbs} ${kv;hide:"p FBS"} ${kv;hide:"pc yellow"} && $MOVE_FILE ${BINDIR}/${nopath;noext:File.fbs} ${output;norel;noext:File.fbs}
+ .CMD=${cwd:BINDIR} ${tool:FLATC} -I . -I ${ARCADIA_ROOT} --proto ${input:File} ${output;hide;norel;noext:File.fbs} ${kv;hide:"p FBS"} ${kv;hide:"pc yellow"} && $MOVE_FILE ${BINDIR}/${nopath;noext:File.fbs} ${output;norel;noext:File.fbs}
}
_CPP_FLATC_CMDLINE=$_CPP_FLATC_CMD($SRC $SRCFLAGS)