| author | |
| committer | |
| log | 945111ae92c28f8ad642a64af4dc83acd3bef4a5 |
| tree | 931a19b81cbf097a2bd049eafb3ac0b5252ef7b3 |
| parent | 7b8cc599d997759201a945d05b91c24f5cfe29d7 |
2 files changed, 24 insertions(+), 0 deletions(-)
lib/std/build.zig+9| ... | ... | @@ -1623,6 +1623,7 @@ pub const LibExeObjStep = struct { |
| 1623 | 1623 | /// Overrides the default stack size |
| 1624 | 1624 | stack_size: ?u64 = null, |
| 1625 | 1625 | |
| 1626 | use_unwind_tables: ?bool = null, | |
| 1626 | 1627 | want_lto: ?bool = null, |
| 1627 | 1628 | use_stage1: ?bool = null, |
| 1628 | 1629 | use_llvm: ?bool = null, |
| ... | ... | @@ -2505,6 +2506,14 @@ pub const LibExeObjStep = struct { |
| 2505 | 2506 | } |
| 2506 | 2507 | } |
| 2507 | 2508 | |
| 2509 | if (self.use_unwind_tables) |use_unwind_tables| { | |
| 2510 | if (use_unwind_tables) { | |
| 2511 | try zig_args.append("-funwind-tables"); | |
| 2512 | } else { | |
| 2513 | try zig_args.append("-fno-unwind-tables"); | |
| 2514 | } | |
| 2515 | } | |
| 2516 | ||
| 2508 | 2517 | if (self.ofmt) |ofmt| { |
| 2509 | 2518 | try zig_args.append(try std.fmt.allocPrint(builder.allocator, "-ofmt={s}", .{@tagName(ofmt)})); |
| 2510 | 2519 | } |
test/tests.zig+15| ... | ... | @@ -108,6 +108,14 @@ const test_targets = blk: { |
| 108 | 108 | }, |
| 109 | 109 | .backend = .stage2_x86_64, |
| 110 | 110 | }, |
| 111 | .{ | |
| 112 | .target = .{ | |
| 113 | .cpu_arch = .x86_64, | |
| 114 | .os_tag = .windows, | |
| 115 | .abi = .gnu, | |
| 116 | }, | |
| 117 | .backend = .stage2_x86_64, | |
| 118 | }, | |
| 111 | 119 | |
| 112 | 120 | .{ |
| 113 | 121 | .target = .{ |
| ... | ... | @@ -693,6 +701,13 @@ pub fn addPkgTests( |
| 693 | 701 | else => { |
| 694 | 702 | these_tests.use_stage1 = false; |
| 695 | 703 | these_tests.use_llvm = false; |
| 704 | ||
| 705 | if (test_target.target.getOsTag() == .windows) { | |
| 706 | // TODO: We set these to no so that we don't fallback to LLD for incremental linking context. This is because | |
| 707 | // our own COFF linker doesn't yet support these options. | |
| 708 | these_tests.emit_implib = .no_emit; | |
| 709 | these_tests.use_unwind_tables = false; | |
| 710 | } | |
| 696 | 711 | }, |
| 697 | 712 | }; |
| 698 | 713 |