Skip to content

Commit d7582f1

Browse files
tmvkrpxl0Firestar99
authored andcommitted
remove RUSTC env var to prevent build script toolchain leaking into cargo gpu
This is bandaid fix, it now ignores RUSTC environment variable set from elsewhere, like when shader crate is part of a workspace. As of today, it fails to compile on workspace which uses nightly because an additional restriction was added to target specification json file on nightly. Even though enforcing specific rustc version seems like good idea for the purpose of cargo-gpu, target specification json file should be updated as well if we were to ever bump up required rustc version.
1 parent 8df2452 commit d7582f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/cargo-gpu/src/install.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ package = "rustc_codegen_spirv"
202202
build_command
203203
.current_dir(&checkout)
204204
.arg(format!("+{}", spirv_version.channel))
205-
.args(["build", "--release"]);
205+
.args(["build", "--release"])
206+
.env_remove("RUSTC");
206207

207208
log::debug!("building artifacts with `{build_command:?}`");
208209

0 commit comments

Comments
 (0)