authorgravatar for sage@sagehane.comSage Hane <sage@sagehane.com> 2021-05-05 04:18:34+09:00
committergravatar for sage@sagehane.comSage Hane <sage@sagehane.com> 2021-05-05 04:19:08+09:00
log975cb9e9a9d4386b73c141459331a3f08904a46e
tree456b04d9b2c8e2085cee4801d083602f4d21f3f5
parent6490e571365ee9f9a6afc1236adae414cb93ae1e
signaturelock-open Commit is signed but in an unrecognized format.

std.zig: make the unrecognized C flag case non-fatal


1 files changed, 3 insertions(+), 4 deletions(-)

lib/std/zig/system.zig+3-4
...@@ -46,9 +46,6 @@ pub const NativePaths = struct {...@@ -46,9 +46,6 @@ pub const NativePaths = struct {
46 var it = mem.tokenize(nix_cflags_compile, " ");46 var it = mem.tokenize(nix_cflags_compile, " ");
47 while (true) {47 while (true) {
48 const word = it.next() orelse break;48 const word = it.next() orelse break;
49 if (mem.startsWith(u8, word, "-frandom-seed=")) {
50 continue;
51 }
52 if (mem.eql(u8, word, "-isystem")) {49 if (mem.eql(u8, word, "-isystem")) {
53 const include_path = it.next() orelse {50 const include_path = it.next() orelse {
54 try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE");51 try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE");
...@@ -56,8 +53,10 @@ pub const NativePaths = struct {...@@ -56,8 +53,10 @@ pub const NativePaths = struct {
56 };53 };
57 try self.addIncludeDir(include_path);54 try self.addIncludeDir(include_path);
58 } else {55 } else {
56 if (mem.startsWith(u8, word, "-frandom-seed=")) {
57 continue;
58 }
59 try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word});59 try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word});
60 break;
61 }60 }
62 }61 }
63 } else |err| switch (err) {62 } else |err| switch (err) {