Skip to content

Commit 27579a2

Browse files
committed
Auto merge of rust-lang#102573 - RalfJung:mirisync, r=oli-obk
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`
2 parents c97d02c + 9cc11e2 commit 27579a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+980
-926
lines changed

Cargo.lock

+22-51
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,12 @@ version = "0.1.0"
385385
dependencies = [
386386
"cargo_metadata 0.15.0",
387387
"directories",
388+
"rustc-build-sysroot",
388389
"rustc-workspace-hack",
390+
"rustc_tools_util 0.2.1",
389391
"rustc_version",
390392
"serde",
391393
"serde_json",
392-
"vergen",
393394
]
394395

395396
[[package]]
@@ -669,7 +670,7 @@ dependencies = [
669670
"regex",
670671
"rustc-semver",
671672
"rustc-workspace-hack",
672-
"rustc_tools_util",
673+
"rustc_tools_util 0.2.0",
673674
"semver",
674675
"serde",
675676
"syn",
@@ -1104,9 +1105,9 @@ dependencies = [
11041105

11051106
[[package]]
11061107
name = "directories"
1107-
version = "3.0.2"
1108+
version = "4.0.1"
11081109
source = "registry+https://github.com/rust-lang/crates.io-index"
1109-
checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7"
1110+
checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210"
11101111
dependencies = [
11111112
"dirs-sys",
11121113
]
@@ -1196,26 +1197,6 @@ dependencies = [
11961197
"log",
11971198
]
11981199

1199-
[[package]]
1200-
name = "enum-iterator"
1201-
version = "0.6.0"
1202-
source = "registry+https://github.com/rust-lang/crates.io-index"
1203-
checksum = "c79a6321a1197d7730510c7e3f6cb80432dfefecb32426de8cea0aa19b4bb8d7"
1204-
dependencies = [
1205-
"enum-iterator-derive",
1206-
]
1207-
1208-
[[package]]
1209-
name = "enum-iterator-derive"
1210-
version = "0.6.0"
1211-
source = "registry+https://github.com/rust-lang/crates.io-index"
1212-
checksum = "1e94aa31f7c0dc764f57896dc615ddd76fc13b0d5dca7eb6cc5e018a5a09ec06"
1213-
dependencies = [
1214-
"proc-macro2",
1215-
"quote",
1216-
"syn",
1217-
]
1218-
12191200
[[package]]
12201201
name = "env_logger"
12211202
version = "0.7.1"
@@ -1553,18 +1534,6 @@ dependencies = [
15531534
"wasi 0.9.0+wasi-snapshot-preview1",
15541535
]
15551536

1556-
[[package]]
1557-
name = "getset"
1558-
version = "0.1.1"
1559-
source = "registry+https://github.com/rust-lang/crates.io-index"
1560-
checksum = "24b328c01a4d71d2d8173daa93562a73ab0fe85616876f02500f53d82948c504"
1561-
dependencies = [
1562-
"proc-macro-error",
1563-
"proc-macro2",
1564-
"quote",
1565-
"syn",
1566-
]
1567-
15681537
[[package]]
15691538
name = "gimli"
15701539
version = "0.25.0"
@@ -3051,6 +3020,17 @@ dependencies = [
30513020
"mdbook",
30523021
]
30533022

3023+
[[package]]
3024+
name = "rustc-build-sysroot"
3025+
version = "0.3.3"
3026+
source = "registry+https://github.com/rust-lang/crates.io-index"
3027+
checksum = "ec5f3689b6c560d6a3a17fcbe54204cd870b4fcf46342d60de16715b660d2c92"
3028+
dependencies = [
3029+
"anyhow",
3030+
"rustc_version",
3031+
"tempfile",
3032+
]
3033+
30543034
[[package]]
30553035
name = "rustc-demangle"
30563036
version = "0.1.21"
@@ -4186,6 +4166,12 @@ dependencies = [
41864166
name = "rustc_tools_util"
41874167
version = "0.2.0"
41884168

4169+
[[package]]
4170+
name = "rustc_tools_util"
4171+
version = "0.2.1"
4172+
source = "registry+https://github.com/rust-lang/crates.io-index"
4173+
checksum = "598f48ce2a421542b3e64828aa742b687cc1b91d2f96591cfdb7ac5988cd6366"
4174+
41894175
[[package]]
41904176
name = "rustc_trait_selection"
41914177
version = "0.0.0"
@@ -5353,21 +5339,6 @@ version = "0.2.10"
53535339
source = "registry+https://github.com/rust-lang/crates.io-index"
53545340
checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
53555341

5356-
[[package]]
5357-
name = "vergen"
5358-
version = "5.1.0"
5359-
source = "registry+https://github.com/rust-lang/crates.io-index"
5360-
checksum = "dfbc87f9a7a9d61b15d51d1d3547284f67b6b4f1494ce3fc5814c101f35a5183"
5361-
dependencies = [
5362-
"anyhow",
5363-
"chrono",
5364-
"enum-iterator",
5365-
"getset",
5366-
"git2",
5367-
"rustversion",
5368-
"thiserror",
5369-
]
5370-
53715342
[[package]]
53725343
name = "version_check"
53735344
version = "0.9.3"

src/bootstrap/test.rs

-12
Original file line numberDiff line numberDiff line change
@@ -494,16 +494,6 @@ impl Step for Miri {
494494
// sysroot does not seem to populate it, so we do that first.
495495
builder.ensure(compile::Std::new(compiler_std, host));
496496
let sysroot = builder.sysroot(compiler_std);
497-
let mut cargo =
498-
builder.cargo(compiler, Mode::ToolRustc, SourceType::Submodule, host, "install");
499-
cargo.arg("xargo");
500-
// Configure `cargo install` path. cargo adds a `bin/`.
501-
cargo.env("CARGO_INSTALL_ROOT", &builder.out);
502-
503-
let mut cargo = Command::from(cargo);
504-
if !try_run(builder, &mut cargo) {
505-
return;
506-
}
507497

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

531519
let mut cargo = Command::from(cargo);
532520
builder.run(&mut cargo);

src/ci/scripts/should-skip-this.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ if [[ -n "${CI_ONLY_WHEN_SUBMODULES_CHANGED-}" ]]; then
1818
# Submodules pseudo-files inside git have the 160000 permissions, so when
1919
# those files are present in the diff a submodule was updated.
2020
echo "Submodules were updated"
21-
elif ! git diff --quiet "$BASE_COMMIT" -- src/tools/clippy src/tools/rustfmt; then
21+
elif ! (git diff --quiet "$BASE_COMMIT" -- \
22+
src/tools/clippy src/tools/rustfmt src/tools/miri); then
2223
# There is not an easy blanket search for subtrees. For now, manually list
2324
# the subtrees.
24-
echo "Clippy or rustfmt subtrees were updated"
25+
echo "Tool subtrees were updated"
2526
elif ! (git diff --quiet "$BASE_COMMIT" -- \
2627
src/test/rustdoc-gui \
2728
src/librustdoc \

src/tools/miri/.github/workflows/ci.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
schedule:
1313
- cron: '5 15 * * *' # At 15:05 UTC every day.
1414

15+
env:
16+
CARGO_UNSTABLE_SPARSE_REGISTRY: 'true'
17+
1518
jobs:
1619
build:
1720
runs-on: ${{ matrix.os }}
@@ -38,14 +41,6 @@ jobs:
3841
if: runner.os == 'Linux'
3942
run: echo "MIRIFLAGS=-Zmiri-tag-gc=1" >> $GITHUB_ENV
4043

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

68-
- name: Install rustup-toolchain-install-master and xargo
69-
if: ${{ steps.cache.outputs.cache-hit == 'false' }}
63+
- name: Install rustup-toolchain-install-master
64+
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
7065
shell: bash
7166
run: |
72-
cargo install rustup-toolchain-install-master
73-
cargo install xargo
67+
cargo install -f rustup-toolchain-install-master
7468
7569
- name: Install "master" toolchain
7670
shell: bash

src/tools/miri/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ for you. If you don't want all of these to happen, you can add individual `.auto
3838
## Building and testing Miri
3939

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

4444
```

0 commit comments

Comments
 (0)