Add missing target_feature to the list of well known cfg names

This commit is contained in:
Josh Stone 2022-05-23 15:42:58 -07:00
parent 3c34da705b
commit f2eed3dd39
3 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
Date: Wed, 27 Apr 2022 19:11:56 +0200
Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
names
---
compiler/rustc_session/src/config.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 12c5c4445d46..330201dd8fef 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1038,6 +1038,7 @@ fn fill_well_known_names(&mut self) {
sym::target_has_atomic_load_store,
sym::target_has_atomic,
sym::target_has_atomic_equal_alignment,
+ sym::target_feature,
sym::panic,
sym::sanitize,
sym::debug_assertions,
@@ -1081,6 +1082,10 @@ fn fill_well_known_values(&mut self) {
.into_iter()
.map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
+ // Unknown possible values:
+ // - `feature`
+ // - `target_feature`
+
// No-values
for name in [
sym::doc,
--
2.36.1

View File

@ -84,7 +84,7 @@
Name: rust
Version: 1.61.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -106,6 +106,13 @@ Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
# Set a substitute-path in rust-gdb for standard library sources.
Patch2: rustc-1.61.0-rust-gdb-substitute-path.patch
# Infer the type that compiletest uses for TestDesc ignore_message
Patch3: rustc-1.61.0-fix-compiletest-ignore_message.patch
# Add missing target_feature to the list of well known cfg names
# https://github.com/rust-lang/rust/pull/96483
Patch4: 0001-Add-missing-target_feature-to-the-list-of-well-known.patch
### RHEL-specific patches below ###
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
@ -571,6 +578,8 @@ test -f '%{local_rust_root}/bin/rustc'
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if %with disabled_libssh2
%patch100 -p1
@ -1030,6 +1039,9 @@ end}
%changelog
* Mon May 23 2022 Josh Stone <jistone@redhat.com> - 1.61.0-2
- Add missing target_feature to the list of well known cfg names
* Thu May 19 2022 Josh Stone <jistone@redhat.com> - 1.61.0-1
- Update to 1.61.0.
- Add rust-toolset for ELN.

View File

@ -0,0 +1,13 @@
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 1bdea33dffaf..1c21d5e87b68 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -807,7 +807,7 @@ pub fn make_test_description<R: Read>(
) -> test::TestDesc {
let mut ignore = false;
#[cfg(not(bootstrap))]
- let ignore_message: Option<String> = None;
+ let ignore_message = None;
let mut should_fail = false;
let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some();