Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump Miri, update for cargo-miri being a separate project #72779

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,19 @@ dependencies = [
"winapi 0.3.8",
]

[[package]]
name = "cargo-miri"
version = "0.1.0"
dependencies = [
"cargo_metadata 0.9.1",
"directories",
"rustc-workspace-hack",
"rustc_version",
"serde",
"serde_json",
"vergen",
]

[[package]]
name = "cargo-platform"
version = "0.1.1"
Expand Down Expand Up @@ -2220,22 +2233,17 @@ name = "miri"
version = "0.1.0"
dependencies = [
"byteorder",
"cargo_metadata 0.9.1",
"colored",
"compiletest_rs",
"directories",
"env_logger 0.7.1",
"getrandom",
"hex 0.4.0",
"libc",
"log",
"num-traits",
"rand 0.7.3",
"rustc-workspace-hack",
"rustc_version",
"serde",
"serde_json",
"shell-escape",
"vergen",
]

[[package]]
Expand Down Expand Up @@ -5555,13 +5563,12 @@ checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"

[[package]]
name = "vergen"
version = "3.0.4"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba"
checksum = "4ce50d8996df1f85af15f2cd8d33daae6e479575123ef4314a51a70a230739cb"
dependencies = [
"bitflags",
"chrono",
"failure",
]

[[package]]
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ members = [
"src/tools/rls",
"src/tools/rustfmt",
"src/tools/miri",
"src/tools/miri/cargo-miri",
"src/tools/rustdoc-themes",
"src/tools/unicode-table-generator",
"src/tools/expand-yaml-anchors",
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,12 @@ impl<'a> Builder<'a> {
tool::Rls,
tool::Rustdoc,
tool::Clippy,
tool::CargoClippy,
native::Llvm,
native::Sanitizers,
tool::Rustfmt,
tool::Miri,
tool::CargoMiri,
native::Lld
),
Kind::Check | Kind::Clippy | Kind::Fix | Kind::Format => {
Expand Down
15 changes: 11 additions & 4 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,12 @@ impl Step for Miri {

let miri =
builder.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() });
if let Some(miri) = miri {
let cargo_miri = builder.ensure(tool::CargoMiri {
compiler,
target: self.host,
extra_features: Vec::new(),
});
if let (Some(miri), Some(_cargo_miri)) = (miri, cargo_miri) {
let mut cargo = builder.cargo(compiler, Mode::ToolRustc, host, "install");
cargo.arg("xargo");
// Configure `cargo install` path. cargo adds a `bin/`.
Expand All @@ -378,14 +383,16 @@ impl Step for Miri {
Mode::ToolRustc,
host,
"run",
"src/tools/miri",
"src/tools/miri/cargo-miri",
SourceType::Submodule,
&[],
);
cargo.arg("--bin").arg("cargo-miri").arg("--").arg("miri").arg("setup");
cargo.arg("--").arg("miri").arg("setup");

// Tell `cargo miri setup` where to find the sources.
cargo.env("XARGO_RUST_SRC", builder.src.join("src"));
// Tell it where to find Miri.
cargo.env("MIRI", &miri);
// Debug things.
cargo.env("RUST_BACKTRACE", "1");
// Overwrite bootstrap's `rustc` wrapper overwriting our flags.
Expand Down Expand Up @@ -437,7 +444,7 @@ impl Step for Miri {
// miri tests need to know about the stage sysroot
cargo.env("MIRI_SYSROOT", miri_sysroot);
cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
cargo.env("MIRI_PATH", miri);
cargo.env("MIRI", miri);

cargo.arg("--").args(builder.config.cmd.test_args());

Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,14 @@ macro_rules! tool_extended {
}
}

// Note: tools need to be also added to `Builder::get_step_descriptions` in `build.rs`
// to make `./x.py build <tool>` work.
tool_extended!((self, builder),
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {};
CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", {};
Clippy, clippy, "src/tools/clippy", "clippy-driver", {};
Miri, miri, "src/tools/miri", "miri", {};
CargoMiri, miri, "src/tools/miri", "cargo-miri", {};
CargoMiri, miri, "src/tools/miri/cargo-miri", "cargo-miri", {};
Rls, rls, "src/tools/rls", "rls", {
builder.ensure(Clippy {
compiler: self.compiler,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri
Submodule miri updated 42 files
+1 −86 Cargo.lock
+7 −22 Cargo.toml
+1 −1 README.md
+351 −0 cargo-miri/Cargo.lock
+32 −0 cargo-miri/Cargo.toml
+10 −5 cargo-miri/bin.rs
+0 −0 cargo-miri/build.rs
+4 −1 ci.sh
+17 −9 miri
+1 −1 rust-version
+4 −4 src/bin/miri.rs
+6 −0 src/eval.rs
+6 −1 src/lib.rs
+9 −0 src/machine.rs
+1 −45 src/operator.rs
+57 −13 src/shims/foreign_items/posix.rs
+10 −0 src/shims/foreign_items/posix/linux.rs
+1 −1 src/shims/foreign_items/posix/macos.rs
+4 −4 src/shims/foreign_items/windows.rs
+13 −13 src/shims/fs.rs
+9 −28 src/shims/intrinsics.rs
+490 −240 src/shims/sync.rs
+8 −8 src/shims/thread.rs
+9 −9 src/shims/tls.rs
+361 −0 src/sync.rs
+174 −67 src/thread.rs
+0 −1 tests/compile-fail/rc_as_ptr.rs
+16 −0 tests/compile-fail/sync/libc_pthread_mutex_NULL_deadlock.rs
+17 −0 tests/compile-fail/sync/libc_pthread_mutex_default_deadlock.rs
+1 −1 tests/compile-fail/sync/libc_pthread_mutex_normal_deadlock.rs
+1 −1 tests/compile-fail/sync/libc_pthread_mutex_wrong_owner.rs
+32 −0 tests/compile-fail/sync/libc_pthread_rwlock_read_wrong_owner.rs
+32 −0 tests/compile-fail/sync/libc_pthread_rwlock_write_wrong_owner.rs
+1 −1 tests/compile-fail/validity/invalid_char.rs
+1 −1 tests/compiletest.rs
+47 −0 tests/run-pass/concurrency/libc_pthread_cond.rs
+0 −75 tests/run-pass/concurrency/locks.rs
+330 −0 tests/run-pass/concurrency/sync.rs
+0 −0 tests/run-pass/concurrency/sync.stderr
+20 −0 tests/run-pass/concurrency/sync.stdout
+0 −1 tests/run-pass/rc.rs
+23 −0 tests/run-pass/wtf8.rs