zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a8b9f0cf2268e0be9551a7d14f76e5e4f1b79527 (tree)
parent d7c2324cdbcb32e285e03aa7938529b9412c72e6
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Sun, 14 Jan 2024 23:07:21 +0100

std/Build/Step/Compile: do not propagate deps of complex addObject step

Diffstat:
Mlib/std/Build/Step/Compile.zig | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig @@ -1077,9 +1077,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { .exe => return step.fail("cannot link with an executable build artifact", .{}), .@"test" => return step.fail("cannot link with a test", .{}), .obj => { - const included_in_lib = !my_responsibility and - compile.kind == .lib and other.kind == .obj; - if (!already_linked and !included_in_lib) { + const included_in_lib_or_obj = !my_responsibility and (compile.kind == .lib or compile.kind == .obj); + if (!already_linked and !included_in_lib_or_obj) { try zig_args.append(other.getEmittedBin().getPath(b)); total_linker_objects += 1; }