Skip to content

Commit 3711565

Browse files
committed
Revert "build.rs: Remove Cargo.lock"
This reverts commit 1c4a991. `cargo package` works fine without this cleanup now.
1 parent 40492ac commit 3711565

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

build.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ fn main() {
1010
.expect("Unable to parse 'llvm-sys' crate")
1111
.write_declarations(&std::path::PathBuf::from(out_dir).join("llvm_gen.rs"))
1212
.expect("Unable to write generated LLVM declarations");
13-
14-
// Workaround for `cargo package`
15-
// `cargo metadata` creates a new Cargo.lock file, which needs removing
16-
let manifest_dir = std::env::var_os("CARGO_MANIFEST_DIR").unwrap();
17-
let cargo_lock = std::path::PathBuf::from(manifest_dir).join("Cargo.lock");
18-
if let Err(err) = std::fs::remove_file(&cargo_lock) {
19-
if err.kind() != std::io::ErrorKind::NotFound {
20-
panic!("failed to delete {}: {err}", cargo_lock.display());
21-
}
22-
}
2313
}
2414

2515
mod llvm {

0 commit comments

Comments
 (0)