diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-21 15:29:52 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-21 15:40:49 -0400 |
| commit | 0eee98edc1e505486a9ec51a331d3aa322fce9ee (patch) | |
| tree | dfdc8a69b1c1f3d2ebf89f4a09f81c1d1942866e /src-self-hosted/stage2.zig | |
| parent | a4eaeee72011a2f7866a18420812178991feaf8d (diff) | |
| download | zig-0eee98edc1e505486a9ec51a331d3aa322fce9ee.tar.gz zig-0eee98edc1e505486a9ec51a331d3aa322fce9ee.zip | |
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.
Diffstat (limited to 'src-self-hosted/stage2.zig')
| -rw-r--r-- | src-self-hosted/stage2.zig | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig index 23df042cbe..73a053b853 100644 --- a/src-self-hosted/stage2.zig +++ b/src-self-hosted/stage2.zig @@ -1239,6 +1239,14 @@ pub const ClangArgIterator = extern struct { other, positional, l, + ignore, + passthrough, + pic, + no_pic, + nostdlib, + shared, + rdynamic, + wl, }; fn init(argv: []const [*:0]const u8) ClangArgIterator { @@ -1282,7 +1290,8 @@ pub const ClangArgIterator = extern struct { break :find_clang_arg; }, .joined, .comma_joined => { - // Example: --target=foo + // joined example: --target=foo + // comma_joined example: -Wl,-soname,libsoundio.so.2 const prefix_len = clang_arg.matchStartsWith(arg); if (prefix_len != 0) { self.zig_equivalent = clang_arg.zig_equivalent; |
