@@ -167,7 +167,13 @@ pub fn get_linker<'a>(
167167pub trait Linker {
168168 fn cmd ( & mut self ) -> & mut Command ;
169169 fn set_output_kind ( & mut self , output_kind : LinkOutputKind , out_filename : & Path ) ;
170- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , as_needed : bool ) ;
170+ fn link_dylib_by_name (
171+ & mut self ,
172+ name : & str ,
173+ verbatim : bool ,
174+ search_paths : & SearchPaths ,
175+ as_needed : bool ,
176+ ) ;
171177 fn link_framework_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
172178 bug ! ( "framework linked with unsupported linker" )
173179 }
@@ -432,7 +438,13 @@ impl<'a> Linker for GccLinker<'a> {
432438 }
433439 }
434440
435- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , as_needed : bool ) {
441+ fn link_dylib_by_name (
442+ & mut self ,
443+ name : & str ,
444+ verbatim : bool ,
445+ _search_paths : & SearchPaths ,
446+ as_needed : bool ,
447+ ) {
436448 if self . sess . target . os == "illumos" && name == "c" {
437449 // libc will be added via late_link_args on illumos so that it will
438450 // appear last in the library search order.
@@ -807,7 +819,7 @@ impl<'a> Linker for MsvcLinker<'a> {
807819 }
808820 }
809821
810- fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , _as_needed : bool ) {
822+ fn link_dylib_by_name ( & mut self , name : & str , verbatim : bool , _search_paths : & SearchPaths , _as_needed : bool ) {
811823 self . cmd . arg ( format ! ( "{}{}" , name, if verbatim { "" } else { ".lib" } ) ) ;
812824 }
813825
@@ -1051,7 +1063,13 @@ impl<'a> Linker for EmLinker<'a> {
10511063
10521064 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
10531065
1054- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1066+ fn link_dylib_by_name (
1067+ & mut self ,
1068+ name : & str ,
1069+ _verbatim : bool ,
1070+ _search_paths : & SearchPaths ,
1071+ _as_needed : bool ,
1072+ ) {
10551073 // Emscripten always links statically
10561074 self . cmd . arg ( "-l" ) . arg ( name) ;
10571075 }
@@ -1225,7 +1243,13 @@ impl<'a> Linker for WasmLd<'a> {
12251243 }
12261244 }
12271245
1228- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1246+ fn link_dylib_by_name (
1247+ & mut self ,
1248+ name : & str ,
1249+ _verbatim : bool ,
1250+ _search_paths : & SearchPaths ,
1251+ _as_needed : bool ,
1252+ ) {
12291253 self . cmd . arg ( "-l" ) . arg ( name) ;
12301254 }
12311255
@@ -1372,7 +1396,13 @@ impl<'a> Linker for L4Bender<'a> {
13721396
13731397 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
13741398
1375- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1399+ fn link_dylib_by_name (
1400+ & mut self ,
1401+ _name : & str ,
1402+ _verbatim : bool ,
1403+ _search_paths : & SearchPaths ,
1404+ _as_needed : bool ,
1405+ ) {
13761406 bug ! ( "dylibs are not supported on L4Re" ) ;
13771407 }
13781408
@@ -1549,7 +1579,13 @@ impl<'a> Linker for AixLinker<'a> {
15491579 }
15501580 }
15511581
1552- fn link_dylib_by_name ( & mut self , name : & str , _verbatim : bool , _as_needed : bool ) {
1582+ fn link_dylib_by_name (
1583+ & mut self ,
1584+ name : & str ,
1585+ _verbatim : bool ,
1586+ _search_paths : & SearchPaths ,
1587+ _as_needed : bool ,
1588+ ) {
15531589 self . hint_dynamic ( ) ;
15541590 self . cmd . arg ( format ! ( "-l{name}" ) ) ;
15551591 }
@@ -1755,7 +1791,13 @@ impl<'a> Linker for PtxLinker<'a> {
17551791
17561792 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
17571793
1758- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1794+ fn link_dylib_by_name (
1795+ & mut self ,
1796+ _name : & str ,
1797+ _verbatim : bool ,
1798+ _search_paths : & SearchPaths ,
1799+ _as_needed : bool ,
1800+ ) {
17591801 panic ! ( "external dylibs not supported" )
17601802 }
17611803
@@ -1837,7 +1879,13 @@ impl<'a> Linker for LlbcLinker<'a> {
18371879
18381880 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
18391881
1840- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1882+ fn link_dylib_by_name (
1883+ & mut self ,
1884+ _name : & str ,
1885+ _verbatim : bool ,
1886+ _search_paths : & SearchPaths ,
1887+ _as_needed : bool ,
1888+ ) {
18411889 panic ! ( "external dylibs not supported" )
18421890 }
18431891
@@ -1928,7 +1976,13 @@ impl<'a> Linker for BpfLinker<'a> {
19281976
19291977 fn set_output_kind ( & mut self , _output_kind : LinkOutputKind , _out_filename : & Path ) { }
19301978
1931- fn link_dylib_by_name ( & mut self , _name : & str , _verbatim : bool , _as_needed : bool ) {
1979+ fn link_dylib_by_name (
1980+ & mut self ,
1981+ _name : & str ,
1982+ _verbatim : bool ,
1983+ _search_paths : & SearchPaths ,
1984+ _as_needed : bool ,
1985+ ) {
19321986 panic ! ( "external dylibs not supported" )
19331987 }
19341988
0 commit comments