Skip to content

[0.2] Require rust >= 1.25 and drop libc_align conditional #4057

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 1 commit into from
Nov 16, 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
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,13 @@ rustc-std-workspace-core = { version = "1.0.0", optional = true }
[features]
default = ["std"]
std = []
align = []
rustc-dep-of-std = ['align', 'rustc-std-workspace-core']
extra_traits = []
const-extern-fn = []

# `align` is deprecated and no longer does anything
align = []

# use_std is deprecated, use `std` instead
use_std = ['std']

Expand Down
7 changes: 0 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
"freebsd13",
"freebsd14",
"freebsd15",
"libc_align",
"libc_cfg_target_vendor",
"libc_const_extern_fn",
"libc_const_extern_fn_unstable",
Expand Down Expand Up @@ -51,7 +50,6 @@ 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 align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();
let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok();
let libc_ci = env::var("LIBC_CI").is_ok();
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80;
Expand Down Expand Up @@ -96,11 +94,6 @@ fn main() {
set_cfg("libc_deny_warnings");
}

// Rust >= 1.25 supports repr(align):
if rustc_minor_ver >= 25 || rustc_dep_of_std || align_cargo_feature {
set_cfg("libc_align");
}

// Rust >= 1.26 supports i128 and u128:
if rustc_minor_ver >= 26 || rustc_dep_of_std {
set_cfg("libc_int128");
Expand Down
7 changes: 1 addition & 6 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ fn do_ctest() {

fn ctest_cfg() -> ctest::TestGenerator {
let mut cfg = ctest::TestGenerator::new();
let libc_cfgs = [
"libc_align",
"libc_core_cvoid",
"libc_packedN",
"libc_thread_local",
];
let libc_cfgs = ["libc_core_cvoid", "libc_packedN", "libc_thread_local"];
for f in &libc_cfgs {
cfg.cfg(f, None);
}
Expand Down
142 changes: 0 additions & 142 deletions src/fuchsia/align.rs

This file was deleted.

Loading