From 065e04c99801105f96a7a6590c3c74e88738be56 Mon Sep 17 00:00:00 2001 From: aral01 Date: Tue, 21 Jul 2026 17:57:21 +0300 Subject: [PATCH 1/2] build: skip libc compatibility fallbacks on macOS Use the libc implementations provided by macOS instead of compiling bundled Linux-oriented replacements. Keep the existing compatibility sources unchanged for non-Apple platforms. --- contrib/libs/libc_compat/CMakeLists.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/contrib/libs/libc_compat/CMakeLists.txt b/contrib/libs/libc_compat/CMakeLists.txt index 6946d6d21db..ddce16d2cef 100644 --- a/contrib/libs/libc_compat/CMakeLists.txt +++ b/contrib/libs/libc_compat/CMakeLists.txt @@ -6,13 +6,18 @@ target_compile_options(contrib-libs-libc_compat PRIVATE target_sources(contrib-libs-libc_compat PRIVATE ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/string.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/explicit_bzero.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/memfd_create.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/strlcat.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/strlcpy.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/reallocarray/reallocarray.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/random/getrandom.c - ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/random/getentropy.c ) +if(NOT APPLE) + target_sources(contrib-libs-libc_compat PRIVATE + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/explicit_bzero.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/memfd_create.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/strlcat.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/strlcpy.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/reallocarray/reallocarray.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/random/getrandom.c + ${YDB_SDK_SOURCE_DIR}/contrib/libs/libc_compat/random/getentropy.c + ) +endif() + _ydb_sdk_install_targets(TARGETS contrib-libs-libc_compat) From 080b18dd418f559b21df9df37367ad1f5d57052a Mon Sep 17 00:00:00 2001 From: aral01 Date: Tue, 21 Jul 2026 18:39:12 +0300 Subject: [PATCH 2/2] build: respect the configured macOS deployment target Remove hard-coded platform_version flags from SDK host tools. CMake and the selected toolchain now provide one consistent macOS deployment target without duplicate linker settings. --- tools/enum_parser/enum_parser/CMakeLists.txt | 3 +-- tools/rescompiler/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/enum_parser/enum_parser/CMakeLists.txt b/tools/enum_parser/enum_parser/CMakeLists.txt index 99729b3553b..a6e80ba6505 100644 --- a/tools/enum_parser/enum_parser/CMakeLists.txt +++ b/tools/enum_parser/enum_parser/CMakeLists.txt @@ -27,8 +27,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_link_options(enum_parser PRIVATE - -Wl,-platform_version,macos,11.0,11.0 -framework CoreFoundation ) -endif() \ No newline at end of file +endif() diff --git a/tools/rescompiler/CMakeLists.txt b/tools/rescompiler/CMakeLists.txt index 16d4df7607b..34634e678af 100644 --- a/tools/rescompiler/CMakeLists.txt +++ b/tools/rescompiler/CMakeLists.txt @@ -27,7 +27,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_link_options(rescompiler PRIVATE - -Wl,-platform_version,macos,11.0,11.0 -framework CoreFoundation )