Enable arm64 for simulator and enable bitcode for all frameworks

This commit is contained in:
Yury Korolev 2021-01-18 11:39:41 +03:00
parent 2a57c12f48
commit 153f9a74ce
2 changed files with 2 additions and 24 deletions

View File

@ -1,14 +1,2 @@
# First, creat all frameworks for both architectures:
xcodebuild -project ios_system.xcodeproj -alltargets -sdk iphoneos -configuration Release -quiet
xcodebuild -project ios_system.xcodeproj -alltargets -sdk iphonesimulator -arch x86_64 -configuration Release -quiet
# then, merge them into XCframeworks:
for framework in awk curl_ios files ios_system shell ssh_cmd tar text
do
rm -rf $framework.xcframework
xcodebuild -create-xcframework -framework build/Release-iphoneos/$framework.framework -framework build/Release-iphonesimulator/$framework.framework -output $framework.xcframework
# while we're at it, let's compute the checksum:
rm -f $framework.xcframework.zip
zip -rq $framework.xcframework.zip $framework.xcframework
swift package compute-checksum $framework.xcframework.zip
done
swift run --package-path xcfs build

View File

@ -9,15 +9,6 @@ OutputLevel.default = .error
// TODO: We can add more platforms here
let platforms: [Platform] = [.iPhoneOS, .iPhoneSimulator]
extension Platform {
var excludedArchs: [Platform.Arch] {
switch self {
case .iPhoneSimulator: return [.arm64] // TODO: add arm64 simulator
default: return []
}
}
}
let allSchemes = [
"ios_system",
@ -47,8 +38,7 @@ for scheme in schemes {
dirPath: ".build",
project: "ios_system",
scheme: scheme,
platforms: platforms.map { ($0, excludedArchs: $0.excludedArchs) },
enableBitCode: false
platforms: platforms.map { ($0, excludedArchs: []) }
)
try cd(".build") {