summaryrefslogtreecommitdiff
path: root/build_extra
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-07-10 21:13:29 +0200
committerBert Belder <bertbelder@gmail.com>2018-07-10 21:54:56 +0200
commit4f626098eca99efc79e71b4839084d730473b696 (patch)
tree3ee9d5557e8526b8f4cc513b6851295a1a61cf5b /build_extra
parentd160de7f445e5d79883f2e8d97584b8afd009cc7 (diff)
windows: add .exe extension to executable produced by rust_test template
Diffstat (limited to 'build_extra')
-rw-r--r--build_extra/rust/rust.gni8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni
index 095904d4b..d9c23fb1b 100644
--- a/build_extra/rust/rust.gni
+++ b/build_extra/rust/rust.gni
@@ -5,6 +5,12 @@ declare_args() {
rust_build = "//build_extra/rust/"
}
+if (is_win) {
+ executable_suffix = ".exe"
+} else {
+ executable_suffix = ""
+}
+
template("run_rustc") {
action(target_name) {
assert(defined(invoker.source_root), "Must specify source_root")
@@ -40,7 +46,7 @@ template("run_rustc") {
if (defined(is_test) && is_test) {
# Test outputs are executables which should be in root_out_dir.
- output_file = "$root_out_dir/$crate_name"
+ output_file = "$root_out_dir/$crate_name" + executable_suffix
args += [
"--test",
"-o",