Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Kelley
f8cc6a1917
zig cc: fix ambiguity with -MT
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`.
2020-04-02 21:15:36 -04:00
Andrew Kelley
2b65dc1032
zig cc: detect optimization and debug flags 2020-03-21 22:30:46 -04:00
Andrew Kelley
0eee98edc1
zig cc improvements
* 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.
2020-03-21 15:40:49 -04:00
Andrew Kelley
a4eaeee720
ability to use zig cc as a drop-in C compiler
The basics are working
2020-03-21 15:39:39 -04:00