Skip to content

Commit

Permalink
Add missing check of cfg!(debug_assertions) (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli authored Mar 31, 2023
1 parent a3fd92b commit 63a2322
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion prusti-contracts-build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ fn main() {
/// reexport specs if any of the `cargo-prusti`/`prusti-{rustc,driver}` changed, and so
/// we manually force that here by deleting the `PRUSTI_LIBS` files.
fn force_reexport_specs(target: &std::path::Path) {
if let Ok(files) = std::fs::read_dir(target.join("release").join("deps")) {
let deps_dir = if cfg!(debug_assertions) {
target.join("debug").join("deps")
} else {
target.join("release").join("deps")
};
if let Ok(files) = std::fs::read_dir(deps_dir) {
let libs =
prusti_utils::launch::PRUSTI_LIBS.map(|lib| format!("lib{}-", lib.replace('-', "_")));
for file in files {
Expand Down

0 comments on commit 63a2322

Please sign in to comment.