Skip to content

Commit b5b553d

Browse files
Require rust >= 1.25 and drop libc_align conditional
This is mostly taken from Josh's work at [1], I just updated to account for conflicts and new uses of `libc_align`. [1]: #2845 Co-authored-by: Josh Triplett <josh@joshtriplett.org>
1 parent 93406f8 commit b5b553d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+1839
-2867
lines changed

Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,13 @@ rustc-std-workspace-core = { version = "1.0.0", optional = true }
139139
[features]
140140
default = ["std"]
141141
std = []
142-
align = []
143142
rustc-dep-of-std = ['align', 'rustc-std-workspace-core']
144143
extra_traits = []
145144
const-extern-fn = []
145+
146+
# `align` is deprecated and no longer does anything
147+
align = []
148+
146149
# use_std is deprecated, use `std` instead
147150
use_std = ['std']
148151

build.rs

-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1414
"freebsd13",
1515
"freebsd14",
1616
"freebsd15",
17-
"libc_align",
1817
"libc_cfg_target_vendor",
1918
"libc_const_extern_fn",
2019
"libc_const_extern_fn_unstable",
@@ -51,7 +50,6 @@ fn main() {
5150

5251
let (rustc_minor_ver, is_nightly) = rustc_minor_nightly();
5352
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
54-
let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();
5553
let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok();
5654
let libc_ci = env::var("LIBC_CI").is_ok();
5755
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80;
@@ -96,11 +94,6 @@ fn main() {
9694
set_cfg("libc_deny_warnings");
9795
}
9896

99-
// Rust >= 1.25 supports repr(align):
100-
if rustc_minor_ver >= 25 || rustc_dep_of_std || align_cargo_feature {
101-
set_cfg("libc_align");
102-
}
103-
10497
// Rust >= 1.26 supports i128 and u128:
10598
if rustc_minor_ver >= 26 || rustc_dep_of_std {
10699
set_cfg("libc_int128");

libc-test/build.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ fn do_ctest() {
6767

6868
fn ctest_cfg() -> ctest::TestGenerator {
6969
let mut cfg = ctest::TestGenerator::new();
70-
let libc_cfgs = [
71-
"libc_align",
72-
"libc_core_cvoid",
73-
"libc_packedN",
74-
"libc_thread_local",
75-
];
70+
let libc_cfgs = ["libc_core_cvoid", "libc_packedN", "libc_thread_local"];
7671
for f in &libc_cfgs {
7772
cfg.cfg(f, None);
7873
}

src/fuchsia/align.rs

-142
This file was deleted.

0 commit comments

Comments
 (0)