Skip to content

Commit

Permalink
Merge pull request #49 from GaloisInc/rustup-2023-01-23
Browse files Browse the repository at this point in the history
Support `nightly-2023-01-23`
  • Loading branch information
RyanGlScott authored Jul 14, 2023
2 parents 3a621e1 + 11e4d1a commit 3b53858
Show file tree
Hide file tree
Showing 21 changed files with 1,795 additions and 1,238 deletions.
1,132 changes: 623 additions & 509 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ authors = ["Joshua Gancher <jrg358@cornell.edu>"]
repository = "https://github.com/GaloisInc/mir-json.git"
license = "MIT/Apache-2.0"

[package.metadata.rust-analyzer]
rustc_private=true

[dependencies]
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
serde_cbor = "0.11"
tar = "0.4"
cargo_metadata = { version = "0.2" }
cargo = { version = "0.43", features = [ "vendored-openssl" ] }
toml = "0.5"
clap = "2.33"
cargo_metadata = { version = "0.14.2" }
cargo = { version = "0.62", features = [ "vendored-openssl" ] }
toml_edit = { version = "0.13.4", features = [ "easy" ] }
clap = "3.1.0"

[[bin]]
name = "cargo-crux-test"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ book](https://doc.rust-lang.org/book/2018-edition/ch01-01-installation.html)).

2. Next, install a version of `rustc` that works with mir-json.

$ rustup toolchain install nightly-2020-03-22 --force
$ rustup component add --toolchain nightly-2020-03-22 rustc-dev
$ rustup default nightly-2020-03-22
$ rustup toolchain install nightly-2023-01-23 --force
$ rustup component add --toolchain nightly-2023-01-23 rustc-dev
$ rustup default nightly-2023-01-23

<!-- Note: when changing to a new nightly, also update `wrapper.rs` -->

Expand Down
15 changes: 15 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use std::path::Path;
use std::process::Command;
use std::str;

fn main() {
// Add the toolchain lib/ directory to `-L`. This fixes the linker error "cannot find
// -lLLVM-13-rust-1.60.0-nightly".
let out = Command::new("rustup")
.args(&["which", "rustc"])
.output().unwrap();
assert!(out.status.success());
let rustc_path = Path::new(str::from_utf8(&out.stdout).unwrap().trim_end());
let lib_dir = rustc_path.parent().unwrap().parent().unwrap().join("lib");
println!("cargo:rustc-link-search={}", lib_dir.display());
}
4 changes: 2 additions & 2 deletions doc/rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ internal environment variables, which most users will not need to care about:
overrides should be used.
* `EXPORT_ALL`: If this environment variable is set, then the MIR JSON file
will export all top-level functions. Otherwise, it will only export those
functions with a `#[crux_test]` attribute.
functions with a `#[crux::test]` attribute.

## Other binaries

Expand Down Expand Up @@ -125,7 +125,7 @@ in the following ways:
representation required by the `crux-mir` backend.

* Miscellaneous: `has_attr` for identifying symbolic tests (marked with the
`#[crux_test]` attribute); `all_crate_nums` and related queries to identify
`#[crux::test]` attribute); `all_crate_nums` and related queries to identify
dependencies; `output_filenames` to get the path of the normal `rustc` output
(`mir-json` stores the `.mir` files it generates alongside the normal `.rlib`
library output).
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2023-01-23"
Loading

0 comments on commit 3b53858

Please sign in to comment.