Skip to content

Commit c9c8872

Browse files
committed
Auto merge of #2585 - asomers:revert-pr2581, r=Amanieu
Revert "Fix invalid freebsd version selection" This reverts commit 53e79b8. PR #2581 unintentionally changed libc's bindings from the FreeBSD 11 ABI to the native ABI of the build host. This is causing breakage for many downstream crates.
2 parents 6b9d509 + 727d37a commit c9c8872

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

build.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ fn main() {
2525
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
2626
// running tests to ensure that the ABI is correct.
2727
match which_freebsd() {
28-
Some(10) => println!("cargo:rustc-cfg=freebsd10"),
29-
Some(11) => println!("cargo:rustc-cfg=freebsd11"),
30-
Some(12) => println!("cargo:rustc-cfg=freebsd12"),
31-
Some(13) => println!("cargo:rustc-cfg=freebsd13"),
32-
Some(14) => println!("cargo:rustc-cfg=freebsd14"),
28+
Some(10) if libc_ci || rustc_dep_of_std => {
29+
println!("cargo:rustc-cfg=freebsd10")
30+
}
31+
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
32+
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
33+
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
34+
Some(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"),
3335
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
3436
}
3537

0 commit comments

Comments
 (0)