File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ $DOCKER build --build-arg OS_ARCH_SUFFIX=$OS_ARCH_SUFFIX --build-arg SWIFT_TOOLC
4141
4242mkdir -p products
4343
44- # Run the build
4544$DOCKER run -i --rm \
4645 -v ./source:/source \
4746 -v ./products:/products \
Original file line number Diff line number Diff line change @@ -48,11 +48,13 @@ if [[ ! -d ${ANDROID_NDK_HOME} ]]; then
4848 popd
4949fi
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 \
Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ swift_android_patch="${patches_dir}/swift-android.patch"
2626perl -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
3135case " ${BUILD_VERSION} " in
3236 release)
6468
6569perl -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
You can’t perform that action at this time.
0 commit comments