Merge branch 'master' into beta
This commit is contained in:
commit
690bb66d7d
|
@ -106,3 +106,11 @@
|
|||
/rust-1.23.0-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.23.0-x86_64-unknown-linux-gnu.tar.xz
|
||||
/rustc-1.24.1-src.tar.xz
|
||||
/rustc-1.25.0-src.tar.xz
|
||||
/rust-1.24.0-aarch64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.24.0-armv7-unknown-linux-gnueabihf.tar.xz
|
||||
/rust-1.24.0-i686-unknown-linux-gnu.tar.xz
|
||||
/rust-1.24.0-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
/rust-1.24.0-powerpc64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.24.0-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.24.0-x86_64-unknown-linux-gnu.tar.xz
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
From b404ec4b4880db7f6aea23ebf778869dfd6ecf99 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Thu, 29 Mar 2018 10:25:32 -0700
|
||||
Subject: [PATCH] Ignore stack-probes tests on powerpc/s390x too
|
||||
|
||||
We only support stack probes on x86 and x86_64.
|
||||
Other arches are already ignored.
|
||||
---
|
||||
src/test/codegen/stack-probes.rs | 1 +
|
||||
src/test/run-pass/stack-probes-lto.rs | 2 ++
|
||||
src/test/run-pass/stack-probes.rs | 2 ++
|
||||
3 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
|
||||
index af400ff3bcbd..51ebc42a0dd6 100644
|
||||
--- a/src/test/codegen/stack-probes.rs
|
||||
+++ b/src/test/codegen/stack-probes.rs
|
||||
@@ -11,6 +11,7 @@
|
||||
// ignore-arm
|
||||
// ignore-aarch64
|
||||
// ignore-powerpc
|
||||
+// ignore-s390x
|
||||
// ignore-aarch64
|
||||
// ignore-wasm
|
||||
// ignore-emscripten
|
||||
diff --git a/src/test/run-pass/stack-probes-lto.rs b/src/test/run-pass/stack-probes-lto.rs
|
||||
index e7fa3bc0a75c..d1cb75909c15 100644
|
||||
--- a/src/test/run-pass/stack-probes-lto.rs
|
||||
+++ b/src/test/run-pass/stack-probes-lto.rs
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
// ignore-arm
|
||||
// ignore-aarch64
|
||||
+// ignore-powerpc
|
||||
+// ignore-s390x
|
||||
// ignore-wasm
|
||||
// ignore-cloudabi no processes
|
||||
// ignore-emscripten no processes
|
||||
diff --git a/src/test/run-pass/stack-probes.rs b/src/test/run-pass/stack-probes.rs
|
||||
index 67b3962ee5fb..78c5782be383 100644
|
||||
--- a/src/test/run-pass/stack-probes.rs
|
||||
+++ b/src/test/run-pass/stack-probes.rs
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
// ignore-arm
|
||||
// ignore-aarch64
|
||||
+// ignore-powerpc
|
||||
+// ignore-s390x
|
||||
// ignore-wasm
|
||||
// ignore-cloudabi no processes
|
||||
// ignore-emscripten no processes
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
From f89f1b496c0c3b96aa8e41bef882131008dac6c3 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 13 Apr 2018 16:52:54 -0700
|
||||
Subject: [PATCH 1/3] rustbuild: allow building tools with debuginfo
|
||||
|
||||
Debugging information for the extended tools is currently disabled for
|
||||
concerns about the size. This patch adds `--enable-debuginfo-tools` to
|
||||
let one opt into having that debuginfo.
|
||||
|
||||
This is useful for debugging the tools in distro packages. We always
|
||||
strip debuginfo into separate packages anyway, so the extra size is not
|
||||
a concern in regular use.
|
||||
---
|
||||
CONTRIBUTING.md | 1 +
|
||||
config.toml.example | 4 ++++
|
||||
src/bootstrap/builder.rs | 12 ++++++++----
|
||||
src/bootstrap/config.rs | 5 +++++
|
||||
src/bootstrap/configure.py | 1 +
|
||||
5 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
|
||||
index 70376c120f..fcd995b703 100644
|
||||
--- a/CONTRIBUTING.md
|
||||
+++ b/CONTRIBUTING.md
|
||||
@@ -121,6 +121,7 @@ configuration used in the build process. Some options to note:
|
||||
#### `[rust]`:
|
||||
- `debuginfo = true` - Build a compiler with debuginfo. Makes building rustc slower, but then you can use a debugger to debug `rustc`.
|
||||
- `debuginfo-lines = true` - An alternative to `debuginfo = true` that doesn't let you use a debugger, but doesn't make building rustc slower and still gives you line numbers in backtraces.
|
||||
+- `debuginfo-tools = true` - Build the extended tools with debuginfo.
|
||||
- `debug-assertions = true` - Makes the log output of `debug!` work.
|
||||
- `optimize = false` - Disable optimizations to speed up compilation of stage1 rust, but makes the stage1 compiler x100 slower.
|
||||
|
||||
diff --git a/config.toml.example b/config.toml.example
|
||||
index f153562a53..64e2f1b424 100644
|
||||
--- a/config.toml.example
|
||||
+++ b/config.toml.example
|
||||
@@ -259,6 +259,10 @@
|
||||
# standard library.
|
||||
#debuginfo-only-std = false
|
||||
|
||||
+# Enable debuginfo for the extended tools: cargo, rls, rustfmt
|
||||
+# Adding debuginfo increases their sizes by a factor of 3-4.
|
||||
+#debuginfo-tools = false
|
||||
+
|
||||
# Whether or not jemalloc is built and enabled
|
||||
#use-jemalloc = true
|
||||
|
||||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index fcb78c479f..584c0cbe75 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -603,10 +603,14 @@ impl<'a> Builder<'a> {
|
||||
cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, self.build.build)));
|
||||
}
|
||||
|
||||
- if mode != Mode::Tool {
|
||||
- // Tools don't get debuginfo right now, e.g. cargo and rls don't
|
||||
- // get compiled with debuginfo.
|
||||
- // Adding debuginfo increases their sizes by a factor of 3-4.
|
||||
+ if mode == Mode::Tool {
|
||||
+ // Tools like cargo and rls don't get debuginfo by default right now, but this can be
|
||||
+ // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4.
|
||||
+ if self.config.rust_debuginfo_tools {
|
||||
+ cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
|
||||
+ cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
|
||||
+ }
|
||||
+ } else {
|
||||
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
|
||||
cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
|
||||
cargo.env("RUSTC_FORCE_UNSTABLE", "1");
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index f3810ac869..ac64e6e8e3 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -88,6 +88,7 @@ pub struct Config {
|
||||
pub rust_debuginfo: bool,
|
||||
pub rust_debuginfo_lines: bool,
|
||||
pub rust_debuginfo_only_std: bool,
|
||||
+ pub rust_debuginfo_tools: bool,
|
||||
pub rust_rpath: bool,
|
||||
pub rustc_parallel_queries: bool,
|
||||
pub rustc_default_linker: Option<String>,
|
||||
@@ -271,6 +272,7 @@ struct Rust {
|
||||
debuginfo: Option<bool>,
|
||||
debuginfo_lines: Option<bool>,
|
||||
debuginfo_only_std: Option<bool>,
|
||||
+ debuginfo_tools: Option<bool>,
|
||||
experimental_parallel_queries: Option<bool>,
|
||||
debug_jemalloc: Option<bool>,
|
||||
use_jemalloc: Option<bool>,
|
||||
@@ -425,6 +427,7 @@ impl Config {
|
||||
let mut llvm_assertions = None;
|
||||
let mut debuginfo_lines = None;
|
||||
let mut debuginfo_only_std = None;
|
||||
+ let mut debuginfo_tools = None;
|
||||
let mut debug = None;
|
||||
let mut debug_jemalloc = None;
|
||||
let mut debuginfo = None;
|
||||
@@ -462,6 +465,7 @@ impl Config {
|
||||
debuginfo = rust.debuginfo;
|
||||
debuginfo_lines = rust.debuginfo_lines;
|
||||
debuginfo_only_std = rust.debuginfo_only_std;
|
||||
+ debuginfo_tools = rust.debuginfo_tools;
|
||||
optimize = rust.optimize;
|
||||
ignore_git = rust.ignore_git;
|
||||
debug_jemalloc = rust.debug_jemalloc;
|
||||
@@ -553,6 +557,7 @@ impl Config {
|
||||
config.rust_thinlto = thinlto.unwrap_or(true);
|
||||
config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default);
|
||||
config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default);
|
||||
+ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default);
|
||||
|
||||
let default = debug == Some(true);
|
||||
config.debug_jemalloc = debug_jemalloc.unwrap_or(default);
|
||||
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
|
||||
index 99a3ee4e4c..689dd905fb 100755
|
||||
--- a/src/bootstrap/configure.py
|
||||
+++ b/src/bootstrap/configure.py
|
||||
@@ -78,6 +78,7 @@ def v(*args):
|
||||
o("debuginfo", "rust.debuginfo", "build with debugger metadata")
|
||||
o("debuginfo-lines", "rust.debuginfo-lines", "build with line number debugger metadata")
|
||||
o("debuginfo-only-std", "rust.debuginfo-only-std", "build only libstd with debugging information")
|
||||
+o("debuginfo-tools", "rust.debuginfo-tools", "build extended tools with debugging information")
|
||||
o("debug-jemalloc", "rust.debug-jemalloc", "build jemalloc with --enable-debug --enable-fill")
|
||||
v("save-toolstates", "rust.save-toolstates", "save build and test status of external tools into this file")
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
||||
From f0a43d3a9a4c28ea45d6bed430b1d9d561944e16 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 13 Apr 2018 21:57:53 -0700
|
||||
Subject: [PATCH 2/3] Avoid specific claims about debuginfo size
|
||||
|
||||
---
|
||||
config.toml.example | 2 +-
|
||||
src/bootstrap/builder.rs | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config.toml.example b/config.toml.example
|
||||
index 64e2f1b424..46be1ecab7 100644
|
||||
--- a/config.toml.example
|
||||
+++ b/config.toml.example
|
||||
@@ -260,7 +260,7 @@
|
||||
#debuginfo-only-std = false
|
||||
|
||||
# Enable debuginfo for the extended tools: cargo, rls, rustfmt
|
||||
-# Adding debuginfo increases their sizes by a factor of 3-4.
|
||||
+# Adding debuginfo makes them several times larger.
|
||||
#debuginfo-tools = false
|
||||
|
||||
# Whether or not jemalloc is built and enabled
|
||||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index 584c0cbe75..627a695884 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -605,7 +605,7 @@ impl<'a> Builder<'a> {
|
||||
|
||||
if mode == Mode::Tool {
|
||||
// Tools like cargo and rls don't get debuginfo by default right now, but this can be
|
||||
- // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4.
|
||||
+ // enabled in the config. Adding debuginfo makes them several times larger.
|
||||
if self.config.rust_debuginfo_tools {
|
||||
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
|
||||
cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
||||
From 7ddb573a2ea41ad3c35f927b7b90fd545a6ab9da Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 13 Apr 2018 21:58:21 -0700
|
||||
Subject: [PATCH 3/3] Make debuginfo-tools always default false
|
||||
|
||||
---
|
||||
src/bootstrap/config.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index ac64e6e8e3..06443ae6cd 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -557,7 +557,7 @@ impl Config {
|
||||
config.rust_thinlto = thinlto.unwrap_or(true);
|
||||
config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default);
|
||||
config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default);
|
||||
- config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default);
|
||||
+ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(false);
|
||||
|
||||
let default = debug == Some(true);
|
||||
config.debug_jemalloc = debug_jemalloc.unwrap_or(default);
|
||||
--
|
||||
2.14.3
|
||||
|
194
rust.spec
194
rust.spec
|
@ -27,6 +27,13 @@
|
|||
%bcond_with bundled_llvm
|
||||
%endif
|
||||
|
||||
# Some targets don't have libgit2
|
||||
%if 0%{?rhel} && !0%{?epel}
|
||||
%bcond_without bundled_libgit2
|
||||
%else
|
||||
%bcond_with bundled_libgit2
|
||||
%endif
|
||||
|
||||
# LLDB only works on some architectures
|
||||
%ifarch %{arm} aarch64 %{ix86} x86_64
|
||||
# LLDB isn't available everywhere...
|
||||
|
@ -39,11 +46,15 @@
|
|||
%bcond_with lldb
|
||||
%endif
|
||||
|
||||
|
||||
# Some sub-packages are versioned independently of the rust compiler and runtime itself.
|
||||
%global rustc_version 1.25.0
|
||||
%global cargo_version 0.26.0
|
||||
%global rustfmt_version 0.3.8
|
||||
%global rls_version 0.125.1
|
||||
|
||||
Name: rust
|
||||
Version: 1.25.0
|
||||
Release: 0.1.beta.13%{?dist}
|
||||
Version: %{rustc_version}
|
||||
Release: 3%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
|
@ -51,14 +62,17 @@ URL: https://www.rust-lang.org
|
|||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
%if "%{channel}" == "stable"
|
||||
%global rustc_package rustc-%{version}-src
|
||||
%global rustc_package rustc-%{rustc_version}-src
|
||||
%else
|
||||
%global rustc_package rustc-%{channel}-src
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
|
||||
# https://github.com/rust-lang/rust/pull/49290
|
||||
Patch1: 0001-Allow-installing-rustfmt-without-config.extended.patch
|
||||
# https://github.com/rust-lang/rust/pull/49484
|
||||
Patch1: 0001-Ignore-stack-probes-tests-on-powerpc-s390x-too.patch
|
||||
|
||||
# https://github.com/rust-lang/rust/pull/49959
|
||||
Patch2: pull-49959.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
|
@ -104,10 +118,10 @@ Provides: bundled(%{name}-bootstrap) = %{bootstrap_rust}
|
|||
%else
|
||||
BuildRequires: cargo >= %{bootstrap_cargo}
|
||||
%if 0%{?fedora} >= 27
|
||||
BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version})
|
||||
BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{rustc_version})
|
||||
%else
|
||||
BuildRequires: %{name} >= %{bootstrap_rust}
|
||||
BuildConflicts: %{name} > %{version}
|
||||
BuildConflicts: %{name} > %{rustc_version}
|
||||
%endif
|
||||
%global local_rust_root %{_prefix}
|
||||
%endif
|
||||
|
@ -116,8 +130,12 @@ BuildRequires: make
|
|||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: curl
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libssh2)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%global python python2
|
||||
|
@ -160,11 +178,11 @@ Provides: bundled(libbacktrace) = 6.1.0
|
|||
Provides: bundled(miniz) = 1.16~beta+r1
|
||||
|
||||
# Virtual provides for folks who attempt "dnf install rustc"
|
||||
Provides: rustc = %{version}-%{release}
|
||||
Provides: rustc%{?_isa} = %{version}-%{release}
|
||||
Provides: rustc = %{rustc_version}-%{release}
|
||||
Provides: rustc%{?_isa} = %{rustc_version}-%{release}
|
||||
|
||||
# Always require our exact standard library
|
||||
Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-std-static%{?_isa} = %{rustc_version}-%{release}
|
||||
|
||||
# The C compiler is needed at runtime just for linking. Someday rustc might
|
||||
# invoke the linker directly, and then we'll only need binutils.
|
||||
|
@ -172,7 +190,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
|||
Requires: /usr/bin/cc
|
||||
|
||||
# ALL Rust libraries are private, because they don't keep an ABI.
|
||||
%global _privatelibs lib.*-[[:xdigit:]]*[.]so.*
|
||||
%global _privatelibs lib(.*-[[:xdigit:]]*|rustc.*)[.]so.*
|
||||
%global __provides_exclude ^(%{_privatelibs})$
|
||||
%global __requires_exclude ^(%{_privatelibs})$
|
||||
%global __provides_exclude_from ^%{_docdir}/.*$
|
||||
|
@ -225,7 +243,7 @@ This package includes the common functionality for %{name}-gdb and %{name}-lldb.
|
|||
Summary: GDB pretty printers for Rust
|
||||
BuildArch: noarch
|
||||
Requires: gdb
|
||||
Requires: %{name}-debugger-common = %{version}-%{release}
|
||||
Requires: %{name}-debugger-common = %{rustc_version}-%{release}
|
||||
|
||||
%description gdb
|
||||
This package includes the rust-gdb script, which allows easier debugging of Rust
|
||||
|
@ -242,7 +260,7 @@ Summary: LLDB pretty printers for Rust
|
|||
|
||||
Requires: lldb
|
||||
Requires: python2-lldb
|
||||
Requires: %{name}-debugger-common = %{version}-%{release}
|
||||
Requires: %{name}-debugger-common = %{rustc_version}-%{release}
|
||||
|
||||
%description lldb
|
||||
This package includes the rust-lldb script, which allows easier debugging of Rust
|
||||
|
@ -263,20 +281,68 @@ 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
|
||||
Version: %{cargo_version}
|
||||
%if %with bundled_libgit2
|
||||
Provides: bundled(libgit2) = 0.26.0
|
||||
%else
|
||||
BuildRequires: pkgconfig(libgit2) >= 0.24
|
||||
%endif
|
||||
# For tests:
|
||||
BuildRequires: git
|
||||
# Cargo is not much use without Rust
|
||||
Requires: rust
|
||||
|
||||
%description -n cargo
|
||||
Cargo is a tool that allows Rust projects to declare their various dependencies
|
||||
and ensure that you'll always get a repeatable build.
|
||||
|
||||
|
||||
%package -n cargo-doc
|
||||
Summary: Documentation for Cargo
|
||||
Version: %{cargo_version}
|
||||
BuildArch: noarch
|
||||
# Cargo no longer builds its own documentation
|
||||
# https://github.com/rust-lang/cargo/pull/4904
|
||||
Requires: rust-doc
|
||||
|
||||
%description -n cargo-doc
|
||||
This package includes HTML documentation for Cargo.
|
||||
|
||||
|
||||
%package -n rustfmt-preview
|
||||
Summary: Tool to find and fix Rust formatting issues
|
||||
Version: 0.3.8
|
||||
Version: %{rustfmt_version}
|
||||
Requires: cargo
|
||||
|
||||
# Despite the lower version, our rustfmt-preview is newer than rustfmt-0.9.
|
||||
# It's expected to stay "preview" until it's released as 1.0.
|
||||
Obsoletes: rustfmt <= 0.9.0
|
||||
Provides: rustfmt = %{version}
|
||||
Provides: rustfmt = %{rustfmt_version}
|
||||
|
||||
%description -n rustfmt-preview
|
||||
A tool for formatting Rust code according to style guidelines.
|
||||
|
||||
|
||||
%package -n rls-preview
|
||||
Summary: Rust Language Server for IDE integration
|
||||
Version: %{rls_version}
|
||||
Provides: rls = %{rls_version}
|
||||
%if %with bundled_libgit2
|
||||
Provides: bundled(libgit2) = 0.26.0
|
||||
%endif
|
||||
Requires: rust-analysis
|
||||
# /usr/bin/rls is dynamically linked against internal rustc libs
|
||||
Requires: %{name}%{?_isa} = %{rustc_version}-%{release}
|
||||
|
||||
%description -n rls-preview
|
||||
The Rust Language Server provides a server that runs in the background,
|
||||
providing IDEs, editors, and other tools with information about Rust programs.
|
||||
It supports functionality such as 'goto definition', symbol search,
|
||||
reformatting, and code completion, and enables renaming and refactorings.
|
||||
|
||||
|
||||
%package src
|
||||
Summary: Sources for the Rust standard library
|
||||
BuildArch: noarch
|
||||
|
@ -286,6 +352,16 @@ This package includes source files for the Rust standard library. It may be
|
|||
useful as a reference for code completion tools in various editors.
|
||||
|
||||
|
||||
%package analysis
|
||||
Summary: Compiler analysis data for the Rust standard library
|
||||
Requires: rust-std-static%{?_isa} = %{rustc_version}-%{release}
|
||||
|
||||
%description analysis
|
||||
This package contains analysis data files produced with rustc's -Zsave-analysis
|
||||
feature for the Rust standard library. The RLS (Rust Language Server) uses this
|
||||
data to provide information about the Rust standard library.
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
%ifarch %{bootstrap_arches}
|
||||
|
@ -298,7 +374,8 @@ test -f '%{local_rust_root}/bin/rustc'
|
|||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
%patch1 -p1 -b .dist-rustfmt
|
||||
%patch1 -p1 -b .ignore-ibm
|
||||
%patch2 -p1
|
||||
|
||||
%if "%{python}" == "python3"
|
||||
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
|
||||
|
@ -346,6 +423,11 @@ find src/vendor -name .cargo-checksum.json \
|
|||
|
||||
%build
|
||||
|
||||
%if %without bundled_libgit2
|
||||
# convince libgit2-sys to use the distro libgit2
|
||||
export LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
%endif
|
||||
|
||||
%{?cmake_path:export PATH=%{cmake_path}:$PATH}
|
||||
%{?library_path:export LIBRARY_PATH="%{library_path}"}
|
||||
%{?rustflags:export RUSTFLAGS="%{rustflags}"}
|
||||
|
@ -358,25 +440,25 @@ find src/vendor -name .cargo-checksum.json \
|
|||
%ifarch %{arm}
|
||||
# full debuginfo is exhausting memory; just do libstd for now
|
||||
# https://github.com/rust-lang/rust/issues/45854
|
||||
%define enable_debuginfo --enable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-lines
|
||||
%define enable_debuginfo --enable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines
|
||||
%else
|
||||
%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-lines
|
||||
%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines
|
||||
%endif
|
||||
|
||||
%configure --disable-option-checking \
|
||||
--libdir=%{common_libdir} \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
--enable-local-rust --local-rust-root=%{local_rust_root} \
|
||||
--local-rust-root=%{local_rust_root} \
|
||||
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} --disable-codegen-tests \
|
||||
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
||||
--disable-jemalloc \
|
||||
--disable-rpath \
|
||||
%{enable_debuginfo} \
|
||||
--enable-extended \
|
||||
--enable-vendor \
|
||||
--release-channel=%{channel}
|
||||
|
||||
%{python} ./x.py build
|
||||
%{python} ./x.py build src/tools/rustfmt
|
||||
%{python} ./x.py doc
|
||||
|
||||
|
||||
|
@ -386,9 +468,6 @@ find src/vendor -name .cargo-checksum.json \
|
|||
%{?rustflags:export RUSTFLAGS="%{rustflags}"}
|
||||
|
||||
DESTDIR=%{buildroot} %{python} ./x.py install
|
||||
DESTDIR=%{buildroot} %{python} ./x.py install rustfmt
|
||||
DESTDIR=%{buildroot} %{python} ./x.py install src
|
||||
|
||||
|
||||
# Make sure the shared libraries are in the proper libdir
|
||||
%if "%{_libdir}" != "%{common_libdir}"
|
||||
|
@ -423,12 +502,38 @@ rm -f %{buildroot}%{_docdir}/%{name}/README.md
|
|||
rm -f %{buildroot}%{_docdir}/%{name}/COPYRIGHT
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-APACHE
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-MIT
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-THIRD-PARTY
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/*.old
|
||||
|
||||
# Sanitize the HTML documentation
|
||||
find %{buildroot}%{_docdir}/%{name}/html -empty -delete
|
||||
find %{buildroot}%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+'
|
||||
|
||||
# Create the path for crate-devel packages
|
||||
mkdir -p %{buildroot}%{_datadir}/cargo/registry
|
||||
|
||||
# Cargo no longer builds its own documentation
|
||||
# https://github.com/rust-lang/cargo/pull/4904
|
||||
mkdir -p %{buildroot}%{_docdir}/cargo/html
|
||||
cat <<EOF > %{buildroot}%{_docdir}/cargo/html/index.html
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="0; url=../../rust/html/cargo/index.html">
|
||||
<script type="text/javascript">
|
||||
window.location.href = "../../rust/html/cargo/index.html"
|
||||
</script>
|
||||
<title>cargo-doc redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
Cargo documentation has been moved to the rust-doc package.
|
||||
If you are not redirected automatically, please follow this
|
||||
<a href="../../rust/html/cargo/index.html">link</a>.
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
%if %without lldb
|
||||
rm -f %{buildroot}%{_bindir}/rust-lldb
|
||||
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
||||
|
@ -442,7 +547,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
|||
|
||||
# The results are not stable on koji, so mask errors and just log it.
|
||||
%{python} ./x.py test --no-fail-fast || :
|
||||
%{python} ./x.py test --no-fail-fast src/tools/rustfmt || :
|
||||
%{python} ./x.py test --no-fail-fast cargo || :
|
||||
%{python} ./x.py test --no-fail-fast rls || :
|
||||
%{python} ./x.py test --no-fail-fast rustfmt || :
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
@ -503,6 +610,21 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
|||
%license %{_docdir}/%{name}/html/*.txt
|
||||
|
||||
|
||||
%files -n cargo
|
||||
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
|
||||
%doc src/tools/cargo/README.md
|
||||
%{_bindir}/cargo
|
||||
%{_mandir}/man1/cargo*.1*
|
||||
%{_sysconfdir}/bash_completion.d/cargo
|
||||
%{_datadir}/zsh/site-functions/_cargo
|
||||
%dir %{_datadir}/cargo
|
||||
%dir %{_datadir}/cargo/registry
|
||||
|
||||
|
||||
%files -n cargo-doc
|
||||
%{_docdir}/cargo/html
|
||||
|
||||
|
||||
%files -n rustfmt-preview
|
||||
%{_bindir}/rustfmt
|
||||
%{_bindir}/cargo-fmt
|
||||
|
@ -510,14 +632,30 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
|||
%license src/tools/rustfmt/LICENSE-{APACHE,MIT}
|
||||
|
||||
|
||||
%files -n rls-preview
|
||||
%{_bindir}/rls
|
||||
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
|
||||
%license src/tools/rls/LICENSE-{APACHE,MIT}
|
||||
|
||||
|
||||
%files src
|
||||
%dir %{rustlibdir}
|
||||
%{rustlibdir}/src
|
||||
|
||||
|
||||
%files analysis
|
||||
%{rustlibdir}/%{rust_triple}/analysis/
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Mar 26 2018 Josh Stone <jistone@redhat.com> - 1.25.0-0.1.beta.13
|
||||
- beta test
|
||||
* Mon Apr 16 2018 Dan Callaghan <dcallagh@redhat.com> - 1.25.0-3
|
||||
- Add cargo, rls, and analysis
|
||||
|
||||
* Tue Apr 10 2018 Josh Stone <jistone@redhat.com> - 1.25.0-2
|
||||
- Filter codegen-backends from Provides too.
|
||||
|
||||
* Thu Mar 29 2018 Josh Stone <jistone@redhat.com> - 1.25.0-1
|
||||
- Update to 1.25.0.
|
||||
|
||||
* Thu Mar 01 2018 Josh Stone <jistone@redhat.com> - 1.24.1-1
|
||||
- Update to 1.24.1.
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (rustc-1.24.1-src.tar.xz) = 5f1fa594f55278f512b70af1f0e5a5ac377cab23ea7fb12d4f4982b5424f993a1f53bbfca28af8168d19ff95b56e107aaa0f684ecaa3264195a274cc5b10caf6
|
||||
SHA512 (rustc-1.25.0-src.tar.xz) = 45baaaa47d8b6433f61b1a6f2637d8f4fe013b534a8a94365025dfcf786815c95111b9bd3beb2544ba8587fb4c8b38431765c4d68bc9c19285da4ccf7c7eeda2
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
SHA512 (rustc-1.24.1-src.tar.xz) = 5f1fa594f55278f512b70af1f0e5a5ac377cab23ea7fb12d4f4982b5424f993a1f53bbfca28af8168d19ff95b56e107aaa0f684ecaa3264195a274cc5b10caf6
|
||||
SHA512 (rust-1.23.0-aarch64-unknown-linux-gnu.tar.xz) = 1d0fbf800a5ede9101570507d6cca4ef79445f2df3ace194ce74702eb507d7de5fe7f4a30dd5e5561faa2bfa205c237dee98eca6eefc8b652d21c0c373099ca6
|
||||
SHA512 (rust-1.23.0-armv7-unknown-linux-gnueabihf.tar.xz) = 2ef07187d78060005e99676cf1f168e7a8861e9f104c95056cfe8784a7fa35b14f0b69ba4adc8be4173ef8d4ce7554f92487385a09602343ab65fcf749fbe35c
|
||||
SHA512 (rust-1.23.0-i686-unknown-linux-gnu.tar.xz) = 6863a512100ae0369d0a5c4242d45fda9b83a2ad6c3e6691f4f0d1e071dca7003c55873cc03a9d09305adae24667e654bda66a8ad3246f4df2d7a2fc0fc4d7a7
|
||||
SHA512 (rust-1.23.0-powerpc64le-unknown-linux-gnu.tar.xz) = d17acdbed5d7007fade8d85492d1f6f3d46bb63f98d76e0313967175d6be0752d4643a26d8e3a1319e7f7782117ccbb76c6c891f9bb3cf3e6e2ab0f61d63574d
|
||||
SHA512 (rust-1.23.0-powerpc64-unknown-linux-gnu.tar.xz) = 19b7e734741fbe1318fffbd3698d3d208fbe978698d8f8e8b9f136d4f954821e94bec0979d4d3871e49acd589c67c0457f9320ac69fabea70a6839c2928c8d2a
|
||||
SHA512 (rust-1.23.0-s390x-unknown-linux-gnu.tar.xz) = c47e4750b02ffd7ffc423db12e8974d16384187938f5ab263a23cedb17f4b27a08acbc927365a1a23b4ee1b12e3ce2f15fdc059b6fe3932ef61798747cb9ddf7
|
||||
SHA512 (rust-1.23.0-x86_64-unknown-linux-gnu.tar.xz) = a5a3aa11d04e81305d33ed50fe657dcebb8c3a1f71a0a2b54372439ff6b1b4b7d2abd9c579b27950be67921cbb41586346824faf71495fb4f3f505ed8a48ccc9
|
||||
SHA512 (rustc-1.25.0-src.tar.xz) = 45baaaa47d8b6433f61b1a6f2637d8f4fe013b534a8a94365025dfcf786815c95111b9bd3beb2544ba8587fb4c8b38431765c4d68bc9c19285da4ccf7c7eeda2
|
||||
SHA512 (rust-1.24.0-aarch64-unknown-linux-gnu.tar.xz) = c8be9bd2929d5a9ac96524bdbbc3b137c703a54d6bdf19a8abee69fcb2cf7d11693a79c520571da021fb0c059de5f759f6c0336d4e42f278584c0ec3783983ce
|
||||
SHA512 (rust-1.24.0-armv7-unknown-linux-gnueabihf.tar.xz) = 57383893b1015377857509f9d485629fc181408089c577b725e52577e5cc44a69f557c8311324473008d879e7917105077045591e72c7d09b4b57bcf020fd39d
|
||||
SHA512 (rust-1.24.0-i686-unknown-linux-gnu.tar.xz) = d7e4ae046bea9c8fd5709fc316965bd0422afc1b7cf2b35bebc8899524bb5e12c1e685dc395e96f43957ab9b6ab3039fa0c0306751b6f1771bd6550d559e66a8
|
||||
SHA512 (rust-1.24.0-powerpc64le-unknown-linux-gnu.tar.xz) = f1a6ad1b66ce4e928a7f7aed8476fedc9ef93ef8520aa34781a5e7e8e2ab2ac3b13fc325d37bd30bc9cc3dc709b2286436b6c68eae1748c434860b51643afa1b
|
||||
SHA512 (rust-1.24.0-powerpc64-unknown-linux-gnu.tar.xz) = 0a2fbe4017c2c69e5fc2b35591f40fa45cf03be93ed0c03c56fb10d76dd78f7a86c40552afb60e360aa05447faf278e2988a9a0056a21950ba05daad1bf070a1
|
||||
SHA512 (rust-1.24.0-s390x-unknown-linux-gnu.tar.xz) = 252342cad4d41f7f972aec7a96e2ed0c8044af9a8c02bfdb36e47b591fad33df4234c141b7532e62f33d7f57af2191cbfb88606e2c59e927b08e41d9f0f8d2a5
|
||||
SHA512 (rust-1.24.0-x86_64-unknown-linux-gnu.tar.xz) = 876e5d66b5531a5dd1c42b8b2f073bc463a6dead348d5857f43b0047a4f6b101d26c7b29d6bbe1c1ea64cb6ca8c36d0159ff4dc75418e4216e7e585b169276ff
|
||||
|
|
Loading…
Reference in New Issue