Index: utils/invoke_dart.gni |
diff --git a/utils/invoke_dart.gni b/utils/invoke_dart.gni |
index ad3a7f83b0d9df33e9d44b03185ca3bf7033ee73..bc4747a0bde957914438977b30e8b33ede16e943 100644 |
--- a/utils/invoke_dart.gni |
+++ b/utils/invoke_dart.gni |
@@ -4,6 +4,12 @@ |
_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 = [] |
@@ -29,11 +35,7 @@ template("invoke_dart") { |
dart_out_dir = |
get_label_info("$relative_dart_root/runtime/bin:dart($host_toolchain)", |
"root_out_dir") |
- if (is_win) { |
- dart = rebase_path("$dart_out_dir/dart.exe") |
- } else { |
- dart = rebase_path("$dart_out_dir/dart") |
- } |
+ dart = rebase_path("$dart_out_dir/dart$dart_executable_suffix") |
inputs = [ dart ] + extra_inputs |