File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 28
28
. usage ( "bindgen [FLAGS] [OPTIONS] <header> -- <clang-args>..." )
29
29
. args ( & [
30
30
Arg :: with_name ( "header" )
31
- . help ( "C or C++ header file" )
32
- . required ( true ) ,
31
+ . help ( "C or C++ header file" ) ,
33
32
Arg :: with_name ( "depfile" )
34
33
. long ( "depfile" )
35
34
. takes_value ( true )
@@ -534,11 +533,19 @@ where
534
533
Arg :: with_name ( "explicit-padding" )
535
534
. long ( "explicit-padding" )
536
535
. help ( "Always output explicit padding fields." ) ,
536
+ Arg :: with_name ( "clang-version" )
537
+ . long ( "clang-version" )
538
+ . help ( "Prints the clang version, and exits" ) ,
537
539
] ) // .args()
538
540
. get_matches_from ( args) ;
539
541
540
542
let mut builder = builder ( ) ;
541
543
544
+ if matches. is_present ( "clang-version" ) {
545
+ println ! ( "{}" , crate :: clang_version( ) . full) ;
546
+ std:: process:: exit ( 0 ) ;
547
+ }
548
+
542
549
if let Some ( header) = matches. value_of ( "header" ) {
543
550
builder = builder. header ( header) ;
544
551
} else {
You can’t perform that action at this time.
0 commit comments