Pass wasm exception model to TargetOptions
This is no longer implied by -wasm-enable-eh.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user