Skip to content

Commit

Permalink
Merge pull request #3687 from tesuji/backport-3684
Browse files Browse the repository at this point in the history
[main] backport allow check-cfg for rust 1.80
  • Loading branch information
JohnTitor authored May 7, 2024
2 parents 2cef0c9 + 5b2fa07 commit 8b9d1fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::str;
// make sure to add it to this list as well.
const ALLOWED_CFGS: &'static [&'static str] = &[
"emscripten_new_stat_abi",
"espidf_time64",
"freebsd10",
"freebsd11",
"freebsd12",
Expand Down Expand Up @@ -35,7 +36,7 @@ fn main() {
let (rustc_minor_ver, is_nightly) = rustc_minor_nightly();
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let libc_ci = env::var("LIBC_CI").is_ok();
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok();
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80;
let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok();

// The ABI of libc used by std is backward compatible with FreeBSD 12.
Expand Down
14 changes: 2 additions & 12 deletions ci/switch.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
{
"family": "unix",
"env": "newlib",
"target-env": "newlib",
"target-family": "unix",
"target-c-int-width": "32",
"target-endian": "little",
"target-pointer-width": "64",
"os": "horizon",
"arch": "aarch64",
"panic-strategy": "unwind",
"abi-blacklist": [
"stdcall",
"fastcall",
"vectorcall",
"thiscall",
"win64",
"sysv64"
],
"dynamic-linking" : false,
"features": "+a53,+strict-align",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"executables": true,
"position-independent-executables" : true,
"linker-flavor": "gcc",
"llvm-target": "aarch64-unknown-none",
"has-elf-tls" : false,
"has-thread-local": false,
"linker-is-gnu" : true,
"disable-redzone" : true,
"relocation-model" : "pic",
Expand All @@ -34,4 +24,4 @@
"trap-unreachable" : true,
"emit-debug-gdb-scripts" : true,
"requires-uwtable" : true
}
}
2 changes: 1 addition & 1 deletion libc-test/test/makedev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mod t {

// These OSes allow 32 bits for both minor and major
#[cfg(any(
target_os = "empscripten",
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "linux",
Expand Down

0 comments on commit 8b9d1fe

Please sign in to comment.