diff --git a/rust-pr68019-in-tree-compiletest.patch b/rust-pr68019-in-tree-compiletest.patch new file mode 100644 index 0000000..a0b28bf --- /dev/null +++ b/rust-pr68019-in-tree-compiletest.patch @@ -0,0 +1,97 @@ +From ed8e55fe8d732d8a87343441db3bfbb974f043df Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Wed, 8 Jan 2020 09:44:45 -0800 +Subject: [PATCH 1/2] Remove obsolete llvm_tools flag + +--- + src/bootstrap/tool.rs | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs +index 815498047fd5..f785a0989a36 100644 +--- a/src/bootstrap/tool.rs ++++ b/src/bootstrap/tool.rs +@@ -293,7 +293,6 @@ fn rustbook_features() -> Vec { + macro_rules! bootstrap_tool { + ($( + $name:ident, $path:expr, $tool_name:expr +- $(,llvm_tools = $llvm:expr)* + $(,is_external_tool = $external:expr)* + $(,features = $features:expr)* + ; +@@ -305,15 +304,6 @@ macro_rules! bootstrap_tool { + )+ + } + +- impl Tool { +- /// Whether this tool requires LLVM to run +- pub fn uses_llvm_tools(&self) -> bool { +- match self { +- $(Tool::$name => false $(|| $llvm)*,)+ +- } +- } +- } +- + impl<'a> Builder<'a> { + pub fn tool_exe(&self, tool: Tool) -> PathBuf { + match tool { +@@ -381,7 +371,7 @@ bootstrap_tool!( + Tidy, "src/tools/tidy", "tidy"; + Linkchecker, "src/tools/linkchecker", "linkchecker"; + CargoTest, "src/tools/cargotest", "cargotest"; +- Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true; ++ Compiletest, "src/tools/compiletest", "compiletest"; + BuildManifest, "src/tools/build-manifest", "build-manifest"; + RemoteTestClient, "src/tools/remote-test-client", "remote-test-client"; + RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true; +-- +2.24.1 + + +From cc4688d66d75e149a0136f701045cbf7ee672725 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Wed, 8 Jan 2020 10:04:18 -0800 +Subject: [PATCH 2/2] Build compiletest with in-tree libtest + +--- + src/bootstrap/tool.rs | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs +index f785a0989a36..73a4dda74e88 100644 +--- a/src/bootstrap/tool.rs ++++ b/src/bootstrap/tool.rs +@@ -294,6 +294,7 @@ macro_rules! bootstrap_tool { + ($( + $name:ident, $path:expr, $tool_name:expr + $(,is_external_tool = $external:expr)* ++ $(,is_unstable_tool = $unstable:expr)* + $(,features = $features:expr)* + ; + )+) => { +@@ -344,7 +345,12 @@ macro_rules! bootstrap_tool { + compiler: self.compiler, + target: self.target, + tool: $tool_name, +- mode: Mode::ToolBootstrap, ++ mode: if false $(|| $unstable)* { ++ // use in-tree libraries for unstable features ++ Mode::ToolStd ++ } else { ++ Mode::ToolBootstrap ++ }, + path: $path, + is_optional_tool: false, + source_type: if false $(|| $external)* { +@@ -371,7 +377,7 @@ bootstrap_tool!( + Tidy, "src/tools/tidy", "tidy"; + Linkchecker, "src/tools/linkchecker", "linkchecker"; + CargoTest, "src/tools/cargotest", "cargotest"; +- Compiletest, "src/tools/compiletest", "compiletest"; ++ Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true; + BuildManifest, "src/tools/build-manifest", "build-manifest"; + RemoteTestClient, "src/tools/remote-test-client", "remote-test-client"; + RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true; +-- +2.24.1 + diff --git a/rust.spec b/rust.spec index 3bd2f3e..5651c38 100644 --- a/rust.spec +++ b/rust.spec @@ -49,7 +49,7 @@ Name: rust Version: 1.40.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -74,10 +74,12 @@ Patch2: rust-pr66317-bindir-relative.patch # Fix compiletest with newer (local-rebuild) libtest # https://github.com/rust-lang/rust/pull/66156/commits/f6832adadb84364ce0c81fa02910b3706f441abc Patch3: 0001-Compiletest-bump-to-stage0-bootstrap-libtest.patch +# https://github.com/rust-lang/rust/pull/68019 +Patch4: rust-pr68019-in-tree-compiletest.patch # Fix ARM unwinding for foreign-exceptions # https://github.com/rust-lang/rust/pull/67779 -Patch4: 0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch +Patch5: 0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -412,6 +414,7 @@ test -f '%{local_rust_root}/bin/rustc' %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure @@ -718,6 +721,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Jan 16 2020 Josh Stone - 1.40.0-3 +- Build compiletest with in-tree libtest + * Tue Jan 07 2020 Josh Stone - 1.40.0-2 - Fix compiletest with newer (local-rebuild) libtest - Fix ARM EHABI unwinding