diff options
author | Baoshan <pangbw@gmail.com> | 2019-09-24 13:40:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 13:40:28 -0700 |
commit | a195fd4ac69622e74b759ec374956d7332ff8422 (patch) | |
tree | c4da8d715e8b24c4e8486943eab8e989cc894048 /build.rs | |
parent | 7f753ce510cb9a920d44d0c447f705f03473edc3 (diff) | |
parent | 90269e85baa534679ca0c29348a83c1918925a72 (diff) | |
download | rust-libc-a195fd4ac69622e74b759ec374956d7332ff8422.tar.gz |
Merge pull request #17 from rust-lang/master
Sync to rust-lang/libc branch master
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), |