Extend rust nightly detection in wasm-builder (#5021)

Instead of just testing `cargo` and `rustup run nightly`, we now test
the `CARGO` env variable and also scan non default nightlies. The user
is also now able to select the toolchain with `WASM_BUILD_TOOLCHAIN`.
This commit is contained in:
Bastian Köcher
2020-02-25 15:50:45 +01:00
committed by GitHub
parent c498f246ec
commit 36770979bb
3 changed files with 62 additions and 22 deletions
@@ -453,6 +453,7 @@ fn generate_rerun_if_changed_instructions(
println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_TYPE_ENV);
println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_RUSTFLAGS_ENV);
println!("cargo:rerun-if-env-changed={}", crate::WASM_TARGET_DIRECTORY);
println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_TOOLCHAIN);
}
/// Copy the WASM binary to the target directory set in `WASM_TARGET_DIRECTORY` environment variable.