diff options
| author | bors <bors@rust-lang.org> | 2024-03-11 16:51:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-11 16:51:54 +0000 |
| commit | 6554a5645a13e4d9331fd028960d69be91d7492d (patch) | |
| tree | 99769b8987cd4046411fa0e9e0f2a08e4fa45941 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 65cd843ae06ad00123c131a431ed5304e4cd577a (diff) | |
| parent | 7fa6fa4a1f5d48ac46e22756b27cb56f2aebf02d (diff) | |
| download | rust-6554a5645a13e4d9331fd028960d69be91d7492d.tar.gz rust-6554a5645a13e4d9331fd028960d69be91d7492d.zip | |
Auto merge of #122338 - workingjubilee:rollup-xzpt4v4, r=workingjubilee
Rollup of 15 pull requests Successful merges: - #116791 (Allow codegen backends to opt-out of parallel codegen) - #116793 (Allow targets to override default codegen backend) - #117458 (LLVM Bitcode Linker: A self contained linker for nvptx and other targets) - #119385 (Fix type resolution of associated const equality bounds (take 2)) - #121438 (std support for wasm32 panic=unwind) - #121893 (Add tests (and a bit of cleanup) for interior mut handling in promotion and const-checking) - #122080 (Clarity improvements to `DropTree`) - #122152 (Improve diagnostics for parenthesized type arguments) - #122166 (Remove the unused `field_remapping` field from `TypeLowering`) - #122249 (interpret: do not call machine read hooks during validation) - #122299 (Store backtrace for `must_produce_diag`) - #122318 (Revision-related tweaks for next-solver tests) - #122320 (Use ptradd for vtable indexing) - #122328 (unix_sigpipe: Replace `inherit` with `sig_dfl` in syntax tests) - #122330 (bootstrap readme: fix, improve, update) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 78d47f36f91..e32c38644aa 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -5,6 +5,7 @@ use crate::errors::{ }; use crate::llvm; use libc::c_int; +use rustc_codegen_ssa::base::wants_wasm_eh; use rustc_codegen_ssa::traits::PrintBackendInfo; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::small_c_str::SmallCStr; @@ -98,6 +99,10 @@ unsafe fn configure_llvm(sess: &Session) { } } + if wants_wasm_eh(sess) { + add("-wasm-enable-eh", false); + } + if sess.target.os == "emscripten" && sess.panic_strategy() == PanicStrategy::Unwind { add("-enable-emscripten-cxx-exceptions", false); } @@ -523,6 +528,10 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str .map(String::from), ); + if wants_wasm_eh(sess) && sess.panic_strategy() == PanicStrategy::Unwind { + features.push("+exception-handling".into()); + } + // -Ctarget-features let supported_features = sess.target.supported_target_features(); let mut featsmap = FxHashMap::default(); |
