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

Unified Diff: utils/application_snapshot.gni

Issue 2493833002: GN: Don't depend on dart_bootstrap if there is a usable prebuilt sdk (Closed)
Patch Set: Created 4 years, 1 month 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 | « utils/analysis_server/BUILD.gn ('k') | utils/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/application_snapshot.gni
diff --git a/utils/invoke_dart.gni b/utils/application_snapshot.gni
similarity index 57%
rename from utils/invoke_dart.gni
rename to utils/application_snapshot.gni
index bc4747a0bde957914438977b30e8b33ede16e943..0f36737bbd40c5d6942d7d54808419d2ed723c13 100644
--- a/utils/invoke_dart.gni
+++ b/utils/application_snapshot.gni
@@ -2,49 +2,9 @@
# 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.
-_dart_root = rebase_path("..")
-
-if (defined(is_win) && is_win) {
- dart_executable_suffix = ".exe"
-} else {
- dart_executable_suffix = ""
-}
-
-template("invoke_dart") {
- assert(defined(invoker.outputs), "invoke_dart must specify outputs")
- extra_deps = []
- if (defined(invoker.deps)) {
- extra_deps += invoker.deps
- }
-
- extra_inputs = []
- if (defined(invoker.inputs)) {
- extra_inputs += invoker.inputs
- }
-
- extra_args = []
- if (defined(invoker.args)) {
- extra_args += invoker.args
- }
-
- action(target_name) {
- relative_dart_root = rebase_path(_dart_root, ".")
- deps =
- extra_deps + [ "$relative_dart_root/runtime/bin:dart($host_toolchain)" ]
-
- dart_out_dir =
- get_label_info("$relative_dart_root/runtime/bin:dart($host_toolchain)",
- "root_out_dir")
- dart = rebase_path("$dart_out_dir/dart$dart_executable_suffix")
+import("//build/compiled_action.gni")
- inputs = [ dart ] + extra_inputs
-
- outputs = invoker.outputs
-
- script = "$_dart_root/tools/dart_for_gn.py"
- args = [ dart ] + extra_args
- }
-}
+_dart_root = rebase_path("..")
template("application_snapshot") {
assert(defined(invoker.main_dart), "Must specify 'main_dart'")
@@ -63,7 +23,8 @@ template("application_snapshot") {
if (defined(invoker.inputs)) {
extra_inputs += invoker.inputs
}
- invoke_dart(target_name) {
+ compiled_action(target_name) {
+ tool = get_path_info("$_dart_root/runtime/bin:dart", "abspath")
deps = extra_deps + [ "$_dart_root/pkg:pkg_files_stamp" ]
inputs = extra_inputs + [
« no previous file with comments | « utils/analysis_server/BUILD.gn ('k') | utils/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698