diff --git a/build_sysroot/Cargo.lock b/build_sysroot/Cargo.lock index 0cf603a14a3..f23e44f8d18 100644 --- a/build_sysroot/Cargo.lock +++ b/build_sysroot/Cargo.lock @@ -1,27 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -dependencies = [ - "compiler_builtins", - "gimli", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-core", -] - [[package]] name = "alloc" version = "0.0.0" @@ -45,6 +23,32 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +[[package]] +name = "backtrace" +version = "0.3.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" +dependencies = [ + "backtrace-sys", + "cfg-if", + "compiler_builtins", + "libc", + "rustc-demangle", + "rustc-std-workspace-core", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" +dependencies = [ + "cc", + "compiler_builtins", + "libc", + "rustc-std-workspace-core", +] + [[package]] name = "cc" version = "1.0.58" @@ -106,17 +110,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "gimli" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - [[package]] name = "hashbrown" version = "0.6.3" @@ -149,29 +142,6 @@ dependencies = [ "rustc-std-workspace-core", ] -[[package]] -name = "miniz_oxide" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" -dependencies = [ - "adler", - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "object" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - [[package]] name = "panic_abort" version = "0.0.0" @@ -236,8 +206,8 @@ dependencies = [ name = "std" version = "0.0.0" dependencies = [ - "addr2line", "alloc", + "backtrace", "cfg-if", "compiler_builtins", "core", @@ -246,11 +216,8 @@ dependencies = [ "hashbrown", "hermit-abi", "libc", - "miniz_oxide", - "object", "panic_abort", "panic_unwind", - "rustc-demangle", "unwind", "wasi", ] diff --git a/build_sysroot/Cargo.toml b/build_sysroot/Cargo.toml index 339e0d5fdc7..e562dedb532 100644 --- a/build_sysroot/Cargo.toml +++ b/build_sysroot/Cargo.toml @@ -4,18 +4,18 @@ name = "sysroot" version = "0.0.0" [dependencies] -core = { path = "./sysroot_src/src/libcore" } +core = { path = "./sysroot_src/library/core" } compiler_builtins = "0.1" -alloc = { path = "./sysroot_src/src/liballoc" } -std = { path = "./sysroot_src/src/libstd", features = ["panic_unwind", "backtrace"] } -test = { path = "./sysroot_src/src/libtest" } +alloc = { path = "./sysroot_src/library/alloc" } +std = { path = "./sysroot_src/library/std", features = ["panic_unwind", "backtrace"] } +test = { path = "./sysroot_src/library/test" } alloc_system = { path = "./alloc_system" } [patch.crates-io] -rustc-std-workspace-core = { path = "./sysroot_src/src/tools/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "./sysroot_src/src/tools/rustc-std-workspace-alloc" } -rustc-std-workspace-std = { path = "./sysroot_src/src/tools/rustc-std-workspace-std" } +rustc-std-workspace-core = { path = "./sysroot_src/library/rustc-std-workspace-core" } +rustc-std-workspace-alloc = { path = "./sysroot_src/library/rustc-std-workspace-alloc" } +rustc-std-workspace-std = { path = "./sysroot_src/library/rustc-std-workspace-std" } [profile.dev] lto = "off" diff --git a/build_sysroot/alloc_system/Cargo.toml b/build_sysroot/alloc_system/Cargo.toml index 221faab32bd..9fffca84300 100644 --- a/build_sysroot/alloc_system/Cargo.toml +++ b/build_sysroot/alloc_system/Cargo.toml @@ -8,6 +8,6 @@ path = "lib.rs" test = false doc = false [dependencies] -core = { path = "../sysroot_src/src/libcore" } +core = { path = "../sysroot_src/library/core" } libc = { version = "0.2.43", features = ['rustc-dep-of-std'], default-features = false } compiler_builtins = "0.1" diff --git a/build_sysroot/prepare_sysroot_src.sh b/build_sysroot/prepare_sysroot_src.sh index 882454754ed..14aa77478f5 100755 --- a/build_sysroot/prepare_sysroot_src.sh +++ b/build_sysroot/prepare_sysroot_src.sh @@ -11,8 +11,8 @@ if [ ! -e $SRC_DIR ]; then fi rm -rf $DST_DIR -mkdir -p $DST_DIR/src -cp -r $SRC_DIR/src $DST_DIR/ +mkdir -p $DST_DIR/library +cp -r $SRC_DIR/library $DST_DIR/ pushd $DST_DIR echo "[GIT] init" diff --git a/patches/0016-Disable-cpuid-intrinsic.patch b/patches/0016-Disable-cpuid-intrinsic.patch index 0cccdb13ad6..c1d24c3c0c5 100644 --- a/patches/0016-Disable-cpuid-intrinsic.patch +++ b/patches/0016-Disable-cpuid-intrinsic.patch @@ -4,13 +4,13 @@ Date: Sat, 6 Apr 2019 12:16:21 +0200 Subject: [PATCH] Remove usage of unsized locals --- - src/stdarch/crates/core_arch/src/x86/cpuid.rs | 2 ++ + library/stdarch/crates/core_arch/src/x86/cpuid.rs | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) -diff --git a/src/stdarch/crates/core_arch/src/x86/cpuid.rs b/src/stdarch/crates/core_arch/src/x86/cpuid.rs +diff --git a/library/stdarch/crates/core_arch/src/x86/cpuid.rs b/library/stdarch/crates/core_arch/src/x86/cpuid.rs index f313c42..ff952bc 100644 ---- a/src/stdarch/crates/core_arch/src/x86/cpuid.rs -+++ b/src/stdarch/crates/core_arch/src/x86/cpuid.rs +--- a/library/stdarch/crates/core_arch/src/x86/cpuid.rs ++++ b/library/stdarch/crates/core_arch/src/x86/cpuid.rs @@ -84,6 +84,11 @@ pub unsafe fn __cpuid(leaf: u32) -> CpuidResult { /// Does the host support the `cpuid` instruction? #[inline] diff --git a/patches/0022-core-Disable-not-compiling-tests.patch b/patches/0022-core-Disable-not-compiling-tests.patch index 282d476bd75..213b7bb5f29 100644 --- a/patches/0022-core-Disable-not-compiling-tests.patch +++ b/patches/0022-core-Disable-not-compiling-tests.patch @@ -4,20 +4,20 @@ Date: Sun, 24 Nov 2019 15:10:23 +0100 Subject: [PATCH] [core] Disable not compiling tests --- - src/libcore/tests/Cargo.toml | 8 ++++++++ - src/libcore/tests/num/flt2dec/mod.rs | 1 - - src/libcore/tests/num/int_macros.rs | 2 ++ - src/libcore/tests/num/uint_macros.rs | 2 ++ - src/libcore/tests/ptr.rs | 2 ++ - src/libcore/tests/slice.rs | 2 ++ + library/core/tests/Cargo.toml | 8 ++++++++ + library/core/tests/num/flt2dec/mod.rs | 1 - + library/core/tests/num/int_macros.rs | 2 ++ + library/core/tests/num/uint_macros.rs | 2 ++ + library/core/tests/ptr.rs | 2 ++ + library/core/tests/slice.rs | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) - create mode 100644 src/libcore/tests/Cargo.toml + create mode 100644 library/core/tests/Cargo.toml -diff --git a/src/libcore/tests/Cargo.toml b/src/libcore/tests/Cargo.toml +diff --git a/library/core/tests/Cargo.toml b/library/core/tests/Cargo.toml new file mode 100644 index 0000000..46fd999 --- /dev/null -+++ b/src/libcore/tests/Cargo.toml ++++ b/library/core/tests/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "core" @@ -27,10 +27,10 @@ index 0000000..46fd999 +[lib] +name = "coretests" +path = "lib.rs" -diff --git a/src/libcore/tests/num/flt2dec/mod.rs b/src/libcore/tests/num/flt2dec/mod.rs +diff --git a/library/core/tests/num/flt2dec/mod.rs b/library/core/tests/num/flt2dec/mod.rs index a35897e..f0bf645 100644 ---- a/src/libcore/tests/num/flt2dec/mod.rs -+++ b/src/libcore/tests/num/flt2dec/mod.rs +--- a/library/core/tests/num/flt2dec/mod.rs ++++ b/library/core/tests/num/flt2dec/mod.rs @@ -13,7 +13,6 @@ mod strategy { mod dragon; mod grisu; @@ -39,10 +39,10 @@ index a35897e..f0bf645 100644 pub fn decode_finite(v: T) -> Decoded { match decode(v).1 { -diff --git a/src/libcore/tests/num/int_macros.rs b/src/libcore/tests/num/int_macros.rs +diff --git a/library/core/tests/num/int_macros.rs b/library/core/tests/num/int_macros.rs index 0475aeb..9558198 100644 ---- a/src/libcore/tests/num/int_macros.rs -+++ b/src/libcore/tests/num/int_macros.rs +--- a/library/core/tests/num/int_macros.rs ++++ b/library/core/tests/num/int_macros.rs @@ -88,6 +88,7 @@ mod tests { assert_eq!(x.trailing_ones(), 0); } @@ -59,10 +59,10 @@ index 0475aeb..9558198 100644 #[test] fn test_swap_bytes() { -diff --git a/src/libcore/tests/num/uint_macros.rs b/src/libcore/tests/num/uint_macros.rs +diff --git a/library/core/tests/num/uint_macros.rs b/library/core/tests/num/uint_macros.rs index 04ed14f..a6e372e 100644 ---- a/src/libcore/tests/num/uint_macros.rs -+++ b/src/libcore/tests/num/uint_macros.rs +--- a/library/core/tests/num/uint_macros.rs ++++ b/library/core/tests/num/uint_macros.rs @@ -52,6 +52,7 @@ mod tests { assert_eq!(x.trailing_ones(), 0); } @@ -79,10 +79,10 @@ index 04ed14f..a6e372e 100644 #[test] fn test_swap_bytes() { -diff --git a/src/libcore/tests/ptr.rs b/src/libcore/tests/ptr.rs +diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index 1a6be3a..42dbd59 100644 ---- a/src/libcore/tests/ptr.rs -+++ b/src/libcore/tests/ptr.rs +--- a/library/core/tests/ptr.rs ++++ b/library/core/tests/ptr.rs @@ -250,6 +250,7 @@ fn test_unsized_nonnull() { assert!(ys == zs); } @@ -99,10 +99,10 @@ index 1a6be3a..42dbd59 100644 #[test] #[cfg_attr(miri, ignore)] // Miri does not compute a maximal `mid` for `align_offset` -diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs +diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index 6609bc3..241b497 100644 ---- a/src/libcore/tests/slice.rs -+++ b/src/libcore/tests/slice.rs +--- a/library/core/tests/slice.rs ++++ b/library/core/tests/slice.rs @@ -1209,6 +1209,7 @@ fn brute_force_rotate_test_1() { } } diff --git a/patches/0023-core-Ignore-failing-tests.patch b/patches/0023-core-Ignore-failing-tests.patch index e1d0cdcd42b..8104b8d767a 100644 --- a/patches/0023-core-Ignore-failing-tests.patch +++ b/patches/0023-core-Ignore-failing-tests.patch @@ -4,16 +4,16 @@ Date: Sun, 24 Nov 2019 15:34:06 +0100 Subject: [PATCH] [core] Ignore failing tests --- - src/libcore/tests/iter.rs | 4 ++++ - src/libcore/tests/num/bignum.rs | 10 ++++++++++ - src/libcore/tests/num/mod.rs | 5 +++-- - src/libcore/tests/time.rs | 1 + + library/core/tests/iter.rs | 4 ++++ + library/core/tests/num/bignum.rs | 10 ++++++++++ + library/core/tests/num/mod.rs | 5 +++-- + library/core/tests/time.rs | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) -diff --git a/src/libcore/tests/array.rs b/src/libcore/tests/array.rs +diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs index 4bc44e9..8e3c7a4 100644 ---- a/src/libcore/tests/array.rs -+++ b/src/libcore/tests/array.rs +--- a/library/core/tests/array.rs ++++ b/library/core/tests/array.rs @@ -242,6 +242,7 @@ fn iterator_drops() { assert_eq!(i.get(), 5); } @@ -30,10 +30,10 @@ index 4bc44e9..8e3c7a4 100644 #[test] fn empty_array_is_always_default() { -diff --git a/src/libcore/tests/num/mod.rs b/src/libcore/tests/num/mod.rs +diff --git a/library/core/tests/num/mod.rs b/library/core/tests/num/mod.rs index a17c094..5bb11d2 100644 ---- a/src/libcore/tests/num/mod.rs -+++ b/src/libcore/tests/num/mod.rs +--- a/library/core/tests/num/mod.rs ++++ b/library/core/tests/num/mod.rs @@ -651,11 +651,12 @@ macro_rules! test_float { assert_eq!((9.0 as $fty).min($neginf), $neginf); assert_eq!(($neginf as $fty).min(-9.0), $neginf); diff --git a/patches/0025-Remove-usage-of-extern_weak-in-thread_local_dtor.patch b/patches/0025-Remove-usage-of-extern_weak-in-thread_local_dtor.patch index 0a25e6b3302..29b891c6eb5 100644 --- a/patches/0025-Remove-usage-of-extern_weak-in-thread_local_dtor.patch +++ b/patches/0025-Remove-usage-of-extern_weak-in-thread_local_dtor.patch @@ -4,13 +4,13 @@ Date: Fri, 10 Apr 2020 13:47:42 +0200 Subject: [PATCH] Remove usage of extern_weak in thread_local_dtor --- - src/libstd/sys/unix/thread_local_dtor.rs | 20 -------------------- + library/std/src/sys/unix/thread_local_dtor.rs | 20 -------------------- 1 files changed, 0 insertions(+), 20 deletions(-) -diff --git a/src/libstd/sys/unix/thread_local_dtor.rs b/src/libstd/sys/unix/thread_local_dtor.rs +diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs index 8730b4d..8d6e3d5 100644 ---- a/src/libstd/sys/unix/thread_local_dtor.rs -+++ b/src/libstd/sys/unix/thread_local_dtor.rs +--- a/library/std/src/sys/unix/thread_local_dtor.rs ++++ b/library/std/src/sys/unix/thread_local_dtor.rs @@ -15,28 +15,8 @@ target_os = "emscripten" ))] diff --git a/rust-toolchain b/rust-toolchain index 3e0f3c66632..3f271bd5c84 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-07-23 +nightly-2020-07-30