Skip to content

Commit e2efeaf

Browse files
committed
Swift Androd build
1 parent 30d839e commit e2efeaf

File tree

1 file changed

+6
-4
lines changed
  • swift-ci/sdks/android

1 file changed

+6
-4
lines changed

swift-ci/sdks/android/build

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ fi
6464
# Apply patches
6565
# TODO: need to selectively apply patches based on release or not release
6666
pushd ${SDKROOT}/src/swift-project
67+
echo "Applying patches"
68+
6769
# patch the patch, which seems to only be needed for an API less than 28
6870
# https://github.com/finagolfin/swift-android-sdk/blob/main/swift-android.patch#L110
6971
perl -pi -e 's/#if os\(Windows\)/#if os\(Android\)/g' $PATCHDIR/swift-android.patch
@@ -76,16 +78,16 @@ pushd ${SDKROOT}/src/swift-project
7678
# fix for Process.swift:953:57: error: value of optional type 'posix_spawnattr_t?' (aka 'Optional<OpaquePointer>') must be unwrapped to a value of type 'posix_spawnattr_t' (aka 'OpaquePointer')
7779
#perl -pi -e 's%canImport\(Darwin\) \|\| os\(Android\) \|\| os\(OpenBSD\)%canImport\(Darwin\) || os\(AndroidXXX\) || os\(OpenBSD\)%g' swift-corelibs-foundation/Sources/Foundation/Process.swift
7880

79-
git apply $PATCHDIR/swift-android.patch || true
81+
git apply -v $PATCHDIR/swift-android.patch
8082
# swift-android-ci.patch is not needed, since it is only used for llbuild, etc.
81-
#git apply -C1 $PATCHDIR/swift-android-ci.patch || true
83+
git apply -C1 $PATCHDIR/swift-android-ci.patch
8284

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

87-
git apply $PATCHDIR/swift-android-ci-release.patch || true
88-
git apply $PATCHDIR/swift-android-testing-release.patch || true
89+
git apply -v $PATCHDIR/swift-android-ci-release.patch
90+
git apply -v $PATCHDIR/swift-android-testing-release.patch
8991

9092
perl -pi -e 's%String\(cString: getpass%\"fake\" //%' swiftpm/Sources/PackageRegistryCommand/PackageRegistryCommand+Auth.swift
9193
popd

0 commit comments

Comments
 (0)