Fix xcode_backend.sh to strip bitcode for archive build, if the project has bitcode disabled entirely (#57027)

This commit is contained in:
shihchanghsiungsonos
2020-05-14 10:57:11 -07:00
committed by GitHub
parent 362a557365
commit bcc42901ad

View File

@@ -288,8 +288,8 @@ EmbedFlutterFrameworks() {
# Copy Xcode behavior and don't copy over headers or modules.
RunCommand rsync -av --delete --filter "- .DS_Store/" --filter "- Headers/" --filter "- Modules/" "${flutter_ios_engine_folder}/Flutter.framework" "${xcode_frameworks_dir}/"
if [[ "$ACTION" != "install" ]]; then
# Strip bitcode from the destination unless archiving.
if [[ "$ACTION" != "install" || "$ENABLE_BITCODE" == "NO" ]]; then
# Strip bitcode from the destination unless archiving, or if bitcode is disabled entirely.
RunCommand "${DT_TOOLCHAIN_DIR}"/usr/bin/bitcode_strip "${flutter_ios_engine_folder}/Flutter.framework/Flutter" -r -o "${xcode_frameworks_dir}/Flutter.framework/Flutter"
fi