better awareness of unwind tables
* stage1 backend allows configuring the uwtables function attr via a flag rather than its own logic. * stage2 defaults to enabling uwtable attr when linking libunwind, or always on windows * stage2 makes link_eh_frame_hdr true automatically if uwtable attr is set to be on for zig functions * CLI: add -funwind-tables and -fno-unwind-tables to allow the user to override the defaults. * hook it up to `zig cc` closes #9046
This commit is contained in:
@@ -211,7 +211,7 @@ static ZigLLVM_CallingConv get_llvm_cc(CodeGen *g, CallingConvention cc) {
|
||||
}
|
||||
|
||||
static void add_uwtable_attr(CodeGen *g, LLVMValueRef fn_val) {
|
||||
if (g->zig_target->os == OsWindows) {
|
||||
if (g->unwind_tables) {
|
||||
addLLVMFnAttr(fn_val, "uwtable");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user