aboutsummaryrefslogtreecommitdiffstats
path: root/build
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
parent2cb42f4e81ff61b9724890830d657cdacab91eec (diff)
downloadydb-9c4b2b4a59a3df8b790cd3a194889a2c5127f1bf.tar.gz
Enable the new command engine in LIBRARY() and PROGRAM()
df060b20e3d184ebea5f4893d74bac84002752a9
Diffstat (limited to 'build')
-rw-r--r--build/conf/linkers/ld.conf8
-rw-r--r--build/conf/linkers/msvc_linker.conf20
-rw-r--r--build/conf/project_specific/yql_udf.conf12
-rw-r--r--build/conf/python.conf4
-rw-r--r--build/ymake.core.conf52
-rwxr-xr-xbuild/ymake_conf.py7
6 files changed, 56 insertions, 47 deletions
diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf
index 326d165f6d..e42fbea8b5 100644
--- a/build/conf/linkers/ld.conf
+++ b/build/conf/linkers/ld.conf
@@ -187,10 +187,10 @@ _ROOT_FLAGS=--source-root $ARCADIA_ROOT --build-root $(BUILD_ROOT)
# Program
GENERATE_MF_CMD=\
- $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${input;hide:"build/scripts/process_command_files.py"} \
+ $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${hide;input:"build/scripts/process_command_files.py"} \
--build-root $ARCADIA_BUILD_ROOT \
--module-name $REALPRJNAME \
- -o ${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \
+ -o ${rootrel;output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \
-t $MODULE_TYPE \
--ya-start-command-file \
-Ya,lics $LICENSE_NAMES \
@@ -361,11 +361,11 @@ macro _FAT_OBJECT_ARGS_BASE(Flag, Lib) {
}
# FIXME: pre=lib here is weird legacy
-_FAT_OBJECT_ARGS=--obj=${pre=lib;output:REALPRJNAME.o}
+_FAT_OBJECT_ARGS=--obj=${output;pre=lib;suf=.o:REALPRJNAME}
_LD_LINK_FAT_SRCS_GLOBALS=$_LD_LINK_FAT_SRCS_GLOBALS_WA
macro PACK_GLOBALS_IN_LIBRARY() {
- SET(_FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, \${output;pre=$MODULE_PREFIX:REALPRJNAME.globals.a}))
+ SET(_FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, \${output;pre=$MODULE_PREFIX;suf=.globals.a:REALPRJNAME}))
}
when ($OS_ANDROID == "yes") {
diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf
index 62a649d036..b2cdfa4cb7 100644
--- a/build/conf/linkers/msvc_linker.conf
+++ b/build/conf/linkers/msvc_linker.conf
@@ -122,10 +122,10 @@ when ($_UNDER_WINE_LINK != "yes") {
GENERATE_COMMON_LIB_VFS=${GENERATE_COMMON_LIB_VFS_CMD}
}
-LINK_IMPLIB=/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib}
+LINK_IMPLIB=/IMPLIB:${rootrel;output;pre=$MODULE_PREFIX;suf=.lib;noext:REALPRJNAME}
_LINK_EXTRA_OUTPUT=
when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") {
- _LINK_EXTRA_OUTPUT=/PDB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.pdb}
+ _LINK_EXTRA_OUTPUT=/PDB:${rootrel;output;pre=$MODULE_PREFIX;suf=.pdb;noext:REALPRJNAME}
}
LINK_EXTRA_OUTPUT=$_LINK_EXTRA_OUTPUT
@@ -151,10 +151,10 @@ when ($EXPORTS_FILE) {
}
GENERATE_MF_CMD=\
- $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${input;hide:"build/scripts/process_command_files.py"} \
+ $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${hide;input:"build/scripts/process_command_files.py"} \
--build-root $ARCADIA_BUILD_ROOT \
--module-name $REALPRJNAME \
- -o ${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \
+ -o ${rootrel;output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \
-t $MODULE_TYPE \
--ya-start-command-file \
-Ya,lics $LICENSE_NAMES \
@@ -191,7 +191,7 @@ REAL_LINK_DYN_LIB_CMDLINE=\
--ya-start-command-file \
${VCS_C_OBJ_RR} \
${qe;rootrel:AUTO_INPUT} \
- ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+ ${qe;rootrel;ext=.lib;tags_cut:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib;tags_cut:PEERS} \
$LINK_EXE_FLAGS \
$LINK_STDLIBS $LDFLAGS \
$LDFLAGS_GLOBAL \
@@ -236,13 +236,13 @@ LINK_EXE_CMDLINE=\
$LDFLAGS \
$LDFLAGS_GLOBAL \
$OBJADDE \
- ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+ ${qe;rootrel;ext=.lib;tags_cut:PEERS} ${qe;rootrel;suf=.lib;noext;ext=.dll;tags_cut:PEERS} \
--ya-end-command-file \
${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"}
LINK_EXE=$LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE)
-LINK_DYN_LIB=${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB ${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"}
+LINK_DYN_LIB=${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB && ${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"}
LINK_EXEC_DYN_LIB_CMDLINE=\
${GENERATE_MF} && \
@@ -262,7 +262,7 @@ LINK_EXEC_DYN_LIB_CMDLINE=\
'--ya-start-command-file \
${VCS_C_OBJ_RR} \
${qe;rootrel:AUTO_INPUT} \
- ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \
+ ${qe;rootrel;ext=.lib;tags_cut:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib;tags_cut:PEERS} \
$LINK_EXE_FLAGS \
$LINK_STDLIBS \
$LDFLAGS $LDFLAGS_GLOBAL \
@@ -281,7 +281,7 @@ LINK_GLOBAL_FAT_OBJECT=\
${cwd:ARCADIA_BUILD_ROOT} \
${LIB_WRAPPER} \
${LINK_LIB_CMD} \
- /OUT:${output;qe;rootrel:REALPRJNAME.global.lib} \
+ /OUT:${qe;rootrel;output;suf=.global.lib:REALPRJNAME} \
--ya-start-command-file \
${qe;rootrel;ext=.lib:SRCS_GLOBAL} \
${qe;rootrel;ext=.obj:SRCS_GLOBAL} \
@@ -294,7 +294,7 @@ LINK_PEERS_FAT_OBJECT=\
${cwd:ARCADIA_BUILD_ROOT} \
${LIB_WRAPPER} \
${LINK_LIB_CMD} \
- /OUT:${qe;rootrel;output:TARGET} \
+ /OUT:${qe;rootrel:TARGET} \
--ya-start-command-file \
${qe;rootrel:PEERS} \
$LINK_LIB_FLAGS \
diff --git a/build/conf/project_specific/yql_udf.conf b/build/conf/project_specific/yql_udf.conf
index e89211294b..a9bbb58672 100644
--- a/build/conf/project_specific/yql_udf.conf
+++ b/build/conf/project_specific/yql_udf.conf
@@ -3,8 +3,8 @@ when ($SANITIZER_TYPE || $USE_ARCADIA_PYTHON == "no" || $UDF_NO_PROBE == "yes" |
YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB
}
otherwise {
- YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"contrib/ydb/library/yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"}
- YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"contrib/ydb/library/yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"}
+ YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"contrib/ydb/library/yql/tools/udf_probe"} $TARGET ${hide;kv:"p UD"}
+ YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"contrib/ydb/library/yql/tools/udf_probe"} $TARGET ${hide;kv:"p UD"}
}
### @usage: UDF_BASE(name [EXPORTS symlist_file] [PREFIX prefix]) #internal
@@ -149,25 +149,25 @@ macro _MAKE_YQL_UDF_CONTRIB() {
###
### https://yql.yandex-team.ru/docs/yt/udf/cpp/
module YQL_UDF_MODULE: UDF_BASE {
- .CMD=YQL_UDF_LINK_CMD
+ .CMD=$YQL_UDF_LINK_CMD
_MAKE_YQL_UDF()
PROVIDES(YqlServicePolicy)
}
module YQL_UDF_YDB_MODULE: UDF_BASE {
- .CMD=YQL_UDF_LINK_CMD
+ .CMD=$YQL_UDF_LINK_CMD
_MAKE_YQL_UDF_YDB()
PROVIDES(YqlServicePolicy)
}
module YQL_UDF_MODULE_CONTRIB: UDF_BASE {
- .CMD=YQL_UDF_LINK_CMD
+ .CMD=$YQL_UDF_LINK_CMD
_MAKE_YQL_UDF_CONTRIB()
PROVIDES(YqlServicePolicy)
}
module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM {
- .CMD=YQL_UDF_LINK_PRG_CMD
+ .CMD=$YQL_UDF_LINK_PRG_CMD
_MAKE_YQL_UDF()
}
diff --git a/build/conf/python.conf b/build/conf/python.conf
index 30c545af76..29c1f712fa 100644
--- a/build/conf/python.conf
+++ b/build/conf/python.conf
@@ -629,7 +629,7 @@ module PY3_LIBRARY: _LIBRARY {
###
### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module _BASE_PY_PROGRAM: _BASE_PROGRAM {
- .CMD=PY_PROGRAM_LINK_EXE
+ .CMD=$PY_PROGRAM_LINK_EXE
_ARCADIA_PYTHON_ADDINCL()
when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
@@ -693,7 +693,7 @@ otherwise {
###
### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
- .CMD=PY3_PROGRAM_LINK_EXE
+ .CMD=$PY3_PROGRAM_LINK_EXE
_ARCADIA_PYTHON3_ADDINCL()
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON3 $CYTHON_SCRIPT
RUN_CYTHON_SCRIPT_H=$YMAKE_PYTHON3 $CYTHON_SCRIPT
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
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index ee5731c50d..25f0adf7f6 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -2419,7 +2419,8 @@ class Cuda(object):
emit('NVCC_OLD', '${quo:NVCC_OLD_UNQUOTED}')
emit('NVCC_FLAGS', self.nvcc_flags, '$CUDA_NVCC_FLAGS')
emit('NVCC_OBJ_EXT', '.o' if not self.build.target.is_windows else '.obj')
- emit('NVCC_ENV', format_env({'PATH': '$CUDA_ROOT/nvvm/bin:$CUDA_ROOT/bin'}))
+ emit('NVCC_ENV', '${env:_NVCC_ENV}')
+ emit('_NVCC_ENV', 'PATH=$CUDA_ROOT/nvvm/bin:$CUDA_ROOT/bin')
def print_macros(self):
mtime = ' '
@@ -2428,9 +2429,9 @@ class Cuda(object):
mtime = ' --mtime ${tool:"tools/mtime0"} '
custom_pid = '--custom-pid ${tool:"tools/custom_pid"} '
if not self.cuda_use_clang.value:
- cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC_OLD $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $NVCC_CFLAGS $SRCFLAGS ${input;hide:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${kv;hide:"p CC"} ${kv;hide:"pc light-green"}' # noqa E501
+ cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $NVCC_CFLAGS $SRCFLAGS ${hide;input:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${hide;kv:"p CC"} ${hide;kv:"pc light-green"}' # noqa E501
else:
- cmd = '$CXX_COMPILER_OLD --cuda-path=$CUDA_ROOT $C_FLAGS_PLATFORM -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} $CXXFLAGS $SRCFLAGS $TOOLCHAIN_ENV ${kv;hide:"p CU"} ${kv;hide:"pc green"}' # noqa E501
+ cmd = '$CXX_COMPILER --cuda-path=$CUDA_ROOT $C_FLAGS_PLATFORM -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} $CXXFLAGS $SRCFLAGS $TOOLCHAIN_ENV ${hide;kv:"p CU"} ${hide;kv:"pc green"}' # noqa E501
emit('_SRC_CU_CMD', cmd)
emit('_SRC_CU_PEERDIR', ' '.join(sorted(self.peerdirs)))