Actually use self-contained lld in bootstrap when use-lld = "self-contained"
is used
Before, we just used the global `lld` anyway.
This commit is contained in:
parent
eeeff9a66c
commit
ab5446c992
1 changed files with 14 additions and 1 deletions
|
@ -475,7 +475,20 @@ pub fn linker_flags(
|
||||||
) -> Vec<String> {
|
) -> Vec<String> {
|
||||||
let mut args = vec![];
|
let mut args = vec![];
|
||||||
if !builder.is_lld_direct_linker(target) && builder.config.lld_mode.is_used() {
|
if !builder.is_lld_direct_linker(target) && builder.config.lld_mode.is_used() {
|
||||||
args.push(String::from("-Clink-arg=-fuse-ld=lld"));
|
match builder.config.lld_mode {
|
||||||
|
LldMode::External => {
|
||||||
|
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
|
||||||
|
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
|
||||||
|
args.push("-Zunstable-options".to_string());
|
||||||
|
}
|
||||||
|
LldMode::SelfContained => {
|
||||||
|
args.push("-Clinker-flavor=gnu-lld-cc".to_string());
|
||||||
|
args.push("-Clink-self-contained=+linker".to_string());
|
||||||
|
// FIXME(kobzol): remove this flag once MCP510 gets stabilized
|
||||||
|
args.push("-Zunstable-options".to_string());
|
||||||
|
}
|
||||||
|
LldMode::Unused => unreachable!(),
|
||||||
|
};
|
||||||
|
|
||||||
if matches!(lld_threads, LldThreads::No) {
|
if matches!(lld_threads, LldThreads::No) {
|
||||||
args.push(format!(
|
args.push(format!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue