authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-23 12:13:16-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:36-07:00
log8b4e55372a51bd2d6869cd3cc1e90939de3b568f
tree33b8ab1bfb6bd0bc32886bd8cd2a8fc27cc1e66e
parent2edeeb5a6476cc996367e547eb2c86e878784bf1

fix incr-check tests


2 files changed, 10 insertions(+), 4 deletions(-)

test/tests.zig+1-1
...@@ -2970,7 +2970,7 @@ pub fn addIncrementalTests(b: *std.Build, test_step: *Step, test_filters: []cons...@@ -2970,7 +2970,7 @@ pub fn addIncrementalTests(b: *std.Build, test_step: *Step, test_filters: []cons
2970 run.addFileArg(b.path("test/incremental/").path(b, entry.path));2970 run.addFileArg(b.path("test/incremental/").path(b, entry.path));
29712971
2972 run.addArg("--zig-lib-dir");2972 run.addArg("--zig-lib-dir");
2973 run.addFileArg(.zig_lib);2973 run.addDirectoryArg(.zig_lib);
29742974
2975 run.addArgs(&.{ "--target", target_str });2975 run.addArgs(&.{ "--target", target_str });
29762976
tools/incr-check.zig+9-3
...@@ -360,7 +360,10 @@ const Eval = struct {...@@ -360,7 +360,10 @@ const Eval = struct {
360360
361 const bin_name = try std.zig.EmitArtifact.bin.cacheName(arena, .{361 const bin_name = try std.zig.EmitArtifact.bin.cacheName(arena, .{
362 .root_name = "root", // corresponds to the module name "root"362 .root_name = "root", // corresponds to the module name "root"
363 .target = &eval.target,363 .cpu_arch = eval.target.cpu.arch,
364 .os_tag = eval.target.os.tag,
365 .ofmt = eval.target.ofmt,
366 .abi = eval.target.abi,
364 .output_mode = .Exe,367 .output_mode = .Exe,
365 });368 });
366 const bin_path = try Dir.path.join(arena, &.{ result_dir, bin_name });369 const bin_path = try Dir.path.join(arena, &.{ result_dir, bin_name });
...@@ -487,9 +490,12 @@ const Eval = struct {...@@ -487,9 +490,12 @@ const Eval = struct {
487 var argv_buf: [2][]const u8 = undefined;490 var argv_buf: [2][]const u8 = undefined;
488 const argv: []const []const u8, const is_foreign: bool = sw: switch (std.zig.system.getExternalExecutor(491 const argv: []const []const u8, const is_foreign: bool = sw: switch (std.zig.system.getExternalExecutor(
489 io,492 io,
490 &eval.host,
491 &eval.target,493 &eval.target,
492 .{ .link_libc = eval.backend == .cbe },494 .{
495 .link_libc = eval.backend == .cbe,
496 .host_cpu_arch = eval.host.cpu.arch,
497 .host_os_tag = eval.host.os.tag,
498 },
493 )) {499 )) {
494 .bad_dl, .bad_os_or_cpu => {500 .bad_dl, .bad_os_or_cpu => {
495 // This binary cannot be executed on this host.501 // This binary cannot be executed on this host.