From 1462e72389e697b500c788eb9cea5b15f02d924d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 24 Aug 2019 17:42:09 +0200 Subject: [PATCH 1/2] fix for latest rustc --- .travis.yml | 2 +- src/sysroot.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4347c7..7211862 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: rust: nightly if: branch = staging OR branch = trying OR type = pull_request - env: TARGET=x86_64-unknown-linux-gnu - rust: nightly-2018-12-01 + rust: nightly-2018-12-01 # old version without rustc-std-workspace-core if: branch = staging OR branch = trying # Linux (build only) diff --git a/src/sysroot.rs b/src/sysroot.rs index 2384d8e..4f83315 100644 --- a/src/sysroot.rs +++ b/src/sysroot.rs @@ -401,6 +401,7 @@ impl Blueprint { Blueprint::add_patch(&mut patch, src.path().join("tools"), "rustc-std-workspace-core")?; Blueprint::add_patch(&mut patch, src.path().join("tools"), "rustc-std-workspace-alloc")?; + Blueprint::add_patch(&mut patch, src.path().join("tools"), "rustc-std-workspace-std")?; // Compose dependency sections let deps = match ( From 2634e8f9d42af45b8e1e22d9589ea806008d80e8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 25 Aug 2019 11:13:23 +0200 Subject: [PATCH 2/2] adjust tests for rsutc changes --- tests/smoke.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/smoke.rs b/tests/smoke.rs index f2d7929..71bc042 100644 --- a/tests/smoke.rs +++ b/tests/smoke.rs @@ -761,16 +761,17 @@ fn host_twice() { } /// Check multi stage sysroot builds with `xargo test` -// We avoid Windows here just because it would be tricky to modify the rust-src -// component (cf. #36501) from within the appveyor environment #[cfg(feature = "dev")] -#[cfg(not(windows))] #[test] fn test() { fn run() -> Result<()> { let project = HProject::new(true)?; - project.xargo_toml( + if std::env::var("TRAVIS_RUST_VERSION").ok().map_or(false, + |var| var.starts_with("nightly-2018")) + { + // Testing an old version on CI, we need a different Xargo.toml. + project.xargo_toml( " [dependencies.std] features = [\"panic_unwind\"] @@ -778,7 +779,17 @@ features = [\"panic_unwind\"] [dependencies.test] stage = 1 ", - )?; + )?; + } else { + project.xargo_toml( + " +[dependencies.std] +features = [\"panic_unwind\"] + +[dependencies.test] +", + )?; + } xargo()?.arg("test").current_dir(project.td.path()).run()?; @@ -788,7 +799,7 @@ stage = 1 run!() } -/// Check multi stage sysroot builds with `xargo test` +/// Check multi stage sysroot builds with `xargo build` #[cfg(feature = "dev")] #[test] fn alloc() {