Skip to content

Commit 2f17860

Browse files
authored
Pass environment defines to compile flutter platform step. (flutter#8412)
* Pass environment defines to the compiler * Remove non-strong platform target
1 parent 4a8c7dc commit 2f17860

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

lib/snapshot/BUILD.gn

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,6 @@ source_set("snapshot") {
231231
get_target_outputs(":platform_strong_dill_linkable")
232232
}
233233

234-
compile_platform("non_strong_platform") {
235-
single_root_scheme = "org-dartlang-sdk"
236-
single_root_base = rebase_path("../../../")
237-
libraries_specification_uri =
238-
"org-dartlang-sdk:///flutter/lib/snapshot/libraries.json"
239-
240-
outputs = [
241-
"$root_out_dir/flutter_patched_sdk/platform.dill",
242-
"$root_out_dir/flutter_patched_sdk/vm_outline.dill",
243-
]
244-
245-
args = [
246-
"--target=flutter",
247-
"dart:core",
248-
]
249-
}
250-
251234
compile_platform("strong_platform") {
252235
single_root_scheme = "org-dartlang-sdk"
253236
single_root_base = rebase_path("../../../")
@@ -259,8 +242,13 @@ compile_platform("strong_platform") {
259242
"$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill",
260243
]
261244

245+
is_runtime_mode_release = flutter_runtime_mode == "release"
246+
allow_causal_async_stacks = !is_runtime_mode_release
262247
args = [
263248
"--target=flutter",
249+
"-Ddart.vm.product=$is_runtime_mode_release",
250+
"-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks",
251+
"-Ddart.isVM=true",
264252
"dart:core",
265253
]
266254
}
@@ -275,7 +263,6 @@ if (is_fuchsia || is_fuchsia_host) {
275263
} else {
276264
group("kernel_platform_files") {
277265
public_deps = [
278-
":non_strong_platform",
279266
":strong_platform",
280267
]
281268
}

0 commit comments

Comments
 (0)