aboutsummaryrefslogtreecommitdiffstats
path: root/build/ymake.core.conf
diff options
context:
space:
mode:
authorvpozdyayev <vpozdyayev@yandex-team.com>2024-09-09 06:38:08 +0300
committervpozdyayev <vpozdyayev@yandex-team.com>2024-09-09 06:50:07 +0300
commit9c4b2b4a59a3df8b790cd3a194889a2c5127f1bf (patch)
treeb3ae8f008870c411150a70df6160fda2edb0c654 /build/ymake.core.conf
parent2cb42f4e81ff61b9724890830d657cdacab91eec (diff)
downloadydb-9c4b2b4a59a3df8b790cd3a194889a2c5127f1bf.tar.gz
Enable the new command engine in LIBRARY() and PROGRAM()
df060b20e3d184ebea5f4893d74bac84002752a9
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r--build/ymake.core.conf52
1 files changed, 30 insertions, 22 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 1ee1ca5aad..77b92779b0 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -23,6 +23,7 @@ FBS_FAKEID=2024-03-13
JSON_CACHE_FAKE_ID=20240830
STRUCT_CMD=yes
+_DBG_EXPR_ERROR_DETAILS=one
CURDIR=.
MODDIR=.
@@ -351,7 +352,7 @@ when ($HAVE_MKL == "") {
}
}
-SFDL_TMP_OUT= ${output;tmp:SRC.tmp}
+SFDL_TMP_OUT= ${output;suf=.tmp:SRC}
# tag:tool-specific
ARCH_TOOL=${tool:"tools/archiver"}
@@ -993,12 +994,12 @@ when ($EMBED_LINKER_MAP == "yes" || $EMBED_LINKER_CREF == "yes") {
$OBJCOPY_TOOL $LINK_ADDITIONAL_SECTIONS $TARGET
}
-_SO_EXT_FILTER=${ext=.so:PEERS} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/:PEERS}
+_SO_EXT_FILTER=${ext=.so:PEERS} ${hide;late_out;ext=.so;pre=$BINDIR/;nopath;tags_cut:PEERS}
when ($OS_WINDOWS == "yes") {
- _SO_EXT_FILTER=${ext=.dll:PEERS} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/:PEERS}
+ _SO_EXT_FILTER=${ext=.dll:PEERS} ${hide;late_out;ext=.dll;pre=$BINDIR/;nopath;tags_cut:PEERS}
}
elsewhen ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
- _SO_EXT_FILTER=${ext=.dylib:PEERS} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/:PEERS}
+ _SO_EXT_FILTER=${ext=.dylib:PEERS} ${hide;late_out;ext=.dylib;pre=$BINDIR/;nopath;tags_cut:PEERS}
}
LINK_OR_COPY_SO_CMD=
@@ -1052,7 +1053,8 @@ macro LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
### The base of all linkable modules: programs, DLLs etc. Describes common linking logic.
module _LINK_UNIT: _BASE_UNIT {
.EXTS=.o .obj .supp .sbom .tidyjson .ld .a .lib
- .CMD=LINK_EXE
+ .CMD=$LINK_EXE
+ .STRUCT_CMD=yes
.ALLOWED=EXTRALIBS OBJADDE_GLOBAL RESOURCE_FILES
.NODE_TYPE=Program
.PEERDIR_POLICY=as_build_from
@@ -1443,7 +1445,7 @@ otherwise {
module BOOSTTEST: _BASE_PROGRAM {
.NODE_TYPE=Program
.FINAL_TARGET=no
- .CMD=LINK_BOOSTTEST_CMD
+ .CMD=$LINK_BOOSTTEST_CMD
PEERDIR(library/cpp/testing/boost_test)
when ($BOOSTTEST_IS_FAT_OBJECT) {
MODULE_SUFFIX=.a
@@ -1782,7 +1784,8 @@ module UNITTEST_FOR: UNITTEST {
### Contains basic logic like module properties, default variable values etc.
### All libraries similar to C++-libraries should be inherited from it.
module _LIBRARY: _BASE_UNIT {
- .CMD=LINK_LIB
+ .CMD=$LINK_LIB
+ .STRUCT_CMD=yes
.NODE_TYPE=Library
.PEERDIR_POLICY=as_include
.EXTS=.o .obj .a .mf .supp .sbom .tidyjson .ld .lib
@@ -1791,7 +1794,7 @@ module _LIBRARY: _BASE_UNIT {
.RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SPLIT_DWARF
.ALIASES=EXTRALIBS=PY_EXTRALIBS
.FINAL_TARGET=no
- .GLOBAL_CMD=GLOBAL_LINK_LIB
+ .GLOBAL_CMD=$GLOBAL_LINK_LIB
.GLOBAL_EXTS=.o .obj .tidyjson
GLOBAL_SUFFIX=.global$MODULE_SUFFIX
@@ -1995,7 +1998,7 @@ KEEP_FAT_OBJECT_SYMBOLS=no
### Designed for use in XCode projects for iOS.
module FAT_OBJECT: LIBRARY {
.ALLOWED=PACK_GLOBALS_IN_LIBRARY
- .CMD=LINK_FAT_OBJECT
+ .CMD=$LINK_FAT_OBJECT
.SEM=FAT_OBJECT_SEM
.PEERDIR_POLICY=as_build_from
@@ -2050,7 +2053,7 @@ RECURSIVE_LIBRARY_SEM=add_recursive_library ${MODDIR} ${CMAKE_TARGET_NAME} ${hid
###
### Designed for use in XCode projects for iOS.
module RECURSIVE_LIBRARY: LIBRARY {
- .CMD=LINK_RECURSIVE_LIBRARY
+ .CMD=$LINK_RECURSIVE_LIBRARY
.SEM=RECURSIVE_LIBRARY_SEM
.PEERDIR_POLICY=as_build_from
@@ -2077,7 +2080,7 @@ macro CLEAN_TEXTREL() {
### Contains all general logic for such kind of modules. Supports versioning and export files.
### Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed).
module DLL_UNIT: _LINK_UNIT {
- .CMD=LINK_DYN_LIB
+ .CMD=$LINK_DYN_LIB
.SEM=CPP_DYN_LIBRARY_SEM
.NODE_TYPE=Library
.SYMLINK_POLICY=SO
@@ -2213,7 +2216,7 @@ module DLL_TOOL: DLL {
### 2. EXPORTS allows you to explicitly specify the list of exported functions. This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files
### 3. PREFIX allows you to change the prefix of the output file.
module SO_PROGRAM: DLL {
- .CMD=LINK_EXEC_DYN_LIB
+ .CMD=$LINK_EXEC_DYN_LIB
SET(MODULE_TYPE PROGRAM)
MODULE_PREFIX=
@@ -2278,7 +2281,7 @@ multimodule DYNAMIC_LIBRARY {
SET(MODULE_TAG DLL)
}
module DLL_LIB: _DLL_COMPATIBLE_LIBRARY {
- .CMD=TOUCH_UNIT_MF
+ .CMD=$TOUCH_UNIT_MF
.PEERDIRSELF=DLL_BIN
.IGNORED=SRCS PEERDIR RUN_PROGRAM PYTHON DYNAMIC_LIBRARY_FROM GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 USE_PYTHON3
.ALLOWED=DYNAMIC_DEPS
@@ -2603,7 +2606,7 @@ macro NO_SPLIT_DWARF() {
SET(SPLIT_DWARF_VALUE no)
}
-SPLIT_DWARF_OUTPUT=${output;tobindir;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.debug:REALPRJNAME}
+SPLIT_DWARF_OUTPUT=${tobindir;output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.debug:REALPRJNAME}
when ($SPLIT_DWARF_VALUE == "yes" && $NO_SPLIT_DWARF != "yes" && $NO_DEBUGINFO != "yes" && $HOST_OS_LINUX == "yes" && $TARGET_PLATFORM == "LINUX") {
DWARF_COMMAND= \
$OBJCOPY_TOOL --only-keep-debug $TARGET $SPLIT_DWARF_OUTPUT && \
@@ -3025,20 +3028,22 @@ macro _SRC("rodata", SRC, SRCFLAGS...) {
}
macro _SRS_S_ASM(SRC, SRCFLAGS...) {
- .CMD=$C_COMPILER_OLD $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output:SRC.o} ${input:SRC} $TOOLCHAIN_ENV ${pre=-I:_C__INCLUDE}
+ .CMD=$C_COMPILER $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output;suf=.o:SRC} ${input:SRC} $TOOLCHAIN_ENV ${pre=-I:_C__INCLUDE}
.SEM=target_sources PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} $_ADD_EXTRA_FLAGS($SRCFLAGS) && target_options-privates-ITEM && target_options-privates-option target_sources && target_options-privates-args ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} && add_language ASM && project_languages ASM
}
# tag:src-processing
macro _SRC("S", SRC, SRCFLAGS...) {
- .CMD=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .CMD=$_SRS_S_ASM($SRC $SRCFLAGS)
.SEM=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .STRUCT_CMD=yes
}
# tag:src-processing
macro _SRC("s", SRC, SRCFLAGS...) {
- .CMD=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .CMD=$_SRS_S_ASM($SRC $SRCFLAGS)
.SEM=$_SRS_S_ASM($SRC, $SRCFLAGS)
+ .STRUCT_CMD=yes
}
# tag:src-processing
@@ -3053,7 +3058,8 @@ macro _SRC("mm", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("sfdl", SRC, SRCFLAGS...) {
- .CMD=$CXX_COMPILER_OLD $C_FLAGS_PLATFORM $CXXFLAGS $SFDL_FLAG ${SRCFLAGS} ${input:SRC} && ${tool:"tools/calcstaticopt"} -i ${tmp:SRC.tmp} -a $ARCADIA_ROOT ${output;stdout;nopath;noext;defext=.inc:SRC} ${hide;kv:"p SF"} ${hide;kv:"pc yellow"} $TOOLCHAIN_ENV
+ .CMD=$CXX_COMPILER $C_FLAGS_PLATFORM $CXXFLAGS $SFDL_FLAG ${SRCFLAGS} ${input:SRC} && ${tool:"tools/calcstaticopt"} -i ${tmp;suf=.tmp:SRC} -a $ARCADIA_ROOT ${stdout;output;defext=.inc;nopath;noext:SRC} ${hide;kv:"p SF"} ${hide;kv:"pc yellow"} $TOOLCHAIN_ENV
+ .STRUCT_CMD=yes
}
macro _XS_SRCS(SRC, TYPEMAPS[], SRCFLAGS...) {
@@ -3276,6 +3282,7 @@ otherwise {
macro _SRC("cu", SRC, SRCFLAGS...) {
.CMD=$_SRC_CU_CMD
.SEM=target_cuda_sources PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} && target_options-privates-ITEM && target_options-privates-option target_cuda_sources && target_options-privates-args ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} && set_global_flags CMAKE_CUDA_STANDARD ${NVCC_STD_VER} && platform_vars-CMAKE_CUDA_STANDARD ${quo:NVCC_STD_VER} && target_cuda_flags $CUDA_NVCC_FLAGS && target_macroses-ITEM && target_macroses-macro target_cuda_flags && target_macroses-args $CUDA_NVCC_FLAGS && target_cuda_cflags $USER_CXXFLAGS $SRCFLAGS $_SEM_EXTRA_CXX_FLAGS && target_macroses-ITEM && target_macroses-macro target_cuda_cflags && target_macroses-args $USER_CXXFLAGS $SRCFLAGS $_SEM_EXTRA_CXX_FLAGS
+ .STRUCT_CMD=yes
.PEERDIR=$_SRC_CU_PEERDIR
}
@@ -3945,7 +3952,7 @@ when ($FORCE_VCS_INFO_UPDATE == "yes") {
VCS_INFO_DISABLE_CACHE__NO_UID__=${hide;kv:"disable_cache"}
}
### Works for pyton too.
-GENERATE_VCS_C_INFO_NODEP=$YMAKE_PYTHON3 ${input:"build/scripts/vcs_info.py"} $(VCS)/vcs.json $VCS_C ${input:"build/scripts/c_templates/svn_interface.c"} $VCS_INFO_DISABLE_CACHE__NO_UID__ && $_SRC_c_nodeps($VCS_C, $VCS_C_OBJ, $(SOURCE_ROOT))
+GENERATE_VCS_C_INFO_NODEP=$YMAKE_PYTHON3 ${input:"build/scripts/vcs_info.py"} $(VCS)/vcs.json $VCS_C ${input:"build/scripts/c_templates/svn_interface.c"} $VCS_INFO_DISABLE_CACHE__NO_UID__ && $_SRC_c_nodeps($VCS_C $VCS_C_OBJ $(SOURCE_ROOT))
GENERATE_VCS_GO_INFO_NODEP=$YMAKE_PYTHON3 ${input:"build/scripts/vcs_info.py"} output-go $(VCS)/vcs.json $VCS_GO $GO_ARCADIA_PROJECT_PREFIX $VCS_INFO_DISABLE_CACHE__NO_UID__
GENERATE_VCS_JAVA_INFO_NODEP=$YMAKE_PYTHON3 ${input:"build/scripts/vcs_info.py"} output-java $(VCS)/vcs.json $VCS_JAVA $VCS_INFO_DISABLE_CACHE__NO_UID__
macro UPDATE_VCS_JAVA_INFO_NODEP(Jar) {
@@ -3976,8 +3983,9 @@ when ($VCS_INFO_FILE) {
### 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
macro CREATE_BUILDINFO_FOR(GenHdr) {
- .CMD=$YIELD $CXX_COMPILER_OLD && $YIELD $CXXFLAGS && $XARGS $YMAKE_PYTHON3 ${input:BUILDVERSION_SCRIPT} ${output:GenHdr} ${hide;kv:"p BI"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} $SVN_DEPENDS_CACHE__NO_UID__
+ .CMD=$YIELD $CXX_COMPILER && $YIELD $CXXFLAGS && $XARGS $YMAKE_PYTHON3 ${input:BUILDVERSION_SCRIPT} ${output:GenHdr} ${hide;kv:"p BI"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} $SVN_DEPENDS_CACHE__NO_UID__
.SEM=$RUN_PYTHON3($BUILDVERSION_SCRIPT $GenHdr \\\"${CMAKE_CXX_COMPILER}\\\" \\\"${CMAKE_CXX_FLAGS}\\\" OUT $GenHdr)
+ .STRUCT_CMD=yes
}
DECIMAL_MD5_SCRIPT=build/scripts/decimal_md5.py
@@ -5124,7 +5132,7 @@ _DLL_PROXY_LIBRARY_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${hide;i
### The use of this module is strictly prohibited!!!
module DLL_PROXY_LIBRARY: _PROXY_LIBRARY {
.ALLOWED=PRIMARY_OUTPUT
- .CMD=_DLL_PROXY_LIBRARY_CMD
+ .CMD=$_DLL_PROXY_LIBRARY_CMD
}
_PREBUILT_PROGRAM_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${TARGET} ${hide;kv:"p ld"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"}
@@ -5134,7 +5142,7 @@ _PREBUILT_PROGRAM_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${TARGET}
###
### Program module which uses a prebuilt prgram as its output.
module PREBUILT_PROGRAM: _LINK_UNIT {
- .CMD=_PREBUILT_PROGRAM_CMD
+ .CMD=$_PREBUILT_PROGRAM_CMD
.SYMLINK_POLICY=EXE
.ALLOWED=INDUCED_DEPS PRIMARY_OUTPUT
.RESTRICTED=SRCS