diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-08-06 12:08:30 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-08-06 13:23:21 +0300 |
commit | 21990649bfd4b251d7344073e80cbd36641b9299 (patch) | |
tree | dfb396a00741a969ba0c6dcbcac1e50e2df66f97 | |
parent | b992a648e70ca7771833e02562bbd1bcac60932f (diff) | |
download | ydb-21990649bfd4b251d7344073e80cbd36641b9299.tar.gz |
Replace another bison patch with environment variable
038ae732c509e3b2c4b4fc745092e090378ab5a2
-rw-r--r-- | build/conf/bison_lex.conf | 2 | ||||
-rw-r--r-- | contrib/tools/bison/src/files.c | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/build/conf/bison_lex.conf b/build/conf/bison_lex.conf index f8bee6b89a..317d1b6851 100644 --- a/build/conf/bison_lex.conf +++ b/build/conf/bison_lex.conf @@ -135,7 +135,7 @@ macro USE_OLD_FLEX() { macro _SRC("y", SRC, SRCFLAGS...) { .PEERDIR=build/induced/by_bison - .CMD=${tool:"contrib/tools/bison"} $BISON_FLAGS ${env:"M4=${tool:M4_PATH}"} $_BISON_HEADER ${hide:_BISON_GEN_EXT} -o ${nopath;output;suf=$_BISON_GEN_EXT:SRC} ${input:SRC} ${SRCFLAGS} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} && $_BISON_PP + .CMD=${tool:"contrib/tools/bison"} $BISON_FLAGS ${env:"M4=${tool:M4_PATH}"} ${env:"BISON_PKGDATADIR=${ARCADIA_ROOT}/${_BISON_DATA_DIR}"} $_BISON_HEADER ${hide:_BISON_GEN_EXT} -o ${nopath;output;suf=$_BISON_GEN_EXT:SRC} ${input:SRC} ${SRCFLAGS} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} && $_BISON_PP .SEM=target_bison_parser PRIVATE ${input:SRC} ${output;nopath;noext;hide;suf=${OBJ_SUF}.o:SRC} ${nopath;noext;output;hide:SRC.h} ${nopath;noext;output;addincl;hide:SRC.h} && set_global_flags BISON_FLAGS $BISON_FLAGS && conan_require_tool m4/1.4.19 && conan_import '"bin, m4* -> ./bin/m4/bin"' && conan_require_tool bison/3.8.2 && conan_import '"bin, bison* -> ./bin/bison/bin"' && conan_import '"res, * -> ./bin/bison/res"' && target_macroses-ITEM && target_macroses-macro target_bison_parser && target_macroses-args PRIVATE ${input:SRC} ${output;nopath;noext;hide;suf=${OBJ_SUF}.o:SRC} ${nopath;noext;output;hide:SRC.h} ${nopath;noext;output;addincl;hide:SRC.h} && platform_vars-BISON_FLAGS ${quo:BISON_FLAGS} && conan-tool_requires m4/1.4.19 && conan-imports 'bin, m4* -> ./bin/m4/bin' && conan-tool_requires bison/3.8.2 && conan-imports 'bin, bison* -> ./bin/bison/bin' && conan-imports 'res, * -> ./bin/bison/res' } diff --git a/contrib/tools/bison/src/files.c b/contrib/tools/bison/src/files.c index 8bc7a4da04..d383a0ede0 100644 --- a/contrib/tools/bison/src/files.c +++ b/contrib/tools/bison/src/files.c @@ -419,18 +419,9 @@ unlink_generated_sources (void) /* Memory allocated by relocate2, to free. */ static char *relocate_buffer = NULL; -#include "uniqstr.h" -#include <contrib/tools/bison/arcadia_root.h> -#define STR(a) XSTR(a) -#define XSTR(a) #a char const * pkgdatadir (void) { - const char* arc_path = getenv("ARCADIA_ROOT_DISTBUILD"); - if (arc_path == NULL) - arc_path = ArcadiaRoot(); - return uniqstr_concat(3, arc_path, "/", STR(BISON_DATA_DIR)); - if (relocate_buffer) return relocate_buffer; else |