Skip to content

Commit

Permalink
Auto merge of #2385 - RalfJung:dev, r=RalfJung
Browse files Browse the repository at this point in the history
use env vars, not Cargo.toml, to configure out dev profile

This should fix the cargo warnings we are seeing in rustc.
  • Loading branch information
bors committed Jul 18, 2022
2 parents b9c6771 + bfd148b commit 220df5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 5 additions & 1 deletion miri
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 220df5f

Please sign in to comment.