Skip to content

Commit

Permalink
Execute cmd directory for bat scripts on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Sep 7, 2017
1 parent 3c636f7 commit bb68302
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,22 +1309,19 @@ impl Build {
})
.or_else(|| {
if target.contains("emscripten") {
//Windows uses bat file so we have to be a bit more specific
let tool = if self.cpp {
if cfg!(windows) {
"em++.bat"
} else {
"em++"
}
"em++"
} else {
if cfg!(windows) {
"emcc.bat"
} else {
"emcc"
}
"emcc"
};

Some(Tool::new(PathBuf::from(tool)))
// Windows uses bat file so we have to be a bit more specific
if cfg!(windows) {
let mut t = Tool::new(PathBuf::from("cmd"));
t.args.push(format!("{}.bat", tool).into());
Some(t)
} else {
Some(Tool::new(PathBuf::from(tool)))
}
} else {
None
}
Expand Down

0 comments on commit bb68302

Please sign in to comment.