Index: runtime/vm/BUILD.gn |
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn |
index 7922cf0226f67b4d73c0424f53328a6999a84eee..285b0d52334eb964eeaa4b0836fdc82ec2c7efea 100644 |
--- a/runtime/vm/BUILD.gn |
+++ b/runtime/vm/BUILD.gn |
@@ -2,7 +2,8 @@ |
# for details. All rights reserved. Use of this source code is governed by a |
# BSD-style license that can be found in the LICENSE file. |
-import("../../utils/invoke_dart.gni") |
+import("../../build/executable_suffix.gni") |
+import("../../build/prebuilt_dart_sdk.gni") |
config("libdart_vm_config") { |
if (defined(is_fuchsia) && is_fuchsia) { |
@@ -440,8 +441,10 @@ if (!defined(is_fuchsia) || !is_fuchsia) { |
# Build the patched sdk out of the concatenated patches and the special |
# libraries. |
action(target_name) { |
- deps = [ "../bin:dart_bootstrap($host_toolchain)" ] + |
- concatenation_target_names |
+ deps = concatenation_target_names |
+ if (!prebuilt_dart_exe_works) { |
+ deps += [ "../bin:dart_bootstrap($host_toolchain)" ] |
+ } |
patches_dir = "$target_gen_dir/patches" |
patched_sdk_dir = "$root_out_dir/patched_sdk" |
@@ -481,14 +484,18 @@ if (!defined(is_fuchsia) || !is_fuchsia) { |
"${patched_sdk_dir}/lib/core/core.dart", |
] |
- dart_out_dir = get_label_info("../bin:dart_bootstrap($host_toolchain)", |
- "root_out_dir") |
- dart_bootstrap = |
- rebase_path("$dart_out_dir/dart_bootstrap$dart_executable_suffix") |
- |
- args = [ |
- "--dart-executable", |
- dart_bootstrap, |
+ args = [] |
+ if (!prebuilt_dart_exe_works) { |
+ dart_out_dir = get_label_info("../bin:dart_bootstrap($host_toolchain)", |
+ "root_out_dir") |
+ dart_bootstrap = |
+ rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") |
+ args += [ |
+ "--dart-executable", |
+ dart_bootstrap, |
+ ] |
+ } |
+ args += [ |
"vm", |
rebase_path("../../sdk"), |
rebase_path(patches_dir, root_build_dir), |