@@ -1297,10 +1297,10 @@ pub struct L4Bender<'a> {
1297
1297
}
1298
1298
1299
1299
impl < ' 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" )
1302
1302
}
1303
- fn link_staticlib ( & mut self , lib : & str ) {
1303
+ fn link_staticlib ( & mut self , lib : Symbol ) {
1304
1304
self . hint_static ( ) ;
1305
1305
self . cmd . arg ( format ! ( "-PC{}" , lib) ) ;
1306
1306
}
@@ -1325,9 +1325,11 @@ impl<'a> Linker for L4Bender<'a> {
1325
1325
fn build_static_executable ( & mut self ) { self . cmd . arg ( "-static" ) ; }
1326
1326
fn args ( & mut self , args : & [ String ] ) { self . cmd . args ( args) ; }
1327
1327
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
+ }
1329
1331
1330
- fn link_framework ( & mut self , _: & str ) {
1332
+ fn link_framework ( & mut self , _: Symbol ) {
1331
1333
bug ! ( "Frameworks not supported on L4Re." ) ;
1332
1334
}
1333
1335
@@ -1337,10 +1339,9 @@ impl<'a> Linker for L4Bender<'a> {
1337
1339
// don't otherwise explicitly reference them. This can occur for
1338
1340
// libraries which are just providing bindings, libraries with generic
1339
1341
// functions, etc.
1340
- fn link_whole_staticlib ( & mut self , lib : & str , _: & [ PathBuf ] ) {
1342
+ fn link_whole_staticlib ( & mut self , lib : Symbol , _: & [ PathBuf ] ) {
1341
1343
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) ) ;
1344
1345
self . cmd . arg ( "--no-whole-archive" ) ;
1345
1346
}
1346
1347
@@ -1385,7 +1386,8 @@ impl<'a> Linker for L4Bender<'a> {
1385
1386
}
1386
1387
1387
1388
fn export_symbols ( & mut self , _: & Path , _: CrateType ) {
1388
- bug ! ( "Not implemented" ) ;
1389
+ // ToDo, not implemented, copy from GCC
1390
+ return ;
1389
1391
}
1390
1392
1391
1393
fn subsystem ( & mut self , subsystem : & str ) {
@@ -1404,6 +1406,9 @@ impl<'a> Linker for L4Bender<'a> {
1404
1406
fn linker_plugin_lto ( & mut self ) {
1405
1407
// do nothing
1406
1408
}
1409
+ fn control_flow_guard ( & mut self ) {
1410
+ self . sess . warn ( "Windows Control Flow Guard is not supported by this linker." ) ;
1411
+ }
1407
1412
}
1408
1413
1409
1414
impl < ' a > L4Bender < ' a > {
0 commit comments