In an MSVC context, `-MT` means
"Use static run-time"
and it is a flag with no parameter.
On POSIX it means
"Specify name of main file output in depfile"
and it is "joined or separate".
The former was interfering with the latter. Now, the MT flag is required
to be specified with a `/` to disambiguate: `/MT`.
This caused link errors in c++ code because it was not correct to pass
these flags to child codegens. And that was the only reason to detect
these flags. Otherwise we can safely rely on non-explicitly-detected
flag forwarding.
This is only the first step; it makes zig cc recognize -z and append it to the linker args, but the linker arg parsing doesn't support -z yet so it will just give the warning 'unsupported linker arg: -z'
* The generated options data file is sorted now in a way that
makes sure longer prefixes are first. This prevents collisions
with some parameters.
* Add support for `-fPIC`, `-fno-PIC`, `-nostdlib`, `-shared`,
`-rdynamic`, `-Wl,-soname`, `-Wl,-rpath`
* Better support for `-o`.
* Disable generating h files
* Shared library support.
* Better positional argument support.
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
* introduce std.json.WriteStream API for writing json
data to a stream
* add WIP tools/merge_anal_dumps.zig for merging multiple semantic
analysis dumps into one. See #3028
* add std.json.Array, improves generated docs
* add test for `std.process.argsAlloc`, improves test coverage and
generated docs
This is the beginning of supporting minimum GLIBC version as part of the
target. See #2509 for the motivation.
The dummy libc zig files are removed. A future commit will build them
on-the-fly, using the generated text files generated by the new tool,
which are checked into source control and distributed along with zig.
These generated text files are, together, 142KB (20KB gzipped).
Compare that to a naive bundling of the .abilist files, which would be
2.2MiB (375KB gzipped).
This is based on glibc 2.29.