@@ -1530,16 +1530,7 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
1530
1530
}
1531
1531
1532
1532
// NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
1533
- // FIXME: Support `StaticPicExe` correctly.
1534
- match link_output_kind {
1535
- LinkOutputKind :: DynamicPicExe | LinkOutputKind :: StaticPicExe => {
1536
- cmd. position_independent_executable ( )
1537
- }
1538
- LinkOutputKind :: DynamicNoPicExe | LinkOutputKind :: StaticNoPicExe => {
1539
- cmd. no_position_independent_executable ( )
1540
- }
1541
- _ => { }
1542
- }
1533
+ cmd. set_output_kind ( link_output_kind, out_filename) ;
1543
1534
1544
1535
// OBJECT-FILES-NO, AUDIT-ORDER
1545
1536
add_relro_args ( cmd, sess) ;
@@ -1568,17 +1559,6 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
1568
1559
tmpdir,
1569
1560
) ;
1570
1561
1571
- // NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
1572
- // FIXME: Merge with the previous `link_output_kind` match,
1573
- // and support `StaticPicExe` and `StaticDylib` correctly.
1574
- match link_output_kind {
1575
- LinkOutputKind :: StaticNoPicExe | LinkOutputKind :: StaticPicExe => {
1576
- cmd. build_static_executable ( )
1577
- }
1578
- LinkOutputKind :: DynamicDylib | LinkOutputKind :: StaticDylib => cmd. build_dylib ( out_filename) ,
1579
- _ => { }
1580
- }
1581
-
1582
1562
// OBJECT-FILES-NO, AUDIT-ORDER
1583
1563
if sess. opts . cg . profile_generate . enabled ( ) {
1584
1564
cmd. pgo_gen ( ) ;
0 commit comments