forked from kirillp/labs-openjdk-17
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xcodebuild.sh
51 lines (40 loc) · 2.57 KB
/
xcodebuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
rm -r xcode
mkdir -p xcode
buildIos() {
echo building for iOS
xcodebuild -sdk iphoneos -arch arm64 -project jdk-ios.xcodeproj -target jdk -configuration Debug > xcode/jdk-iphoneos-d.log 2>&1
xcodebuild -sdk iphoneos -arch arm64 -project jdk-ios.xcodeproj -target jdk -configuration Release > xcode/jdk-iphoneos-r.log 2>&1
lipo -info xcode/jdk-ios-d.a
lipo -info xcode/jdk-ios-r.a
}
buildIosSimulator() {
echo building for iOS Simulator
xcodebuild -sdk iphonesimulator -arch x86_64 -project jdk-ios.xcodeproj -target jdk -configuration Release > xcode/jdk-iphonesimulator-x86_64-r.log 2>&1
xcodebuild -sdk iphonesimulator -arch x86_64 -project jdk-ios.xcodeproj -target jdk -configuration Debug > xcode/jdk-iphonesimulator-x86_64-d.log 2>&1
mv xcode/jdk-ios-simulator-d.a xcode/jdk-ios-simulator-x86_64-d.a
mv xcode/jdk-ios-simulator-r.a xcode/jdk-ios-simulator-x86_64-r.a
xcodebuild -sdk iphonesimulator -arch arm64 -project jdk-ios.xcodeproj -target jdk -configuration Release > xcode/jdk-iphonesimulator-arm64-r.log 2>&1
xcodebuild -sdk iphonesimulator -arch arm64 -project jdk-ios.xcodeproj -target jdk -configuration Debug > xcode/jdk-iphonesimulator-arm64-d.log 2>&1
mv xcode/jdk-ios-simulator-d.a xcode/jdk-ios-simulator-arm64-d.a
mv xcode/jdk-ios-simulator-r.a xcode/jdk-ios-simulator-arm64-r.a
lipo xcode/jdk-ios-simulator-arm64-d.a xcode/jdk-ios-simulator-x86_64-d.a -create -output xcode/jdk-ios-simulator-d.a
lipo xcode/jdk-ios-simulator-arm64-r.a xcode/jdk-ios-simulator-x86_64-r.a -create -output xcode/jdk-ios-simulator-r.a
rm xcode/jdk-ios-simulator-arm64-d.a xcode/jdk-ios-simulator-x86_64-d.a xcode/jdk-ios-simulator-arm64-r.a xcode/jdk-ios-simulator-x86_64-r.a
lipo -info xcode/jdk-ios-simulator-d.a
lipo -info xcode/jdk-ios-simulator-r.a
}
# Mac Catalyst
buildMacCatalyst() {
echo building for catalyst
xcodebuild -sdk macosx -arch x86_64 -project jdk-ios.xcodeproj -scheme jdk-x86-64-debug > xcode/x86-64-mac-catalyst-d.log 2>&1
xcodebuild -sdk macosx -arch x86_64 -project jdk-ios.xcodeproj -scheme jdk-x86-64-release > xcode/x86-64-mac-catalyst-r.log 2>&1
xcodebuild -sdk macosx -arch arm64 -project jdk-ios.xcodeproj -scheme jdk-arm64-debug > xcode/arm64-mac-catalyst-r.log 2>&1
xcodebuild -sdk macosx -arch arm64 -project jdk-ios.xcodeproj -scheme jdk-arm64-release > xcode/arm64-mac-catalyst-r.log 2>&1
lipo -info xcode/jdk-x86-64-mac-catalyst-d.a
lipo -info xcode/jdk-x86-64-mac-catalyst-r.a
lipo -info xcode/jdk-arm64-mac-catalyst-d.a
lipo -info xcode/jdk-arm64-mac-catalyst-r.a
}
buildIos
buildIosSimulator
#buildMacCatalyst