mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
build: avoid repeating objects when linking a static library
Don't pass the object files from a static library to the linker invocation. The lib.a file already contains them. Avoids "duplicate symbol" errors (and useless work by the linker)
This commit is contained in:
parent
8142bc20ea
commit
cea8645423
@ -2192,7 +2192,8 @@ const TransitiveDeps = struct {
|
||||
if ((try td.seen_steps.fetchPut(&inner_other.step, {})) != null)
|
||||
continue;
|
||||
|
||||
if (!dyn)
|
||||
const included_in_lib = (other.kind == .lib and inner_other.kind == .obj);
|
||||
if (!dyn and !included_in_lib)
|
||||
try td.link_objects.append(other_link_object);
|
||||
|
||||
try addInner(td, inner_other, dyn or inner_other.isDynamicLibrary());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user