Enable bitcode compilation for AOT (#36471)

This commit is contained in:
Dan Field
2019-07-18 22:42:47 -07:00
committed by GitHub
parent e6128a0c14
commit c953cd19d2
14 changed files with 486 additions and 26 deletions

View File

@@ -114,6 +114,7 @@ BuildApp() {
flutter_engine_flag="--local-engine-src-path=${FLUTTER_ENGINE}"
fi
local bitcode_flag=""
if [[ -n "$LOCAL_ENGINE" ]]; then
if [[ $(echo "$LOCAL_ENGINE" | tr "[:upper:]" "[:lower:]") != *"$build_mode"* ]]; then
EchoError "========================================================================"
@@ -130,6 +131,9 @@ BuildApp() {
local_engine_flag="--local-engine=${LOCAL_ENGINE}"
flutter_framework="${FLUTTER_ENGINE}/out/${LOCAL_ENGINE}/Flutter.framework"
flutter_podspec="${FLUTTER_ENGINE}/out/${LOCAL_ENGINE}/Flutter.podspec"
if [[ $ENABLE_BITCODE == "YES" ]]; then
bitcode_flag="--bitcode"
fi
fi
if [[ -e "${project_path}/.ios" ]]; then
@@ -174,6 +178,7 @@ BuildApp() {
EchoError "========================================================================"
exit -1
fi
RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \
${verbose_flag} \
build aot \
@@ -183,7 +188,8 @@ BuildApp() {
--${build_mode} \
--ios-arch="${archs}" \
${flutter_engine_flag} \
${local_engine_flag}
${local_engine_flag} \
${bitcode_flag}
if [[ $? -ne 0 ]]; then
EchoError "Failed to build ${project_path}."