mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
enable testing of x86_64-windows-gnu using self-hosted backend and linker
This commit is contained in:
parent
7b8cc599d9
commit
945111ae92
@ -1623,6 +1623,7 @@ pub const LibExeObjStep = struct {
|
||||
/// Overrides the default stack size
|
||||
stack_size: ?u64 = null,
|
||||
|
||||
use_unwind_tables: ?bool = null,
|
||||
want_lto: ?bool = null,
|
||||
use_stage1: ?bool = null,
|
||||
use_llvm: ?bool = null,
|
||||
@ -2505,6 +2506,14 @@ pub const LibExeObjStep = struct {
|
||||
}
|
||||
}
|
||||
|
||||
if (self.use_unwind_tables) |use_unwind_tables| {
|
||||
if (use_unwind_tables) {
|
||||
try zig_args.append("-funwind-tables");
|
||||
} else {
|
||||
try zig_args.append("-fno-unwind-tables");
|
||||
}
|
||||
}
|
||||
|
||||
if (self.ofmt) |ofmt| {
|
||||
try zig_args.append(try std.fmt.allocPrint(builder.allocator, "-ofmt={s}", .{@tagName(ofmt)}));
|
||||
}
|
||||
|
||||
@ -108,6 +108,14 @@ const test_targets = blk: {
|
||||
},
|
||||
.backend = .stage2_x86_64,
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .x86_64,
|
||||
.os_tag = .windows,
|
||||
.abi = .gnu,
|
||||
},
|
||||
.backend = .stage2_x86_64,
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
@ -693,6 +701,13 @@ pub fn addPkgTests(
|
||||
else => {
|
||||
these_tests.use_stage1 = false;
|
||||
these_tests.use_llvm = false;
|
||||
|
||||
if (test_target.target.getOsTag() == .windows) {
|
||||
// TODO: We set these to no so that we don't fallback to LLD for incremental linking context. This is because
|
||||
// our own COFF linker doesn't yet support these options.
|
||||
these_tests.emit_implib = .no_emit;
|
||||
these_tests.use_unwind_tables = false;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user