Skip to content

Commit d0695c9

Browse files
committed
Auto merge of rust-lang#83776 - jyn514:update-stdarch-docs, r=Amanieu
Update stdarch submodule (to before it switched to const generics) rust-lang#83278 (comment): This unblocks rust-lang#82539. Major changes: - More AVX-512 intrinsics. - More ARM & AArch64 NEON intrinsics. - Updated unstable WASM intrinsics to latest draft standards. - std_detect is now a separate crate instead of a submodule of std. I double-checked and the first use of const generics looks like rust-lang/stdarch@8d50178, which isn't included in this PR. r? `@Amanieu`
2 parents 1284da3 + 1b0b7e9 commit d0695c9

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

Diff for: Cargo.lock

+12
Original file line numberDiff line numberDiff line change
@@ -5034,10 +5034,22 @@ dependencies = [
50345034
"profiler_builtins",
50355035
"rand 0.7.3",
50365036
"rustc-demangle",
5037+
"std_detect",
50375038
"unwind",
50385039
"wasi",
50395040
]
50405041

5042+
[[package]]
5043+
name = "std_detect"
5044+
version = "0.1.5"
5045+
dependencies = [
5046+
"cfg-if 0.1.10",
5047+
"compiler_builtins",
5048+
"libc",
5049+
"rustc-std-workspace-alloc",
5050+
"rustc-std-workspace-core",
5051+
]
5052+
50415053
[[package]]
50425054
name = "string_cache"
50435055
version = "0.8.0"

Diff for: Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ exclude = [
4545
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
4646
# so it can be invoked before the current checkout is set up.
4747
"src/tools/x",
48+
# stdarch has its own Cargo workspace
49+
"library/stdarch",
4850
]
4951

5052
[profile.release.package.compiler_builtins]

Diff for: library/std/Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ compiler_builtins = { version = "0.1.39" }
2121
profiler_builtins = { path = "../profiler_builtins", optional = true }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep-of-std'] }
24+
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
2425

2526
# Dependencies of the `backtrace` crate
2627
addr2line = { version = "0.14.0", optional = true, default-features = false }
@@ -70,8 +71,8 @@ panic_immediate_abort = ["core/panic_immediate_abort"]
7071

7172
# Enable std_detect default features for stdarch/crates/std_detect:
7273
# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
73-
std_detect_file_io = []
74-
std_detect_dlsym_getauxval = []
74+
std_detect_file_io = ["std_detect/std_detect_file_io"]
75+
std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"]
7576

7677
[package.metadata.fortanix-sgx]
7778
# Maximum possible number of threads when testing

Diff for: library/std/src/lib.rs

+8-14
Original file line numberDiff line numberDiff line change
@@ -538,22 +538,16 @@ pub mod rt;
538538
#[allow(dead_code, unused_attributes)]
539539
mod backtrace_rs;
540540

541-
// Pull in the `std_detect` crate directly into libstd. The contents of
542-
// `std_detect` are in a different repository: rust-lang/stdarch.
543-
//
544-
// `std_detect` depends on libstd, but the contents of this module are
545-
// set up in such a way that directly pulling it here works such that the
546-
// crate uses the this crate as its libstd.
547-
#[path = "../../stdarch/crates/std_detect/src/mod.rs"]
548-
#[allow(missing_debug_implementations, missing_docs, dead_code)]
549-
#[unstable(feature = "stdsimd", issue = "48556")]
550-
#[cfg(not(test))]
551-
mod std_detect;
552-
541+
#[stable(feature = "simd_x86", since = "1.27.0")]
542+
pub use std_detect::is_x86_feature_detected;
553543
#[doc(hidden)]
554544
#[unstable(feature = "stdsimd", issue = "48556")]
555-
#[cfg(not(test))]
556-
pub use std_detect::detect;
545+
pub use std_detect::*;
546+
#[unstable(feature = "stdsimd", issue = "48556")]
547+
pub use std_detect::{
548+
is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
549+
is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
550+
};
557551

558552
// Re-export macros defined in libcore.
559553
#[stable(feature = "rust1", since = "1.0.0")]

Diff for: library/stdarch

Submodule stdarch updated 57 files

0 commit comments

Comments
 (0)