| author | |
| committer | |
| log | 95bb53653d11e62e3bfb9de6b3668ac0c1c466f5 |
| tree | 68c50f6b254cd780fe76f3e94613dfecce3ddd4e |
| parent | de8cece6e7be570a7e622c54c0cbbc7c99308a08 |
3 files changed, 24 insertions(+), 2 deletions(-)
src/clang_options_data.zig+2-2| ... | ... | @@ -1984,7 +1984,7 @@ flagpsl("MT"), |
| 1984 | 1984 | .{ |
| 1985 | 1985 | .name = "rtlib", |
| 1986 | 1986 | .syntax = .separate, |
| 1987 | .zig_equivalent = .other, | |
| 1987 | .zig_equivalent = .rtlib, | |
| 1988 | 1988 | .pd1 = false, |
| 1989 | 1989 | .pd2 = true, |
| 1990 | 1990 | .psl = false, |
| ... | ... | @@ -7331,7 +7331,7 @@ jspd1("iquote"), |
| 7331 | 7331 | .{ |
| 7332 | 7332 | .name = "rtlib=", |
| 7333 | 7333 | .syntax = .joined, |
| 7334 | .zig_equivalent = .other, | |
| 7334 | .zig_equivalent = .rtlib, | |
| 7335 | 7335 | .pd1 = true, |
| 7336 | 7336 | .pd2 = true, |
| 7337 | 7337 | .psl = false, |
src/main.zig+14| ... | ... | @@ -2180,6 +2180,19 @@ fn buildOutputType( |
| 2180 | 2180 | fatal("unsupported -undefined option '{s}'", .{it.only_arg}); |
| 2181 | 2181 | } |
| 2182 | 2182 | }, |
| 2183 | .rtlib => { | |
| 2184 | // Unlike Clang, we support `none` for explicitly omitting compiler-rt. | |
| 2185 | if (mem.eql(u8, "none", it.only_arg)) { | |
| 2186 | want_compiler_rt = false; | |
| 2187 | } else if (mem.eql(u8, "compiler-rt", it.only_arg) or | |
| 2188 | mem.eql(u8, "libgcc", it.only_arg)) | |
| 2189 | { | |
| 2190 | want_compiler_rt = true; | |
| 2191 | } else { | |
| 2192 | // Note that we don't support `platform`. | |
| 2193 | fatal("unsupported -rtlib option '{s}'", .{it.only_arg}); | |
| 2194 | } | |
| 2195 | }, | |
| 2183 | 2196 | } |
| 2184 | 2197 | } |
| 2185 | 2198 | // Parse linker args. |
| ... | ... | @@ -5810,6 +5823,7 @@ pub const ClangArgIterator = struct { |
| 5810 | 5823 | san_cov_trace_pc_guard, |
| 5811 | 5824 | san_cov, |
| 5812 | 5825 | no_san_cov, |
| 5826 | rtlib, | |
| 5813 | 5827 | }; |
| 5814 | 5828 | |
| 5815 | 5829 | const Args = struct { |
tools/update_clang_options.zig+8| ... | ... | @@ -548,6 +548,14 @@ const known_options = [_]KnownOpt{ |
| 548 | 548 | .name = "fno-sanitize-coverage", |
| 549 | 549 | .ident = "no_san_cov", |
| 550 | 550 | }, |
| 551 | .{ | |
| 552 | .name = "rtlib", | |
| 553 | .ident = "rtlib", | |
| 554 | }, | |
| 555 | .{ | |
| 556 | .name = "rtlib=", | |
| 557 | .ident = "rtlib", | |
| 558 | }, | |
| 551 | 559 | }; |
| 552 | 560 | |
| 553 | 561 | const blacklisted_options = [_][]const u8{}; |