zig cc: add support for -L linker arguments
This commit is contained in:
parent
783f73c7e3
commit
2b6dfdd3d4
|
@ -1658,7 +1658,7 @@ sepd1("Zlinker-input"),
|
|||
.{
|
||||
.name = "library-directory",
|
||||
.syntax = .separate,
|
||||
.zig_equivalent = .other,
|
||||
.zig_equivalent = .linker_input_l,
|
||||
.pd1 = false,
|
||||
.pd2 = true,
|
||||
.psl = false,
|
||||
|
@ -4534,7 +4534,7 @@ joinpd1("target-sdk-version="),
|
|||
.{
|
||||
.name = "library-directory=",
|
||||
.syntax = .joined,
|
||||
.zig_equivalent = .other,
|
||||
.zig_equivalent = .linker_input_l,
|
||||
.pd1 = false,
|
||||
.pd2 = true,
|
||||
.psl = false,
|
||||
|
@ -5632,7 +5632,14 @@ jspd1("F"),
|
|||
jspd1("G"),
|
||||
jspd1("I"),
|
||||
jspd1("J"),
|
||||
jspd1("L"),
|
||||
.{
|
||||
.name = "L",
|
||||
.syntax = .joined_or_separate,
|
||||
.zig_equivalent = .linker_input_l,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
.{
|
||||
.name = "O",
|
||||
.syntax = .joined,
|
||||
|
|
|
@ -1288,6 +1288,7 @@ pub const ClangArgIterator = extern struct {
|
|||
verbose_cmds,
|
||||
for_linker,
|
||||
linker_input_z,
|
||||
linker_input_l,
|
||||
};
|
||||
|
||||
const Args = struct {
|
||||
|
|
|
@ -735,6 +735,9 @@ static int main0(int argc, char **argv) {
|
|||
linker_args.append(buf_create_from_str("-z"));
|
||||
linker_args.append(buf_create_from_str(it.only_arg));
|
||||
break;
|
||||
case Stage2ClangArgLinkerInputL:
|
||||
lib_dirs.append(it.only_arg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Parse linker args
|
||||
|
|
|
@ -347,6 +347,7 @@ enum Stage2ClangArg {
|
|||
Stage2ClangArgVerboseCmds,
|
||||
Stage2ClangArgForLinker,
|
||||
Stage2ClangArgLinkerInputZ,
|
||||
Stage2ClangArgLinkerInputL,
|
||||
};
|
||||
|
||||
// ABI warning
|
||||
|
|
|
@ -174,6 +174,14 @@ const known_options = [_]KnownOpt{
|
|||
.name = "###",
|
||||
.ident = "verbose_cmds",
|
||||
},
|
||||
.{
|
||||
.name = "L",
|
||||
.ident = "linker_input_l",
|
||||
},
|
||||
.{
|
||||
.name = "library-directory",
|
||||
.ident = "linker_input_l",
|
||||
},
|
||||
};
|
||||
|
||||
const blacklisted_options = [_][]const u8{};
|
||||
|
|
Loading…
Reference in New Issue
Block a user