aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-06-01 15:07:13 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-06-01 15:18:22 +0300
commit5815ad62f7070ad0ba471a7422acf3f19fc48a7a (patch)
tree8604d50b687087938527535cb7555f854281cb7f
parent110ac369547e14483c9fffcabccf47f04d08010c (diff)
downloadydb-5815ad62f7070ad0ba471a7422acf3f19fc48a7a.tar.gz
Update macOS sdk to 14.2 Sonoma
54e59afec75240b5f18a03f72ec7a134ae64b1fb
-rw-r--r--build/internal/platform/macos_sdk/ya.make5
-rw-r--r--build/internal/platform/macos_system_stl/ya.make13
-rw-r--r--build/ymake.core.conf2
-rwxr-xr-xbuild/ymake_conf.py12
4 files changed, 15 insertions, 17 deletions
diff --git a/build/internal/platform/macos_sdk/ya.make b/build/internal/platform/macos_sdk/ya.make
index 283c95430a..f80ecb6677 100644
--- a/build/internal/platform/macos_sdk/ya.make
+++ b/build/internal/platform/macos_sdk/ya.make
@@ -1,13 +1,14 @@
RESOURCES_LIBRARY()
-# macOS 11.1 Big Sur SDK / Xcode 12.4 (12D4e)
-DECLARE_EXTERNAL_RESOURCE(MACOS_SDK sbr:2088833948)
+# macOS 14.2 Sonoma SDK / Xcode 15.1 (15C65)
+DECLARE_EXTERNAL_RESOURCE(MACOS_SDK sbr:6121515192)
IF (USE_STL_SYSTEM)
SET(__XCODE_RESOURCE_NAME CPP_XCODE_TOOLCHAIN_ROOT)
SET(__XCODE_TOOLCHAIN_VERSION ${CPP_XCODE_TOOLCHAIN_VERSION})
INCLUDE(${ARCADIA_ROOT}/build/platform/xcode/ya.make.inc)
CFLAGS(
+ GLOBAL -isystem$MACOS_SDK_RESOURCE_GLOBAL/usr/include/c++/v1
GLOBAL -F$MACOS_SDK_RESOURCE_GLOBAL/System/Library/Frameworks
)
LDFLAGS(
diff --git a/build/internal/platform/macos_system_stl/ya.make b/build/internal/platform/macos_system_stl/ya.make
deleted file mode 100644
index 1659a184ba..0000000000
--- a/build/internal/platform/macos_system_stl/ya.make
+++ /dev/null
@@ -1,13 +0,0 @@
-RESOURCES_LIBRARY()
-
-# Taken from the default toolchain of the Xcode 12.5.1
-DECLARE_EXTERNAL_RESOURCE(MACOS_SYSTEM_STL sbr:2561940097)
-
-# xcode toolchain allready contains system headers
-IF (USE_STL_SYSTEM AND NOT XCODE)
- CFLAGS(
- GLOBAL -I${MACOS_SYSTEM_STL_RESOURCE_GLOBAL}/include
- )
-ENDIF()
-
-END()
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 2da204b7c4..acfd429cb2 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -20,7 +20,7 @@ FBS_FAKEID=2024-03-13
# Change of this value will invalidate some parts of configure cache
# but will not affect builds anyhow (except tests referring build/ directory)
-JSON_CACHE_FAKE_ID=11215402
+JSON_CACHE_FAKE_ID=20240414
STRUCT_CMD=yes
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 1e6669eb9e..34d684b8bb 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -45,6 +45,7 @@ ANDROID_API_DEFAULT = 21
LINUX_SDK_DEFAULT = "ubuntu-14"
MACOS_VERSION_MIN = "11.0"
+MACOS_VERSION_MIN_AS_INT = "110000"
IOS_VERSION_MIN = "13.0"
WINDOWS_VERSION_MIN = WindowsVersion.Windows07
@@ -1031,6 +1032,9 @@ class ToolchainOptions(object):
def version_at_least(self, *args):
return args <= tuple(self.compiler_version_list)
+ def version_below(self, *args):
+ return args > tuple(self.compiler_version_list)
+
def version_exactly(self, *args):
if not args or len(args) > len(self.compiler_version_list):
return False
@@ -1353,7 +1357,6 @@ class GnuToolchain(Toolchain):
self.platform_projects.append('build/internal/platform/macos_system_stl')
if target.is_macos:
self.setup_xcode_sdk(project='build/internal/platform/macos_sdk', var='${MACOS_SDK_RESOURCE_GLOBAL}')
- self.platform_projects.append('build/internal/platform/macos_system_stl')
def setup_apple_local_sdk(self, target):
def get_output(*args):
@@ -1493,6 +1496,13 @@ class GnuCompiler(Compiler):
'-D_LARGEFILE_SOURCE', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS',
])
+ if self.target.is_macos and self.tc.version_below(17):
+ # OS-versioning macros for Darwin-based OSes were generalized in
+ # https://github.com/llvm/llvm-project/commit/c8e2dd8c6f490b68e41fe663b44535a8a21dfeab
+ #
+ # This PR was released in llvm-17. Provide similar behaviour manually.
+ self.c_defines.append("-D__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__=" + MACOS_VERSION_MIN_AS_INT)
+
if not self.target.is_android:
# There is no usable _FILE_OFFSET_BITS=64 support in Androids until API 21. And it's incomplete until at least API 24.
# https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md