diff --git a/sky/build/sdk_xcode_harness/Tools/common/BuildFlutterApp b/sky/build/sdk_xcode_harness/Tools/common/BuildFlutterApp index 11001ba1d2eba55ad7465e8f49c68aa8ab1ae1c1..8d7a113a06a89a41bed7bac1f44efea787baab2e 100644 --- a/sky/build/sdk_xcode_harness/Tools/common/BuildFlutterApp +++ b/sky/build/sdk_xcode_harness/Tools/common/BuildFlutterApp @@ -41,17 +41,17 @@ BuildApp() { RunCommand pushd ${project_path} + local local_engine_flag="" + if [[ -n "$LOCAL_ENGINE" ]]; then + local_engine_flag="--local-engine=$LOCAL_ENGINE" + fi + if [[ $CURRENT_ARCH != "x86_64" ]]; then local interpreter_flag="--interpreter" if [[ "$DART_EXPERIMENTAL_INTERPRETER" != "1" ]]; then interpreter_flag="" fi - local local_engine_flag="" - if [[ -n "$LOCAL_ENGINE" ]]; then - local_engine_flag="--local-engine=$LOCAL_ENGINE" - fi - RunCommand ${FLUTTER_ROOT}/bin/flutter --suppress-analytics build aot \ --target-platform=ios \ --release \ @@ -75,6 +75,7 @@ BuildApp() { RunCommand ${FLUTTER_ROOT}/bin/flutter --suppress-analytics build flx \ --output-file=${derived_dir}/app.flx \ ${precompilation_flag} \ + ${local_engine_flag} \ if [[ $? -ne 0 ]]; then EchoError "Failed to package $1."