diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-01-24 05:11:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-24 05:11:26 +0000 |
| commit | f77e1b86225cd49c2d04dfa6ca4a7ede315dc0b1 (patch) | |
| tree | c30cddc29ae1f1162f3ec38fcaf89b94ecb4e6dd /src/Package | |
| parent | d916954bee0f477bcada0693d4aa952197cf1eef (diff) | |
| parent | 180db2bf23f05a02876d4567cac3b04842c11acb (diff) | |
| download | zig-f77e1b86225cd49c2d04dfa6ca4a7ede315dc0b1.tar.gz zig-f77e1b86225cd49c2d04dfa6ca4a7ede315dc0b1.zip | |
Merge pull request #22578 from mlugg/stack-trace-tests-x86_64
tests: enable stack trace tests for x86_64-selfhosted
Diffstat (limited to 'src/Package')
| -rw-r--r-- | src/Package/Module.zig | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Package/Module.zig b/src/Package/Module.zig index 433a9b6ade..5b3a487a49 100644 --- a/src/Package/Module.zig +++ b/src/Package/Module.zig @@ -112,17 +112,14 @@ 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) |uwt| if (uwt != .none) assert(options.global.any_unwind_tables != .none); + if (options.inherited.unwind_tables) |uwt| if (uwt != .none) assert(options.global.any_unwind_tables); if (options.inherited.error_tracing == true) assert(options.global.any_error_tracing); const resolved_target = options.inherited.resolved_target orelse options.parent.?.resolved_target; const target = resolved_target.result; const optimize_mode = options.inherited.optimize_mode orelse - if (options.parent) |p| p.optimize_mode else .Debug; - - const unwind_tables = options.inherited.unwind_tables orelse - if (options.parent) |p| p.unwind_tables else options.global.any_unwind_tables; + if (options.parent) |p| p.optimize_mode else options.global.root_optimize_mode; const strip = b: { if (options.inherited.strip) |x| break :b x; @@ -220,6 +217,17 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module { break :b false; }; + const unwind_tables = b: { + if (options.inherited.unwind_tables) |x| break :b x; + if (options.parent) |p| break :b p.unwind_tables; + + break :b target_util.defaultUnwindTables( + target, + options.global.link_libunwind, + sanitize_thread or options.global.any_sanitize_thread, + ); + }; + const fuzz = b: { if (options.inherited.fuzz) |x| break :b x; if (options.parent) |p| break :b p.fuzz; |
