Skip to content

Commit 80e24d1

Browse files
committed
up to 1.69.0
- use upstream fix for llvm tools install issue from: rust-lang/rust#109256 - rust analysis dropped upstream
1 parent 80d0b51 commit 80e24d1

File tree

2 files changed

+37
-63
lines changed

2 files changed

+37
-63
lines changed

llvm-tools-install.patch

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
1-
From 23a34c18f7b2ce8b20fed717ef48e2be1776246b Mon Sep 17 00:00:00 2001
2-
From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= <[email protected]>
3-
Date: Sun, 11 Dec 2022 12:19:17 +0100
4-
Subject: [PATCH] bootstrap: Allow installing llvm-tools
1+
From 97740a648f57e24c45f641f2827598b26a2bf661 Mon Sep 17 00:00:00 2001
2+
From: NagaChaitanya Vellanki <[email protected]>
3+
Date: Fri, 17 Mar 2023 02:33:31 -0700
4+
Subject: [PATCH] Check for llvm-tools before install
55

66
---
7-
src/bootstrap/builder.rs | 1 +
8-
src/bootstrap/install.rs | 6 ++++++
9-
2 files changed, 7 insertions(+)
7+
src/bootstrap/install.rs | 11 +++++++----
8+
1 file changed, 7 insertions(+), 4 deletions(-)
109

