Skip to content

[main] backport allow check-cfg for rust 1.80 #3687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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