authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-08 14:34:17-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:14-07:00
log974a6fe757fd53873e7dace177ad3ae3c425b504
treefb0e778471e324e3d88c4a8a05a164cf92168bd4
parent8d4067e7a37c13c0761b2685f46375b32f01037a

std.Build.RunStep: support -fqemu solving bad dynamic linker


1 files changed, 3 insertions(+), 1 deletions(-)

lib/std/Build/RunStep.zig+3-1
...@@ -555,7 +555,9 @@ fn runCommand(...@@ -555,7 +555,9 @@ fn runCommand(
555 try Step.handleVerbose(step.owner, self.cwd, argv);555 try Step.handleVerbose(step.owner, self.cwd, argv);
556556
557 const result = spawnChildAndCollect(self, argv, has_side_effects) catch |err| term: {557 const result = spawnChildAndCollect(self, argv, has_side_effects) catch |err| term: {
558 if (err == error.InvalidExe) interpret: {558 // InvalidExe: cpu arch mismatch
559 // FileNotFound: can happen with a wrong dynamic linker path
560 if (err == error.InvalidExe or err == error.FileNotFound) interpret: {
559 // TODO: learn the target from the binary directly rather than from561 // TODO: learn the target from the binary directly rather than from
560 // relying on it being a CompileStep. This will make this logic562 // relying on it being a CompileStep. This will make this logic
561 // work even for the edge case that the binary was produced by a563 // work even for the edge case that the binary was produced by a