diff --git a/compiler/noirc_driver/src/lib.rs b/compiler/noirc_driver/src/lib.rs index 1e917452215..6716d247ea6 100644 --- a/compiler/noirc_driver/src/lib.rs +++ b/compiler/noirc_driver/src/lib.rs @@ -79,6 +79,11 @@ pub struct CompileOptions { #[arg(long, hide = true)] pub show_ssa_pass: Vec, + /// Do not emit source file locations when emitting debug information for the SSA IR to stdout. + /// By default, source file locations will be shown. + #[arg(long, hide = true)] + pub no_ssa_locations: bool, + /// Only show the SSA and ACIR for the contract function with a given name. #[arg(long, hide = true)] pub show_contract_fn: Option, @@ -796,7 +801,11 @@ pub fn compile_no_check( &context.file_manager, )? } else { - create_program(program, &ssa_evaluator_options, Some(&context.file_manager))? + create_program( + program, + &ssa_evaluator_options, + if options.no_ssa_locations { None } else { Some(&context.file_manager) }, + )? }; let abi = gen_abi(context, &main_function, return_visibility, error_types);