mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
zig build: fix system libraries not respected for C artifacts
closes #550
This commit is contained in:
parent
3c3af4b332
commit
b3d12d2c9e
@ -1400,6 +1400,13 @@ pub const LibExeObjStep = struct {
|
||||
%%cc_args.append(builder.pathFromRoot(full_path_lib));
|
||||
}
|
||||
|
||||
{
|
||||
var it = self.link_libs.iterator();
|
||||
while (it.next()) |entry| {
|
||||
%%cc_args.append(builder.fmt("-l{}", entry.key));
|
||||
}
|
||||
}
|
||||
|
||||
if (is_darwin and !self.static) {
|
||||
var it = self.frameworks.iterator();
|
||||
while (it.next()) |entry| {
|
||||
@ -1464,6 +1471,13 @@ pub const LibExeObjStep = struct {
|
||||
|
||||
%%cc_args.append("-rdynamic");
|
||||
|
||||
{
|
||||
var it = self.link_libs.iterator();
|
||||
while (it.next()) |entry| {
|
||||
%%cc_args.append(builder.fmt("-l{}", entry.key));
|
||||
}
|
||||
}
|
||||
|
||||
if (is_darwin) {
|
||||
if (self.need_flat_namespace_hack) {
|
||||
%%cc_args.append("-Wl,-flat_namespace");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user