From 4ed5eb40f87b920522543ca1697caf3beb6e48e8 Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Mon, 16 Jun 2025 09:38:32 -0700 Subject: [PATCH 1/4] Revert "Reenable exit tests on Ubuntu 20.04 (#1343)" This reverts commit a88365294f351fcc1b5581525bf9d4a8dabbe66f. --- Package.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 327c8cfbb..4ec820250 100644 --- a/Package.swift +++ b/Package.swift @@ -75,11 +75,20 @@ let wasiLibcCSettings: [CSetting] = [ .define("_WASI_EMULATED_MMAN", .when(platforms: [.wasi])), ] -let testOnlySwiftSettings: [SwiftSetting] = [ +var testOnlySwiftSettings: [SwiftSetting] = [ // The latest Windows toolchain does not yet have exit tests in swift-testing .define("FOUNDATION_EXIT_TESTS", .when(platforms: [.macOS, .linux, .openbsd])) ] +#if os(Linux) +import FoundationEssentials + +if ProcessInfo.processInfo.operatingSystemVersionString.hasPrefix("Ubuntu 20.") { + // Exit tests currently hang indefinitely on Ubuntu 20. + testOnlySwiftSettings.removeFirst() +} +#endif + let package = Package( name: "swift-foundation", platforms: [.macOS("15"), .iOS("18"), .tvOS("18"), .watchOS("11")], From 77b7cf407fd71f44cb99bf65ced521efb43f9e65 Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Wed, 9 Jul 2025 15:08:34 -0700 Subject: [PATCH 2/4] Revert "build: adjust the autolink library for Windows (#1312)" (#1417) This reverts commit 5d54b930b9846b37998afec785d52d8f80d3c8b2. --- Sources/FoundationEssentials/CMakeLists.txt | 2 +- Sources/FoundationInternationalization/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/FoundationEssentials/CMakeLists.txt b/Sources/FoundationEssentials/CMakeLists.txt index c25d493c6..b88ee86d7 100644 --- a/Sources/FoundationEssentials/CMakeLists.txt +++ b/Sources/FoundationEssentials/CMakeLists.txt @@ -102,7 +102,7 @@ if(NOT BUILD_SHARED_LIBS) target_compile_options(FoundationEssentials PRIVATE "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>_FoundationCollections>") target_compile_options(FoundationEssentials PRIVATE - "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>swiftSynchronization>") + "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>") endif() set_target_properties(FoundationEssentials PROPERTIES diff --git a/Sources/FoundationInternationalization/CMakeLists.txt b/Sources/FoundationInternationalization/CMakeLists.txt index 7edec0fb4..6cf0629ef 100644 --- a/Sources/FoundationInternationalization/CMakeLists.txt +++ b/Sources/FoundationInternationalization/CMakeLists.txt @@ -49,7 +49,7 @@ if(NOT BUILD_SHARED_LIBS) target_compile_options(FoundationInternationalization PRIVATE "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>") target_compile_options(FoundationEssentials PRIVATE - "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>swiftSynchronization>") + "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>") endif() set_target_properties(FoundationInternationalization PROPERTIES From 30942804d8e7a6c0e5feecd2a7c29837cd6e9c69 Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Wed, 16 Jul 2025 10:17:32 -0700 Subject: [PATCH 3/4] Revert "Revert "Reenable exit tests on Ubuntu 20.04 (#1343)"" This reverts commit 4ed5eb40f87b920522543ca1697caf3beb6e48e8. --- Package.swift | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Package.swift b/Package.swift index 4d123c0f7..bb7f782b6 100644 --- a/Package.swift +++ b/Package.swift @@ -73,20 +73,11 @@ let wasiLibcCSettings: [CSetting] = [ .define("_WASI_EMULATED_MMAN", .when(platforms: [.wasi])), ] -var testOnlySwiftSettings: [SwiftSetting] = [ +let testOnlySwiftSettings: [SwiftSetting] = [ // The latest Windows toolchain does not yet have exit tests in swift-testing .define("FOUNDATION_EXIT_TESTS", .when(platforms: [.macOS, .linux, .openbsd])) ] -#if os(Linux) -import FoundationEssentials - -if ProcessInfo.processInfo.operatingSystemVersionString.hasPrefix("Ubuntu 20.") { - // Exit tests currently hang indefinitely on Ubuntu 20. - testOnlySwiftSettings.removeFirst() -} -#endif - let package = Package( name: "swift-foundation", platforms: [.macOS("15"), .iOS("18"), .tvOS("18"), .watchOS("11")], From 366b57c625bf81aa7a1dd1da963a018c249435bc Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Wed, 16 Jul 2025 10:17:41 -0700 Subject: [PATCH 4/4] Revert "Revert "build: adjust the autolink library for Windows (#1312)" (#1417)" This reverts commit 77b7cf407fd71f44cb99bf65ced521efb43f9e65. --- Sources/FoundationEssentials/CMakeLists.txt | 2 +- Sources/FoundationInternationalization/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/FoundationEssentials/CMakeLists.txt b/Sources/FoundationEssentials/CMakeLists.txt index b88ee86d7..c25d493c6 100644 --- a/Sources/FoundationEssentials/CMakeLists.txt +++ b/Sources/FoundationEssentials/CMakeLists.txt @@ -102,7 +102,7 @@ if(NOT BUILD_SHARED_LIBS) target_compile_options(FoundationEssentials PRIVATE "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>_FoundationCollections>") target_compile_options(FoundationEssentials PRIVATE - "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>") + "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>swiftSynchronization>") endif() set_target_properties(FoundationEssentials PROPERTIES diff --git a/Sources/FoundationInternationalization/CMakeLists.txt b/Sources/FoundationInternationalization/CMakeLists.txt index 6cf0629ef..7edec0fb4 100644 --- a/Sources/FoundationInternationalization/CMakeLists.txt +++ b/Sources/FoundationInternationalization/CMakeLists.txt @@ -49,7 +49,7 @@ if(NOT BUILD_SHARED_LIBS) target_compile_options(FoundationInternationalization PRIVATE "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>") target_compile_options(FoundationEssentials PRIVATE - "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>") + "SHELL:$<$:-Xfrontend -public-autolink-library -Xfrontend $<$:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>swiftSynchronization>") endif() set_target_properties(FoundationInternationalization PROPERTIES