@@ -343,19 +343,6 @@ impl Builder {
343
343
output_vector. push ( "--disable-name-namespacing" . into ( ) ) ;
344
344
}
345
345
346
- self . options
347
- . links
348
- . iter ( )
349
- . map ( |& ( ref item, _) | {
350
- output_vector. push ( "--framework" . into ( ) ) ;
351
- output_vector. push (
352
- item. trim_left_matches ( "^" )
353
- . trim_right_matches ( "$" )
354
- . into ( ) ,
355
- ) ;
356
- } )
357
- . count ( ) ;
358
-
359
346
if !self . options . codegen_config . functions {
360
347
output_vector. push ( "--ignore-functions" . into ( ) ) ;
361
348
}
@@ -389,19 +376,6 @@ impl Builder {
389
376
output_vector. push ( "--ignore-methods" . into ( ) ) ;
390
377
}
391
378
392
- self . options
393
- . links
394
- . iter ( )
395
- . map ( |& ( ref item, _) | {
396
- output_vector. push ( "--clang-args" . into ( ) ) ;
397
- output_vector. push (
398
- item. trim_left_matches ( "^" )
399
- . trim_right_matches ( "$" )
400
- . into ( ) ,
401
- ) ;
402
- } )
403
- . count ( ) ;
404
-
405
379
if !self . options . convert_floats {
406
380
output_vector. push ( "--no-convert-floats" . into ( ) ) ;
407
381
}
@@ -437,19 +411,6 @@ impl Builder {
437
411
} )
438
412
. count ( ) ;
439
413
440
- self . options
441
- . links
442
- . iter ( )
443
- . map ( |& ( ref item, _) | {
444
- output_vector. push ( "--static" . into ( ) ) ;
445
- output_vector. push (
446
- item. trim_left_matches ( "^" )
447
- . trim_right_matches ( "$" )
448
- . into ( ) ,
449
- ) ;
450
- } )
451
- . count ( ) ;
452
-
453
414
if self . options . use_core {
454
415
output_vector. push ( "--use-core" . into ( ) ) ;
455
416
}
@@ -824,26 +785,6 @@ impl Builder {
824
785
self
825
786
}
826
787
827
- /// Make the generated bindings link the given shared library.
828
- pub fn link < T : Into < String > > ( mut self , library : T ) -> Builder {
829
- self . options . links . push ( ( library. into ( ) , LinkType :: Default ) ) ;
830
- self
831
- }
832
-
833
- /// Make the generated bindings link the given static library.
834
- pub fn link_static < T : Into < String > > ( mut self , library : T ) -> Builder {
835
- self . options . links . push ( ( library. into ( ) , LinkType :: Static ) ) ;
836
- self
837
- }
838
-
839
- /// Make the generated bindings link the given framework.
840
- pub fn link_framework < T : Into < String > > ( mut self , library : T ) -> Builder {
841
- self . options . links . push (
842
- ( library. into ( ) , LinkType :: Framework ) ,
843
- ) ;
844
- self
845
- }
846
-
847
788
/// Emit bindings for builtin definitions (for example `__builtin_va_list`)
848
789
/// in the generated Rust.
849
790
pub fn emit_builtins ( mut self ) -> Builder {
@@ -1277,9 +1218,6 @@ struct BindgenOptions {
1277
1218
/// Whether we should generate builtins or not.
1278
1219
builtins : bool ,
1279
1220
1280
- /// The set of libraries we should link in the generated Rust code.
1281
- links : Vec < ( String , LinkType ) > ,
1282
-
1283
1221
/// True if we should dump the Clang AST for debugging purposes.
1284
1222
emit_ast : bool ,
1285
1223
@@ -1484,7 +1422,6 @@ impl Default for BindgenOptions {
1484
1422
rustified_enums : Default :: default ( ) ,
1485
1423
constified_enum_modules : Default :: default ( ) ,
1486
1424
builtins : false ,
1487
- links : vec ! [ ] ,
1488
1425
emit_ast : false ,
1489
1426
emit_ir : false ,
1490
1427
emit_ir_graphviz : None ,
@@ -1529,19 +1466,6 @@ impl Default for BindgenOptions {
1529
1466
}
1530
1467
}
1531
1468
1532
- /// The linking type to use with a given library.
1533
- ///
1534
- /// TODO: #104: This is ignored at the moment, but shouldn't be.
1535
- #[ derive( Debug , Copy , Clone , PartialEq , Eq , PartialOrd , Ord ) ]
1536
- pub enum LinkType {
1537
- /// Use shared library linking. This is the default.
1538
- Default ,
1539
- /// Use static linking.
1540
- Static ,
1541
- /// The library is an OSX framework.
1542
- Framework ,
1543
- }
1544
-
1545
1469
fn ensure_libclang_is_loaded ( ) {
1546
1470
if clang_sys:: is_loaded ( ) {
1547
1471
return ;
0 commit comments