Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
wasmtime-basic: fix build.rs
Browse files Browse the repository at this point in the history
The `rustc` command misses an argument and fails, which went unnoticed
because of a missing assert on its status.
  • Loading branch information
steveej authored and npmccallum committed Aug 21, 2019
1 parent 509084c commit 33b893a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wasmtime-basic/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ fn main() {

if cfg!(feature = "rust") {
println!("Compiling Rust source to WASM...");
Command::new("rustc")
assert!(Command::new("rustc")
.arg("-C")
.arg("lto")
.arg("-C")
.arg("opt-level=3")
.arg("--target")
.arg("wasm32-unknown-unknown")
.arg("-o")
.arg(format!("{}/add.wasm", out))
.arg("src/add.rs")
.spawn()
.expect("failed to compile WASM module");
.status()
.expect("failed to compile WASM module")
.success());
}
}

0 comments on commit 33b893a

Please sign in to comment.