aboutsummaryrefslogtreecommitdiff
path: root/src/Package
diff options
context:
space:
mode:
Diffstat (limited to 'src/Package')
-rw-r--r--src/Package/Module.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Package/Module.zig b/src/Package/Module.zig
index 781a8e50c2..bfcef038ed 100644
--- a/src/Package/Module.zig
+++ b/src/Package/Module.zig
@@ -27,7 +27,7 @@ red_zone: bool,
sanitize_c: bool,
sanitize_thread: bool,
fuzz: bool,
-unwind_tables: bool,
+unwind_tables: std.builtin.UnwindTables,
cc_argv: []const []const u8,
/// (SPIR-V) whether to generate a structured control flow graph or not
structured_cfg: bool,
@@ -91,7 +91,7 @@ pub const CreateOptions = struct {
/// other number means stack protection with that buffer size.
stack_protector: ?u32 = null,
red_zone: ?bool = null,
- unwind_tables: ?bool = null,
+ unwind_tables: ?std.builtin.UnwindTables = null,
sanitize_c: ?bool = null,
sanitize_thread: ?bool = null,
fuzz: ?bool = null,
@@ -112,7 +112,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
if (options.inherited.sanitize_thread == true) assert(options.global.any_sanitize_thread);
if (options.inherited.fuzz == true) assert(options.global.any_fuzz);
if (options.inherited.single_threaded == false) assert(options.global.any_non_single_threaded);
- if (options.inherited.unwind_tables == true) assert(options.global.any_unwind_tables);
+ if (options.inherited.unwind_tables) |uwt| if (uwt != .none) assert(options.global.any_unwind_tables != .none);
if (options.inherited.error_tracing == true) assert(options.global.any_error_tracing);
const resolved_target = options.inherited.resolved_target orelse options.parent.?.resolved_target;
@@ -382,6 +382,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
.zig_backend = zig_backend,
.output_mode = options.global.output_mode,
.link_mode = options.global.link_mode,
+ .unwind_tables = options.global.any_unwind_tables,
.is_test = options.global.is_test,
.single_threaded = single_threaded,
.link_libc = options.global.link_libc,