diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-01 15:44:44 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-02-02 20:43:01 -0700 |
| commit | 105db13536b4dc2affe130cb8d2eee6c97c89bcd (patch) | |
| tree | 07d5a285d7ff1ea5262118e94ea61a018f1d775a /lib/std/Build/Step/WriteFile.zig | |
| parent | bd1d2b0ae25ead6cd27c0bfeb65490ee92f06bad (diff) | |
| download | zig-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 'lib/std/Build/Step/WriteFile.zig')
| -rw-r--r-- | lib/std/Build/Step/WriteFile.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Build/Step/WriteFile.zig b/lib/std/Build/Step/WriteFile.zig index 7fcf06249f..aab40a8a5e 100644 --- a/lib/std/Build/Step/WriteFile.zig +++ b/lib/std/Build/Step/WriteFile.zig @@ -190,7 +190,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { // If, for example, a hard-coded path was used as the location to put WriteFile // files, then two WriteFiles executing in parallel might clobber each other. - var man = b.cache.obtain(); + var man = b.graph.cache.obtain(); defer man.deinit(); // Random bytes to make WriteFile unique. Refresh this with |
