Skip to content

Commit 63a2322

Browse files
authored
Add missing check of cfg!(debug_assertions) (#1382)
1 parent a3fd92b commit 63a2322

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

prusti-contracts-build/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ fn main() {
6161
/// reexport specs if any of the `cargo-prusti`/`prusti-{rustc,driver}` changed, and so
6262
/// we manually force that here by deleting the `PRUSTI_LIBS` files.
6363
fn force_reexport_specs(target: &std::path::Path) {
64-
if let Ok(files) = std::fs::read_dir(target.join("release").join("deps")) {
64+
let deps_dir = if cfg!(debug_assertions) {
65+
target.join("debug").join("deps")
66+
} else {
67+
target.join("release").join("deps")
68+
};
69+
if let Ok(files) = std::fs::read_dir(deps_dir) {
6570
let libs =
6671
prusti_utils::launch::PRUSTI_LIBS.map(|lib| format!("lib{}-", lib.replace('-', "_")));
6772
for file in files {

0 commit comments

Comments
 (0)