mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 06:15:21 +00:00
zig cc: Add support for -Xlinker, --for-linker, --for-linker=
This commit is contained in:
parent
12e1c6e21c
commit
b0b29b8a2f
@ -80,7 +80,14 @@ sepd1("Xassembler"),
|
||||
sepd1("Xclang"),
|
||||
sepd1("Xcuda-fatbinary"),
|
||||
sepd1("Xcuda-ptxas"),
|
||||
sepd1("Xlinker"),
|
||||
.{
|
||||
.name = "Xlinker",
|
||||
.syntax = .separate,
|
||||
.zig_equivalent = .for_linker,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
sepd1("Xopenmp-target"),
|
||||
sepd1("Xpreprocessor"),
|
||||
flagpd1("Z"),
|
||||
@ -1563,7 +1570,7 @@ sepd1("Zlinker-input"),
|
||||
.{
|
||||
.name = "for-linker",
|
||||
.syntax = .separate,
|
||||
.zig_equivalent = .other,
|
||||
.zig_equivalent = .for_linker,
|
||||
.pd1 = false,
|
||||
.pd2 = true,
|
||||
.psl = false,
|
||||
@ -4887,7 +4894,7 @@ jspd1("sub_umbrella"),
|
||||
.{
|
||||
.name = "for-linker=",
|
||||
.syntax = .joined,
|
||||
.zig_equivalent = .other,
|
||||
.zig_equivalent = .for_linker,
|
||||
.pd1 = false,
|
||||
.pd2 = true,
|
||||
.psl = false,
|
||||
|
||||
@ -1289,6 +1289,7 @@ pub const ClangArgIterator = extern struct {
|
||||
no_exceptions,
|
||||
rtti,
|
||||
no_rtti,
|
||||
for_linker,
|
||||
};
|
||||
|
||||
const Args = struct {
|
||||
|
||||
@ -734,6 +734,9 @@ static int main0(int argc, char **argv) {
|
||||
case Stage2ClangArgNoRtti:
|
||||
cpp_rtti = false;
|
||||
break;
|
||||
case Stage2ClangArgForLinker:
|
||||
linker_args.append(buf_create_from_str(it.only_arg));
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Parse linker args
|
||||
|
||||
@ -349,6 +349,7 @@ enum Stage2ClangArg {
|
||||
Stage2ClangArgNoExceptions,
|
||||
Stage2ClangArgRtti,
|
||||
Stage2ClangArgNoRtti,
|
||||
Stage2ClangArgForLinker,
|
||||
};
|
||||
|
||||
// ABI warning
|
||||
|
||||
@ -78,6 +78,18 @@ const known_options = [_]KnownOpt{
|
||||
.name = "Wl,",
|
||||
.ident = "wl",
|
||||
},
|
||||
.{
|
||||
.name = "Xlinker",
|
||||
.ident = "for_linker",
|
||||
},
|
||||
.{
|
||||
.name = "for-linker",
|
||||
.ident = "for_linker",
|
||||
},
|
||||
.{
|
||||
.name = "for-linker=",
|
||||
.ident = "for_linker",
|
||||
},
|
||||
.{
|
||||
.name = "E",
|
||||
.ident = "preprocess",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user