use env vars, not Cargo.toml, to configure out dev profile
This commit is contained in:
parent
b9c677112a
commit
bfd148b783
@ -56,5 +56,6 @@ harness = false
|
||||
default = ["stack-cache"]
|
||||
stack-cache = []
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 2 # because it's too slow otherwise
|
||||
# Be aware that this file is inside a workspace when used via the
|
||||
# submodule in the rustc repo. That means there are many cargo features
|
||||
# we cannot use, such as profiles.
|
||||
|
6
miri
6
miri
@ -96,10 +96,14 @@ fi
|
||||
|
||||
# Prepare flags for cargo and rustc.
|
||||
CARGO="cargo +$TOOLCHAIN"
|
||||
# Share target dir between `miri` and `cargo-miri`.
|
||||
if [ -z "$CARGO_TARGET_DIR" ]; then
|
||||
# Share target dir between `miri` and `cargo-miri`.
|
||||
export CARGO_TARGET_DIR="$MIRIDIR/target"
|
||||
fi
|
||||
# We configure dev builds to not be unusably slow.
|
||||
if [ -z "$CARGO_PROFILE_DEV_OPT_LEVEL" ]; then
|
||||
export CARGO_PROFILE_DEV_OPT_LEVEL=2
|
||||
fi
|
||||
# We set the rpath so that Miri finds the private rustc libraries it needs.
|
||||
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user