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

Unified Diff: build/compiled_action.gni

Issue 533853002: Minor fixes for the GN Windows build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/compiled_action.gni
diff --git a/build/compiled_action.gni b/build/compiled_action.gni
index 2fb4532e5823c9d6a0fb0c2b9cb171465fb114b0..b750af0320084e4ad9a72b4899a3c340b6e84e10 100644
--- a/build/compiled_action.gni
+++ b/build/compiled_action.gni
@@ -66,6 +66,12 @@
# saves unnecessarily compiling your tool for the target platform. But if you
# need a target build of your tool as well, just leave off the if statement.
+if (build_os == "win") {
+ _host_executable_suffix = ".exe"
+} else {
+ _host_executable_suffix = ""
+}
+
template("compiled_action") {
assert(defined(invoker.tool), "tool must be defined for $target_name")
assert(defined(invoker.outputs), "outputs must be defined for $target_name")
@@ -97,7 +103,7 @@ template("compiled_action") {
# specify this, since we can't know what the output name is (it might be in
# another file not processed yet).
host_executable = get_label_info(host_tool, "root_out_dir") + "/" +
- get_label_info(host_tool, "name")
+ get_label_info(host_tool, "name") + _host_executable_suffix
# Add the executable itself as an input.
inputs += [ host_executable ]
@@ -146,7 +152,7 @@ template("compiled_action_foreach") {
# specify this, since we can't know what the output name is (it might be in
# another file not processed yet).
host_executable = get_label_info(host_tool, "root_out_dir") + "/" +
- get_label_info(host_tool, "name")
+ get_label_info(host_tool, "name") + _host_executable_suffix
# Add the executable itself as an input.
inputs += [ host_executable ]
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698