rust: update to 1.78.0

This commit is contained in:
Marcin Puc 2024-05-03 10:40:58 +02:00 committed by cinerea0
parent 8f53bb6a24
commit 2dee68943c
3 changed files with 43 additions and 43 deletions

View File

@ -61,10 +61,10 @@ index 53f710b8f..2a4eec15f 100644
new(&[
(LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
diff --git a/config.example.toml b/config.example.toml
index a7d4df545..feaa0f861 100644
index f94553dd6..65139e167 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -586,14 +586,6 @@
@@ -591,14 +591,6 @@
# behavior -- this may lead to miscompilations or other bugs.
#description = ""
@ -80,7 +80,7 @@ index a7d4df545..feaa0f861 100644
# platforms to ensure that the compiler is usable by default from the build
# directory (as it links to a number of dynamic libraries). This may not be
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index 544a42d9a..8bd3fc755 100755
index 818a7daad..5edc363f6 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config")
@ -119,10 +119,10 @@ index 544a42d9a..8bd3fc755 100755
"riscv32gc-unknown-linux-musl install directory")
v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index df4d1a43d..b34309a27 100644
index e927b491c..00475eb66 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -307,39 +307,7 @@ fn copy_self_contained_objects(
@@ -361,39 +361,7 @@ fn copy_self_contained_objects(
let mut target_deps = vec![];
// Copies the libc and CRT objects.
@ -150,7 +150,7 @@ index df4d1a43d..b34309a27 100644
- for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] {
- let src = crt_path.join(obj);
- let target = libdir_self_contained.join(obj);
- builder.copy(&src, &target);
- builder.copy_link(&src, &target);
- target_deps.push((target, DependencyType::TargetSelfContained));
- }
-
@ -163,7 +163,7 @@ index df4d1a43d..b34309a27 100644
let srcdir = builder
.wasi_root(target)
.unwrap_or_else(|| {
@@ -436,15 +404,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
@@ -504,15 +472,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
.arg("--manifest-path")
.arg(builder.src.join("library/sysroot/Cargo.toml"));
@ -180,18 +180,18 @@ index df4d1a43d..b34309a27 100644
if let Some(p) = builder.wasi_root(target) {
let root = format!(
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index f1e1b89d9..e706b9d65 100644
index 3e1bc9a9a..3eef99651 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -308,7 +308,6 @@ pub struct Config {
pub missing_tools: bool,
@@ -310,7 +310,6 @@ pub struct Config {
pub missing_tools: bool, // FIXME: Deprecated field. Remove it at 2024.
// Fallback musl-root for all targets
- pub musl_root: Option<PathBuf>,
pub prefix: Option<PathBuf>,
pub sysconfdir: Option<PathBuf>,
pub datadir: Option<PathBuf>,
@@ -574,8 +573,6 @@ pub struct Target {
@@ -579,8 +578,6 @@ pub struct Target {
pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>,
pub crt_static: Option<bool>,
@ -199,16 +199,16 @@ index f1e1b89d9..e706b9d65 100644
- pub musl_libdir: Option<PathBuf>,
pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>,
pub no_std: bool,
@@ -1080,7 +1077,6 @@ define_config! {
pub runner: Option<String>,
@@ -1089,7 +1086,6 @@ define_config! {
default_linker: Option<String> = "default-linker",
channel: Option<String> = "channel",
description: Option<String> = "description",
- musl_root: Option<String> = "musl-root",
rpath: Option<bool> = "rpath",
strip: Option<bool> = "strip",
stack_protector: Option<String> = "stack-protector",
@@ -1131,8 +1127,6 @@ define_config! {
frame_pointers: Option<bool> = "frame-pointers",
@@ -1143,8 +1139,6 @@ define_config! {
profiler: Option<StringOrBool> = "profiler",
rpath: Option<bool> = "rpath",
crt_static: Option<bool> = "crt-static",
@ -217,7 +217,7 @@ index f1e1b89d9..e706b9d65 100644
wasi_root: Option<String> = "wasi-root",
qemu_rootfs: Option<String> = "qemu-rootfs",
no_std: Option<bool> = "no-std",
@@ -1532,7 +1526,6 @@ impl Config {
@@ -1564,7 +1558,6 @@ impl Config {
default_linker,
channel,
description,
@ -225,7 +225,7 @@ index f1e1b89d9..e706b9d65 100644
rpath,
verbose_tests,
optimize_tests,
@@ -1634,7 +1627,6 @@ impl Config {
@@ -1677,7 +1670,6 @@ impl Config {
config.rustc_parallel =
parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly");
config.rustc_default_linker = default_linker;
@ -233,7 +233,7 @@ index f1e1b89d9..e706b9d65 100644
config.save_toolstates = save_toolstates.map(PathBuf::from);
set(
&mut config.deny_warnings,
@@ -1827,8 +1819,6 @@ impl Config {
@@ -1876,8 +1868,6 @@ impl Config {
target.ranlib = cfg.ranlib.map(PathBuf::from);
target.linker = cfg.linker.map(PathBuf::from);
target.crt_static = cfg.crt_static;
@ -241,9 +241,9 @@ index f1e1b89d9..e706b9d65 100644
- target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
target.wasi_root = cfg.wasi_root.map(PathBuf::from);
target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
target.sanitizers = cfg.sanitizers;
target.runner = cfg.runner;
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
index 9101d94ea..df72d6f9a 100644
index e03b1e179..e61335d9b 100644
--- a/src/bootstrap/src/core/sanity.rs
+++ b/src/bootstrap/src/core/sanity.rs
@@ -11,7 +11,6 @@
@ -254,7 +254,7 @@ index 9101d94ea..df72d6f9a 100644
use std::path::PathBuf;
use std::process::Command;
@@ -215,28 +214,6 @@ than building it.
@@ -220,28 +219,6 @@ than building it.
continue;
}
@ -284,10 +284,10 @@ index 9101d94ea..df72d6f9a 100644
// There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 871318de5..b3f1eff91 100644
index 5ed6b357e..9667bb0e0 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1290,25 +1290,6 @@ impl Build {
@@ -1319,25 +1319,6 @@ impl Build {
}
}
@ -297,7 +297,7 @@ index 871318de5..b3f1eff91 100644
- .target_config
- .get(&target)
- .and_then(|t| t.musl_root.as_ref())
- .or_else(|| self.config.musl_root.as_ref())
- .or(self.config.musl_root.as_ref())
- .map(|p| &**p)
- }
-
@ -314,10 +314,10 @@ index 871318de5..b3f1eff91 100644
fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
index fb5b9d8c8..c6c9368a0 100644
index 3ba4e0cb6..31ffacb25 100644
--- a/src/bootstrap/src/utils/cc_detect.rs
+++ b/src/bootstrap/src/utils/cc_detect.rs
@@ -201,30 +201,6 @@ fn default_compiler(
@@ -199,30 +199,6 @@ fn default_compiler(
}
}

View File

@ -7,41 +7,41 @@ This allows us to get around the linker attempting to use
incompatible libs.
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index e18096443..b48742ae4 100644
index 7f93fdc72..f52644b57 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -1706,6 +1706,10 @@ impl<'a> Builder<'a> {
hostflags.arg(&arg);
@@ -2429,6 +2429,10 @@ impl Cargo {
self.hostflags.arg(&arg);
}
+ if let Some(sysroot) = self.native_sysroot(target) {
+ rustflags.arg(&format!("-Clink-args=--sysroot={}", sysroot.display()));
+ if let Some(sysroot) = builder.native_sysroot(target) {
+ self.rustflags.arg(&format!("-Clink-args=--sysroot={}", sysroot.display()));
+ }
+
if let Some(target_linker) = self.linker(target) {
if let Some(target_linker) = builder.linker(target) {
let target = crate::envify(&target.triple);
cargo.env(&format!("CARGO_TARGET_{target}_LINKER"), target_linker);
self.command.env(&format!("CARGO_TARGET_{target}_LINKER"), target_linker);
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index f1e1b89d9..30e61161d 100644
index 3e1bc9a9a..e0038b9ac 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -570,6 +570,7 @@ pub struct Target {
pub ranlib: Option<PathBuf>,
@@ -575,6 +575,7 @@ pub struct Target {
pub default_linker: Option<PathBuf>,
pub linker: Option<PathBuf>,
pub split_debuginfo: Option<SplitDebuginfo>,
+ pub sysroot: Option<PathBuf>,
pub sanitizers: Option<bool>,
pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>,
@@ -1123,6 +1124,7 @@ define_config! {
ranlib: Option<String> = "ranlib",
@@ -1135,6 +1136,7 @@ define_config! {
default_linker: Option<PathBuf> = "default-linker",
linker: Option<String> = "linker",
split_debuginfo: Option<String> = "split-debuginfo",
+ sysroot: Option<String> = "sysroot",
llvm_config: Option<String> = "llvm-config",
llvm_has_rust_patches: Option<bool> = "llvm-has-rust-patches",
llvm_filecheck: Option<String> = "llvm-filecheck",
@@ -1826,6 +1828,7 @@ impl Config {
@@ -1875,6 +1877,7 @@ impl Config {
target.ar = cfg.ar.map(PathBuf::from);
target.ranlib = cfg.ranlib.map(PathBuf::from);
target.linker = cfg.linker.map(PathBuf::from);
@ -50,10 +50,10 @@ index f1e1b89d9..30e61161d 100644
target.musl_root = cfg.musl_root.map(PathBuf::from);
target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 871318de5..96abbe721 100644
index 5ed6b357e..0d4392dd8 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1289,6 +1289,10 @@ impl Build {
@@ -1318,6 +1318,10 @@ impl Build {
self.config.target_config.get(&target).and_then(|t| t.crt_static)
}
}

View File

@ -8,7 +8,7 @@
# uploaded to https://repo-default.voidlinux.org/distfiles/
#
pkgname=rust
version=1.77.1
version=1.78.0
revision=1
hostmakedepends="curl pkg-config python3 tar cargo-bootstrap"
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm17-devel"
@ -18,7 +18,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, Apache-2.0"
homepage="https://www.rust-lang.org/"
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
checksum=ee106e4c569f52dba3b5b282b105820f86bd8f6b3d09c06b8dce82fb1bb3a4a1
checksum=ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9
lib32disabled=yes
make_check=no # CBA for now
python_version=3 # needed for python files in rust-src