mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #2451 from chinmaygarde/master
Ignore checked mode when running from a precompilation snapshot.
This commit is contained in:
commit
88dc138126
@ -122,6 +122,11 @@ SnapshotProject() {
|
||||
# snapshot buffer and isolate snapshot buffer, we name the file to match
|
||||
# the name of the symbol the VM expects at runtime. On these binary files,
|
||||
# we invoke xxd.
|
||||
#
|
||||
# Note about "checked mode": Precompilation snapshots are never in checked
|
||||
# mode. The flag is also ignored by the standalone VM. So there is no sense
|
||||
# in generating the larger snapshot. For development purposes, a
|
||||
# non-precompilation enabled VM is used.
|
||||
RunCommand ${FLUTTER_ARCH_TOOLS_PATH}/Snapshotter \
|
||||
--vm_isolate_snapshot=${derived_dir}/kDartVmIsolateSnapshotBuffer \
|
||||
--isolate_snapshot=${derived_dir}/kDartIsolateSnapshotBuffer \
|
||||
@ -131,6 +136,7 @@ SnapshotProject() {
|
||||
--url_mapping=dart:mojo.internal,${mojo_internal_path} \
|
||||
--url_mapping=dart:ui,${ui_path} \
|
||||
--url_mapping=dart:vmservice_sky,$vm_service_path \
|
||||
--no-checked \
|
||||
$main_path
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
||||
@ -68,9 +68,6 @@ namespace {
|
||||
|
||||
static const char* kDartArgs[] = {
|
||||
"--enable_mirrors=false",
|
||||
// Dart assumes ARM devices are insufficiently powerful and sets the
|
||||
// default profile period to 100Hz. This number is suitable for older
|
||||
// Raspberry Pi devices but quite low for current smartphones.
|
||||
"--profile_period=1000",
|
||||
"--background_compilation",
|
||||
#if (WTF_OS_IOS || WTF_OS_MACOSX)
|
||||
@ -316,6 +313,10 @@ void InitDartVM() {
|
||||
enable_checked_mode = true;
|
||||
#endif
|
||||
|
||||
if (IsRunningPrecompiledCode()) {
|
||||
enable_checked_mode = false;
|
||||
}
|
||||
|
||||
Vector<const char*> args;
|
||||
args.append(kDartArgs, arraysize(kDartArgs));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user