diff options
author | Alan Somers <asomers@gmail.com> | 2021-12-10 09:05:37 -0700 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-12-10 09:05:37 -0700 |
commit | 727d37a0162108381baea64ffabca7c9a8714600 (patch) | |
tree | d9052297a014bf0bce7fa309b365399f56d8bc91 | |
parent | 6b9d5099d103df9b076778d97c3607b2ed2729a9 (diff) | |
download | rust-libc-727d37a0162108381baea64ffabca7c9a8714600.tar.gz |
Revert "Fix invalid freebsd version selection"
This reverts commit 53e79b886bf4e4d3682ae6669e3585b3586e5255.
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.
-rw-r--r-- | build.rs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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"), } |