File tree 24 files changed +64
-203
lines changed
24 files changed +64
-203
lines changed Original file line number Diff line number Diff line change
1
+ # We set up our own workspace that contains the library crates.
2
+ # `./run-test.sh` makes the `library` folder a symlink to the right place.
3
+ # (Somehow, directly building things from `rustlib/src` does not work...)
1
4
[workspace ]
2
5
members = [
3
- " core_miri_test" ,
4
- " alloc_miri_test" ,
5
- " std_miri_test" ,
6
+ " library/std" ,
7
+ " library/sysroot" ,
6
8
]
7
9
8
10
exclude = [
9
11
# stdarch has its own Cargo workspace
10
12
" library/stdarch" ,
11
- " rust-src-patched/library/stdarch" ,
13
+ # this is just a staging ground for CI
14
+ " rust-src-patched" ,
12
15
]
16
+
17
+ [patch .crates-io ]
18
+ # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
19
+ # here
20
+ rustc-std-workspace-core = { path = ' library/rustc-std-workspace-core' }
21
+ rustc-std-workspace-alloc = { path = ' library/rustc-std-workspace-alloc' }
22
+ rustc-std-workspace-std = { path = ' library/rustc-std-workspace-std' }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 85
85
echo " ::endgroup::"
86
86
;;
87
87
simd)
88
- cd $MIRI_LIB_SRC /portable-simd
88
+ export CARGO_TARGET_DIR= $( pwd ) /target
89
89
export RUSTFLAGS=" -Ainternal_features ${RUSTFLAGS:- } "
90
90
export RUSTDOCFLAGS=" -Ainternal_features ${RUSTDOCFLAGS:- } "
91
+ cd $MIRI_LIB_SRC /portable-simd
91
92
92
93
echo " ::group::Testing portable-simd"
93
94
MIRIFLAGS=" $DEFAULTFLAGS " \
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set -euo pipefail
6
6
# # Usage:
7
7
# # ./run-test.sh TARGET
8
8
# # Environment variables:
9
- # # MIRI_LIB_SRC: The path to the Rust library directory (`library` ).
9
+ # # MIRI_LIB_SRC: The path to the Rust ` library` directory (optional ).
10
10
# # RUSTFLAGS: rustc flags (optional)
11
11
# # MIRIFLAGS: Miri flags (optional)
12
12
@@ -40,8 +40,11 @@ export STDARCH_TEST_EVERYTHING=1
40
40
# Needed to pass the STDARCH_TEST_EVERYTHING environment variable
41
41
export MIRIFLAGS=" ${MIRIFLAGS:- } -Zmiri-disable-isolation"
42
42
43
- cd $MIRI_LIB_SRC /stdarch
43
+ # Set library source dir
44
+ export MIRI_LIB_SRC=${MIRI_LIB_SRC:- $(rustc --print sysroot)/ lib/ rustlib/ src/ rust/ library}
45
+
46
+ export CARGO_TARGET_DIR=$( pwd) /target
44
47
cargo miri test \
48
+ --manifest-path=$MIRI_LIB_SRC /stdarch/crates/core_arch/Cargo.toml \
45
49
--target " $TARGET " \
46
- --manifest-path=crates/core_arch/Cargo.toml \
47
50
-- " ${TEST_ARGS[@]} "
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ ln -s "$MIRI_LIB_SRC" library
35
35
# use the rust-src lockfile
36
36
cp " $MIRI_LIB_SRC /../Cargo.lock" Cargo.lock
37
37
38
+ # This ensures that the "core" crate being built as part of `cargo miri test`
39
+ # is just a re-export of the sysroot crate, so we don't get duplicate lang items.
40
+ export MIRI_REPLACE_LIBRS_IF_NOT_TEST=1
41
+
38
42
# run test
39
- cd ./ ${CRATE} _miri_test
40
- cargo miri test " $@ "
43
+ export CARGO_TARGET_DIR= $( pwd ) /target
44
+ cargo miri test --manifest-path " library/ $CRATE /Cargo.toml " " $@ "
Original file line number Diff line number Diff line change
1
+ diff --git a/library/alloc/benches/lib.rs b/library/alloc/benches/lib.rs
2
+ index 638f343fb24..0561f49c967 100644
3
+ --- a/library/alloc/benches/lib.rs
4
+ +++ b/library/alloc/benches/lib.rs
5
+ @@ -1,6 +1,8 @@
6
+ // Disabling on android for the time being
7
+ // See https://github.com/rust-lang/rust/issues/73535#event-3477699747
8
+ #![cfg(not(target_os = "android"))]
9
+ + // Disabling in Miri as these would take too long.
10
+ + #![cfg(not(miri))]
11
+ #![feature(btree_extract_if)]
12
+ #![feature(iter_next_chunk)]
13
+ #![feature(repr_simd)]
14
+ diff --git a/library/core/benches/lib.rs b/library/core/benches/lib.rs
15
+ index 4d14b930e41..32d15c386cb 100644
16
+ --- a/library/core/benches/lib.rs
17
+ +++ b/library/core/benches/lib.rs
18
+ @@ -1,5 +1,7 @@
19
+ // wasm32 does not support benches (no time).
20
+ #![cfg(not(target_arch = "wasm32"))]
21
+ + // Disabling in Miri as these would take too long.
22
+ + #![cfg(not(miri))]
23
+ #![feature(flt2dec)]
24
+ #![feature(test)]
25
+ #![feature(trusted_random_access)]
26
+ diff --git a/library/std/benches/lib.rs b/library/std/benches/lib.rs
27
+ index 4d1cf7fab7b..1b21c230a0b 100644
28
+ --- a/library/std/benches/lib.rs
29
+ +++ b/library/std/benches/lib.rs
30
+ @@ -1,3 +1,5 @@
31
+ + // Disabling in Miri as these would take too long.
32
+ + #![cfg(not(miri))]
33
+ #![feature(test)]
34
+
35
+ extern crate test;
Original file line number Diff line number Diff line change 1
- nightly-2024-04-01
1
+ nightly-2024-04-06
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments