mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
std.zig: make the unrecognized C flag case non-fatal
This commit is contained in:
parent
6490e57136
commit
975cb9e9a9
@ -46,9 +46,6 @@ pub const NativePaths = struct {
|
||||
var it = mem.tokenize(nix_cflags_compile, " ");
|
||||
while (true) {
|
||||
const word = it.next() orelse break;
|
||||
if (mem.startsWith(u8, word, "-frandom-seed=")) {
|
||||
continue;
|
||||
}
|
||||
if (mem.eql(u8, word, "-isystem")) {
|
||||
const include_path = it.next() orelse {
|
||||
try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE");
|
||||
@ -56,8 +53,10 @@ pub const NativePaths = struct {
|
||||
};
|
||||
try self.addIncludeDir(include_path);
|
||||
} else {
|
||||
if (mem.startsWith(u8, word, "-frandom-seed=")) {
|
||||
continue;
|
||||
}
|
||||
try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word});
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else |err| switch (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user