@@ -1297,10 +1297,10 @@ pub struct L4Bender<'a> {
12971297}
12981298
12991299impl < ' a > Linker for L4Bender < ' a > {
1300- fn link_dylib ( & mut self , lib : & str ) {
1301- self . link_staticlib ( lib ) ; // do not support dynamic linking for now
1300+ fn link_dylib ( & mut self , _lib : Symbol ) {
1301+ panic ! ( "dylibs not supported yet" )
13021302 }
1303- fn link_staticlib ( & mut self , lib : & str ) {
1303+ fn link_staticlib ( & mut self , lib : Symbol ) {
13041304 self . hint_static ( ) ;
13051305 self . cmd . arg ( format ! ( "-PC{}" , lib) ) ;
13061306 }
@@ -1325,9 +1325,11 @@ impl<'a> Linker for L4Bender<'a> {
13251325 fn build_static_executable ( & mut self ) { self . cmd . arg ( "-static" ) ; }
13261326 fn args ( & mut self , args : & [ String ] ) { self . cmd . args ( args) ; }
13271327
1328- fn link_rust_dylib ( & mut self , lib : & str , _path : & Path ) { self . link_dylib ( lib) ; }
1328+ fn link_rust_dylib ( & mut self , _: Symbol , _: & Path ) {
1329+ panic ! ( "Rust dylibs not supported" ) ;
1330+ }
13291331
1330- fn link_framework ( & mut self , _: & str ) {
1332+ fn link_framework ( & mut self , _: Symbol ) {
13311333 bug ! ( "Frameworks not supported on L4Re." ) ;
13321334 }
13331335
@@ -1337,10 +1339,9 @@ impl<'a> Linker for L4Bender<'a> {
13371339 // don't otherwise explicitly reference them. This can occur for
13381340 // libraries which are just providing bindings, libraries with generic
13391341 // functions, etc.
1340- fn link_whole_staticlib ( & mut self , lib : & str , _: & [ PathBuf ] ) {
1342+ fn link_whole_staticlib ( & mut self , lib : Symbol , _: & [ PathBuf ] ) {
13411343 self . hint_static ( ) ;
1342- self . cmd . arg ( "--whole-archive" ) ;
1343- self . cmd . arg ( "-l" ) . arg ( lib) ;
1344+ self . cmd . arg ( "--whole-archive" ) . arg ( format ! ( "-l{}" , lib) ) ;
13441345 self . cmd . arg ( "--no-whole-archive" ) ;
13451346 }
13461347
@@ -1385,7 +1386,8 @@ impl<'a> Linker for L4Bender<'a> {
13851386 }
13861387
13871388 fn export_symbols ( & mut self , _: & Path , _: CrateType ) {
1388- bug ! ( "Not implemented" ) ;
1389+ // ToDo, not implemented, copy from GCC
1390+ return ;
13891391 }
13901392
13911393 fn subsystem ( & mut self , subsystem : & str ) {
@@ -1404,6 +1406,9 @@ impl<'a> Linker for L4Bender<'a> {
14041406 fn linker_plugin_lto ( & mut self ) {
14051407 // do nothing
14061408 }
1409+ fn control_flow_guard ( & mut self ) {
1410+ self . sess . warn ( "Windows Control Flow Guard is not supported by this linker." ) ;
1411+ }
14071412}
14081413
14091414impl < ' a > L4Bender < ' a > {
0 commit comments