diff options
| author | Nikita Popov <npopov@redhat.com> | 2025-07-11 10:11:03 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2025-07-18 09:35:50 +0200 |
| commit | 12b19be741ea07934d7478bd8e450dca8f85afe5 (patch) | |
| tree | 87e349109f0e8892a8cbb043b53a39b11032ddb7 /compiler/rustc_llvm/llvm-wrapper | |
| parent | 63e1074c97b60d248f86321f021871f93ba10c31 (diff) | |
| download | rust-12b19be741ea07934d7478bd8e450dca8f85afe5.tar.gz rust-12b19be741ea07934d7478bd8e450dca8f85afe5.zip | |
Pass wasm exception model to TargetOptions
This is no longer implied by -wasm-enable-eh.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index cc33764e485..e649978780e 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -396,7 +396,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine( bool EmitStackSizeSection, bool RelaxELFRelocations, bool UseInitArray, const char *SplitDwarfFile, const char *OutputObjFile, const char *DebugInfoCompression, bool UseEmulatedTls, - const char *ArgsCstrBuff, size_t ArgsCstrBuffLen) { + const char *ArgsCstrBuff, size_t ArgsCstrBuffLen, bool UseWasmEH) { auto OptLevel = fromRust(RustOptLevel); auto RM = fromRust(RustReloc); @@ -462,6 +462,9 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine( Options.ThreadModel = ThreadModel::Single; } + if (UseWasmEH) + Options.ExceptionModel = ExceptionHandling::Wasm; + Options.EmitStackSizeSection = EmitStackSizeSection; if (ArgsCstrBuff != nullptr) { |
