diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2021-11-10 10:47:00 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2021-11-10 10:47:00 -0800 |
| commit | 7dc38369c00380f8ec23f8b3bf4cfc0ea5c94bcf (patch) | |
| tree | bea076b77cb31298faa9e37fe5c339acd14a53c9 /compiler/rustc_codegen_llvm | |
| parent | 9a442353f37a9959c2149927382bb8261d980e76 (diff) | |
| download | rust-7dc38369c00380f8ec23f8b3bf4cfc0ea5c94bcf.tar.gz rust-7dc38369c00380f8ec23f8b3bf4cfc0ea5c94bcf.zip | |
Disable `.debug_aranges` for all wasm targets
This follows from discussion on https://bugs.llvm.org/show_bug.cgi?id=52442 where it looks like this section doesn't make sense for wasm targets.
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 35a3d21036a..3393c9baa28 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -75,14 +75,8 @@ unsafe fn configure_llvm(sess: &Session) { if sess.print_llvm_passes() { add("-debug-pass=Structure", false); } - if !sess.opts.debugging_opts.no_generate_arange_section - // FIXME: An LLVM bug [1] means that if this option is enabled for - // wasm64 then LLVM will crash when generating debuginfo. Assuming - // that this gets fixed in LLVM 14 this condition here is a - // workaround to work with versions of LLVM 13 and prior. - // - // [1]: https://bugs.llvm.org/show_bug.cgi?id=52376 - && (sess.target.arch != "wasm64" || llvm_util::get_version() >= (14, 0, 0)) + if sess.target.generate_arange_section + && !sess.opts.debugging_opts.no_generate_arange_section { add("-generate-arange-section", false); } |
