Skip to content

Commit e9f41fd

Browse files
committed
1 parent b20c546 commit e9f41fd

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

swift-ci/sdks/android/build-docker

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ $DOCKER build --build-arg OS_ARCH_SUFFIX=$OS_ARCH_SUFFIX --build-arg SWIFT_TOOLC
4141

4242
mkdir -p products
4343

44-
# Run the build
4544
$DOCKER run -i --rm \
4645
-v ./source:/source \
4746
-v ./products:/products \

swift-ci/sdks/android/build-local

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ if [[ ! -d ${ANDROID_NDK_HOME} ]]; then
4848
popd
4949
fi
5050

51-
mkdir -p ${SDKROOT}/products
5251

52+
# Check-out and patch the sources
5353
./scripts/fetch-source.sh --source-dir ${SDKROOT}/source --swift-tag ${SWIFT_TAG}
5454
./scripts/patch-sources.sh ${SDKROOT}/source
5555

56+
mkdir -p ${SDKROOT}/products
57+
5658
./scripts/build.sh \
5759
--source-dir ${SDKROOT}/source \
5860
--products-dir ${SDKROOT}/products \

swift-ci/sdks/android/scripts/patch-sources.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ swift_android_patch="${patches_dir}/swift-android.patch"
2626
perl -pi -e 's/#if os\(Windows\)/#if os\(Android\)/g' $swift_android_patch
2727

2828
# remove the need to link in android-execinfo
29-
perl -pi -e 's/dispatch android-execinfo/dispatch/g' $swift_android_patch
29+
perl -pi -e 's;dispatch android-execinfo;dispatch;g' $swift_android_patch
30+
31+
# debug symbolic link setup
32+
perl -pi -e 's;call ln -sf;call ln -svf;g' $swift_android_patch
33+
perl -pi -e 's%linux-x86_64/sysroot/usr/lib"%linux-x86_64/sysroot/usr/lib"; echo "VALIDATING SYMBOLIC LINK"; ls -la "${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib"; ls -la "${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift"; %g' $swift_android_patch
3034

3135
case "${BUILD_VERSION}" in
3236
release)
@@ -64,8 +68,8 @@ done
6468

6569
perl -pi -e 's%String\(cString: getpass%\"fake\" //%' swiftpm/Sources/PackageRegistryCommand/PackageRegistryCommand+Auth.swift
6670
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
67-
perl -pi -e 's/os\(Android\)/os\(AndroidDISABLED\)/g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
71+
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
6872

6973
# need to un-apply libandroid-spawn since we don't need it for API28+
70-
perl -pi -e 's/MATCHES "Android"/MATCHES "AndroidDISABLED"/g' llbuild/lib/llvm/Support/CMakeLists.txt
71-
perl -pi -e 's/ STREQUAL Android\)/ STREQUAL AndroidDISABLED\)/g' swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
74+
perl -pi -e 's;MATCHES "Android";MATCHES "AndroidDISABLED";g' llbuild/lib/llvm/Support/CMakeLists.txt
75+
perl -pi -e 's; STREQUAL Android\); STREQUAL AndroidDISABLED\);g' swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt

0 commit comments

Comments
 (0)