File tree 3 files changed +11
-4
lines changed 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ name = "bindgen"
13
13
readme = " README.md"
14
14
repository = " https://github.com/servo/rust-bindgen"
15
15
documentation = " https://docs.rs/bindgen"
16
- version = " 0.23.0 "
16
+ version = " 0.23.1 "
17
17
build = " build.rs"
18
18
19
19
exclude = [
Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ fn main() {
32
32
. enable_cxx_namespaces ( )
33
33
. raw_line ( "pub use self::root::*;" )
34
34
. header ( "cpp/Test.h" )
35
- . clang_arg ( "-x" )
36
- . clang_arg ( "c++" )
37
- . clang_arg ( "-std=c++11" )
35
+ . clang_args ( & [ "-x" , "c++" , "-std=c++11" ] )
38
36
. parse_callbacks ( Box :: new ( MacroCallback { macros : macros. clone ( ) } ) )
39
37
. generate ( )
40
38
. expect ( "Unable to generate bindings" ) ;
Original file line number Diff line number Diff line change @@ -555,6 +555,15 @@ impl Builder {
555
555
self
556
556
}
557
557
558
+ /// Add arguments to be passed straight through to clang.
559
+ pub fn clang_args < I > ( mut self , iter : I ) -> Builder
560
+ where I : IntoIterator , I :: Item : AsRef < str > {
561
+ for arg in iter {
562
+ self . options . clang_args . push ( arg. as_ref ( ) . into ( ) ) ;
563
+ }
564
+ self
565
+ }
566
+
558
567
/// Make the generated bindings link the given shared library.
559
568
pub fn link < T : Into < String > > ( mut self , library : T ) -> Builder {
560
569
self . options . links . push ( ( library. into ( ) , LinkType :: Default ) ) ;
You can’t perform that action at this time.
0 commit comments