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