aboutsummaryrefslogtreecommitdiff
path: root/test/src/Cases.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-01 15:44:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-02 20:43:01 -0700
commit105db13536b4dc2affe130cb8d2eee6c97c89bcd (patch)
tree07d5a285d7ff1ea5262118e94ea61a018f1d775a /test/src/Cases.zig
parentbd1d2b0ae25ead6cd27c0bfeb65490ee92f06bad (diff)
downloadzig-105db13536b4dc2affe130cb8d2eee6c97c89bcd.tar.gz
zig-105db13536b4dc2affe130cb8d2eee6c97c89bcd.zip
std.Build: implement --host-target, --host-cpu, --host-dynamic-linker
This also makes a long-overdue change of extracting common state from Build into a shared Graph object. Getting the semantics right for these flags turned out to be quite tricky. In the end it works like this: * The override only happens when the target is fully native, with no additional query parameters, such as versions or CPU features added. * The override affects the resolved Target but leaves the original Query unmodified. * The "is native?" detection logic operates on the original, unmodified query. This makes it possible to provide invalid host target information, causing confusing errors to occur. Don't do that. There are some minor breaking changes to std.Build API such as the fact that `b.zig_exe` is now moved to `b.graph.zig_exe`, as well as a handful of other similar flags.
Diffstat (limited to 'test/src/Cases.zig')
-rw-r--r--test/src/Cases.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/src/Cases.zig b/test/src/Cases.zig
index 041d537625..614cf690a9 100644
--- a/test/src/Cases.zig
+++ b/test/src/Cases.zig
@@ -562,7 +562,7 @@ pub fn lowerToBuildSteps(
run.setName(incr_case.base_path);
run.addArgs(&.{
case_base_path_with_dir,
- b.zig_exe,
+ b.graph.zig_exe,
});
run.expectStdOutEqual("");
parent_step.dependOn(&run.step);
@@ -653,7 +653,7 @@ pub fn lowerToBuildSteps(
break :no_exec;
}
const run_c = b.addSystemCommand(&.{
- b.zig_exe,
+ b.graph.zig_exe,
"run",
"-cflags",
"-Ilib",