diff --git a/0001-WIP-minimize-the-rust-std-component.patch b/0001-WIP-minimize-the-rust-std-component.patch deleted file mode 100644 index 04be717a3daf9fe1c20d64aa21d16907bf280622..0000000000000000000000000000000000000000 --- a/0001-WIP-minimize-the-rust-std-component.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 2bf05f208272cd58c57f4d7d8d0e10fdb22e8719 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Fri, 27 Sep 2019 12:33:08 -0700 -Subject: [PATCH] [WIP] minimize the rust-std component - ---- - src/bootstrap/dist.rs | 45 +++++++++++++++---------------------------- - 1 file changed, 16 insertions(+), 29 deletions(-) - -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index 552965863d10..76fbd07f9fb5 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -667,41 +667,28 @@ impl Step for Std { - return distdir(builder).join(format!("{}-{}.tar.gz", name, target)); - } - -- // We want to package up as many target libraries as possible -- // for the `rust-std` package, so if this is a host target we -- // depend on librustc and otherwise we just depend on libtest. -- if builder.hosts.iter().any(|t| t == target) { -- builder.ensure(compile::Rustc { compiler, target }); -- } else { -- if builder.no_std(target) == Some(true) { -- // the `test` doesn't compile for no-std targets -- builder.ensure(compile::Std { compiler, target }); -- } else { -- builder.ensure(compile::Test { compiler, target }); -- } -- } -+ builder.ensure(compile::Std { compiler, target }); -+ builder.ensure(compile::Test { compiler, target }); - - let image = tmpdir(builder).join(format!("{}-{}-image", name, target)); - let _ = fs::remove_dir_all(&image); - -- let dst = image.join("lib/rustlib").join(target); -+ let dst = image.join("lib/rustlib").join(target).join("lib"); - t!(fs::create_dir_all(&dst)); -- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf(); -- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir -- builder.cp_filtered(&src, &dst, &|path| { -- if let Some(name) = path.file_name().and_then(|s| s.to_str()) { -- if name == builder.config.rust_codegen_backends_dir.as_str() { -- return false -- } -- if name == "bin" { -- return false -- } -- if name.contains("LLVM") { -- return false -- } -+ -+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); -+ let stamp = dbg!(compile::libstd_stamp(builder, compiler_to_use, target)); -+ for (path, host) in builder.read_stamp_file(&stamp) { -+ if !host { -+ builder.copy(&path, &dst.join(path.file_name().unwrap())); - } -- true -- }); -+ } -+ let stamp = dbg!(compile::libtest_stamp(builder, compiler_to_use, target)); -+ for (path, host) in builder.read_stamp_file(&stamp) { -+ if !host { -+ builder.copy(&path, &dst.join(path.file_name().unwrap())); -+ } -+ } - - let mut cmd = rust_installer(builder); - cmd.arg("generate") --- -2.21.0 - diff --git a/rust-pr57840-llvm7-debuginfo-variants.patch b/rust-pr57840-llvm7-debuginfo-variants.patch deleted file mode 100644 index 71996bce8a83938ba554a9958d4ea9c4cb64f5c5..0000000000000000000000000000000000000000 --- a/rust-pr57840-llvm7-debuginfo-variants.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit ab998a2eeb2bcdc69ce70c814af97f0d1302a404 (from d17f62d857c70508efbf60be41135880bcd2e062) -Merge: d17f62d857c7 9452a8dfa3ba -Author: Mazdak Farrokhzad -Date: Thu Jan 24 00:20:00 2019 +0100 - - Rollup merge of #57840 - tromey:fix-issue-57762, r=nikic - - Fix issue 57762 - - against a stock LLVM 7. LLVM 7 was released without a necessary fix - for a bug in the DWARF discriminant code. - - This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7. - - Closes #57762 - -diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs -index 6deedd0b5ea3..9f63038c3623 100644 ---- a/src/librustc_codegen_llvm/debuginfo/metadata.rs -+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs -@@ -1164,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool { - // On MSVC we have to use the fallback mode, because LLVM doesn't - // lower variant parts to PDB. - return cx.sess().target.target.options.is_like_msvc -- || llvm_util::get_major_version() < 7; -+ // LLVM version 7 did not release with an important bug fix; -+ // but the required patch is in the LLVM 8. Rust LLVM reports -+ // 8 as well. -+ || llvm_util::get_major_version() < 8; - } - - // Describes the members of an enum value: An enum is described as a union of diff --git a/rust.spec b/rust.spec index 0c16679113353b8a1eca578acf177817604d7a3d..3b77ee9e8b5af3bd0b3c85c263134438cad7b697 100644 --- a/rust.spec +++ b/rust.spec @@ -1,13 +1,13 @@ %{!?channel: %global channel stable} -%global bootstrap_rust 1.37.0 -%global bootstrap_cargo 1.37.0 -%global bootstrap_channel 1.37.0 -%global bootstrap_date 2019-08-15 +%global bootstrap_rust 1.44.0 +%global bootstrap_cargo 1.44.0 +%global bootstrap_channel 1.44.0 +%global bootstrap_date 2020-06-04 %bcond_with llvm_static %bcond_with bundled_llvm %bcond_without bundled_libgit2 Name: rust -Version: 1.38.0 +Version: 1.45.2 Release: 1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -18,9 +18,6 @@ URL: https://www.rust-lang.org %global rustc_package rustc-%{channel}-src %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz -Patch1: rust-pr57840-llvm7-debuginfo-variants.patch -Patch2: rustc-1.38.0-rebuild-bootstrap.patch -Patch3: 0001-WIP-minimize-the-rust-std-component.patch %{lua: function rust_triple(arch) local abi = "gnu" if arch == "armv7hl" then @@ -67,7 +64,7 @@ BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1. BuildRequires: %{python} %if %with bundled_llvm BuildRequires: cmake3 >= 3.4.3 -Provides: bundled(llvm) = 8.0.0 +Provides: bundled(llvm) = 10.0.1 %else BuildRequires: cmake >= 2.8.11 %if %defined llvm @@ -76,14 +73,13 @@ BuildRequires: cmake >= 2.8.11 %global llvm llvm %global llvm_root %{_prefix} %endif -BuildRequires: %{llvm}-devel >= 6.0 +BuildRequires: %{llvm}-devel >= 8.0 %if %with llvm_static BuildRequires: %{llvm}-static libffi-devel %endif %endif BuildRequires: procps-ng gdb -Provides: bundled(libbacktrace) = 8.1.0 -Provides: bundled(miniz) = 2.0.7 +Provides: bundled(libbacktrace) = 1.0.20200219 Provides: rustc = %{version}-%{release} Provides: rustc%{?_isa} = %{version}-%{release} Requires: %{name}-std-static%{?_isa} = %{version}-%{release} @@ -128,7 +124,7 @@ programs. %package lldb Summary: LLDB pretty printers for Rust BuildArch: noarch -Requires: lldb python2-lldb +Requires: lldb python3-lldb Requires: %{name}-debugger-common = %{version}-%{release} %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust @@ -136,15 +132,13 @@ programs. %package doc Summary: Documentation for Rust -Provides: rust-help = %{version}-%{release} -Obsoletes: rust-help < %{version}-%{release} %description doc This package includes HTML documentation for the Rust programming language and its standard library. %package -n cargo Summary: Rust's package manager and build tool -Provides: bundled(libgit2) = 0.28.2 +Provides: bundled(libgit2) = 1.0.0 BuildRequires: git Requires: rust Obsoletes: cargo-vendor <= 0.1.23 @@ -170,7 +164,7 @@ A tool for formatting Rust code according to style guidelines. %package -n rls Summary: Rust Language Server for IDE integration -Provides: bundled(libgit2) = 0.28.2 +Provides: bundled(libgit2) = 1.0.0 Requires: rust-analysis %{name}%{?_isa} = %{version}-%{release} Obsoletes: rls-preview < 1.31.6 Provides: rls-preview = %{version}-%{release} @@ -212,16 +206,12 @@ test -f '%{local_rust_root}/bin/cargo' test -f '%{local_rust_root}/bin/rustc' %endif %setup -q -n %{rustc_package} -%patch1 -p1 -R -%patch2 -p1 -%patch3 -p1 %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure %endif %if %without bundled_llvm rm -rf src/llvm-project/ %endif -rm -rf src/llvm-emscripten/ rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/libz-sys/src/zlib/ @@ -263,6 +253,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 --disable-rpath \ %{enable_debuginfo} \ --enable-extended \ + --tools=analysis,cargo,clippy,rls,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ %{?codegen_units_std} \ @@ -329,8 +320,6 @@ ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.so -%{rustlibdir}/%{rust_triple}/codegen-backends/ -%exclude %{_bindir}/*miri %files std-static %dir %{rustlibdir} @@ -407,6 +396,9 @@ ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html %{rustlibdir}/%{rust_triple}/analysis/ %changelog +* Mon Aug 17 2020 zhangjiapeng - 1.45.2-1 +- Update to 1.45.2 + * Wed Jul 15 2020 yanan li - 1.38.0-1 - Update to 1.38.0-1 diff --git a/rustc-1.38.0-rebuild-bootstrap.patch b/rustc-1.38.0-rebuild-bootstrap.patch deleted file mode 100644 index 07f59a0641bb844deaba374e79c034cbb3127b6e..0000000000000000000000000000000000000000 --- a/rustc-1.38.0-rebuild-bootstrap.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- rustc-1.38.0-src/src/bootstrap/builder.rs 2019-09-23 14:15:52.000000000 -0700 -+++ rustc-1.38.0-src/src/bootstrap/builder.rs 2019-09-26 10:45:49.663995011 -0700 -@@ -140,6 +140,7 @@ - - impl StepDescription { - fn from() -> StepDescription { -+ #[allow(unused_unsafe)] // for rebuild bootstrapping - StepDescription { - default: S::DEFAULT, - only_hosts: S::ONLY_HOSTS, diff --git a/rustc-1.38.0-src.tar.xz b/rustc-1.45.2-src.tar.xz similarity index 84% rename from rustc-1.38.0-src.tar.xz rename to rustc-1.45.2-src.tar.xz index 19d73b897283774f2e5e54d74879785501bc5779..ee50aadfe62827bd43c3bc2f6943a8c4e931f671 100644 Binary files a/rustc-1.38.0-src.tar.xz and b/rustc-1.45.2-src.tar.xz differ