authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-25 12:05:33-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-25 12:05:48-04:00
log6cbe589b51c9404a0f485733cbc4e3b46499d480
tree9a11aed02c3a9fe4f6c0ccd5d8160a8d3652a173
parent3869e803318721134170ca8e90190cdfbadbe475
signaturelock-open Commit is signed but in an unrecognized format.

zig cc: support -T linker script option


5 files changed, 17 insertions(+), 1 deletions(-)

src-self-hosted/clang_options_data.zig+8-1
......@@ -5614,7 +5614,14 @@ jspd1("L"),
56145614 .psl = false,
56155615},
56165616joinpd1("R"),
5617jspd1("T"),
5617.{
5618 .name = "T",
5619 .syntax = .joined_or_separate,
5620 .zig_equivalent = .linker_script,
5621 .pd1 = true,
5622 .pd2 = false,
5623 .psl = false,
5624},
56185625jspd1("U"),
56195626jspd1("V"),
56205627joinpd1("W"),
src-self-hosted/stage2.zig+1
......@@ -1278,6 +1278,7 @@ pub const ClangArgIterator = extern struct {
12781278 optimize,
12791279 debug,
12801280 sanitize,
1281 linker_script,
12811282 };
12821283
12831284 fn init(argv: []const [*:0]const u8) ClangArgIterator {
src/main.cpp+3
......@@ -704,6 +704,9 @@ static int main0(int argc, char **argv) {
704704 }
705705 }
706706 break;
707 case Stage2ClangArgLinkerScript:
708 linker_script = it.only_arg;
709 break;
707710 }
708711 }
709712 // Parse linker args
src/stage2.h+1
......@@ -340,6 +340,7 @@ enum Stage2ClangArg {
340340 Stage2ClangArgOptimize,
341341 Stage2ClangArgDebug,
342342 Stage2ClangArgSanitize,
343 Stage2ClangArgLinkerScript,
343344};
344345
345346// ABI warning
tools/update_clang_options.zig+4
......@@ -146,6 +146,10 @@ const known_options = [_]KnownOpt{
146146 .name = "fsanitize",
147147 .ident = "sanitize",
148148 },
149 .{
150 .name = "T",
151 .ident = "linker_script",
152 },
149153};
150154
151155const blacklisted_options = [_][]const u8{};