File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -999,6 +999,12 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
999
999
// so we turn off that caching with an env var, just to avoid any issues.
1000
1000
cargo. env ( "CARGO_CACHE_RUSTC_INFO" , "0" ) ;
1001
1001
1002
+ // NOTE(firestar99) If you call SpirvBuilder in a build script, it will
1003
+ // set `RUSTC` before calling it. And if we were to propagate it to our
1004
+ // cargo invocation, it will take precedence over the `+toolchain` we
1005
+ // previously set.
1006
+ cargo. env_remove ( "RUSTC" ) ;
1007
+
1002
1008
// NOTE(eddyb) this used to be just `RUSTFLAGS` but at some point Cargo
1003
1009
// added a separate environment variable using `\x1f` instead of spaces,
1004
1010
// which allows us to have spaces within individual `rustc` flags.
You can’t perform that action at this time.
0 commit comments