Skip to content

Commit

Permalink
Invert -Z generate-arange-section.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nnethercote committed Mar 24, 2020
1 parent f19ab9a commit fa43259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/librustc_codegen_llvm/llvm_util.rs
Expand Up @@ -80,8 +80,7 @@ unsafe fn configure_llvm(sess: &Session) {
if sess.print_llvm_passes() {
add("-debug-pass=Structure", false);
}

if sess.opts.debugging_opts.generate_arange_section {
if !sess.opts.debugging_opts.no_generate_arange_section {
add("-generate-arange-section", false);
}
if get_major_version() >= 8 {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_session/options.rs
Expand Up @@ -815,8 +815,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"for every macro invocation, print its name and arguments"),
debug_macros: bool = (false, parse_bool, [TRACKED],
"emit line numbers debug info inside macros"),
generate_arange_section: bool = (true, parse_bool, [TRACKED],
"generate DWARF address ranges for faster lookups"),
no_generate_arange_section: bool = (false, parse_bool, [TRACKED],
"don't generate DWARF address ranges that give faster lookups"),
keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED],
"don't clear the hygiene data after analysis"),
keep_ast: bool = (false, parse_bool, [UNTRACKED],
Expand Down

0 comments on commit fa43259

Please sign in to comment.