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

Support building and running with full MIR on foreign architectures, drop support for missing MIR #566

Merged
merged 8 commits into from
Dec 10, 2018
12 changes: 5 additions & 7 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,15 @@ fn get_sysroot() -> PathBuf {

fn get_host() -> String {
let rustc = rustc_test_suite().unwrap_or(PathBuf::from("rustc"));
let host = std::process::Command::new(rustc)
let rustc_version = std::process::Command::new(rustc)
.arg("-vV")
.output()
.expect("rustc not found for -vV")
.stdout;
let host = std::str::from_utf8(&host).expect("sysroot is not utf8");
let host = host.split("\nhost: ").nth(1).expect(
"no host: part in rustc -vV",
);
let host = host.split('\n').next().expect("no \n after host");
String::from(host)
let rustc_version = std::str::from_utf8(&rustc_version).expect("rustc -vV is not utf8");
let version_meta = rustc_version::version_meta_for(&rustc_version)
.expect("failed to parse rustc version info");
version_meta.host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire get_host function body could be just rustc_version::version_meta().unwrap().host

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this uses a different binary than rustc when being run in the rustc test suite.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... because of the RUSTC env var. Oh well, it's not very important.

}

fn run_pass_miri(opt: bool) {
Expand Down