Simplify iOS debug build (#17145)

iOS debug builds always run in interpreted mode whether on device or on
simulator. In both cases, we can skip snapshotting and link against an
empty App.framework. Previously, we did this for iOS simulator builds.
This does the same for device builds.

Previously, debug iOS builds used gen_snapshot to generate a core
snapshot, then used 'xxd' to generate C files containing the snapshot
data in buffers named kDartVmSnapshotData and kDartIsolateSnapshotData,
which are then compiled/linked into App.framework. This is unnecessary
since the VM compiled into Flutter.framework already contains this data.
This commit is contained in:
Chris Bracken
2018-04-30 19:51:30 -07:00
committed by GitHub
parent c3d43ef4a7
commit 68a1e2f7aa
5 changed files with 33 additions and 130 deletions

View File

@@ -109,7 +109,7 @@ BuildApp() {
preview_dart_2_flag="--no-preview-dart-2"
fi
if [[ "$CURRENT_ARCH" != "x86_64" ]]; then
if [[ "${build_mode}" != "debug" ]]; then
StreamOutput " ├─Building Dart code..."
RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \
${verbose_flag} \
@@ -131,6 +131,7 @@ BuildApp() {
else
RunCommand mkdir -p -- "${derived_dir}/App.framework"
RunCommand eval "$(echo "static const int Moo = 88;" | xcrun clang -x c \
-arch "$CURRENT_ARCH" \
-dynamiclib \
-Xlinker -rpath -Xlinker '@executable_path/Frameworks' \
-Xlinker -rpath -Xlinker '@loader_path/Frameworks' \