From bcc42901ad6bb3ec644be225b5f9cd998852e0ef Mon Sep 17 00:00:00 2001 From: shihchanghsiungsonos <44383755+shihchanghsiungsonos@users.noreply.github.com> Date: Thu, 14 May 2020 10:57:11 -0700 Subject: [PATCH] Fix xcode_backend.sh to strip bitcode for archive build, if the project has bitcode disabled entirely (#57027) --- packages/flutter_tools/bin/xcode_backend.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh index 67a42df4f5..92d9b8163c 100755 --- a/packages/flutter_tools/bin/xcode_backend.sh +++ b/packages/flutter_tools/bin/xcode_backend.sh @@ -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