authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-09-06 17:53:21+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-09-07 22:42:58+02:00
log945111ae92c28f8ad642a64af4dc83acd3bef4a5
tree931a19b81cbf097a2bd049eafb3ac0b5252ef7b3
parent7b8cc599d997759201a945d05b91c24f5cfe29d7

enable testing of x86_64-windows-gnu using self-hosted backend and linker


2 files changed, 24 insertions(+), 0 deletions(-)

lib/std/build.zig+9
......@@ -1623,6 +1623,7 @@ pub const LibExeObjStep = struct {
16231623 /// Overrides the default stack size
16241624 stack_size: ?u64 = null,
16251625
1626 use_unwind_tables: ?bool = null,
16261627 want_lto: ?bool = null,
16271628 use_stage1: ?bool = null,
16281629 use_llvm: ?bool = null,
......@@ -2505,6 +2506,14 @@ pub const LibExeObjStep = struct {
25052506 }
25062507 }
25072508
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
25082517 if (self.ofmt) |ofmt| {
25092518 try zig_args.append(try std.fmt.allocPrint(builder.allocator, "-ofmt={s}", .{@tagName(ofmt)}));
25102519 }
test/tests.zig+15
......@@ -108,6 +108,14 @@ const test_targets = blk: {
108108 },
109109 .backend = .stage2_x86_64,
110110 },
111 .{
112 .target = .{
113 .cpu_arch = .x86_64,
114 .os_tag = .windows,
115 .abi = .gnu,
116 },
117 .backend = .stage2_x86_64,
118 },
111119
112120 .{
113121 .target = .{
......@@ -693,6 +701,13 @@ pub fn addPkgTests(
693701 else => {
694702 these_tests.use_stage1 = false;
695703 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 }
696711 },
697712 };
698713