Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: runtime/bin/main.cc

Issue 1661703002: VM: Replace dart --noopt with new binary target dart_noopt. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/dart-runtime.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index ee655d2474d3f8563a7b8705a461f165c366a497..c61016f8f4581164f05321792f3d22608d755fc9 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -343,19 +343,6 @@ static bool ProcessRunPrecompiledSnapshotOption(
}
-static bool ProcessNooptOption(
- const char* arg,
- CommandLineOptions* vm_options) {
- ASSERT(arg != NULL);
- if (*arg != '\0') {
- return false;
- }
- has_noopt = true;
- vm_options->AddArgument("--precompilation");
- return true;
-}
-
-
static bool ProcessScriptSnapshotOptionHelper(const char* filename,
bool* snapshot_option) {
*snapshot_option = false;
@@ -487,7 +474,6 @@ static struct {
{ "--compile_all", ProcessCompileAllOption },
{ "--enable-vm-service", ProcessEnableVmServiceOption },
{ "--gen-precompiled-snapshot", ProcessGenPrecompiledSnapshotOption },
- { "--noopt", ProcessNooptOption },
{ "--observe", ProcessObserveOption },
{ "--run-precompiled-snapshot", ProcessRunPrecompiledSnapshotOption },
{ "--shutdown", ProcessShutdownOption },
@@ -1460,6 +1446,16 @@ void main(int argc, char** argv) {
vm_options.AddArgument("--load_deferred_eagerly");
}
+#if defined(DART_PRECOMPILER) && !defined(DART_NO_SNAPSHOT)
+ // Always set --precompilation with dart_noopt, unless already set by these
+ // command line options.
+ if (!has_gen_precompiled_snapshot &&
+ !has_run_precompiled_snapshot) {
+ has_noopt = true;
+ vm_options.AddArgument("--precompilation");
+ }
+#endif
+
Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
// Start event handler.
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/dart-runtime.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698