11-
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
12-
index 8ee6d49da8f0e..3f551dc119b5d 100644
13-
--- a/src/bootstrap/builder.rs
14-
+++ b/src/bootstrap/builder.rs
15-
@@ -744,6 +744,7 @@ impl<'a> Builder<'a> {
16-
install::RustDemangler,
17-
install::Clippy,
18-
install::Miri,
19-
+ install::LlvmTools,
20-
install::Analysis,
21-
install::Src,
22-
install::Rustc
2310
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
24-
index 7672b7c913594..c53d0d7e4cb7c 100644
11+
index ac3843c3344eb..42d895a3413fb 100644
2512
--- a/src/bootstrap/install.rs
2613
+++ b/src/bootstrap/install.rs
27-
@@ -205,6 +205,12 @@ install!((self, builder, _config),
28-
);
14+
@@ -210,10 +210,13 @@ install!((self, builder, _config),
2915
}
3016
};
31-
+ LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
32-
+ let tarball = builder
33-
+ .ensure(dist::LlvmTools { target: self.target })
34-
+ .expect("missing llvm-tools");
35-
+ install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
36-
+ };
17+
LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
18+
- let tarball = builder
19+
- .ensure(dist::LlvmTools { target: self.target })
20+
- .expect("missing llvm-tools");
21+
- install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
22+
+ if let Some(tarball) = builder.ensure(dist::LlvmTools { target: self.target }) {
23+
+ install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
24+
+ } else {
25+
+ builder.info(
26+
+ &format!("skipping llvm-tools stage{} ({}): external LLVM", self.compiler.stage, self.target),
27+
+ );
28+
+ }
29+
};
3730
Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
3831
if let Some(tarball) = builder.ensure(dist::Rustfmt {
39-
compiler: self.compiler,

rust.spec

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
# To bootstrap from scratch, set the channel and date from src/stage0.json
2222
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
2323
# or nightly wants some beta-YYYY-MM-DD
24-
%define bootstrap_rust 1.67.1
24+
%define bootstrap_rust 1.68.2
2525
%define bootstrap_cargo %{bootstrap_rust}
26-
%define bootstrap_date 2023-02-09
26+
%define bootstrap_date 2023-03-28
2727

2828
%ifarch x32
2929
%define with_cross 1
@@ -36,23 +36,23 @@
3636
Summary: The Rust Programming Language
3737
Summary(pl.UTF-8): Język programowania Rust
3838
Name: rust
39-
Version: 1.68.2
39+
Version: 1.69.0
4040
Release: 1
4141
# Licenses: (rust itself) and (bundled libraries)
4242
License: (Apache v2.0 or MIT) and (BSD and ISC and MIT)
4343
Group: Development/Languages
4444
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
45-
# Source0-md5: df91d58551c09e6bf5d32e9bf3c0d802
45+
# Source0-md5: 2fac6c46422e743f5f05287e89e72f22
4646
Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
47-
# Source1-md5: 800e693e0ac317755f8f0e19269540db
47+
# Source1-md5: b82ae74e630a849d6675b93ddf0ed6ca
4848
Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
49-
# Source2-md5: 65d86e2c17b1a09df55860a1d8dec9d4
49+
# Source2-md5: a2affbb1e831228c71f972a270717ce3
5050
Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
51-
# Source3-md5: 127fdf3e824e23808a1fa6a8e92bcf56
51+
# Source3-md5: 489073dd8a8380c28a570bf70c9fbd6e
5252
Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
53-
# Source4-md5: 70acb1412ca21e288105d86a7d5b975b
53+
# Source4-md5: bb43d3fca2893f2de0b892e0f4a8fdb3
5454
Source5: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-armv7-unknown-linux-gnueabihf.tar.xz
55-
# Source5-md5: 1d917abdc484fd34c1471a931349a2c5
55+
# Source5-md5: 5691b194302d66b40c3e4eee0eeb1813
5656
Patch0: llvm-tools-install.patch
5757
URL: https://www.rust-lang.org/
5858
# for src/compiler-rt
@@ -72,8 +72,8 @@ BuildRequires: curl-devel
7272
BuildRequires: libgit2-devel >= 1.4.0
7373
BuildRequires: libstdc++-devel
7474
%if %{with system_llvm}
75-
BuildRequires: llvm >= 13.0
76-
BuildRequires: llvm-devel >= 13.0
75+
BuildRequires: llvm >= 14.0
76+
BuildRequires: llvm-devel >= 14.0
7777
%endif
7878
BuildRequires: openssl-devel >= 1.0.1
7979
BuildRequires: tar >= 1:1.22
@@ -95,7 +95,7 @@ BuildRequires: curl-devel
9595
BuildRequires: gcc-multilib-x32
9696
BuildRequires: libgit2-devel >= 1.4.0
9797
BuildRequires: libstdc++-devel
98-
%{?with_system_llvm:BuildRequires: llvm-devel >= 13.0}
98+
%{?with_system_llvm:BuildRequires: llvm-devel >= 14.0}
9999
BuildRequires: openssl-devel >= 1.0.1
100100
BuildRequires: xz-devel
101101
BuildRequires: zlib-devel
@@ -108,8 +108,8 @@ BuildRequires: libgit2-devel(x86-64) >= 1.4.0
108108
BuildRequires: libgit2-devel(x86-x32) >= 1.4.0
109109
BuildRequires: libstdc++-multilib-64-devel
110110
%if %{with system_llvm}
111-
BuildRequires: llvm-devel(x86-64) >= 13.0
112-
BuildRequires: llvm-devel(x86-x32) >= 13.0
111+
BuildRequires: llvm-devel(x86-64) >= 14.0
112+
BuildRequires: llvm-devel(x86-x32) >= 14.0
113113
%endif
114114
BuildRequires: openssl-devel(x86-64)
115115
BuildRequires: openssl-devel(x86-x32)
@@ -128,6 +128,7 @@ Requires: %{name}-std%{?_isa} = %{version}-%{release}
128128
Requires: %{name}-std(x86-64) = %{version}-%{release}
129129
Requires: gcc-multilib-64
130130
%endif
131+
Obsoletes: rust-analysis < 1.69.0
131132
# Only x86_64 and i686 are Tier 1 platforms at this time.
132133
# x32 is Tier 2, only rust-std is available (no rustc or cargo).
133134
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
@@ -203,18 +204,6 @@ Rust to systemowy język programowania działający bardzo szybko,
203204
zapobiegający naruszeniom ochrony pamięci i gwarantujący
204205
bezpieczną wielowątkowość.
205206

206-
%package analysis
207-
Summary: Metadata about the standard library
208-
Summary(pl.UTF-8): Metadane o standardowej bibliotece
209-
Group: Development/Tools
210-
Requires: %{name} = %{version}-%{release}
211-
212-
%description analysis
213-
Metadata about the standard library.
214-
215-
%description analysis -l pl.UTF-8
216-
Metadane o standardowej bibliotece.
217-
218207
%package std
219208
Summary: Standard library for Rust
220209
Summary(pl.UTF-8): Standardowa biblioteka Rusta
@@ -343,7 +332,7 @@ Dopełnianie parametrów polecenia cargo w powłoce Zsh.
343332

344333
%prep
345334
%setup -q -n %{rustc_package}
346-
%patch0 -p1 -R
335+
%patch0 -p1
347336

348337
%if %{with bootstrap}
349338
%ifarch %{x8664} x32
@@ -509,13 +498,6 @@ rm -rf $RPM_BUILD_ROOT
509498
%{_mandir}/man1/rustdoc.1*
510499
%dir %{rustlibdir}
511500

512-
%files analysis
513-
%defattr(644,root,root,755)
514-
%(for rust_target in %rust_targets; do
515-
echo "%{rustlibdir}/$rust_target/analysis"
516-
done
517-
)
518-
519501
%files std
520502
%defattr(644,root,root,755)
521503
%(for rust_target in %rust_targets; do

0 commit comments

Comments
 (0)