zig cc: support -T linker script option
This commit is contained in:
parent
3869e80331
commit
6cbe589b51
@ -5614,7 +5614,14 @@ jspd1("L"),
|
||||
.psl = false,
|
||||
},
|
||||
joinpd1("R"),
|
||||
jspd1("T"),
|
||||
.{
|
||||
.name = "T",
|
||||
.syntax = .joined_or_separate,
|
||||
.zig_equivalent = .linker_script,
|
||||
.pd1 = true,
|
||||
.pd2 = false,
|
||||
.psl = false,
|
||||
},
|
||||
jspd1("U"),
|
||||
jspd1("V"),
|
||||
joinpd1("W"),
|
||||
|
@ -1278,6 +1278,7 @@ pub const ClangArgIterator = extern struct {
|
||||
optimize,
|
||||
debug,
|
||||
sanitize,
|
||||
linker_script,
|
||||
};
|
||||
|
||||
fn init(argv: []const [*:0]const u8) ClangArgIterator {
|
||||
|
@ -704,6 +704,9 @@ static int main0(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Stage2ClangArgLinkerScript:
|
||||
linker_script = it.only_arg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Parse linker args
|
||||
|
@ -340,6 +340,7 @@ enum Stage2ClangArg {
|
||||
Stage2ClangArgOptimize,
|
||||
Stage2ClangArgDebug,
|
||||
Stage2ClangArgSanitize,
|
||||
Stage2ClangArgLinkerScript,
|
||||
};
|
||||
|
||||
// ABI warning
|
||||
|
@ -146,6 +146,10 @@ const known_options = [_]KnownOpt{
|
||||
.name = "fsanitize",
|
||||
.ident = "sanitize",
|
||||
},
|
||||
.{
|
||||
.name = "T",
|
||||
.ident = "linker_script",
|
||||
},
|
||||
};
|
||||
|
||||
const blacklisted_options = [_][]const u8{};
|
||||
|
Loading…
x
Reference in New Issue
Block a user