Commit 41e6aa78bb

Rafael Ristovski <rafael.ristovski@gmail.com>
2021-01-19 23:26:28
zig cc: Support reading input from stdin
This fixes #6271, which allows using `zig cc` with meson.
1 parent 072d1e0
Changed files (1)
src/main.zig
@@ -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;