File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 1
- // bindgen-flags: -- -target i686-pc-win32
1
+ // bindgen-flags: -- -- target= i686-pc-win32
2
2
// bindgen-unstable
3
3
// bindgen-generate-bindings-on-linux-only
4
4
//
Original file line number Diff line number Diff line change @@ -235,18 +235,13 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> {
235
235
}
236
236
}
237
237
238
- // Windows platform has various different conventions than *nix platforms,
239
- // e.g. default enum underlying type, struct padding, mangling. Most tests
240
- // were written and checked on Linux and macOS, and thus they could fail on
241
- // Windows. We just make those tests targetting Linux instead as far as one
242
- // isn't annotated for a specific target.
243
- if cfg ! ( target_os = "windows" ) {
244
- if flags. iter ( ) . all ( |flag| !flag. starts_with ( "--target=" ) ) {
245
- if !flags. iter ( ) . any ( |flag| flag == "--" ) {
246
- flags. push ( "--" . into ( ) ) ;
247
- }
248
- flags. push ( "--target=x86_64-unknown-linux" . into ( ) ) ;
238
+ // Different platforms have various different conventions like struct padding, mangling, etc.
239
+ // We make the default target as x86_64-unknown-linux
240
+ if flags. iter ( ) . all ( |flag| !flag. starts_with ( "--target=" ) ) {
241
+ if !flags. iter ( ) . any ( |flag| flag == "--" ) {
242
+ flags. push ( "--" . into ( ) ) ;
249
243
}
244
+ flags. push ( "--target=x86_64-unknown-linux" . into ( ) ) ;
250
245
}
251
246
252
247
// Fool builder_from_flags() into believing it has real env::args_os...
You can’t perform that action at this time.
0 commit comments