| author | |
| committer | |
| log | 3889112380e1c14978d8be512068b99d2a7f774b |
| tree | fbe1c4301e61c7e4c753919b08a1f842fa775949 |
| parent | d5c83bafad0842a3020eabfa1d9f198413340e56 |
2 files changed, 7 insertions(+), 7 deletions(-)
lib/compiler/Maker.zig+5-5| ... | ... | @@ -283,11 +283,11 @@ pub fn main(init: process.Init.Minimal) !void { |
| 283 | 283 | cache_poison = .poisoned; |
| 284 | 284 | configure_argv.appendAssumeCapacity("--cache-poison=poisoned"); |
| 285 | 285 | } else if (mem.cutPrefix(u8, arg, "--cache-poison=")) |rest| { |
| 286 | // Allow the configurer process to report parse failure. | |
| 287 | if (stringToEnum(std.Build.Graph.CachePoison, rest)) |poison| { | |
| 288 | cache_poison = poison; | |
| 289 | } | |
| 290 | configure_argv.appendAssumeCapacity(arg); | |
| 286 | // We have to report parse failure here otherwise we would | |
| 287 | // potentially get false positive cache hits for misspellings. | |
| 288 | cache_poison = stringToEnum(std.Build.Graph.CachePoison, rest) orelse | |
| 289 | fatalWithHint("expected --cache-poison=[pure|poisoned|disallowed|ignored]; found: {s}", .{arg}); | |
| 290 | if (cache_poison != .pure) configure_argv.appendAssumeCapacity(arg); | |
| 291 | 291 | } else if (mem.eql(u8, arg, "--verbose")) { |
| 292 | 292 | // Intentionally is added both to make and configure but |
| 293 | 293 | // does not go into the cache hash. |
lib/compiler/configurer.zig+2-2| ... | ... | @@ -113,8 +113,8 @@ pub fn main(init: process.Init.Minimal) !void { |
| 113 | 113 | } else if (mem.eql(u8, arg, "--verbose")) { |
| 114 | 114 | graph.verbose = true; |
| 115 | 115 | } else if (mem.cutPrefix(u8, arg, "--cache-poison=")) |rest| { |
| 116 | graph.cache_poison = std.meta.stringToEnum(std.Build.Graph.CachePoison, rest) orelse | |
| 117 | fatalWithHint("expected --cache-poison=[pure|poisoned|disallowed|ignored]; found: {s}", .{arg}); | |
| 116 | // Already parsed and validated by Maker. | |
| 117 | graph.cache_poison = std.meta.stringToEnum(std.Build.Graph.CachePoison, rest).?; | |
| 118 | 118 | } else if (mem.eql(u8, arg, "--search-prefix")) { |
| 119 | 119 | try graph.search_prefixes.append(arena, nextArgOrFatal(args, &arg_i)); |
| 120 | 120 | } else { |