Skip to content

Commit 8b5ea07

Browse files
committed
support for old rust-gpu versions on crates.io
1 parent 6fef1fd commit 8b5ea07

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/cargo-gpu/src/install.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ package = "rustc_codegen_spirv"
161161
format!("could not create cache directory '{}'", cache_dir.display())
162162
})?;
163163

164-
// TODO what about lockfiles?
165-
// let spirv_version = self.spirv_cli().context("running spirv cli")?;
166164
let source = SpirvSource::new(
167165
&self.spirv_install.shader_crate,
168166
self.spirv_install.spirv_builder_source.as_deref(),
@@ -216,8 +214,11 @@ package = "rustc_codegen_spirv"
216214
)
217215
.context("ensuring toolchain and components exist")?;
218216

219-
crate::user_output!("Compiling `rustc_codegen_spirv` from source {}\n", source,);
217+
// to prevent unsupported version errors when using older toolchains
218+
log::debug!("remove Cargo.lock");
219+
std::fs::remove_file(checkout.join("Cargo.lock")).context("remove Cargo.lock")?;
220220

221+
crate::user_output!("Compiling `rustc_codegen_spirv` from source {}\n", source,);
221222
let mut build_command = std::process::Command::new("cargo");
222223
build_command
223224
.current_dir(&checkout)

0 commit comments

Comments
 (0)