PhaseMage 8a97807d68
Full response file (*.rsp) support
I hit the "quotes in an RSP file" issue when trying to compile gRPC using
"zig cc". As a fun exercise, I decided to see if I could fix it myself.
I'm fully open to this code being flat-out rejected. Or I can take feedback
to fix it up.

This modifies (and renames) _ArgIteratorWindows_ in process.zig such that
it works with arbitrary strings (or the contents of an RSP file).

In main.zig, this new _ArgIteratorGeneral_ is used to address the "TODO"
listed in _ClangArgIterator_.

This change closes #4833.

**Pros:**

- It has the nice attribute of handling "RSP file" arguments in the same way it
  handles "cmd_line" arguments.
- High Performance, minimal allocations
- Fixed bug in previous _ArgIteratorWindows_, where final trailing backslashes
  in a command line were entirely dropped
- Added a test case for the above bug
- Harmonized the _ArgIteratorXxxx._initWithAllocator()_ and _next()_ interface
  across Windows/Posix/Wasi (Moved Windows errors to _initWithAllocator()_
  rather than _next()_)
- Likely perf benefit on Windows by doing _utf16leToUtf8AllocZ()_ only once
  for the entire cmd_line

**Cons:**

- Breaking Change in std library on Windows: Call
  _ArgIterator.initWithAllocator()_ instead of _ArgIterator.init()_
- PhaseMage is new with contributions to Zig, might need a lot of hand-holding
- PhaseMage is a Windows person, non-Windows stuff will need to be double-checked

**Testing Done:**

- Wrote a few new test cases in process.zig
- zig.exe build test -Dskip-release (no new failures seen)
- zig cc now builds gRPC without error
2022-01-30 21:27:52 +02:00
..
2022-01-24 17:29:19 +02:00
2022-01-28 16:23:47 -07:00
2022-01-29 20:30:53 +00:00
2022-01-27 19:35:08 +02:00
2022-01-24 20:15:32 +02:00
2022-01-17 16:56:50 +02:00
2022-01-27 19:42:40 +02:00
2022-01-24 20:29:05 +02:00
2022-01-07 00:06:06 -05:00
2022-01-17 12:32:02 +01:00
2022-01-28 11:45:04 -07:00
2022-01-20 10:54:45 +02:00
2022-01-30 21:27:52 +02:00
2021-10-27 16:07:48 -04:00
2022-01-07 00:06:06 -05:00
2022-01-30 21:27:52 +02:00
2022-01-07 00:06:06 -05:00