authorgravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2024-06-08 21:22:38+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-06-08 12:22:38-07:00
log6327a3994af8667d8553910d0175603c165d494d
tree7802abc2876061b8ccbb83551fa2a7a44df3c50b
parent84d15808731978637a1093a96c385a92949dff0d
signaturebadge-check Signed by PGP key B5690EEEBB952194

std.Build: remove deprecated b.host in favor of b.graph.host (#20237)


2 files changed, 6 insertions(+), 6 deletions(-)

lib/std/Build.zig+2-2
...@@ -886,7 +886,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {...@@ -886,7 +886,7 @@ pub fn addTest(b: *Build, options: TestOptions) *Step.Compile {
886 .kind = .@"test",886 .kind = .@"test",
887 .root_module = .{887 .root_module = .{
888 .root_source_file = options.root_source_file,888 .root_source_file = options.root_source_file,
889 .target = options.target orelse b.host,889 .target = options.target orelse b.graph.host,
890 .optimize = options.optimize,890 .optimize = options.optimize,
891 .link_libc = options.link_libc,891 .link_libc = options.link_libc,
892 .single_threaded = options.single_threaded,892 .single_threaded = options.single_threaded,
...@@ -1711,7 +1711,7 @@ pub fn fmt(b: *Build, comptime format: []const u8, args: anytype) []u8 {...@@ -1711,7 +1711,7 @@ pub fn fmt(b: *Build, comptime format: []const u8, args: anytype) []u8 {
17111711
1712pub fn findProgram(b: *Build, names: []const []const u8, paths: []const []const u8) ![]const u8 {1712pub fn findProgram(b: *Build, names: []const []const u8, paths: []const []const u8) ![]const u8 {
1713 // TODO report error for ambiguous situations1713 // TODO report error for ambiguous situations
1714 const exe_extension = b.host.result.exeFileExt();1714 const exe_extension = b.graph.host.result.exeFileExt();
1715 for (b.search_prefixes.items) |search_prefix| {1715 for (b.search_prefixes.items) |search_prefix| {
1716 for (names) |name| {1716 for (names) |name| {
1717 if (fs.path.isAbsolute(name)) {1717 if (fs.path.isAbsolute(name)) {
lib/std/Build/Step/Run.zig+4-4
...@@ -923,7 +923,7 @@ fn runCommand(...@@ -923,7 +923,7 @@ fn runCommand(
923 const need_cross_glibc = exe.rootModuleTarget().isGnuLibC() and923 const need_cross_glibc = exe.rootModuleTarget().isGnuLibC() and
924 exe.is_linking_libc;924 exe.is_linking_libc;
925 const other_target = exe.root_module.resolved_target.?.result;925 const other_target = exe.root_module.resolved_target.?.result;
926 switch (std.zig.system.getExternalExecutor(b.host.result, &other_target, .{926 switch (std.zig.system.getExternalExecutor(b.graph.host.result, &other_target, .{
927 .qemu_fixes_dl = need_cross_glibc and b.glibc_runtimes_dir != null,927 .qemu_fixes_dl = need_cross_glibc and b.glibc_runtimes_dir != null,
928 .link_libc = exe.is_linking_libc,928 .link_libc = exe.is_linking_libc,
929 })) {929 })) {
...@@ -996,7 +996,7 @@ fn runCommand(...@@ -996,7 +996,7 @@ fn runCommand(
996 .bad_dl => |foreign_dl| {996 .bad_dl => |foreign_dl| {
997 if (allow_skip) return error.MakeSkipped;997 if (allow_skip) return error.MakeSkipped;
998998
999 const host_dl = b.host.result.dynamic_linker.get() orelse "(none)";999 const host_dl = b.graph.host.result.dynamic_linker.get() orelse "(none)";
10001000
1001 return step.fail(1001 return step.fail(
1002 \\the host system is unable to execute binaries from the target1002 \\the host system is unable to execute binaries from the target
...@@ -1008,7 +1008,7 @@ fn runCommand(...@@ -1008,7 +1008,7 @@ fn runCommand(
1008 .bad_os_or_cpu => {1008 .bad_os_or_cpu => {
1009 if (allow_skip) return error.MakeSkipped;1009 if (allow_skip) return error.MakeSkipped;
10101010
1011 const host_name = try b.host.result.zigTriple(b.allocator);1011 const host_name = try b.graph.host.result.zigTriple(b.allocator);
1012 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);1012 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);
10131013
1014 return step.fail("the host system ({s}) is unable to execute binaries from the target ({s})", .{1014 return step.fail("the host system ({s}) is unable to execute binaries from the target ({s})", .{
...@@ -1564,7 +1564,7 @@ fn failForeign(...@@ -1564,7 +1564,7 @@ fn failForeign(
1564 return error.MakeSkipped;1564 return error.MakeSkipped;
15651565
1566 const b = run.step.owner;1566 const b = run.step.owner;
1567 const host_name = try b.host.result.zigTriple(b.allocator);1567 const host_name = try b.graph.host.result.zigTriple(b.allocator);
1568 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);1568 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);
15691569
1570 return run.step.fail(1570 return run.step.fail(