zig cc: Support reading input from stdin

This fixes #6271, which allows using `zig cc` with meson.
This commit is contained in:
Rafael Ristovski
2021-01-19 23:26:28 +01:00
committed by Andrew Kelley
parent 072d1e088c
commit 41e6aa78bb

View File

@@ -3056,7 +3056,7 @@ pub const ClangArgIterator = struct {
arg = mem.span(self.argv[self.next_index]);
self.incrementArgIndex();
}
if (!mem.startsWith(u8, arg, "-")) {
if (mem.eql(u8, arg, "-") or !mem.startsWith(u8, arg, "-")) {
self.zig_equivalent = .positional;
self.only_arg = arg;
return;