Skip to content

Commit

Permalink
Auto merge of rust-lang#102573 - RalfJung:mirisync, r=oli-obk
Browse files Browse the repository at this point in the history
Miri sync

This is a Miri sync created with my experimental fork of josh. We should probably not merge this yet, but we can use this to check if the sync looks the way it should.

r? `@oli-obk`
  • Loading branch information
bors committed Oct 6, 2022
2 parents c97d02c + 9cc11e2 commit 27579a2
Show file tree
Hide file tree
Showing 48 changed files with 980 additions and 926 deletions.
73 changes: 22 additions & 51 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,12 @@ version = "0.1.0"
dependencies = [
"cargo_metadata 0.15.0",
"directories",
"rustc-build-sysroot",
"rustc-workspace-hack",
"rustc_tools_util 0.2.1",
"rustc_version",
"serde",
"serde_json",
"vergen",
]

[[package]]
Expand Down Expand Up @@ -669,7 +670,7 @@ dependencies = [
"regex",
"rustc-semver",
"rustc-workspace-hack",
"rustc_tools_util",
"rustc_tools_util 0.2.0",
"semver",
"serde",
"syn",
Expand Down Expand Up @@ -1104,9 +1105,9 @@ dependencies = [

[[package]]
name = "directories"
version = "3.0.2"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7"
checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210"
dependencies = [
"dirs-sys",
]
Expand Down Expand Up @@ -1196,26 +1197,6 @@ dependencies = [
"log",
]

[[package]]
name = "enum-iterator"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c79a6321a1197d7730510c7e3f6cb80432dfefecb32426de8cea0aa19b4bb8d7"
dependencies = [
"enum-iterator-derive",
]

[[package]]
name = "enum-iterator-derive"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e94aa31f7c0dc764f57896dc615ddd76fc13b0d5dca7eb6cc5e018a5a09ec06"
dependencies = [
"proc-macro2",
"quote",
"syn",
]

[[package]]
name = "env_logger"
version = "0.7.1"
Expand Down Expand Up @@ -1553,18 +1534,6 @@ dependencies = [
"wasi 0.9.0+wasi-snapshot-preview1",
]

[[package]]
name = "getset"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24b328c01a4d71d2d8173daa93562a73ab0fe85616876f02500f53d82948c504"
dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]

[[package]]
name = "gimli"
version = "0.25.0"
Expand Down Expand Up @@ -3051,6 +3020,17 @@ dependencies = [
"mdbook",
]

[[package]]
name = "rustc-build-sysroot"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec5f3689b6c560d6a3a17fcbe54204cd870b4fcf46342d60de16715b660d2c92"
dependencies = [
"anyhow",
"rustc_version",
"tempfile",
]

[[package]]
name = "rustc-demangle"
version = "0.1.21"
Expand Down Expand Up @@ -4186,6 +4166,12 @@ dependencies = [
name = "rustc_tools_util"
version = "0.2.0"

[[package]]
name = "rustc_tools_util"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "598f48ce2a421542b3e64828aa742b687cc1b91d2f96591cfdb7ac5988cd6366"

[[package]]
name = "rustc_trait_selection"
version = "0.0.0"
Expand Down Expand Up @@ -5353,21 +5339,6 @@ version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"

[[package]]
name = "vergen"
version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfbc87f9a7a9d61b15d51d1d3547284f67b6b4f1494ce3fc5814c101f35a5183"
dependencies = [
"anyhow",
"chrono",
"enum-iterator",
"getset",
"git2",
"rustversion",
"thiserror",
]

[[package]]
name = "version_check"
version = "0.9.3"
Expand Down
12 changes: 0 additions & 12 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,16 +494,6 @@ impl Step for Miri {
// sysroot does not seem to populate it, so we do that first.
builder.ensure(compile::Std::new(compiler_std, host));
let sysroot = builder.sysroot(compiler_std);
let mut cargo =
builder.cargo(compiler, Mode::ToolRustc, SourceType::Submodule, host, "install");
cargo.arg("xargo");
// Configure `cargo install` path. cargo adds a `bin/`.
cargo.env("CARGO_INSTALL_ROOT", &builder.out);

let mut cargo = Command::from(cargo);
if !try_run(builder, &mut cargo) {
return;
}

// # Run `cargo miri setup`.
let mut cargo = tool::prepare_tool_cargo(
Expand All @@ -525,8 +515,6 @@ impl Step for Miri {
cargo.env("MIRI", &miri);
// Debug things.
cargo.env("RUST_BACKTRACE", "1");
// Let cargo-miri know where xargo ended up.
cargo.env("XARGO_CHECK", builder.out.join("bin").join("xargo-check"));

let mut cargo = Command::from(cargo);
builder.run(&mut cargo);
Expand Down
5 changes: 3 additions & 2 deletions src/ci/scripts/should-skip-this.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ if [[ -n "${CI_ONLY_WHEN_SUBMODULES_CHANGED-}" ]]; then
# Submodules pseudo-files inside git have the 160000 permissions, so when
# those files are present in the diff a submodule was updated.
echo "Submodules were updated"
elif ! git diff --quiet "$BASE_COMMIT" -- src/tools/clippy src/tools/rustfmt; then
elif ! (git diff --quiet "$BASE_COMMIT" -- \
src/tools/clippy src/tools/rustfmt src/tools/miri); then
# There is not an easy blanket search for subtrees. For now, manually list
# the subtrees.
echo "Clippy or rustfmt subtrees were updated"
echo "Tool subtrees were updated"
elif ! (git diff --quiet "$BASE_COMMIT" -- \
src/test/rustdoc-gui \
src/librustdoc \
Expand Down
20 changes: 7 additions & 13 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
schedule:
- cron: '5 15 * * *' # At 15:05 UTC every day.

env:
CARGO_UNSTABLE_SPARSE_REGISTRY: 'true'

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -38,14 +41,6 @@ jobs:
if: runner.os == 'Linux'
run: echo "MIRIFLAGS=-Zmiri-tag-gc=1" >> $GITHUB_ENV

# We install gnu-tar because BSD tar is buggy on macOS builders of GHA.
# See <https://github.com/actions/cache/issues/403>.
- name: Install GNU tar
if: runner.os == 'macOS'
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
# Cache the global cargo directory, but NOT the local `target` directory which
# we cannot reuse anyway when the nightly changes (and it grows quite large
# over time).
Expand All @@ -62,15 +57,14 @@ jobs:
# contains package information of crates installed via `cargo install`.
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'cargo-miri/src/version.rs') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo

- name: Install rustup-toolchain-install-master and xargo
if: ${{ steps.cache.outputs.cache-hit == 'false' }}
- name: Install rustup-toolchain-install-master
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
shell: bash
run: |
cargo install rustup-toolchain-install-master
cargo install xargo
cargo install -f rustup-toolchain-install-master
- name: Install "master" toolchain
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for you. If you don't want all of these to happen, you can add individual `.auto
## Building and testing Miri

Invoking Miri requires getting a bunch of flags right and setting up a custom
sysroot with xargo. The `miri` script takes care of that for you. With the
sysroot. The `miri` script takes care of that for you. With the
build environment prepared, compiling Miri is just one command away:

```
Expand Down
Loading

0 comments on commit 27579a2

Please sign in to comment.