@@ -168,7 +168,13 @@ pub fn get_linker<'a>(
168168pub trait Linker {
169169 fn cmd ( & mut self ) -> & mut Command ;
170170 fn set_output_kind ( & mut self , output_kind : LinkOutputKind , out_filename : & Path ) ;
171- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , as_needed : bool ) ;
171+ fn link_dylib_by_name (
172+ & mut self ,
173+ name : & str ,
174+ verbatim : bool ,
175+ search_paths : & SearchPaths ,
176+ as_needed : bool ,
177+ ) ;
172178 fn link_framework_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
173179 bug ! ( "framework linked with unsupported linker" )
174180 }
@@ -439,7 +445,13 @@ impl<'a> Linker for GccLinker<'a> {
439445 }
440446 }
441447
442- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , as_needed : bool ) {
448+ fn link_dylib_by_name (
449+ & mut self ,
450+ name : & str ,
451+ verbatim : bool ,
452+ _search_paths : & SearchPaths ,
453+ as_needed : bool ,
454+ ) {
443455 if self . sess . target . os == "illumos" && name == "c" {
444456 // libc will be added via late_link_args on illumos so that it will
445457 // appear last in the library search order.
@@ -821,7 +833,7 @@ impl<'a> Linker for MsvcLinker<'a> {
821833 }
822834 }
823835
824- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , _as_needed : bool ) {
836+ fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , _search_paths : & SearchPaths , _as_needed : bool ) {
825837 self . cmd . arg ( format ! ( "{}{}" , name, if verbatim { "" } else { ".lib" } ) ) ;
826838 }
827839
@@ -1065,7 +1077,13 @@ impl<'a> Linker for EmLinker<'a> {
10651077
10661078 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
10671079
1068- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1080+ fn link_dylib_by_name (
1081+ & mut self ,
1082+ name : & str ,
1083+ _verbatim : bool ,
1084+ _search_paths : & SearchPaths ,
1085+ _as_needed : bool ,
1086+ ) {
10691087 // Emscripten always links statically
10701088 self . cmd . arg ( "-l" ) . arg ( name) ;
10711089 }
@@ -1245,7 +1263,13 @@ impl<'a> Linker for WasmLd<'a> {
12451263 }
12461264 }
12471265
1248- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1266+ fn link_dylib_by_name (
1267+ & mut self ,
1268+ name : & str ,
1269+ _verbatim : bool ,
1270+ _search_paths : & SearchPaths ,
1271+ _as_needed : bool ,
1272+ ) {
12491273 self . cmd . arg ( "-l" ) . arg ( name) ;
12501274 }
12511275
@@ -1398,7 +1422,13 @@ impl<'a> Linker for L4Bender<'a> {
13981422
13991423 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
14001424
1401- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1425+ fn link_dylib_by_name (
1426+ & mut self ,
1427+ _name : & str ,
1428+ _verbatim : bool ,
1429+ _search_paths : & SearchPaths ,
1430+ _as_needed : bool ,
1431+ ) {
14021432 bug ! ( "dylibs are not supported on L4Re" ) ;
14031433 }
14041434
@@ -1581,7 +1611,13 @@ impl<'a> Linker for AixLinker<'a> {
15811611 }
15821612 }
15831613
1584- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1614+ fn link_dylib_by_name (
1615+ & mut self ,
1616+ name : & str ,
1617+ _verbatim : bool ,
1618+ _search_paths : & SearchPaths ,
1619+ _as_needed : bool ,
1620+ ) {
15851621 self . hint_dynamic ( ) ;
15861622 self . cmd . arg ( format ! ( "-l{name}" ) ) ;
15871623 }
@@ -1794,7 +1830,13 @@ impl<'a> Linker for PtxLinker<'a> {
17941830
17951831 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
17961832
1797- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1833+ fn link_dylib_by_name (
1834+ & mut self ,
1835+ _name : & str ,
1836+ _verbatim : bool ,
1837+ _search_paths : & SearchPaths ,
1838+ _as_needed : bool ,
1839+ ) {
17981840 panic ! ( "external dylibs not supported" )
17991841 }
18001842
@@ -1882,7 +1924,13 @@ impl<'a> Linker for LlbcLinker<'a> {
18821924
18831925 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
18841926
1885- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1927+ fn link_dylib_by_name (
1928+ & mut self ,
1929+ _name : & str ,
1930+ _verbatim : bool ,
1931+ _search_paths : & SearchPaths ,
1932+ _as_needed : bool ,
1933+ ) {
18861934 panic ! ( "external dylibs not supported" )
18871935 }
18881936
@@ -1979,7 +2027,13 @@ impl<'a> Linker for BpfLinker<'a> {
19792027
19802028 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
19812029
1982- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
2030+ fn link_dylib_by_name (
2031+ & mut self ,
2032+ _name : & str ,
2033+ _verbatim : bool ,
2034+ _search_paths : & SearchPaths ,
2035+ _as_needed : bool ,
2036+ ) {
19832037 panic ! ( "external dylibs not supported" )
19842038 }
19852039
0 commit comments