Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace removed std.Build.host with std.Build.graph.host #429

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/1-simple-executable/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "hello",
.root_source_file = b.path("hello.zig"),
.target = b.host,
.target = b.graph.host,
});

b.installArtifact(exe);
Expand Down
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/11-zig-tool/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
const tool = b.addExecutable(.{
.name = "word_select",
.root_source_file = b.path("tools/word_select.zig"),
.target = b.host,
.target = b.graph.host,
});

const tool_step = b.addRunArtifact(tool);
Expand Down
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/12-embedfile/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void {
const tool = b.addExecutable(.{
.name = "word_select",
.root_source_file = b.path("tools/word_select.zig"),
.target = b.host,
.target = b.graph.host,
});

const tool_step = b.addRunArtifact(tool);
Expand Down
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/13-import/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const tool = b.addExecutable(.{
.name = "generate_struct",
.root_source_file = b.path("tools/generate_struct.zig"),
.target = b.host,
.target = b.graph.host,
});

const tool_step = b.addRunArtifact(tool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "app",
.root_source_file = b.path("app.zig"),
.target = b.host,
.target = b.graph.host,
});

const version = b.option([]const u8, "version", "application version string") orelse "0.0.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "hello",
.root_source_file = b.path("hello.zig"),
.target = b.host,
.target = b.graph.host,
});

b.installArtifact(exe);
Expand Down
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/system-libraries/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "zip",
.root_source_file = b.path("zip.zig"),
.target = b.host,
.target = b.graph.host,
});

exe.linkSystemLibrary("z");
Expand Down
2 changes: 1 addition & 1 deletion assets/zig-code/build-system/write-files/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "app",
.root_source_file = b.path("src/main.zig"),
.target = b.host,
.target = b.graph.host,
});

const version = b.option([]const u8, "version", "application version string") orelse "0.0.0";
Expand Down
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn runZigScripts(
paths: []const []const u8,
) void {
const doctest_dep = b.dependency("doctest", .{
.target = b.host,
.target = b.graph.host,
.optimize = .Debug,
});
const doctest_exe = doctest_dep.artifact("doctest");
Expand Down Expand Up @@ -228,7 +228,7 @@ fn runSingleZigScript(

pub fn oldBuild(b: *std.Build) void {
const doctest_dep = b.dependency("doctest", .{
.target = b.host,
.target = b.graph.host,
.optimize = .Debug,
});
const doctest_exe = doctest_dep.artifact("doctest");
Expand Down