diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-23 01:38:20 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-01-23 23:22:38 +0000 |
| commit | ef4d7f01a5c26d8ed6fa8236d1b64e4091a51be3 (patch) | |
| tree | 80da7b2ae3a66a5e394d31ccd62421529a14929b /src/main.zig | |
| parent | b46a40ff1db6c4d467925a9a0d72436cdb3a6a74 (diff) | |
| download | zig-ef4d7f01a5c26d8ed6fa8236d1b64e4091a51be3.tar.gz zig-ef4d7f01a5c26d8ed6fa8236d1b64e4091a51be3.zip | |
compiler: Fix computation of Compilation.Config.any_unwind_tables.
This moves the default value logic to Package.Module.create() instead and makes
it so that Compilation.Config.any_unwind_tables is computed similarly to
any_sanitize_thread, any_fuzz, etc. It turns out that for any_unwind_tables, we
only actually care if unwind tables are enabled at all, not at what level.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main.zig b/src/main.zig index cbc1c33319..ae7c2229aa 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2849,12 +2849,7 @@ fn buildOutputType( create_module.opts.any_fuzz = true; if (mod_opts.unwind_tables) |uwt| switch (uwt) { .none => {}, - .sync => if (create_module.opts.any_unwind_tables == .none) { - create_module.opts.any_unwind_tables = .sync; - }, - .@"async" => { - create_module.opts.any_unwind_tables = .@"async"; - }, + .sync, .@"async" => create_module.opts.any_unwind_tables = true, }; if (mod_opts.strip == false) create_module.opts.any_non_stripped = true; @@ -7566,12 +7561,7 @@ fn handleModArg( create_module.opts.any_fuzz = true; if (mod_opts.unwind_tables) |uwt| switch (uwt) { .none => {}, - .sync => if (create_module.opts.any_unwind_tables == .none) { - create_module.opts.any_unwind_tables = .sync; - }, - .@"async" => { - create_module.opts.any_unwind_tables = .@"async"; - }, + .sync, .@"async" => create_module.opts.any_unwind_tables = true, }; if (mod_opts.strip == false) create_module.opts.any_non_stripped = true; |
