提交 b407fc48 编写于 作者: C Chinmay Garde

Dont include any of the machinery to generate a precompilation snapshot on the embedder VM

上级 88dc1381
......@@ -126,7 +126,7 @@ SnapshotProject() {
# 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.
# non-precompilation-enabled VM is used.
RunCommand ${FLUTTER_ARCH_TOOLS_PATH}/Snapshotter \
--vm_isolate_snapshot=${derived_dir}/kDartVmIsolateSnapshotBuffer \
--isolate_snapshot=${derived_dir}/kDartIsolateSnapshotBuffer \
......
......@@ -66,10 +66,11 @@ Dart_Handle DartLibraryTagHandler(Dart_LibraryTag tag,
namespace {
static const char* kDartArgs[] = {
"--enable_mirrors=false",
static const char* kDartProfilingArgs[] = {
// 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)
// On platforms where LLDB is the primary debugger, SIGPROF signals
// overwhelm LLDB.
......@@ -77,8 +78,12 @@ static const char* kDartArgs[] = {
#endif
};
static const char* kDartPrecompilationArgs[]{
"--precompilation",
static const char *kDartMirrorsArgs[] = {
"--enable_mirrors=false",
};
static const char* kDartBackgroundCompilationArgs[] = {
"--background_compilation",
};
static const char* kDartCheckedModeArgs[] = {
......@@ -318,10 +323,16 @@ void InitDartVM() {
}
Vector<const char*> args;
args.append(kDartArgs, arraysize(kDartArgs));
args.append(kDartProfilingArgs, arraysize(kDartProfilingArgs));
if (IsRunningPrecompiledCode())
args.append(kDartPrecompilationArgs, arraysize(kDartPrecompilationArgs));
if (!IsRunningPrecompiledCode()) {
// The version of the VM setup to run precompiled code does not recognize
// the mirrors or the background compilation flags. They are never enabled.
// Make sure we dont pass in unrecognized flags.
args.append(kDartMirrorsArgs, arraysize(kDartMirrorsArgs));
args.append(kDartBackgroundCompilationArgs,
arraysize(kDartBackgroundCompilationArgs));
}
if (enable_checked_mode)
args.append(kDartCheckedModeArgs, arraysize(kDartCheckedModeArgs));
......
......@@ -30,11 +30,16 @@ source_set("common") {
"ui_delegate.h",
]
public_deps = [
if (is_ios && !use_ios_simulator) {
dart_deps = [ "//dart/runtime:libdart_precompiled_runtime" ]
} else {
dart_deps = [ "//dart/runtime:libdart" ]
}
public_deps = dart_deps + [
"//base",
"//base:i18n",
"//build/config/sanitizers:deps",
"//dart/runtime:libdart",
"//flow",
"//mojo/common",
"//mojo/data_pipe_utils",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册