]> git.lizzy.rs Git - rust.git/commitdiff
Update stdarch submodule (to before it switched to const generics)
authorJoshua Nelson <jyn514@gmail.com>
Fri, 2 Apr 2021 08:11:46 +0000 (04:11 -0400)
committerJoshua Nelson <jyn514@gmail.com>
Mon, 12 Apr 2021 13:39:04 +0000 (09:39 -0400)
This also includes a cherry-pick of
https://github.com/rust-lang/stdarch/commit/ec1461905b421cf0c56adeebb49bbf55bb33fd17
and https://github.com/rust-lang/stdarch/pull/1108 to fix a build
failure.

It also adds a re-export of various macros to the crate root of libstd -
previously they would show up automatically because std_detect was defined
in the same crate.

Cargo.lock
Cargo.toml
library/std/Cargo.toml
library/std/src/lib.rs
library/stdarch

index 2d00f31e3159a9fde4aea8fa0e0dfbe77d315672..c91fbf6ef95b0a8b00ac62872a12b4f712daeaf2 100644 (file)
@@ -5032,10 +5032,22 @@ dependencies = [
  "profiler_builtins",
  "rand 0.7.3",
  "rustc-demangle",
+ "std_detect",
  "unwind",
  "wasi",
 ]
 
+[[package]]
+name = "std_detect"
+version = "0.1.5"
+dependencies = [
+ "cfg-if 0.1.10",
+ "compiler_builtins",
+ "libc",
+ "rustc-std-workspace-alloc",
+ "rustc-std-workspace-core",
+]
+
 [[package]]
 name = "string_cache"
 version = "0.8.0"
index f961d3e9b97be8033292979f9aab2e770a900fff..e630be47c4621e4a5dcd38e2269345e8edf98af1 100644 (file)
@@ -45,6 +45,8 @@ exclude = [
   # not all `Cargo.toml` files are available, so we exclude the `x` binary,
   # so it can be invoked before the current checkout is set up.
   "src/tools/x",
+  # stdarch has its own Cargo workspace
+  "library/stdarch",
 ]
 
 [profile.release.package.compiler_builtins]
index 22ca7ed09b42a92f852367a6855c66921d97d6f2..faa926857614e68fb4c3199d602bc9c2d7b36266 100644 (file)
@@ -21,6 +21,7 @@ compiler_builtins = { version = "0.1.39" }
 profiler_builtins = { path = "../profiler_builtins", optional = true }
 unwind = { path = "../unwind" }
 hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep-of-std'] }
+std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
 
 # Dependencies of the `backtrace` crate
 addr2line = { version = "0.14.0", optional = true, default-features = false }
@@ -70,8 +71,8 @@ panic_immediate_abort = ["core/panic_immediate_abort"]
 
 # Enable std_detect default features for stdarch/crates/std_detect:
 # https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
-std_detect_file_io = []
-std_detect_dlsym_getauxval = []
+std_detect_file_io = ["std_detect/std_detect_file_io"]
+std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"]
 
 [package.metadata.fortanix-sgx]
 # Maximum possible number of threads when testing
index 6baf9f2a464b2ed593b84e6000daa6685b0c40a4..3d92ee7c403206d9a757bde425f079f3f00cf9a1 100644 (file)
@@ -539,22 +539,16 @@ pub mod task {
 #[allow(dead_code, unused_attributes)]
 mod backtrace_rs;
 
-// Pull in the `std_detect` crate directly into libstd. The contents of
-// `std_detect` are in a different repository: rust-lang/stdarch.
-//
-// `std_detect` depends on libstd, but the contents of this module are
-// set up in such a way that directly pulling it here works such that the
-// crate uses the this crate as its libstd.
-#[path = "../../stdarch/crates/std_detect/src/mod.rs"]
-#[allow(missing_debug_implementations, missing_docs, dead_code)]
-#[unstable(feature = "stdsimd", issue = "48556")]
-#[cfg(not(test))]
-mod std_detect;
-
+#[stable(feature = "simd_x86", since = "1.27.0")]
+pub use std_detect::is_x86_feature_detected;
 #[doc(hidden)]
 #[unstable(feature = "stdsimd", issue = "48556")]
-#[cfg(not(test))]
-pub use std_detect::detect;
+pub use std_detect::*;
+#[unstable(feature = "stdsimd", issue = "48556")]
+pub use std_detect::{
+    is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
+    is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
+};
 
 // Re-export macros defined in libcore.
 #[stable(feature = "rust1", since = "1.0.0")]
index 9c732a56f67f54d12a0b4fd99993154906c95ea6..19f5459dd0f89e466b7bcaa0f69ecca90f21a4d1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 9c732a56f67f54d12a0b4fd99993154906c95ea6
+Subproject commit 19f5459dd0f89e466b7bcaa0f69ecca90f21a4d1