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 {
886886 .kind = .@"test",
887887 .root_module = .{
888888 .root_source_file = options.root_source_file,
889 .target = options.target orelse b.host,
889 .target = options.target orelse b.graph.host,
890890 .optimize = options.optimize,
891891 .link_libc = options.link_libc,
892892 .single_threaded = options.single_threaded,
......@@ -1711,7 +1711,7 @@ pub fn fmt(b: *Build, comptime format: []const u8, args: anytype) []u8 {
17111711
17121712pub fn findProgram(b: *Build, names: []const []const u8, paths: []const []const u8) ![]const u8 {
17131713 // TODO report error for ambiguous situations
1714 const exe_extension = b.host.result.exeFileExt();
1714 const exe_extension = b.graph.host.result.exeFileExt();
17151715 for (b.search_prefixes.items) |search_prefix| {
17161716 for (names) |name| {
17171717 if (fs.path.isAbsolute(name)) {
lib/std/Build/Step/Run.zig+4-4
......@@ -923,7 +923,7 @@ fn runCommand(
923923 const need_cross_glibc = exe.rootModuleTarget().isGnuLibC() and
924924 exe.is_linking_libc;
925925 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, .{
927927 .qemu_fixes_dl = need_cross_glibc and b.glibc_runtimes_dir != null,
928928 .link_libc = exe.is_linking_libc,
929929 })) {
......@@ -996,7 +996,7 @@ fn runCommand(
996996 .bad_dl => |foreign_dl| {
997997 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
10011001 return step.fail(
10021002 \\the host system is unable to execute binaries from the target
......@@ -1008,7 +1008,7 @@ fn runCommand(
10081008 .bad_os_or_cpu => {
10091009 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);
10121012 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);
10131013
10141014 return step.fail("the host system ({s}) is unable to execute binaries from the target ({s})", .{
......@@ -1564,7 +1564,7 @@ fn failForeign(
15641564 return error.MakeSkipped;
15651565
15661566 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);
15681568 const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);
15691569
15701570 return run.step.fail(