diff options
Diffstat (limited to 'build.rs')
-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"), } |