@@ -137,9 +137,6 @@ pub(crate) fn get_linker<'a>(
137137 // to the linker args construction.
138138 assert ! ( cmd. get_args( ) . is_empty( ) || sess. target. abi == Abi :: Uwp ) ;
139139 match flavor {
140- LinkerFlavor :: Unix ( Cc :: No ) if sess. target . os == Os :: L4Re => {
141- Box :: new ( L4Bender :: new ( cmd, sess) ) as Box < dyn Linker >
142- }
143140 LinkerFlavor :: Unix ( Cc :: No ) if sess. target . os == Os :: Aix => {
144141 Box :: new ( AixLinker :: new ( cmd, sess) ) as Box < dyn Linker >
145142 }
@@ -280,7 +277,6 @@ generate_arg_methods! {
280277 MsvcLinker <' _>
281278 EmLinker <' _>
282279 WasmLd <' _>
283- L4Bender <' _>
284280 AixLinker <' _>
285281 LlbcLinker <' _>
286282 PtxLinker <' _>
@@ -1475,128 +1471,6 @@ impl<'a> WasmLd<'a> {
14751471 }
14761472}
14771473
1478- /// Linker shepherd script for L4Re (Fiasco)
1479- struct L4Bender < ' a > {
1480- cmd : Command ,
1481- sess : & ' a Session ,
1482- hinted_static : bool ,
1483- }
1484-
1485- impl < ' a > Linker for L4Bender < ' a > {
1486- fn cmd ( & mut self ) -> & mut Command {
1487- & mut self . cmd
1488- }
1489-
1490- fn set_output_kind (
1491- & mut self ,
1492- _output_kind : LinkOutputKind ,
1493- _crate_type : CrateType ,
1494- _out_filename : & Path ,
1495- ) {
1496- }
1497-
1498- fn link_staticlib_by_name ( & mut self , name : & str , _verbatim : bool , whole_archive : bool ) {
1499- self . hint_static ( ) ;
1500- if !whole_archive {
1501- self . link_arg ( format ! ( "-PC{name}" ) ) ;
1502- } else {
1503- self . link_arg ( "--whole-archive" )
1504- . link_or_cc_arg ( format ! ( "-l{name}" ) )
1505- . link_arg ( "--no-whole-archive" ) ;
1506- }
1507- }
1508-
1509- fn link_staticlib_by_path ( & mut self , path : & Path , whole_archive : bool ) {
1510- self . hint_static ( ) ;
1511- if !whole_archive {
1512- self . link_or_cc_arg ( path) ;
1513- } else {
1514- self . link_arg ( "--whole-archive" ) . link_or_cc_arg ( path) . link_arg ( "--no-whole-archive" ) ;
1515- }
1516- }
1517-
1518- fn full_relro ( & mut self ) {
1519- self . link_args ( & [ "-z" , "relro" , "-z" , "now" ] ) ;
1520- }
1521-
1522- fn partial_relro ( & mut self ) {
1523- self . link_args ( & [ "-z" , "relro" ] ) ;
1524- }
1525-
1526- fn no_relro ( & mut self ) {
1527- self . link_args ( & [ "-z" , "norelro" ] ) ;
1528- }
1529-
1530- fn gc_sections ( & mut self , keep_metadata : bool ) {
1531- if !keep_metadata {
1532- self . link_arg ( "--gc-sections" ) ;
1533- }
1534- }
1535-
1536- fn optimize ( & mut self ) {
1537- // GNU-style linkers support optimization with -O. GNU ld doesn't
1538- // need a numeric argument, but other linkers do.
1539- if self . sess . opts . optimize == config:: OptLevel :: More
1540- || self . sess . opts . optimize == config:: OptLevel :: Aggressive
1541- {
1542- self . link_arg ( "-O1" ) ;
1543- }
1544- }
1545-
1546- fn pgo_gen ( & mut self ) { }
1547-
1548- fn debuginfo ( & mut self , strip : Strip , _: & [ PathBuf ] ) {
1549- match strip {
1550- Strip :: None => { }
1551- Strip :: Debuginfo => {
1552- self . link_arg ( "--strip-debug" ) ;
1553- }
1554- Strip :: Symbols => {
1555- self . link_arg ( "--strip-all" ) ;
1556- }
1557- }
1558- }
1559-
1560- fn no_default_libraries ( & mut self ) {
1561- self . cc_arg ( "-nostdlib" ) ;
1562- }
1563-
1564- fn export_symbols ( & mut self , _: & Path , _: CrateType , _: & [ ( String , SymbolExportKind ) ] ) {
1565- // ToDo, not implemented, copy from GCC
1566- self . sess . dcx ( ) . emit_warn ( errors:: L4BenderExportingSymbolsUnimplemented ) ;
1567- }
1568-
1569- fn windows_subsystem ( & mut self , subsystem : WindowsSubsystemKind ) {
1570- let subsystem = subsystem. as_str ( ) ;
1571- self . link_arg ( & format ! ( "--subsystem {subsystem}" ) ) ;
1572- }
1573-
1574- fn reset_per_library_state ( & mut self ) {
1575- self . hint_static ( ) ; // Reset to default before returning the composed command line.
1576- }
1577-
1578- fn linker_plugin_lto ( & mut self ) { }
1579-
1580- fn control_flow_guard ( & mut self ) { }
1581-
1582- fn ehcont_guard ( & mut self ) { }
1583-
1584- fn no_crt_objects ( & mut self ) { }
1585- }
1586-
1587- impl < ' a > L4Bender < ' a > {
1588- fn new ( cmd : Command , sess : & ' a Session ) -> L4Bender < ' a > {
1589- L4Bender { cmd, sess, hinted_static : false }
1590- }
1591-
1592- fn hint_static ( & mut self ) {
1593- if !self . hinted_static {
1594- self . link_or_cc_arg ( "-static" ) ;
1595- self . hinted_static = true ;
1596- }
1597- }
1598- }
1599-
16001474/// Linker for AIX.
16011475struct AixLinker < ' a > {
16021476 cmd : Command ,
0 commit comments