From afd1473d35502504ed53c641210e5b662234db70 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Tue, 2 Apr 2019 13:09:53 -0700 Subject: [PATCH] Pass environment defines to compile flutter platform step. (flutter/engine#8412) * Pass environment defines to the compiler * Remove non-strong platform target --- engine/src/flutter/lib/snapshot/BUILD.gn | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/engine/src/flutter/lib/snapshot/BUILD.gn b/engine/src/flutter/lib/snapshot/BUILD.gn index f82c5e81f0..8ab94ab127 100644 --- a/engine/src/flutter/lib/snapshot/BUILD.gn +++ b/engine/src/flutter/lib/snapshot/BUILD.gn @@ -231,23 +231,6 @@ source_set("snapshot") { get_target_outputs(":platform_strong_dill_linkable") } -compile_platform("non_strong_platform") { - single_root_scheme = "org-dartlang-sdk" - single_root_base = rebase_path("../../../") - libraries_specification_uri = - "org-dartlang-sdk:///flutter/lib/snapshot/libraries.json" - - outputs = [ - "$root_out_dir/flutter_patched_sdk/platform.dill", - "$root_out_dir/flutter_patched_sdk/vm_outline.dill", - ] - - args = [ - "--target=flutter", - "dart:core", - ] -} - compile_platform("strong_platform") { single_root_scheme = "org-dartlang-sdk" single_root_base = rebase_path("../../../") @@ -259,8 +242,13 @@ compile_platform("strong_platform") { "$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill", ] + is_runtime_mode_release = flutter_runtime_mode == "release" + allow_causal_async_stacks = !is_runtime_mode_release args = [ "--target=flutter", + "-Ddart.vm.product=$is_runtime_mode_release", + "-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks", + "-Ddart.isVM=true", "dart:core", ] } @@ -275,7 +263,6 @@ if (is_fuchsia || is_fuchsia_host) { } else { group("kernel_platform_files") { public_deps = [ - ":non_strong_platform", ":strong_platform", ] }