File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -56,5 +56,6 @@ harness = false
56
56
default = [" stack-cache" ]
57
57
stack-cache = []
58
58
59
- [profile .dev ]
60
- opt-level = 2 # because it's too slow otherwise
59
+ # Be aware that this file is inside a workspace when used via the
60
+ # submodule in the rustc repo. That means there are many cargo features
61
+ # we cannot use, such as profiles.
Original file line number Diff line number Diff line change 96
96
97
97
# Prepare flags for cargo and rustc.
98
98
CARGO=" cargo +$TOOLCHAIN "
99
+ # Share target dir between `miri` and `cargo-miri`.
99
100
if [ -z " $CARGO_TARGET_DIR " ]; then
100
- # Share target dir between `miri` and `cargo-miri`.
101
101
export CARGO_TARGET_DIR=" $MIRIDIR /target"
102
102
fi
103
+ # We configure dev builds to not be unusably slow.
104
+ if [ -z " $CARGO_PROFILE_DEV_OPT_LEVEL " ]; then
105
+ export CARGO_PROFILE_DEV_OPT_LEVEL=2
106
+ fi
103
107
# We set the rpath so that Miri finds the private rustc libraries it needs.
104
108
export RUSTFLAGS=" -C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS "
105
109
You can’t perform that action at this time.
0 commit comments