Skip to content

Commit 5de8b7d

Browse files
committed
Switch trunk over to new build flag on the CI
1 parent c48be33 commit 5de8b7d

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/sdks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,14 @@ jobs:
125125
ANDROID_ARCH=aarch64 BUILD_SWIFT_PM=1 ${TOOLCHAIN}/bin/swift get-packages-and-swift-source.swift
126126
127127
git apply -C1 swift-android.patch swift-android-ci.patch
128+
BUILD_FLAG="--build-swift-tools=0"
128129
if ${{ matrix.version == 'release' }}; then
129130
perl -pi -e 's%r26%ndk/27%' swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
130131
LSP_BUILD="--sourcekit-lsp"
131132
git apply swift-android-ci-release.patch swift-android-testing-release.patch
132133
else
133134
if ${{ matrix.version == 'trunk' }}; then
135+
BUILD_FLAG="--cross-compile-build-swift-tools=0"
134136
git apply swift-android-trunk-libdispatch.patch
135137
else
136138
git apply swift-android-devel.patch
@@ -164,7 +166,7 @@ jobs:
164166
cp $SYSROOT/usr/include/execinfo.h ${SDK_NAME}/usr/include
165167
perl -pi -e 's%33%24%' ${SDK_NAME}/usr/include/execinfo.h
166168
167-
./swift/utils/build-script -RA --skip-build-cmark --build-llvm=0 --android --android-ndk $ANDROID_NDK_HOME --android-arch $arch --android-api-level $ANDROID_API_LEVEL --build-swift-tools=0 --native-swift-tools-path=${TOOLCHAIN}/bin --native-clang-tools-path=${TOOLCHAIN}/bin --cross-compile-hosts=android-$arch --cross-compile-deps-path=$SDK --skip-local-build --build-swift-static-stdlib --xctest --install-swift --install-libdispatch --install-foundation --install-xctest --install-destdir=$SDK --swift-install-components='compiler;clang-resource-dir-symlink;license;stdlib;sdk-overlay' --cross-compile-append-host-target-to-destdir=False -b --install-llbuild --swift-testing --install-swift-testing -p $LSP_BUILD
169+
./swift/utils/build-script -RA --skip-build-cmark --build-llvm=0 --android --android-ndk $ANDROID_NDK_HOME --android-arch $arch --android-api-level $ANDROID_API_LEVEL --native-swift-tools-path=${TOOLCHAIN}/bin --native-clang-tools-path=${TOOLCHAIN}/bin --cross-compile-hosts=android-$arch --cross-compile-deps-path=$SDK --skip-local-build --build-swift-static-stdlib --xctest --install-swift --install-libdispatch --install-foundation --install-xctest --install-destdir=$SDK --swift-install-components='compiler;clang-resource-dir-symlink;license;stdlib;sdk-overlay' --cross-compile-append-host-target-to-destdir=False -b --install-llbuild --swift-testing --install-swift-testing -p $BUILD_FLAG $LSP_BUILD
168170
169171
rm $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift
170172

swift-android-trunk-libdispatch.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
2+
index 890fc5e1419..a9bdd7f8842 100755
3+
--- a/swift/utils/build-script-impl
4+
+++ b/swift/utils/build-script-impl
5+
@@ -2331,7 +2331,7 @@ for host in "${ALL_HOSTS[@]}"; do
6+
continue
7+
fi
8+
9+
- if [[ "${BUILD_SWIFT_TOOLS}" == "0" ]]; then
10+
+ if [[ "${CROSS_COMPILE_BUILD_SWIFT_TOOLS}" == "0" ]]; then
11+
echo "Skipping building Foundation Macros for ${host}, because the host tools are not being built"
12+
continue
13+
fi
14+
@@ -2920,7 +2920,7 @@ for host in "${ALL_HOSTS[@]}"; do
15+
continue
16+
fi
17+
18+
- if [[ "${BUILD_SWIFT_TOOLS}" == "0" && "${product}" == "foundation_macros" ]]; then
19+
+ if [[ "${CROSS_COMPILE_BUILD_SWIFT_TOOLS}" == "0" && "${product}" == "foundation_macros" ]]; then
20+
echo "Skipping installing Foundation Macros for ${host}, because the host tools are not being built"
21+
continue
22+
fi
123
diff --git a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake b/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake
224
index 3da519e..e2dd8ed 100644
325
--- a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake

0 commit comments

Comments
 (0)