Skip to content

[build] Do not implicitly bump macCatalyst deployment target #77024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function(_add_target_variant_c_compile_link_flags)
if("${CFLAGS_SDK}" IN_LIST SWIFT_DARWIN_PLATFORMS)
# Check if there's a specific OS deployment version needed for this invocation
if("${CFLAGS_SDK}" STREQUAL "OSX")
if(DEFINED maccatalyst_build_flavor)
if(DEFINED maccatalyst_build_flavor AND DEFINED CFLAGS_DEPLOYMENT_VERSION_MACCATALYST)
set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_MACCATALYST})
else()
set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_OSX})
Expand Down
9 changes: 6 additions & 3 deletions test/Concurrency/Backdeploy/linking_maccatalyst.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -target %target-cpu-apple-macosx12 %s -o %t/linking_direct
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/linking_rpath
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 %s -o %t/linking_rpath_old
// RUN: %target-build-swift -target %target-cpu-apple-macosx12 %s -o %t/linking_direct 2>&1 | %FileCheck -allow-empty -check-prefix CHECK-BUILD-ERRORS %s
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/linking_rpath 2>&1 | %FileCheck -allow-empty -check-prefix CHECK-BUILD-ERRORS %s
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 %s -o %t/linking_rpath_old 2>&1 | %FileCheck -allow-empty -check-prefix CHECK-BUILD-ERRORS %s

// Make sure the linker didn't emit any version mismatch warnings.
// CHECK-BUILD-ERRORS-NOT: was built for newer 'macOS' version

// RUN: otool -L %t/linking_direct | %FileCheck -check-prefix CHECK-DIRECT %s
// RUN: otool -L %t/linking_rpath | %FileCheck -check-prefix CHECK-RPATH %s
Expand Down