File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,20 @@ pub fn linker_flags(
475
475
) -> Vec < String > {
476
476
let mut args = vec ! [ ] ;
477
477
if !builder. is_lld_direct_linker ( target) && builder. config . lld_mode . is_used ( ) {
478
- args. push ( String :: from ( "-Clink-arg=-fuse-ld=lld" ) ) ;
478
+ match builder. config . lld_mode {
479
+ LldMode :: External => {
480
+ args. push ( "-Clinker-flavor=gnu-lld-cc" . to_string ( ) ) ;
481
+ // FIXME(kobzol): remove this flag once MCP510 gets stabilized
482
+ args. push ( "-Zunstable-options" . to_string ( ) ) ;
483
+ }
484
+ LldMode :: SelfContained => {
485
+ args. push ( "-Clinker-flavor=gnu-lld-cc" . to_string ( ) ) ;
486
+ args. push ( "-Clink-self-contained=+linker" . to_string ( ) ) ;
487
+ // FIXME(kobzol): remove this flag once MCP510 gets stabilized
488
+ args. push ( "-Zunstable-options" . to_string ( ) ) ;
489
+ }
490
+ LldMode :: Unused => unreachable ! ( ) ,
491
+ } ;
479
492
480
493
if matches ! ( lld_threads, LldThreads :: No ) {
481
494
args. push ( format ! (
You can’t perform that action at this time.
0 commit comments