From 22d7bc4a3a44ca44916405f516719bde2e3057ac Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Fri, 4 Mar 2016 16:22:27 -0800 Subject: [PATCH] Enable conditional directives --- sky/engine/core/script/dart_init.cc | 5 +++++ sky/tools/sky_snapshot/vm.cc | 1 + 2 files changed, 6 insertions(+) diff --git a/sky/engine/core/script/dart_init.cc b/sky/engine/core/script/dart_init.cc index a4818ec98e275..edd824024b4f0 100644 --- a/sky/engine/core/script/dart_init.cc +++ b/sky/engine/core/script/dart_init.cc @@ -86,6 +86,10 @@ static const char* kDartBackgroundCompilationArgs[] = { "--background_compilation", }; +static const char *kDartConditionalDirectivesArgs[] = { + "--conditional_directives", +}; + static const char* kDartCheckedModeArgs[] = { "--enable_asserts", "--enable_type_checks", @@ -324,6 +328,7 @@ void InitDartVM() { Vector args; args.append(kDartProfilingArgs, arraysize(kDartProfilingArgs)); + args.append(kDartConditionalDirectivesArgs, arraysize(kDartConditionalDirectivesArgs)); if (!IsRunningPrecompiledCode()) { // The version of the VM setup to run precompiled code does not recognize diff --git a/sky/tools/sky_snapshot/vm.cc b/sky/tools/sky_snapshot/vm.cc index e13246adf9dca..eb5f8b941f408 100644 --- a/sky/tools/sky_snapshot/vm.cc +++ b/sky/tools/sky_snapshot/vm.cc @@ -16,6 +16,7 @@ extern void* kDartIsolateSnapshotBuffer; static const char* kDartArgs[] = { "--enable_mirrors=false", "--load_deferred_eagerly=true", + "--conditional_directives", }; void InitDartVM() {