Skip to content

Commit

Permalink
Revert "Fix invalid freebsd version selection"
Browse files Browse the repository at this point in the history
This reverts commit 53e79b8.

PR rust-lang#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.
  • Loading branch information
asomers committed Dec 10, 2021
1 parent 6b9d509 commit 727d37a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build.rs
Expand Up @@ -25,11 +25,13 @@ fn main() {
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
// running tests to ensure that the ABI is correct.
match which_freebsd() {
Some(10) => println!("cargo:rustc-cfg=freebsd10"),
Some(11) => println!("cargo:rustc-cfg=freebsd11"),
Some(12) => println!("cargo:rustc-cfg=freebsd12"),
Some(13) => println!("cargo:rustc-cfg=freebsd13"),
Some(14) => println!("cargo:rustc-cfg=freebsd14"),
Some(10) if libc_ci || rustc_dep_of_std => {
println!("cargo:rustc-cfg=freebsd10")
}
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
Some(14) if libc_ci => println!("cargo:rustc-cfg=freebsd14"),
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
}

Expand Down

0 comments on commit 727d37a

Please sign in to comment.