diff options
author | gnzlbg <gonzalobg88@gmail.com> | 2019-08-25 00:23:40 +0200 |
---|---|---|
committer | gnzlbg <gonzalobg88@gmail.com> | 2019-09-16 20:50:55 +0200 |
commit | 3843c7dba14529204eee5b64c5a44f792531d033 (patch) | |
tree | 48a14a60f06a0ed248c315f29d5dbb9c53efefc2 /build.rs | |
parent | 9b936e30116da305b799a74491c82ee2d2e8f678 (diff) | |
download | rust-libc-3843c7dba14529204eee5b64c5a44f792531d033.tar.gz |
Add FreeBSD10 support
This adds libc-test support for Freebsd10 and a CI build job that tests
FreeBSD10 with LIBC_CI only.
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -16,11 +16,15 @@ fn main() { ); } - // The ABI of libc is backward compatible with FreeBSD 11. + // The ABI of libc used by libstd is backward compatible with FreeBSD 10. + // The ABI of libc from crates.io is backward compatible with FreeBSD 11. // // 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) 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"), @@ -109,6 +113,7 @@ fn which_freebsd() -> Option<i32> { let stdout = stdout.unwrap(); match &stdout { + s if s.starts_with("10") => Some(10), s if s.starts_with("11") => Some(11), s if s.starts_with("12") => Some(12), s if s.starts_with("13") => Some(13), |