Rollup merge of #127021 - thesummer:1-add-target-support-for-rtems-ar… · patricklam/verify-rust-std@3d2a91f

20 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -43,6 +43,8 @@ check-cfg = [

4343

'cfg(bootstrap)',

4444

'cfg(no_fp_fmt_parse)',

4545

'cfg(stdarch_intel_sde)',

46+

# #[cfg(bootstrap)] rtems

47+

'cfg(target_os, values("rtems"))',

4648

# core use #[path] imports to portable-simd `core_simd` crate

4749

# and to stdarch `core_arch` crate which messes-up with Cargo list

4850

# of declared features, we therefor expect any feature cfg

Original file line numberDiff line numberDiff line change

@@ -110,7 +110,7 @@ mod c_char_definition {

110110

all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),

111111

all(target_os = "l4re", target_arch = "x86_64"),

112112

all(

113-

any(target_os = "freebsd", target_os = "openbsd"),

113+

any(target_os = "freebsd", target_os = "openbsd", target_os = "rtems"),

114114

any(

115115

target_arch = "aarch64",

116116

target_arch = "arm",

Original file line numberDiff line numberDiff line change

@@ -20,3 +20,10 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }

2020
2121

[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]

2222

libc = { version = "0.2", default-features = false }

23+
24+

[lints.rust.unexpected_cfgs]

25+

level = "warn"

26+

check-cfg = [

27+

# #[cfg(bootstrap)] rtems

28+

'cfg(target_os, values("rtems"))',

29+

]

Original file line numberDiff line numberDiff line change

@@ -48,7 +48,7 @@ cfg_if::cfg_if! {

4848

target_os = "psp",

4949

target_os = "xous",

5050

target_os = "solid_asp3",

51-

all(target_family = "unix", not(target_os = "espidf")),

51+

all(target_family = "unix", not(any(target_os = "espidf", target_os = "rtems"))),

5252

all(target_vendor = "fortanix", target_env = "sgx"),

5353

target_family = "wasm",

5454

))] {

Original file line numberDiff line numberDiff line change

@@ -146,4 +146,6 @@ check-cfg = [

146146

# and to the `backtrace` crate which messes-up with Cargo list

147147

# of declared features, we therefor expect any feature cfg

148148

'cfg(feature, values(any()))',

149+

# #[cfg(bootstrap)] rtems

150+

'cfg(target_os, values("rtems"))',

149151

]

Original file line numberDiff line numberDiff line change

@@ -53,6 +53,7 @@ fn main() {

5353

|| target_os == "uefi"

5454

|| target_os == "teeos"

5555

|| target_os == "zkvm"

56+

|| target_os == "rtems"

5657
5758

// See src/bootstrap/src/core/build_steps/synthetic_targets.rs

5859

|| env::var("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET").is_ok()

Original file line numberDiff line numberDiff line change

@@ -143,6 +143,8 @@ pub mod nto;

143143

pub mod openbsd;

144144

#[cfg(target_os = "redox")]

145145

pub mod redox;

146+

#[cfg(target_os = "rtems")]

147+

pub mod rtems;

146148

#[cfg(target_os = "solaris")]

147149

pub mod solaris;

148150

#[cfg(target_os = "solid_asp3")]