aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-01-31 17:22:33 +0300
committerAlexander Smirnov <alex@ydb.tech>2024-01-31 17:22:33 +0300
commit52be5dbdd420165c68e7e90ba8f1d2f00da041f6 (patch)
tree5d47f5b2ff4e6a7c8e75d33931a1e683949b7229 /build
parentea57c8867ceca391357c3c5ffcc5ba6738b49adc (diff)
parent809f0cf2fdfddfbeacc2256ffdbaaf5808ce5ed4 (diff)
downloadydb-52be5dbdd420165c68e7e90ba8f1d2f00da041f6.tar.gz
Merge branch 'mergelibs12' into main
Diffstat (limited to 'build')
-rw-r--r--build/conf/compilers/gnu_compiler.conf4
-rw-r--r--build/conf/java.conf6
-rw-r--r--build/export_generators/hardcoded-cmake/cmake/common.cmake7
-rw-r--r--build/export_generators/hardcoded-cmake/cmake/conan.cmake20
-rw-r--r--build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake7
-rw-r--r--build/external_resources/ymake/public.resources.json10
-rw-r--r--build/external_resources/ymake/resources.json10
-rw-r--r--build/mapping.conf.json10
-rw-r--r--build/scripts/link_exe.py9
-rw-r--r--build/ymake.core.conf6
10 files changed, 59 insertions, 30 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf
index 2de1678d8d..668b5e1af7 100644
--- a/build/conf/compilers/gnu_compiler.conf
+++ b/build/conf/compilers/gnu_compiler.conf
@@ -54,7 +54,7 @@ elsewhen ($PIE == "yes") {
}
when ($CLANG16 == "yes") {
- CFLAGS+=-Wno-array-parameter -Wno-deprecate-lax-vec-conv-all -Wno-unqualified-std-cast-call -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-int -Wno-address-of-packed-member
+ CFLAGS+=-Wno-array-parameter -Wno-deprecate-lax-vec-conv-all -Wno-unqualified-std-cast-call -Wno-unused-but-set-parameter -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-address-of-packed-member
}
when ($MSAN_TRACK_ORIGIN == "yes") {
@@ -88,7 +88,7 @@ when ($NO_WSHADOW == "yes") {
#
# Use -Wno-everything to force warning suppression.
when ($NO_COMPILER_WARNINGS == "yes") {
- C_WARNING_OPTS = -w
+ C_WARNING_OPTS = -Wno-everything
CXX_WARNING_OPTS = -Wno-everything
}
when ($NO_OPTIMIZE == "yes") {
diff --git a/build/conf/java.conf b/build/conf/java.conf
index 94e5835ab5..11b1ec6a39 100644
--- a/build/conf/java.conf
+++ b/build/conf/java.conf
@@ -1564,9 +1564,9 @@ UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS=
### Transform manifest.mf for UBERJAR() java programs, set attribute
###
### @see: [UBERJAR](#macro_UBERJAR)
-macro UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) {
- SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE $ARGS_DELIM $Key : $Value)
- SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS --manifest-attribute ${Key}:${Value})
+macro UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Values...) {
+ SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE $ARGS_DELIM $Key : $Values)
+ SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS --manifest-attribute ${Key}:'${Values}')
}
# tag:java-specific
diff --git a/build/export_generators/hardcoded-cmake/cmake/common.cmake b/build/export_generators/hardcoded-cmake/cmake/common.cmake
index f85875ec40..98313341a5 100644
--- a/build/export_generators/hardcoded-cmake/cmake/common.cmake
+++ b/build/export_generators/hardcoded-cmake/cmake/common.cmake
@@ -103,7 +103,7 @@ endfunction()
function(generate_enum_serilization Tgt Input)
set(opts "")
- set(oneval_args INCLUDE_HEADERS)
+ set(oneval_args INCLUDE_HEADERS GEN_HEADER)
set(multival_args "")
cmake_parse_arguments(ENUM_SERIALIZATION_ARGS
"${opts}"
@@ -116,7 +116,7 @@ function(generate_enum_serilization Tgt Input)
get_filename_component(BaseName ${Input} NAME)
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp ${ENUM_SERIALIZATION_ARGS_GEN_HEADER}
COMMAND
${enum_parser_bin}
${Input}
@@ -124,6 +124,9 @@ function(generate_enum_serilization Tgt Input)
--output ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp
DEPENDS ${Input} ${enum_parser_dependency}
)
+ if (ENUM_SERIALIZATION_ARGS_GEN_HEADER)
+ set_property(SOURCE ${ENUM_SERIALIZATION_ARGS_GEN_HEADER} PROPERTY GENERATED On)
+ endif()
target_sources(${Tgt} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp)
endfunction()
diff --git a/build/export_generators/hardcoded-cmake/cmake/conan.cmake b/build/export_generators/hardcoded-cmake/cmake/conan.cmake
index 9a5dee5d81..a8e812acbd 100644
--- a/build/export_generators/hardcoded-cmake/cmake/conan.cmake
+++ b/build/export_generators/hardcoded-cmake/cmake/conan.cmake
@@ -92,10 +92,12 @@ macro(_conan_check_system_name)
set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CONAN_SYSTEM_NAME Macos)
+ message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}")
+ set(_CONAN_SETTING_OS_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "QNX")
set(CONAN_SYSTEM_NAME Neutrino)
- endif()
+ endif()
set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore WindowsCE watchOS tvOS FreeBSD SunOS AIX Arduino Emscripten Neutrino)
list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index)
if (${_index} GREATER -1)
@@ -279,7 +281,7 @@ function(conan_cmake_settings result)
endforeach()
if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")
- set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
+ set(ARGUMENTS_PROFILE_AUTO arch os.version build_type compiler compiler.version
compiler.runtime compiler.libcxx compiler.toolset)
endif()
@@ -288,7 +290,7 @@ function(conan_cmake_settings result)
string(REGEX MATCH "[^=]*" MANUAL_SETTING "${ARG}")
message(STATUS "Conan: ${MANUAL_SETTING} was added as an argument. Not using the autodetected one.")
list(REMOVE_ITEM ARGUMENTS_PROFILE_AUTO "${MANUAL_SETTING}")
- endforeach()
+ endforeach()
# Automatic from CMake
foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
@@ -407,7 +409,7 @@ function(conan_cmake_detect_vs_runtime result)
string(TOUPPER "${build_type}" build_type)
endif()
- if (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
+ if (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
if(${CMAKE_MSVC_RUNTIME_LIBRARY} STREQUAL MultiThreaded)
set(${result} "MT" PARENT_SCOPE)
elseif(${CMAKE_MSVC_RUNTIME_LIBRARY} STREQUAL MultiThreadedDebug)
@@ -455,7 +457,7 @@ function(conan_cmake_detect_vs_runtime result)
endfunction()
function(_collect_settings result)
- set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
+ set(ARGUMENTS_PROFILE_AUTO arch os.version build_type compiler compiler.version
compiler.runtime compiler.libcxx compiler.toolset
compiler.cppstd)
foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
@@ -649,12 +651,12 @@ function(conan_cmake_install)
set(NO_IMPORTS --no-imports)
endif()
set(install_args install ${PATH_OR_REFERENCE} ${REFERENCE} ${UPDATE} ${NO_IMPORTS} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER}
- ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD}
+ ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD}
${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD} ${CONF})
string(REPLACE ";" " " _install_args "${install_args}")
message(STATUS "Conan executing: ${CONAN_CMD} ${_install_args}")
-
+
if(ARGS_OUTPUT_QUIET)
set(OUTPUT_OPT OUTPUT_QUIET)
endif()
@@ -771,7 +773,7 @@ endmacro()
macro(conan_cmake_run)
conan_parse_arguments(${ARGV})
-
+
if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES)
message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators")
elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE)
@@ -849,7 +851,7 @@ macro(conan_check)
if(NOT "${return_code}" STREQUAL "0")
message(FATAL_ERROR "Conan --version failed='${return_code}'")
endif()
-
+
if(NOT CONAN_DETECT_QUIET)
string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT)
message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}")
diff --git a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake
index a81af88c70..a9c619efc6 100644
--- a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake
+++ b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake
@@ -29,6 +29,13 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64|AMD64)$")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
string(APPEND _GNU_MARCH_C_CXX_FLAGS " -D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE")
endif()
+elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$")
+ if (CMAKE_SYSTEM_NAME MATCHES "^(Darwin|Linux)$")
+ # Clang 13+ generates outline atomics by default if '-rtlib=compiler_rt' is specified or system's
+ # libgcc version is >= 9.3.1 : https://github.com/llvm/llvm-project/commit/c5e7e649d537067dec7111f3de1430d0fc8a4d11
+ # Disable this behaviour because our build links with contrib/libs/cxxsupp/builtins that does not contain outline atomics yet
+ string(APPEND _GNU_MARCH_C_CXX_FLAGS " -mno-outline-atomics")
+ endif()
elseif (ANDROID AND (CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a"))
string(APPEND _GNU_MARCH_C_CXX_FLAGS " -mfloat-abi=softfp")
endif()
diff --git a/build/external_resources/ymake/public.resources.json b/build/external_resources/ymake/public.resources.json
index 1b4e5fc087..71377438c0 100644
--- a/build/external_resources/ymake/public.resources.json
+++ b/build/external_resources/ymake/public.resources.json
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5690811210"
+ "uri": "sbr:5731297588"
},
"darwin-arm64": {
- "uri": "sbr:5690798649"
+ "uri": "sbr:5731298012"
},
"linux": {
- "uri": "sbr:5690801853"
+ "uri": "sbr:5731298871"
},
"linux-aarch64": {
- "uri": "sbr:5690800663"
+ "uri": "sbr:5731297073"
},
"win32-clang-cl": {
- "uri": "sbr:5690801745"
+ "uri": "sbr:5731299437"
}
}
}
diff --git a/build/external_resources/ymake/resources.json b/build/external_resources/ymake/resources.json
index 291af7a1cf..beaed0393a 100644
--- a/build/external_resources/ymake/resources.json
+++ b/build/external_resources/ymake/resources.json
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5690784885"
+ "uri": "sbr:5731292752"
},
"darwin-arm64": {
- "uri": "sbr:5690783084"
+ "uri": "sbr:5731292924"
},
"linux": {
- "uri": "sbr:5690790317"
+ "uri": "sbr:5731294947"
},
"linux-aarch64": {
- "uri": "sbr:5690793726"
+ "uri": "sbr:5731296385"
},
"win32-clang-cl": {
- "uri": "sbr:5690795911"
+ "uri": "sbr:5731295134"
}
}
}
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index d931e3d12a..af9b5b2297 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -178,6 +178,7 @@
"5622651213": "https://devtools-registry.s3.yandex.net/5622651213",
"5647706426": "https://devtools-registry.s3.yandex.net/5647706426",
"5690811210": "https://devtools-registry.s3.yandex.net/5690811210",
+ "5731297588": "https://devtools-registry.s3.yandex.net/5731297588",
"5476891477": "https://devtools-registry.s3.yandex.net/5476891477",
"5509369518": "https://devtools-registry.s3.yandex.net/5509369518",
"5550838146": "https://devtools-registry.s3.yandex.net/5550838146",
@@ -185,6 +186,7 @@
"5622657921": "https://devtools-registry.s3.yandex.net/5622657921",
"5647706238": "https://devtools-registry.s3.yandex.net/5647706238",
"5690798649": "https://devtools-registry.s3.yandex.net/5690798649",
+ "5731298012": "https://devtools-registry.s3.yandex.net/5731298012",
"5476896849": "https://devtools-registry.s3.yandex.net/5476896849",
"5509364024": "https://devtools-registry.s3.yandex.net/5509364024",
"5550826871": "https://devtools-registry.s3.yandex.net/5550826871",
@@ -192,6 +194,7 @@
"5622653964": "https://devtools-registry.s3.yandex.net/5622653964",
"5647708831": "https://devtools-registry.s3.yandex.net/5647708831",
"5690801853": "https://devtools-registry.s3.yandex.net/5690801853",
+ "5731298871": "https://devtools-registry.s3.yandex.net/5731298871",
"5476895322": "https://devtools-registry.s3.yandex.net/5476895322",
"5509360013": "https://devtools-registry.s3.yandex.net/5509360013",
"5550843115": "https://devtools-registry.s3.yandex.net/5550843115",
@@ -199,6 +202,7 @@
"5622652638": "https://devtools-registry.s3.yandex.net/5622652638",
"5647716154": "https://devtools-registry.s3.yandex.net/5647716154",
"5690800663": "https://devtools-registry.s3.yandex.net/5690800663",
+ "5731297073": "https://devtools-registry.s3.yandex.net/5731297073",
"5476896707": "https://devtools-registry.s3.yandex.net/5476896707",
"5509388614": "https://devtools-registry.s3.yandex.net/5509388614",
"5550838970": "https://devtools-registry.s3.yandex.net/5550838970",
@@ -206,6 +210,7 @@
"5622653810": "https://devtools-registry.s3.yandex.net/5622653810",
"5647712429": "https://devtools-registry.s3.yandex.net/5647712429",
"5690801745": "https://devtools-registry.s3.yandex.net/5690801745",
+ "5731299437": "https://devtools-registry.s3.yandex.net/5731299437",
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199",
"5562224408": "https://devtools-registry.s3.yandex.net/5562224408"
},
@@ -387,6 +392,7 @@
"5622651213": "ymake for darwin",
"5647706426": "ymake for darwin",
"5690811210": "ymake for darwin",
+ "5731297588": "ymake for darwin",
"5476891477": "ymake for darwin-arm64",
"5509369518": "ymake for darwin-arm64",
"5550838146": "ymake for darwin-arm64",
@@ -394,6 +400,7 @@
"5622657921": "ymake for darwin-arm64",
"5647706238": "ymake for darwin-arm64",
"5690798649": "ymake for darwin-arm64",
+ "5731298012": "ymake for darwin-arm64",
"5476896849": "ymake for linux",
"5509364024": "ymake for linux",
"5550826871": "ymake for linux",
@@ -401,6 +408,7 @@
"5622653964": "ymake for linux",
"5647708831": "ymake for linux",
"5690801853": "ymake for linux",
+ "5731298871": "ymake for linux",
"5476895322": "ymake for linux-aarch64",
"5509360013": "ymake for linux-aarch64",
"5550843115": "ymake for linux-aarch64",
@@ -408,6 +416,7 @@
"5622652638": "ymake for linux-aarch64",
"5647716154": "ymake for linux-aarch64",
"5690800663": "ymake for linux-aarch64",
+ "5731297073": "ymake for linux-aarch64",
"5476896707": "ymake.exe for win32-clang-cl",
"5509388614": "ymake.exe for win32-clang-cl",
"5550838970": "ymake.exe for win32-clang-cl",
@@ -415,6 +424,7 @@
"5622653810": "ymake.exe for win32-clang-cl",
"5647712429": "ymake.exe for win32-clang-cl",
"5690801745": "ymake.exe for win32-clang-cl",
+ "5731299437": "ymake.exe for win32-clang-cl",
"2980468199": "ytexec for linux",
"5562224408": "ytexec for linux"
},
diff --git a/build/scripts/link_exe.py b/build/scripts/link_exe.py
index 980ac05d7e..4650315b89 100644
--- a/build/scripts/link_exe.py
+++ b/build/scripts/link_exe.py
@@ -52,6 +52,11 @@ def prune_cuda_libraries(cmd, prune_arches, nvprune_exe, build_root):
_, ver = arch.split('_', 1)
return 'compute_{}'.format(ver)
+ libs_to_prune = set(CUDA_LIBRARIES)
+
+ # does not contain device code, nothing to prune
+ libs_to_prune.remove('-lcudart_static')
+
tmp_names_gen = name_generator('cuda_pruned_libs')
arch_args = []
@@ -62,10 +67,10 @@ def prune_cuda_libraries(cmd, prune_arches, nvprune_exe, build_root):
flags = []
cuda_deps = set()
for flag in reversed(cmd):
- if flag in CUDA_LIBRARIES:
+ if flag in libs_to_prune:
cuda_deps.add('lib' + flag[2:] + '.a')
flag += '_pruned'
- elif flag.startswith('-L') and any(f in cuda_deps for f in os.listdir(flag[2:])):
+ elif flag.startswith('-L') and os.path.exists(flag[2:]) and os.path.isdir(flag[2:]) and any(f in cuda_deps for f in os.listdir(flag[2:])):
from_dirpath = flag[2:]
from_deps = list(cuda_deps & set(os.listdir(from_dirpath)))
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index c0c2a070f5..0cbf22b6a0 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -1166,7 +1166,8 @@ CPP_PROGRAM_SEM=add_executable $MODDIR $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:
&& target_link_options PRIVATE $LDFLAGS_GLOBAL_RAW $LDFLAGS $OBJADDE_LIB $OBJADDE_LIB_GLOBAL $OBJADDE \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \
&& target_compile_options PRIVATE $USER_CFLAGS $USER_CXXFLAGS $_SEM_EXTRA_CXX_FLAGS \
- && target_compile_options PRIVATE $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW
+ && target_compile_options PRIVATE $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW \
+ && target_sources PRIVATE ${MODULE_EXPLICIT_HEADERS}
### @usage: PROGRAM([progname])
###
### Regular program module.
@@ -1778,7 +1779,8 @@ CPP_LIBRARY_SEM=add_library ${MODDIR} $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:A
&& target_compile_options PRIVATE $USER_CFLAGS $USER_CXXFLAGS $_SEM_EXTRA_CXX_FLAGS \
&& target_compile_options PUBLIC $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW \
&& target_link_options INTERFACE $LDFLAGS_GLOBAL_RAW \
- && add_language C && add_language CXX
+ && add_language C && add_language CXX \
+ && target_sources PRIVATE ${MODULE_EXPLICIT_HEADERS}
CPP_OBJ_LIBRARY_SEM=add_global_library_for ${MODDIR} ${suf=.global:CMAKE_TARGET_NAME} $CMAKE_TARGET_NAME ${hide:GLOBAL_TARGET} ${hide:AUTO_INPUT} \
&& target_include_directories PUBLIC $_C__INCLUDE_GLOBAL \
&& target_include_directories PRIVATE $_C__INCLUDE_OWNED \