summaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 1e02da2d..df794b64 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -235,18 +235,13 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> {
}
}
- // Windows platform has various different conventions than *nix platforms,
- // e.g. default enum underlying type, struct padding, mangling. Most tests
- // were written and checked on Linux and macOS, and thus they could fail on
- // Windows. We just make those tests targetting Linux instead as far as one
- // isn't annotated for a specific target.
- if cfg!(target_os = "windows") {
- if flags.iter().all(|flag| !flag.starts_with("--target=")) {
- if !flags.iter().any(|flag| flag == "--") {
- flags.push("--".into());
- }
- flags.push("--target=x86_64-unknown-linux".into());
+ // Different platforms have various different conventions like struct padding, mangling, etc.
+ // We make the default target as x86_64-unknown-linux
+ if flags.iter().all(|flag| !flag.starts_with("--target=")) {
+ if !flags.iter().any(|flag| flag == "--") {
+ flags.push("--".into());
}
+ flags.push("--target=x86_64-unknown-linux".into());
}
// Fool builder_from_flags() into believing it has real env::args_os...