mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
std.zig.system.NativePaths: ignore linkage directives in NIX_LDFLAGS
`NIX_LDFLAGS` typically contains just `-rpath` and `-L`, which we already
handle. However, at least one setup hook in Nixpkgs [0] adds a linkage
directive to it. To prevent library paths from being missed (as I've
observed myself with `NIX_LDFLAGS` being `-liconv ...`, making it so that
*all* paths are missed), let's just skip over them.
[0]: 08f615eb1b/pkgs/development/libraries/libiconv/setup-hook.sh
This commit is contained in:
parent
993a83081a
commit
6f3ee587ba
@ -60,6 +60,8 @@ pub fn detect(arena: Allocator, native_target: std.Target) !NativePaths {
|
||||
const lib_path = word[2..];
|
||||
try self.addLibDir(lib_path);
|
||||
try self.addRPath(lib_path);
|
||||
} else if (word.len > 2 and word[0] == '-' and word[1] == 'l') {
|
||||
// There could still be paths after this.
|
||||
} else {
|
||||
try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word});
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user