| ... | @@ -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); |
| 556 | | 556 | |
| 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 from | 561 | // TODO: learn the target from the binary directly rather than from |
| 560 | // relying on it being a CompileStep. This will make this logic | 562 | // relying on it being a CompileStep. This will make this logic |
| 561 | // work even for the edge case that the binary was produced by a | 563 | // work even for the edge case that the binary was produced by a |