Skip to content

Commit

Permalink
chore: force compilation if debug flags are set (#2797)
Browse files Browse the repository at this point in the history
Co-authored-by: jfecher <jake@aztecprotocol.com>
  • Loading branch information
TomAFrench and jfecher authored Sep 22, 2023
1 parent 5747bfe commit 7b80f0e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,14 @@ pub fn compile_no_check(
let program = monomorphize(main_function, &context.def_interner);

let hash = fxhash::hash64(&program);
if let Some(cached_program) = cached_program {
if hash == cached_program.hash {
return Ok(cached_program);

// If user has specified that they want to see intermediate steps printed then we should
// force compilation even if the program hasn't changed.
if !(options.print_acir || options.show_brillig || options.show_ssa) {
if let Some(cached_program) = cached_program {
if hash == cached_program.hash {
return Ok(cached_program);
}
}
}

Expand Down

0 comments on commit 7b80f0e

Please sign in to comment.