Skip to content

Commit

Permalink
Build iphoneos binaries with full Bitcode
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebrambilla committed Sep 20, 2021
1 parent 71f0d1e commit 62607c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ PRODUCTS_DIR="${DERIVED_DATA_DIR}/Build/Products"
# carthage adds these, not sure if necessary
EXTRA_ARGS="ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="

# Embed bitcode for iphoneos binaries
EXTRA_IPHONEOS_ARGS="ENABLE_BITCODE=YES BITCODE_GENERATION_MODE=bitcode"

# libetpan has been set up to build an xcframework for libsasl2, however xcframeworks must exist at the *start* of the build process
# I didn't have time to figure out something less awful than building libetpan first
# It'll copy sasl.xcframework to the build directory
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "libetpan ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS}
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "libetpan ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS} ${EXTRA_IPHONEOS_ARGS}
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "libetpan ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphonesimulator ${EXTRA_ARGS}

# mailcore2 references the sasl.xcframework in the build directory
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "mailcore ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS}
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "mailcore ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS} ${EXTRA_IPHONEOS_ARGS}
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "mailcore ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphonesimulator ${EXTRA_ARGS}

# glue it all together
Expand Down

0 comments on commit 62607c6

Please sign in to comment.