Skip to content

Commit f490819

Browse files
committed
Update Foundation patch on CI for upstream change
1 parent b2ae329 commit f490819

File tree

5 files changed

+46
-12
lines changed

5 files changed

+46
-12
lines changed

.github/workflows/sdks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
if ${{ matrix.version == 'trunk' }}; then
135135
git apply swift-android-trunk-libdispatch.patch
136136
else
137-
git apply swift-android-ci-devel.patch
137+
git apply swift-android-ci-devel.patch swift-android-devel.patch
138138
fi
139139
git apply -C2 swift-android-ci-except-release.patch
140140
BUILD_FLAG="--cross-compile-build-swift-tools=0"

swift-android-devel.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
2+
index 016bf294..5c42986a 100644
3+
--- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
4+
+++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
5+
@@ -162,6 +162,10 @@ if(NOT BUILD_SHARED_LIBS)
6+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>")
7+
target_compile_options(Foundation PRIVATE
8+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>")
9+
+ if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
10+
+ target_compile_options(Foundation PRIVATE
11+
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend android-spawn>")
12+
+ endif()
13+
endif()
14+
15+
if(dispatch_FOUND)

swift-android-testing-release.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,18 @@ index 90f4aa78..0429425b 100644
5858
// Glibc versions prior to 2.29 don't support posix_spawn_file_actions_addchdir_np, impacting:
5959
// - Amazon Linux 2 (EoL mid-2025)
6060
return ENOSYS;
61+
diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
62+
index 016bf294..5c42986a 100644
63+
--- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
64+
+++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
65+
@@ -162,6 +162,10 @@ if(NOT BUILD_SHARED_LIBS)
66+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>")
67+
target_compile_options(Foundation PRIVATE
68+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>")
69+
+ if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
70+
+ target_compile_options(Foundation PRIVATE
71+
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend android-spawn>")
72+
+ endif()
73+
endif()
74+
75+
set_target_properties(Foundation PROPERTIES

swift-android-trunk-libdispatch.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
2+
index 016bf294..5c42986a 100644
3+
--- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
4+
+++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
5+
@@ -162,6 +162,10 @@ if(NOT BUILD_SHARED_LIBS)
6+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>")
7+
target_compile_options(Foundation PRIVATE
8+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend $<$<PLATFORM_ID:Windows>:${CMAKE_STATIC_LIBRARY_PREFIX_Swift}>swiftSynchronization>")
9+
+ if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
10+
+ target_compile_options(Foundation PRIVATE
11+
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend android-spawn>")
12+
+ endif()
13+
endif()
14+
15+
if(dispatch_FOUND)
116
diff --git a/swift-corelibs-libdispatch/src/swift/CMakeLists.txt b/swift-corelibs-libdispatch/src/swift/CMakeLists.txt
217
index 38bef37..d0ddf98 100644
318
--- a/swift-corelibs-libdispatch/src/swift/CMakeLists.txt

swift-android.patch

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift
6565
index 016bf294..5c42986a 100644
6666
--- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
6767
+++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
68-
@@ -162,6 +162,10 @@ if(NOT BUILD_SHARED_LIBS)
69-
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend _FoundationICU>")
70-
target_compile_options(Foundation PRIVATE
71-
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend swiftSynchronization>")
72-
+ if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
73-
+ target_compile_options(Foundation PRIVATE
74-
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend android-spawn>")
75-
+ endif()
76-
endif()
77-
78-
set_target_properties(Foundation PROPERTIES
7968
@@ -174,6 +174,12 @@
8069
target_link_libraries(Foundation PUBLIC
8170
swiftDispatch)

0 commit comments

Comments
 (0)