From 988531cc3b7484e79053e490325df61b0b23f863 Mon Sep 17 00:00:00 2001 From: Eric Miotto Date: Thu, 31 Jul 2025 13:01:55 -0700 Subject: [PATCH] CMake: ensure we can build compatibility libraries with macOS 14.0 SDK In particular, fix the Apple Silicon benchmark job by do not propagating the flag added in #83399. Addresses rdar://157188603 --- stdlib/toolchain/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdlib/toolchain/CMakeLists.txt b/stdlib/toolchain/CMakeLists.txt index 81afa1c74d591..0b833153bcd48 100644 --- a/stdlib/toolchain/CMakeLists.txt +++ b/stdlib/toolchain/CMakeLists.txt @@ -1,5 +1,13 @@ # Toolchain-only build products +# `-fsized-deallocation` would cause a build failure +# when targeting macOS 14.0 SDK used in some configuration +get_property(directory_compile_options + DIRECTORY + PROPERTY COMPILE_OPTIONS) +list(FILTER directory_compile_options EXCLUDE REGEX ".*-fsized-deallocation.*") +set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${directory_compile_options}) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../cmake/modules) include(StdlibOptions) include(AddSwiftStdlib)