Compare commits
No commits in common. "c8-stream-rhel8" and "c8-stream-rhel8-bootstrap" have entirely different histories.
c8-stream-
...
c8-stream-
|
@ -1,2 +1 @@
|
|||
SOURCES/rustc-1.71.1-src.tar.xz
|
||||
SOURCES/wasi-libc-wasi-sdk-20.tar.gz
|
||||
SOURCES/rustc-1.40.0-src.tar.xz
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
ffa03139b447604322d689eefe4e157a49c39f51 SOURCES/rustc-1.71.1-src.tar.xz
|
||||
8678e3510c88ef1de4d8c2940fa8ddad8f4eb084 SOURCES/wasi-libc-wasi-sdk-20.tar.gz
|
||||
34aa1c281487724648b39439bc512f958a3da4ad SOURCES/rustc-1.40.0-src.tar.xz
|
||||
|
|
|
@ -1,142 +0,0 @@
|
|||
From f2fd2d01f96b50b039402c9ab4278230687f7922 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Tue, 25 Jul 2023 13:11:50 -0700
|
||||
Subject: [PATCH] Allow using external builds of the compiler-rt profile lib
|
||||
|
||||
This changes the bootstrap config `target.*.profiler` from a plain bool
|
||||
to also allow a string, which will be used as a path to the pre-built
|
||||
profiling runtime for that target. Then `profiler_builtins/build.rs`
|
||||
reads that in a `LLVM_PROFILER_RT_LIB` environment variable.
|
||||
---
|
||||
config.example.toml | 6 ++++--
|
||||
library/profiler_builtins/build.rs | 6 ++++++
|
||||
src/bootstrap/compile.rs | 4 ++++
|
||||
src/bootstrap/config.rs | 30 ++++++++++++++++++++++++------
|
||||
4 files changed, 38 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/config.example.toml b/config.example.toml
|
||||
index d0eaa9fd7ffa..e0e991e679af 100644
|
||||
--- a/config.example.toml
|
||||
+++ b/config.example.toml
|
||||
@@ -745,8 +745,10 @@ changelog-seen = 2
|
||||
# This option will override the same option under [build] section.
|
||||
#sanitizers = build.sanitizers (bool)
|
||||
|
||||
-# Build the profiler runtime for this target(required when compiling with options that depend
|
||||
-# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
|
||||
+# When true, build the profiler runtime for this target(required when compiling
|
||||
+# with options that depend on this runtime, such as `-C profile-generate` or
|
||||
+# `-C instrument-coverage`). This may also be given a path to an existing build
|
||||
+# of the profiling runtime library from LLVM's compiler-rt.
|
||||
# This option will override the same option under [build] section.
|
||||
#profiler = build.profiler (bool)
|
||||
|
||||
diff --git a/library/profiler_builtins/build.rs b/library/profiler_builtins/build.rs
|
||||
index 1b1f11798d74..d14d0b82229a 100644
|
||||
--- a/library/profiler_builtins/build.rs
|
||||
+++ b/library/profiler_builtins/build.rs
|
||||
@@ -6,6 +6,12 @@
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
+ println!("cargo:rerun-if-env-changed=LLVM_PROFILER_RT_LIB");
|
||||
+ if let Ok(rt) = env::var("LLVM_PROFILER_RT_LIB") {
|
||||
+ println!("cargo:rustc-link-lib=static:+verbatim={rt}");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
let target = env::var("TARGET").expect("TARGET was not set");
|
||||
let cfg = &mut cc::Build::new();
|
||||
|
||||
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
|
||||
index 33addb90da37..1d8b3c6e5435 100644
|
||||
--- a/src/bootstrap/compile.rs
|
||||
+++ b/src/bootstrap/compile.rs
|
||||
@@ -305,6 +305,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
|
||||
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
|
||||
}
|
||||
|
||||
+ if let Some(path) = builder.config.profiler_path(target) {
|
||||
+ cargo.env("LLVM_PROFILER_RT_LIB", path);
|
||||
+ }
|
||||
+
|
||||
// Determine if we're going to compile in optimized C intrinsics to
|
||||
// the `compiler-builtins` crate. These intrinsics live in LLVM's
|
||||
// `compiler-rt` repository, but our `src/llvm-project` submodule isn't
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index e192cda9a9a7..a4803db0a470 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -467,7 +467,7 @@ pub struct Target {
|
||||
pub linker: Option<PathBuf>,
|
||||
pub ndk: Option<PathBuf>,
|
||||
pub sanitizers: Option<bool>,
|
||||
- pub profiler: Option<bool>,
|
||||
+ pub profiler: Option<StringOrBool>,
|
||||
pub rpath: Option<bool>,
|
||||
pub crt_static: Option<bool>,
|
||||
pub musl_root: Option<PathBuf>,
|
||||
@@ -796,9 +796,9 @@ struct Dist {
|
||||
}
|
||||
}
|
||||
|
||||
-#[derive(Debug, Deserialize)]
|
||||
+#[derive(Clone, Debug, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
-enum StringOrBool {
|
||||
+pub enum StringOrBool {
|
||||
String(String),
|
||||
Bool(bool),
|
||||
}
|
||||
@@ -809,6 +809,12 @@ fn default() -> StringOrBool {
|
||||
}
|
||||
}
|
||||
|
||||
+impl StringOrBool {
|
||||
+ fn is_string_or_true(&self) -> bool {
|
||||
+ matches!(self, Self::String(_) | Self::Bool(true))
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
define_config! {
|
||||
/// TOML representation of how the Rust build is configured.
|
||||
struct Rust {
|
||||
@@ -880,7 +886,7 @@ struct TomlTarget {
|
||||
llvm_libunwind: Option<String> = "llvm-libunwind",
|
||||
android_ndk: Option<String> = "android-ndk",
|
||||
sanitizers: Option<bool> = "sanitizers",
|
||||
- profiler: Option<bool> = "profiler",
|
||||
+ profiler: Option<StringOrBool> = "profiler",
|
||||
rpath: Option<bool> = "rpath",
|
||||
crt_static: Option<bool> = "crt-static",
|
||||
musl_root: Option<String> = "musl-root",
|
||||
@@ -1744,12 +1750,24 @@ pub fn any_sanitizers_enabled(&self) -> bool {
|
||||
self.target_config.values().any(|t| t.sanitizers == Some(true)) || self.sanitizers
|
||||
}
|
||||
|
||||
+ pub fn profiler_path(&self, target: TargetSelection) -> Option<&str> {
|
||||
+ match self.target_config.get(&target)?.profiler.as_ref()? {
|
||||
+ StringOrBool::String(s) => Some(s),
|
||||
+ StringOrBool::Bool(_) => None,
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
pub fn profiler_enabled(&self, target: TargetSelection) -> bool {
|
||||
- self.target_config.get(&target).map(|t| t.profiler).flatten().unwrap_or(self.profiler)
|
||||
+ self.target_config
|
||||
+ .get(&target)
|
||||
+ .and_then(|t| t.profiler.as_ref())
|
||||
+ .map(StringOrBool::is_string_or_true)
|
||||
+ .unwrap_or(self.profiler)
|
||||
}
|
||||
|
||||
pub fn any_profiler_enabled(&self) -> bool {
|
||||
- self.target_config.values().any(|t| t.profiler == Some(true)) || self.profiler
|
||||
+ self.target_config.values().any(|t| matches!(&t.profiler, Some(p) if p.is_string_or_true()))
|
||||
+ || self.profiler
|
||||
}
|
||||
|
||||
pub fn rpath_enabled(&self, target: TargetSelection) -> bool {
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From f6832adadb84364ce0c81fa02910b3706f441abc Mon Sep 17 00:00:00 2001
|
||||
From: Mark Rousskov <mark.simulacrum@gmail.com>
|
||||
Date: Wed, 6 Nov 2019 15:17:02 -0500
|
||||
Subject: [PATCH] Compiletest bump to stage0 bootstrap libtest
|
||||
|
||||
---
|
||||
src/tools/compiletest/src/main.rs | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
|
||||
index 34435819a2c4..b115539b4af3 100644
|
||||
--- a/src/tools/compiletest/src/main.rs
|
||||
+++ b/src/tools/compiletest/src/main.rs
|
||||
@@ -568,6 +568,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
|
||||
skip: vec![],
|
||||
list: false,
|
||||
options: test::Options::new(),
|
||||
+ time_options: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,6 +704,7 @@ pub fn make_test(config: &Config, testpaths: &TestPaths) -> Vec<test::TestDescAn
|
||||
ignore,
|
||||
should_panic,
|
||||
allow_fail: false,
|
||||
+ test_type: test::TestType::Unknown,
|
||||
},
|
||||
testfn: make_test_closure(config, early_props.ignore, testpaths, revision),
|
||||
}
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From 6e2adb05860b72610291d3b0e8bd525c44cb0cc9 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 9 Jun 2023 15:23:08 -0700
|
||||
Subject: [PATCH] Let environment variables override some default CPUs
|
||||
|
||||
---
|
||||
compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs | 2 +-
|
||||
compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
|
||||
index fd896e086b54..08d0c43d20b4 100644
|
||||
--- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::linux_gnu_base::opts();
|
||||
- base.cpu = "ppc64le".into();
|
||||
+ base.cpu = option_env!("RUSTC_TARGET_CPU_PPC64LE").unwrap_or("ppc64le").into();
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||
base.max_atomic_width = Some(64);
|
||||
base.stack_probes = StackProbeType::Inline;
|
||||
diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
|
||||
index f2c722b9a89d..17a14d10b27e 100644
|
||||
--- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
|
||||
@@ -5,7 +5,7 @@ pub fn target() -> Target {
|
||||
let mut base = super::linux_gnu_base::opts();
|
||||
base.endian = Endian::Big;
|
||||
// z10 is the oldest CPU supported by LLVM
|
||||
- base.cpu = "z10".into();
|
||||
+ base.cpu = option_env!("RUSTC_TARGET_CPU_S390X").unwrap_or("z10").into();
|
||||
// FIXME: The ABI implementation in cabi_s390x.rs is for now hard-coded to assume the no-vector
|
||||
// ABI. Pass the -vector feature string to LLVM to respect this assumption. On LLVM < 16, we
|
||||
// also strip v128 from the data_layout below to match the older LLVM's expectation.
|
||||
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
|
||||
index 9af1049b8702..68f876dd18c3 100644
|
||||
--- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::linux_gnu_base::opts();
|
||||
- base.cpu = "x86-64".into();
|
||||
+ base.cpu = option_env!("RUSTC_TARGET_CPU_X86_64").unwrap_or("x86-64").into();
|
||||
base.max_atomic_width = Some(64);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||
base.stack_probes = StackProbeType::X86;
|
||||
--
|
||||
2.40.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From b6fd4598c5367e78b5841fd99412484f0e86fc21 Mon Sep 17 00:00:00 2001
|
||||
From: Amanieu d'Antras <amanieu@gmail.com>
|
||||
Date: Wed, 1 Jan 2020 17:11:45 +0100
|
||||
Subject: [PATCH] Update the barrier cache during ARM EHABI unwinding
|
||||
|
||||
---
|
||||
src/libpanic_unwind/gcc.rs | 8 +++++++-
|
||||
src/libunwind/libunwind.rs | 2 ++
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs
|
||||
index 4f572fe21b30..328d0d4ce7be 100644
|
||||
--- a/src/libpanic_unwind/gcc.rs
|
||||
+++ b/src/libpanic_unwind/gcc.rs
|
||||
@@ -187,7 +187,13 @@ cfg_if::cfg_if! {
|
||||
match eh_action {
|
||||
EHAction::None |
|
||||
EHAction::Cleanup(_) => return continue_unwind(exception_object, context),
|
||||
- EHAction::Catch(_) => return uw::_URC_HANDLER_FOUND,
|
||||
+ EHAction::Catch(_) => {
|
||||
+ // EHABI requires the personality routine to update the
|
||||
+ // SP value in the barrier cache of the exception object.
|
||||
+ (*exception_object).private[5] =
|
||||
+ uw::_Unwind_GetGR(context, uw::UNWIND_SP_REG);
|
||||
+ return uw::_URC_HANDLER_FOUND;
|
||||
+ }
|
||||
EHAction::Terminate => return uw::_URC_FAILURE,
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
|
||||
index 0b39503c0d03..30658ce328d8 100644
|
||||
--- a/src/libunwind/libunwind.rs
|
||||
+++ b/src/libunwind/libunwind.rs
|
||||
@@ -23,6 +23,7 @@ pub type _Unwind_Word = uintptr_t;
|
||||
pub type _Unwind_Ptr = uintptr_t;
|
||||
pub type _Unwind_Trace_Fn = extern "C" fn(ctx: *mut _Unwind_Context, arg: *mut c_void)
|
||||
-> _Unwind_Reason_Code;
|
||||
+
|
||||
#[cfg(target_arch = "x86")]
|
||||
pub const unwinder_private_data_size: usize = 5;
|
||||
|
||||
@@ -151,6 +152,7 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
|
||||
use _Unwind_VRS_DataRepresentation::*;
|
||||
|
||||
pub const UNWIND_POINTER_REG: c_int = 12;
|
||||
+ pub const UNWIND_SP_REG: c_int = 13;
|
||||
pub const UNWIND_IP_REG: c_int = 15;
|
||||
|
||||
#[cfg_attr(all(feature = "llvm-libunwind",
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 37cb177eb53145103ae72b67562884782dde01c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Mironov <mironov.ivan@gmail.com>
|
||||
Date: Sun, 8 Dec 2019 17:23:08 +0500
|
||||
Subject: [PATCH] Use lld provided by system for wasm
|
||||
|
||||
---
|
||||
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
index 528a84a8b37c..353d742161d1 100644
|
||||
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
@@ -89,8 +89,7 @@ macro_rules! args {
|
||||
// arguments just yet
|
||||
limit_rdylib_exports: false,
|
||||
|
||||
- // we use the LLD shipped with the Rust toolchain by default
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
|
||||
|
||||
pre_link_args,
|
||||
--
|
||||
2.38.1
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
From a627c8f54cab6880dc7d36c55092a94c6f750a6e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 3 Aug 2023 15:05:40 -0700
|
||||
Subject: [PATCH] bootstrap: config: fix version comparison bug
|
||||
|
||||
Rust requires a previous version of Rust to build, such as the current version, or the
|
||||
previous version. However, the version comparison logic did not take patch releases
|
||||
into consideration when doing the version comparison for the current branch, e.g.
|
||||
Rust 1.71.1 could not be built by Rust 1.71.0 because it is neither an exact version
|
||||
match, or the previous version.
|
||||
|
||||
Adjust the version comparison logic to tolerate mismatches in the patch version.
|
||||
|
||||
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
||||
(cherry picked from commit 31a81a08786826cc6e832bd0b49fb8b934e29648)
|
||||
---
|
||||
src/bootstrap/config.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index e192cda9a9a7..2b5d0b94e968 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -1805,7 +1805,8 @@ pub fn check_build_rustc_version(&self) {
|
||||
.unwrap();
|
||||
if !(source_version == rustc_version
|
||||
|| (source_version.major == rustc_version.major
|
||||
- && source_version.minor == rustc_version.minor + 1))
|
||||
+ && (source_version.minor == rustc_version.minor
|
||||
+ || source_version.minor == rustc_version.minor + 1)))
|
||||
{
|
||||
let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1);
|
||||
eprintln!(
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# Explicitly use bindir tools, in case others are in the PATH,
|
||||
# like the rustup shims in a user's ~/.cargo/bin/.
|
||||
#
|
||||
# Since cargo 1.31, install only uses $CARGO_HOME/config, ignoring $PWD.
|
||||
# https://github.com/rust-lang/cargo/issues/6397
|
||||
# But we can set CARGO_HOME locally, which is a good idea anyway to make sure
|
||||
# it never writes to ~/.cargo during rpmbuild.
|
||||
%__cargo %{_bindir}/env CARGO_HOME=.cargo %{_bindir}/cargo
|
||||
%__rustc %{_bindir}/rustc
|
||||
%__rustdoc %{_bindir}/rustdoc
|
||||
|
||||
# Enable optimization, debuginfo, and link hardening.
|
||||
%__global_rustflags -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now
|
||||
|
||||
%__global_rustflags_toml [%{lua:
|
||||
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
|
||||
print('"' .. arg .. '", ')
|
||||
end}]
|
||||
|
||||
%cargo_prep(V:) (\
|
||||
%{__mkdir} -p .cargo \
|
||||
cat > .cargo/config << EOF \
|
||||
[build]\
|
||||
rustc = "%{__rustc}"\
|
||||
rustdoc = "%{__rustdoc}"\
|
||||
rustflags = %{__global_rustflags_toml}\
|
||||
\
|
||||
[install]\
|
||||
root = "%{buildroot}%{_prefix}"\
|
||||
\
|
||||
[term]\
|
||||
verbose = true\
|
||||
EOF\
|
||||
%if 0%{-V:1}\
|
||||
%{__tar} -xoaf %{S:%{-V*}}\
|
||||
cat >> .cargo/config << EOF \
|
||||
\
|
||||
[source.crates-io]\
|
||||
replace-with = "vendored-sources"\
|
||||
\
|
||||
[source.vendored-sources]\
|
||||
directory = "./vendor"\
|
||||
EOF\
|
||||
%endif\
|
||||
)
|
||||
|
||||
%cargo_build %__cargo build --release %{?_smp_mflags}
|
||||
|
||||
%cargo_test %__cargo test --release %{?_smp_mflags} --no-fail-fast
|
||||
|
||||
%cargo_install %__cargo install --no-track --path .
|
|
@ -0,0 +1,32 @@
|
|||
commit ab998a2eeb2bcdc69ce70c814af97f0d1302a404 (from d17f62d857c70508efbf60be41135880bcd2e062)
|
||||
Merge: d17f62d857c7 9452a8dfa3ba
|
||||
Author: Mazdak Farrokhzad <twingoow@gmail.com>
|
||||
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
|
|
@ -0,0 +1,39 @@
|
|||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index 2748903f2d47..10d02d6db829 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -1231,7 +1231,8 @@ impl<'a> Builder<'a> {
|
||||
cargo.arg("--frozen");
|
||||
}
|
||||
|
||||
- cargo.env("RUSTC_INSTALL_BINDIR", &self.config.bindir);
|
||||
+ // Try to use a sysroot-relative bindir, in case it was configured absolutely.
|
||||
+ cargo.env("RUSTC_INSTALL_BINDIR", self.config.bindir_relative());
|
||||
|
||||
self.ci_env.force_coloring_in_ci(&mut cargo);
|
||||
|
||||
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
||||
index d1bdfa0a7676..0c03b95c7b25 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -647,6 +647,20 @@ impl Config {
|
||||
config
|
||||
}
|
||||
|
||||
+ /// Try to find the relative path of `bindir`, otherwise return it in full.
|
||||
+ pub fn bindir_relative(&self) -> &Path {
|
||||
+ let bindir = &self.bindir;
|
||||
+ if bindir.is_absolute() {
|
||||
+ // Try to make it relative to the prefix.
|
||||
+ if let Some(prefix) = &self.prefix {
|
||||
+ if let Ok(stripped) = bindir.strip_prefix(prefix) {
|
||||
+ return stripped;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ bindir
|
||||
+ }
|
||||
+
|
||||
/// Try to find the relative path of `libdir`.
|
||||
pub fn libdir_relative(&self) -> Option<&Path> {
|
||||
let libdir = self.libdir.as_ref()?;
|
|
@ -0,0 +1,97 @@
|
|||
From ed8e55fe8d732d8a87343441db3bfbb974f043df Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 8 Jan 2020 09:44:45 -0800
|
||||
Subject: [PATCH 1/2] Remove obsolete llvm_tools flag
|
||||
|
||||
---
|
||||
src/bootstrap/tool.rs | 12 +-----------
|
||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
|
||||
index 815498047fd5..f785a0989a36 100644
|
||||
--- a/src/bootstrap/tool.rs
|
||||
+++ b/src/bootstrap/tool.rs
|
||||
@@ -293,7 +293,6 @@ fn rustbook_features() -> Vec<String> {
|
||||
macro_rules! bootstrap_tool {
|
||||
($(
|
||||
$name:ident, $path:expr, $tool_name:expr
|
||||
- $(,llvm_tools = $llvm:expr)*
|
||||
$(,is_external_tool = $external:expr)*
|
||||
$(,features = $features:expr)*
|
||||
;
|
||||
@@ -305,15 +304,6 @@ macro_rules! bootstrap_tool {
|
||||
)+
|
||||
}
|
||||
|
||||
- impl Tool {
|
||||
- /// Whether this tool requires LLVM to run
|
||||
- pub fn uses_llvm_tools(&self) -> bool {
|
||||
- match self {
|
||||
- $(Tool::$name => false $(|| $llvm)*,)+
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
impl<'a> Builder<'a> {
|
||||
pub fn tool_exe(&self, tool: Tool) -> PathBuf {
|
||||
match tool {
|
||||
@@ -381,7 +371,7 @@ bootstrap_tool!(
|
||||
Tidy, "src/tools/tidy", "tidy";
|
||||
Linkchecker, "src/tools/linkchecker", "linkchecker";
|
||||
CargoTest, "src/tools/cargotest", "cargotest";
|
||||
- Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true;
|
||||
+ Compiletest, "src/tools/compiletest", "compiletest";
|
||||
BuildManifest, "src/tools/build-manifest", "build-manifest";
|
||||
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
|
||||
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From cc4688d66d75e149a0136f701045cbf7ee672725 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 8 Jan 2020 10:04:18 -0800
|
||||
Subject: [PATCH 2/2] Build compiletest with in-tree libtest
|
||||
|
||||
---
|
||||
src/bootstrap/tool.rs | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
|
||||
index f785a0989a36..73a4dda74e88 100644
|
||||
--- a/src/bootstrap/tool.rs
|
||||
+++ b/src/bootstrap/tool.rs
|
||||
@@ -294,6 +294,7 @@ macro_rules! bootstrap_tool {
|
||||
($(
|
||||
$name:ident, $path:expr, $tool_name:expr
|
||||
$(,is_external_tool = $external:expr)*
|
||||
+ $(,is_unstable_tool = $unstable:expr)*
|
||||
$(,features = $features:expr)*
|
||||
;
|
||||
)+) => {
|
||||
@@ -344,7 +345,12 @@ macro_rules! bootstrap_tool {
|
||||
compiler: self.compiler,
|
||||
target: self.target,
|
||||
tool: $tool_name,
|
||||
- mode: Mode::ToolBootstrap,
|
||||
+ mode: if false $(|| $unstable)* {
|
||||
+ // use in-tree libraries for unstable features
|
||||
+ Mode::ToolStd
|
||||
+ } else {
|
||||
+ Mode::ToolBootstrap
|
||||
+ },
|
||||
path: $path,
|
||||
is_optional_tool: false,
|
||||
source_type: if false $(|| $external)* {
|
||||
@@ -371,7 +377,7 @@ bootstrap_tool!(
|
||||
Tidy, "src/tools/tidy", "tidy";
|
||||
Linkchecker, "src/tools/linkchecker", "linkchecker";
|
||||
CargoTest, "src/tools/cargotest", "cargotest";
|
||||
- Compiletest, "src/tools/compiletest", "compiletest";
|
||||
+ Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true;
|
||||
BuildManifest, "src/tools/build-manifest", "build-manifest";
|
||||
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
|
||||
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
--- rustc-1.39.0-src/Cargo.lock.orig 2019-11-04 07:45:21.000000000 -0800
|
||||
+++ rustc-1.39.0-src/Cargo.lock 2019-11-08 13:25:37.743377197 -0800
|
||||
@@ -1697,7 +1697,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1714,20 +1713,6 @@
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "libssh2-sys"
|
||||
-version = "0.2.11"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
- "libz-sys",
|
||||
- "openssl-sys",
|
||||
- "pkg-config",
|
||||
- "vcpkg",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.0.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-1.39.0-src/vendor/git2/Cargo.toml.orig 2019-11-04 09:34:41.000000000 -0800
|
||||
+++ rustc-1.39.0-src/vendor/git2/Cargo.toml 2019-11-08 13:25:13.174904479 -0800
|
||||
@@ -55,7 +55,7 @@
|
||||
version = "0.1.39"
|
||||
|
||||
[features]
|
||||
-default = ["ssh", "https", "ssh_key_from_memory"]
|
||||
+default = ["https"]
|
||||
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
|
||||
ssh = ["libgit2-sys/ssh"]
|
||||
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
|
||||
index 9abed30ea6f7..e4bf55df3688 100755
|
||||
--- a/src/etc/rust-gdb
|
||||
+++ b/src/etc/rust-gdb
|
||||
@@ -13,8 +13,6 @@ fi
|
||||
# Find out where the pretty printer Python module is
|
||||
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
|
||||
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
|
||||
-# Get the commit hash for path remapping
|
||||
-RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
|
||||
|
||||
# Run GDB with the additional arguments that load the pretty printers
|
||||
# Set the environment variable `RUST_GDB` to overwrite the call to a
|
||||
@@ -23,6 +21,6 @@ RUST_GDB="${RUST_GDB:-gdb}"
|
||||
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
|
||||
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
|
||||
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
|
||||
- -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \
|
||||
+ -iex "set substitute-path @BUILDDIR@ $RUSTC_SYSROOT/lib/rustlib/src/rust" \
|
||||
"$@"
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-07-07 17:30:04.817452621 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:30:27.777988139 -0700
|
||||
@@ -734,7 +734,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libnghttp2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1954,16 +1953,6 @@
|
||||
checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
|
||||
|
||||
[[package]]
|
||||
-name = "libnghttp2-sys"
|
||||
-version = "0.1.7+1.45.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-07-07 17:30:04.819452581 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:30:24.133061874 -0700
|
||||
@@ -118,7 +118,7 @@
|
||||
cargo-util.workspace = true
|
||||
clap = { workspace = true, features = ["wrap_help"] }
|
||||
crates-io.workspace = true
|
||||
-curl = { workspace = true, features = ["http2"] }
|
||||
+curl = { workspace = true, features = [] }
|
||||
curl-sys.workspace = true
|
||||
env_logger.workspace = true
|
||||
filetime.workspace = true
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-06-24 10:27:37.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-07-07 17:30:04.819452581 -0700
|
||||
@@ -407,16 +407,9 @@
|
||||
sources: SourceMap<'cfg>,
|
||||
config: &'cfg Config,
|
||||
) -> CargoResult<PackageSet<'cfg>> {
|
||||
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||
- // failures here as fatal as it would indicate a build-time problem.
|
||||
- let mut multi = Multi::new();
|
||||
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
|
||||
- multi
|
||||
- .pipelining(false, multiplexing)
|
||||
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||
-
|
||||
- // let's not flood crates.io with connections
|
||||
- multi.set_max_host_connections(2)?;
|
||||
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||
+ let multi = Multi::new();
|
||||
+ let multiplexing = false;
|
||||
|
||||
Ok(PackageSet {
|
||||
packages: package_ids
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-06-24 10:27:37.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-07-07 17:30:04.819452581 -0700
|
||||
@@ -229,16 +229,8 @@
|
||||
}
|
||||
self.fetch_started = true;
|
||||
|
||||
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||
- // failures here as fatal as it would indicate a build-time problem.
|
||||
- self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
|
||||
-
|
||||
- self.multi
|
||||
- .pipelining(false, self.multiplexing)
|
||||
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||
-
|
||||
- // let's not flood the server with connections
|
||||
- self.multi.set_max_host_connections(2)?;
|
||||
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||
+ self.multiplexing = false;
|
||||
|
||||
if !self.quiet {
|
||||
self.config
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-06-24 10:27:37.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-07-07 17:30:04.819452581 -0700
|
||||
@@ -26,7 +26,7 @@
|
||||
macro_rules! try_old_curl {
|
||||
($e:expr, $msg:expr) => {
|
||||
let result = $e;
|
||||
- if cfg!(target_os = "macos") {
|
||||
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
|
||||
if let Err(e) = result {
|
||||
warn!("ignoring libcurl {} error: {}", $msg, e);
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-06-24 10:27:37.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:12:23.406932870 -0700
|
||||
@@ -1942,7 +1942,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1965,20 +1964,6 @@
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "libssh2-sys"
|
||||
-version = "0.3.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
- "libz-sys",
|
||||
- "openssl-sys",
|
||||
- "pkg-config",
|
||||
- "vcpkg",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-06-24 10:27:37.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:12:00.688392750 -0700
|
||||
@@ -31,7 +31,7 @@
|
||||
filetime = "0.2.9"
|
||||
flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] }
|
||||
fwdansi = "1.1.0"
|
||||
-git2 = "0.17.1"
|
||||
+git2 = { version = "0.17.1", default-features = false, features = ["https"] }
|
||||
git2-curl = "0.18.0"
|
||||
gix = { version = "0.44.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree"] }
|
||||
gix-features-for-configuration-only = { version = "0.29.0", package = "gix-features", features = [ "parallel" ] }
|
956
SPECS/rust.spec
956
SPECS/rust.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue