|
8 | 8 | # Mac Catalyst) and combines them into a single universal xcframework. |
9 | 9 | # |
10 | 10 | # Usage: |
11 | | -# ./build-apple-framework.sh # build all platforms + universal xcframework |
12 | | -# ./build-apple-framework.sh <platform> # build a single platform (e.g. macosx, iphoneos) |
13 | | -# ./build-apple-framework.sh build_framework # combine already-built slices into xcframework |
| 11 | +# ./build-apple-framework.sh # build all platforms + universal xcframework |
| 12 | +# ./build-apple-framework.sh <platform> # build a single platform (e.g. macosx, iphoneos) |
| 13 | +# ./build-apple-framework.sh build_framework # combine already-built slices into xcframework |
| 14 | +# ./build-apple-framework.sh build_hermesc # build host hermesc compiler |
| 15 | +# ./build-apple-framework.sh prepare_dest_root # assemble destroot from pre-built slices |
14 | 16 |
|
15 | 17 | if [ "$CI" ]; then |
16 | 18 | set -x |
@@ -75,15 +77,9 @@ function get_release_version { |
75 | 77 | # Given a specific target, retrieve the right architecture for it |
76 | 78 | # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst, macosx, xros, xrsimulator, appletvos, appletvsimulator |
77 | 79 | function get_architecture { |
78 | | - if [[ $1 == "iphoneos" || $1 == "xros" ]]; then |
| 80 | + if [[ $1 == "iphoneos" || $1 == "xros" || $1 == "appletvos" ]]; then |
79 | 81 | echo "arm64" |
80 | | - elif [[ $1 == "iphonesimulator" || $1 == "xrsimulator" ]]; then |
81 | | - echo "x86_64;arm64" |
82 | | - elif [[ $1 == "appletvos" ]]; then |
83 | | - echo "arm64" |
84 | | - elif [[ $1 == "appletvsimulator" ]]; then |
85 | | - echo "x86_64;arm64" |
86 | | - elif [[ $1 == "catalyst" || $1 == "macosx" ]]; then |
| 82 | + elif [[ $1 == "iphonesimulator" || $1 == "xrsimulator" || $1 == "appletvsimulator" || $1 == "catalyst" || $1 == "macosx" ]]; then |
87 | 83 | echo "x86_64;arm64" |
88 | 84 | else |
89 | 85 | echo "Error: unknown architecture passed $1" |
@@ -318,6 +314,10 @@ if [[ -z $1 ]]; then |
318 | 314 | create_framework |
319 | 315 | elif [[ $1 == "build_framework" ]]; then |
320 | 316 | build_universal_framework |
| 317 | +elif [[ $1 == "build_hermesc" ]]; then |
| 318 | + build_host_hermesc_if_needed |
| 319 | +elif [[ $1 == "prepare_dest_root" ]]; then |
| 320 | + prepare_dest_root_for_ci |
321 | 321 | else |
322 | 322 | build_framework "$1" |
323 | 323 | fi |
0 commit comments