diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-23 23:45:31 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-23 23:48:19 -0400 |
| commit | c610cde1eb460ddf80910f34e19c8a68d1bc86a9 (patch) | |
| tree | 7ddba1eab424cc3c6c26d30d4d73cbb570e7d666 /lib/std/Build/Step/Compile.zig | |
| parent | 06af9cc101d0e688f7c6a1c2cc009b917f0a7bdf (diff) | |
| download | zig-c610cde1eb460ddf80910f34e19c8a68d1bc86a9.tar.gz zig-c610cde1eb460ddf80910f34e19c8a68d1bc86a9.zip | |
test: test for issues starting codegen on many targets
Specifically this is to make sure llvm data layout generation doesn't
regress. The no emit bin is to allow testing targets that can't
currently be linked. The commented out targets are ones that fail in
the linker anyway when no emit bin is passed.
Diffstat (limited to 'lib/std/Build/Step/Compile.zig')
| -rw-r--r-- | lib/std/Build/Step/Compile.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 7ff82e4b7b..6dd0bd2d11 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -1997,7 +1997,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { try zig_args.append(resolved_args_file); } - const output_bin_path = step.evalZigProcess(zig_args.items, prog_node) catch |err| switch (err) { + const maybe_output_bin_path = step.evalZigProcess(zig_args.items, prog_node) catch |err| switch (err) { error.NeedCompileErrorCheck => { assert(self.expect_errors.len != 0); try checkCompileErrors(self); @@ -2005,10 +2005,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { }, else => |e| return e, }; - const output_dir = fs.path.dirname(output_bin_path).?; // Update generated files - { + if (maybe_output_bin_path) |output_bin_path| { + const output_dir = fs.path.dirname(output_bin_path).?; + self.output_dirname_source.path = output_dir; self.output_path_source.path = b.pathJoin( |
