Accepting request 734169 from home:luke_nukem:branches:devel:languages:rust

- Add patch add-option-to-allow-warnings.patch to add a config option
  which allows warnings and so enables v1.38 to bootstrap itself.
- Update to version 1.38.0
  + Language
    - The `#[global_allocator]` attribute can now be used in submodules.
    - The `#[deprecated]` attribute can now be used on macros.
  + Compiler
    - Added pipelined compilation support to `rustc`. This will
      improve compilation times in some cases.
  + Libraries
    - `ascii::EscapeDefault` now implements `Clone` and `Display`.
    - Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
	  available at the same path as the trait. (e.g. The `Clone` derive macro
	  is available at `std::clone::Clone`). This also makes all built-in macros
	  available in `std`/`core` root. e.g. `std::include_bytes!`.
    - `str::Chars` now implements `Debug`.
    - `slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.
    - `*const T` and `*mut T` now implement `marker::Unpin`.
    - `Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.
    - Added euclidean remainder and division operations (`div_euclid`,
	  `rem_euclid`) to all numeric primitives. Additionally `checked`,
	  `overflowing`, and `wrapping` versions are available for all
	  integer primitives.
    - `thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
      `PartialEq`.
    - `iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.
  + Stabilized APIs
    - `<*const T>::cast`
    - `<*mut T>::cast`
    - `Duration::as_secs_f32`
    - `Duration::as_secs_f64`
    - `Duration::div_f32`
    - `Duration::div_f64`
    - `Duration::from_secs_f32`
    - `Duration::from_secs_f64`
    - `Duration::mul_f32`
    - `Duration::mul_f64`
    - `any::type_name`
  + Cargo
    - Added pipelined compilation support to `cargo`.
    - You can now pass the `--features` option multiple times to enable
      multiple features.
  + Misc
    - `rustc` will now warn about some incorrect uses of
      `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.

OBS-URL: https://build.opensuse.org/request/show/734169
OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=229
This commit is contained in:
Luke Jones 2019-10-01 03:31:42 +00:00 committed by Git OBS Bridge
parent 5d9a019862
commit 7ccfc9e547
21 changed files with 199 additions and 30 deletions

View File

@ -0,0 +1,112 @@
From 935c1c86070dfac3515a4296bf991cdf544bae27 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Tue, 27 Aug 2019 09:37:51 +0200
Subject: [PATCH] rustbuild: allow disabling deny(warnings) for bootstrap
When deny-warnings is not specified or set to true, the behaviour is the same as before.
When deny-warnings is set to false, warnings are now allowed
Fixes #63911
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
src/bootstrap/bin/main.rs | 3 ---
src/bootstrap/bin/rustc.rs | 8 +++-----
src/bootstrap/bin/rustdoc.rs | 3 ---
src/bootstrap/bootstrap.py | 2 ++
src/bootstrap/lib.rs | 3 ---
src/build_helper/lib.rs | 3 ---
6 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
index bd1a87c5744d..138b7f4b2610 100644
--- a/src/bootstrap/bin/main.rs
+++ b/src/bootstrap/bin/main.rs
@@ -5,9 +5,6 @@
//! parent directory, and otherwise documentation can be found throughout the `build`
//! directory in each respective module.
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
use std::env;
use bootstrap::{Config, Build};
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index ce92ce026967..8cb48df14bfe 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -15,9 +15,6 @@
//! switching compilers for the bootstrap and for build scripts will probably
//! never get replaced.
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
use std::env;
use std::ffi::OsString;
use std::io;
@@ -124,8 +121,9 @@ fn main() {
if env::var_os("RUSTC_DENY_WARNINGS").is_some() &&
env::var_os("RUSTC_EXTERNAL_TOOL").is_none() {
- // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints
- // there as well, some code doesn't go through this `rustc` wrapper.
+ // When extending this list, add the new lints to the RUSTFLAGS of the
+ // build_bootstrap function of src/bootstrap/bootstrap.py as well as
+ // some code doesn't go through this `rustc` wrapper.
cmd.arg("-Dwarnings");
cmd.arg("-Drust_2018_idioms");
cmd.arg("-Dunused_lifetimes");
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index ff38ee8788f5..766a3463ecd8 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -2,9 +2,6 @@
//!
//! See comments in `src/bootstrap/rustc.rs` for more information.
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
use std::env;
use std::process::Command;
use std::path::PathBuf;
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 86901792d797..3c56131396f2 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -631,6 +631,8 @@ def build_bootstrap(self):
target_linker = self.get_toml("linker", build_section)
if target_linker is not None:
env["RUSTFLAGS"] += "-C linker=" + target_linker + " "
+ if self.get_toml("deny-warnings", "rust") != "false":
+ env["RUSTFLAGS"] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes "
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
os.pathsep + env["PATH"]
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index c0e0ad1a857b..575844028d56 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -103,9 +103,6 @@
//! More documentation can be found in each respective module below, and you can
//! also check out the `src/bootstrap/README.md` file for more information.
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
#![feature(core_intrinsics)]
#![feature(drain_filter)]
diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
index 131d2034675e..f035a7119188 100644
--- a/src/build_helper/lib.rs
+++ b/src/build_helper/lib.rs
@@ -1,6 +1,3 @@
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
use std::fs::File;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:009a55688042c8f64cab97a1019d2d4e2c5ebc932acaa9eadecbcb7cd8193183
size 139261576

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d86790c837e6ef6f80cd477148342bef4fc93f0872715bf7bdd201f9dfc932da
size 142315532

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3653a203b4ef3f8f4d661872664e0741755a36665ac77b4053c3f791b2be5d4
size 182609496

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afbb05b3c4045e9ad5270ada53a31e954358bf893154c075ee05bbcbef7a2168
size 134270632

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0eba9783e674264c9f7af552ccd85889ff22b538147255ca153dfc10f3f91bb5
size 145880928

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:abb43afccedbd902928397b302ff265114dce738a5bc3cc6fab2851bab2ab2a0
size 149721676

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b7b2b5d9599b18e30a7f471fd2b41e0f04bfaf6c38f55d983abb9e8aa6196738
size 159518028

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e8dfbbba493b7efa762daf9980406cd7266f7224e7895a9940b86ef7614f738
size 169600936

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aed553dbf457d8239eb3b01d4a2f422672772a0114aa43647294eca1b358d219
size 124322996

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d4ed33497b3a3b89f5910fa140bbc9f4865ebf1735898bbe06266ef5944f6fca
size 126583596

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f99daecd13c716b0c285b1c26225e71df2c7ca520a00285ba4c26ff767680ecb
size 177419360

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d784f998e93e18e2daf369097c30eb4718d8d2a71372b0f3d0da2869942f19ec
size 124035536

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:539492d5bfcd21261843028e4f53f753f57bb8ed45faee394701f27c01aef63b
size 128662180

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eecebeaa2100950196e604d5680f9a9e7b6e97c535c246011a2247fe6ce629fc
size 131763436

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e5bcf4181d0ae65ec7a20f727fc29a13c7a4864e69344a1bc19721053b7daaf
size 141808296

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b498a84947012064363607c29cdd2ba6fab9a5260212ec4a7151dafd0d079081
size 165034364

View File

@ -1,3 +1,56 @@
-------------------------------------------------------------------
Mon Sep 30 21:29:54 UTC 2019 - Luke Jones <luke@ljones.dev>
- Add patch add-option-to-allow-warnings.patch to add a config option
which allows warnings and so enables v1.38 to bootstrap itself.
-------------------------------------------------------------------
Mon Sep 30 02:46:51 UTC 2019 - Luke Jones <luke@ljones.dev>
- Update to version 1.38.0
+ Language
- The `#[global_allocator]` attribute can now be used in submodules.
- The `#[deprecated]` attribute can now be used on macros.
+ Compiler
- Added pipelined compilation support to `rustc`. This will
improve compilation times in some cases.
+ Libraries
- `ascii::EscapeDefault` now implements `Clone` and `Display`.
- Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
available at the same path as the trait. (e.g. The `Clone` derive macro
is available at `std::clone::Clone`). This also makes all built-in macros
available in `std`/`core` root. e.g. `std::include_bytes!`.
- `str::Chars` now implements `Debug`.
- `slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.
- `*const T` and `*mut T` now implement `marker::Unpin`.
- `Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.
- Added euclidean remainder and division operations (`div_euclid`,
`rem_euclid`) to all numeric primitives. Additionally `checked`,
`overflowing`, and `wrapping` versions are available for all
integer primitives.
- `thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
`PartialEq`.
- `iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.
+ Stabilized APIs
- `<*const T>::cast`
- `<*mut T>::cast`
- `Duration::as_secs_f32`
- `Duration::as_secs_f64`
- `Duration::div_f32`
- `Duration::div_f64`
- `Duration::from_secs_f32`
- `Duration::from_secs_f64`
- `Duration::mul_f32`
- `Duration::mul_f64`
- `any::type_name`
+ Cargo
- Added pipelined compilation support to `cargo`.
- You can now pass the `--features` option multiple times to enable
multiple features.
+ Misc
- `rustc` will now warn about some incorrect uses of
`mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.
-------------------------------------------------------------------
Tue Sep 10 18:11:30 UTC 2019 - federico@suse.com

View File

@ -17,9 +17,9 @@
#
%global version_current 1.37.0
%global version_previous 1.36.0
%global version_bootstrap 1.36.0
%global version_current 1.38.0
%global version_previous 1.37.0
%global version_bootstrap 1.37.0
# some sub-packages are versioned independantly
%global rustfmt_version 1.0.3
%global clippy_version 0.0.212
@ -124,6 +124,8 @@ Source108: %{dl_url}/rust-%{version_bootstrap}-powerpc-unknown-linux-gnu.ta
Patch0: ignore-Wstring-conversion.patch
# PATCH-FIX-UPSTREAM: Fix bug with timestamps which caused LLVM to rebuild - https://github.com/rust-lang/rust/issues/61206
Patch1: rust-61206-assume-tarball-llvm-is-fresh.patch
# PATCH-FIX-UPSTREAM: Adds an option to ignore warnings, primaraily used in this build to allow v1.38 to bootstrap itself
Patch2: add-option-to-allow-warnings.patch
BuildRequires: ccache
# Leap 42 to 42.3, SLE12 SP1, SP2
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200
@ -376,6 +378,7 @@ This package includes HTML documentation for Cargo.
%patch0 -p1
%patch1 -p1
%patch2 -p1
# use python3
sed -i -e "1s|#!.*|#!%{_bindir}/python3|" x.py
@ -412,6 +415,7 @@ chmod +x src/libcore/unicode/printable.py
%build
%define _lto_cflags %{nil}
%configure \
--set rust.deny-warnings=false \
--disable-option-checking \
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
--enable-local-rust \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10abffac50a729cf74cef6dd03193a2f4647541bd19ee9281be9e5b12ca8cdfd
size 98654252

3
rustc-1.38.0-src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a7991aa4cb44ef941d71636e45a95468b520dc6fc7cf725364925bd3e3d3a34
size 96163304