Skip to content

Commit fa43259

Browse files
committed
Invert -Z generate-arange-section.
Because it uses `parse_bool` and defaults to true, it is actually impossible to set it to false. Inverting its sense to `-Z no-generate-arange-section` makes it usable.
1 parent f19ab9a commit fa43259

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: src/librustc_codegen_llvm/llvm_util.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ unsafe fn configure_llvm(sess: &Session) {
8080
if sess.print_llvm_passes() {
8181
add("-debug-pass=Structure", false);
8282
}
83-
84-
if sess.opts.debugging_opts.generate_arange_section {
83+
if !sess.opts.debugging_opts.no_generate_arange_section {
8584
add("-generate-arange-section", false);
8685
}
8786
if get_major_version() >= 8 {

Diff for: src/librustc_session/options.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
815815
"for every macro invocation, print its name and arguments"),
816816
debug_macros: bool = (false, parse_bool, [TRACKED],
817817
"emit line numbers debug info inside macros"),
818-
generate_arange_section: bool = (true, parse_bool, [TRACKED],
819-
"generate DWARF address ranges for faster lookups"),
818+
no_generate_arange_section: bool = (false, parse_bool, [TRACKED],
819+
"don't generate DWARF address ranges that give faster lookups"),
820820
keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED],
821821
"don't clear the hygiene data after analysis"),
822822
keep_ast: bool = (false, parse_bool, [UNTRACKED],

0 commit comments

Comments
 (0)