add paraview
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
|
||||
From: Jory Pratt <anarchy@gentoo.org>
|
||||
Date: Tue, 2 Aug 2022 18:32:53 -0500
|
||||
Subject: [PATCH] Enable dynamic linking by default for musl
|
||||
|
||||
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
|
||||
---
|
||||
compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
index 207a87ab0..8a5a43363 100644
|
||||
--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
|
||||
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
|
||||
|
||||
// These targets statically link libc by default
|
||||
- base.crt_static_default = true;
|
||||
+ base.crt_static_default = false;
|
||||
|
||||
base
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
@@ -0,0 +1,34 @@
|
||||
From 92aa5f6b272bcdc020a34f8d90f9ef851b5b4504 Mon Sep 17 00:00:00 2001
|
||||
From: John Millikin <john@john-millikin.com>
|
||||
Date: Mon, 9 Jan 2023 13:54:21 +0900
|
||||
Subject: [PATCH] Disable `linux_ext` in wasm32 and fortanix rustdoc builds.
|
||||
|
||||
The `std::os::unix` module is stubbed out when building docs for these
|
||||
target platforms. The introduction of Linux-specific extension traits
|
||||
caused `std::os::net` to depend on sub-modules of `std::os::unix`,
|
||||
which broke rustdoc for the `wasm32-unknown-unknown` target.
|
||||
|
||||
Adding an additional `#[cfg]` guard solves that rustdoc failure by
|
||||
not declaring `linux_ext` on targets with a stubbed `std::os::unix`.
|
||||
---
|
||||
library/std/src/os/net/mod.rs | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/library/std/src/os/net/mod.rs b/library/std/src/os/net/mod.rs
|
||||
index 5ec267c41e97c..b7046dd7c598c 100644
|
||||
--- a/library/std/src/os/net/mod.rs
|
||||
+++ b/library/std/src/os/net/mod.rs
|
||||
@@ -1,4 +1,13 @@
|
||||
//! OS-specific networking functionality.
|
||||
|
||||
+// See cfg macros in `library/std/src/os/mod.rs` for why these platforms must
|
||||
+// be special-cased during rustdoc generation.
|
||||
+#[cfg(not(all(
|
||||
+ doc,
|
||||
+ any(
|
||||
+ all(target_arch = "wasm32", not(target_os = "wasi")),
|
||||
+ all(target_vendor = "fortanix", target_env = "sgx")
|
||||
+ )
|
||||
+)))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android", doc))]
|
||||
pub(super) mod linux_ext;
|
||||
@@ -0,0 +1,30 @@
|
||||
From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 16 Sep 2018 16:38:48 +0000
|
||||
Subject: [PATCH 12/15] Ignore broken and non-applicable tests
|
||||
|
||||
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
|
||||
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
|
||||
long-linker-command-lines: takes >10 minutes to run (but still passes)
|
||||
simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
|
||||
sparc-struct-abi: no sparc target
|
||||
sysroot-crates-are-unstable: can't run rustc without RPATH
|
||||
---
|
||||
test/ui/env-funky-keys.rs | 1 +
|
||||
6 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
|
||||
index c5c824ac58d..f3fe047a79c 100644
|
||||
--- a/tests/ui/env-funky-keys.rs
|
||||
+++ b/tests/ui/env-funky-keys.rs
|
||||
@@ -1,6 +1,7 @@
|
||||
// run-pass
|
||||
// Ignore this test on Android, because it segfaults there.
|
||||
|
||||
+// ignore-test
|
||||
// ignore-android
|
||||
// ignore-windows
|
||||
// ignore-cloudabi no execve
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
https://github.com/rust-lang/rust/pull/113579 which reverts the broken
|
||||
https://github.com/rust-lang/rust/pull/110906.
|
||||
From: ekusiadadus <ekusiadadus@gmail.com>
|
||||
Date: Wed, 12 Jul 2023 00:54:27 +0900
|
||||
Subject: [PATCH] Revert "fix: :bug: etc/bash_complettion -> src/etc/... to
|
||||
avoid copy error"
|
||||
|
||||
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -1074,11 +1074,7 @@ impl Step for Cargo {
|
||||
|
||||
tarball.add_file(&cargo, "bin", 0o755);
|
||||
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
|
||||
- tarball.add_renamed_file(
|
||||
- etc.join("cargo.bashcomp.sh"),
|
||||
- "src/etc/bash_completion.d",
|
||||
- "cargo",
|
||||
- );
|
||||
+ tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
|
||||
tarball.add_dir(etc.join("man"), "share/man/man1");
|
||||
tarball.add_legal_and_readme_to("share/doc/cargo");
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
https://bugs.gentoo.org/910595
|
||||
https://github.com/rust-lang/rust/issues/113678
|
||||
|
||||
https://github.com/rust-lang/rust/commit/67b5990472e3cac643d8cf90f45fe42201ddec3c
|
||||
From: jyn <github@jyn.dev>
|
||||
Date: Mon, 10 Jul 2023 15:59:30 -0500
|
||||
Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
|
||||
enabled"
|
||||
|
||||
This was not the correct fix. The problem was two-fold:
|
||||
- `download-rustc` didn't respect `llvm.assertions`
|
||||
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`
|
||||
|
||||
The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
|
||||
--- a/src/tools/lint-docs/src/groups.rs
|
||||
+++ b/src/tools/lint-docs/src/groups.rs
|
||||
@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> {
|
||||
fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> {
|
||||
let mut result = BTreeMap::new();
|
||||
let mut cmd = Command::new(self.rustc_path);
|
||||
- cmd.env_remove("LD_LIBRARY_PATH");
|
||||
cmd.arg("-Whelp");
|
||||
let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?;
|
||||
if !output.status.success() {
|
||||
--- a/src/tools/lint-docs/src/lib.rs
|
||||
+++ b/src/tools/lint-docs/src/lib.rs
|
||||
@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> {
|
||||
fs::write(&tempfile, source)
|
||||
.map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?;
|
||||
let mut cmd = Command::new(self.rustc_path);
|
||||
- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself.
|
||||
- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source,
|
||||
- // and sometimes the paths conflict. In particular, when using `download-rustc`,
|
||||
- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`.
|
||||
- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler.
|
||||
- cmd.env_remove("LD_LIBRARY_PATH");
|
||||
if options.contains(&"edition2015") {
|
||||
cmd.arg("--edition=2015");
|
||||
} else {
|
||||
@@ -0,0 +1,26 @@
|
||||
https://github.com/rust-lang/rust/pull/114440
|
||||
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>
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -2004,7 +2004,8 @@ impl Config {
|
||||
.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!(
|
||||
@@ -0,0 +1,156 @@
|
||||
This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4.
|
||||
|
||||
--- a/vendor/addr2line-0.20.0/Cargo.lock
|
||||
+++ b/vendor/addr2line-0.20.0/Cargo.lock
|
||||
@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libtest-mimic"
|
||||
--- a/vendor/backtrace-0.3.67/Cargo.lock
|
||||
+++ b/vendor/backtrace-0.3.67/Cargo.lock
|
||||
@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.138"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
--- a/vendor/bstr/Cargo.lock
|
||||
+++ b/vendor/bstr/Cargo.lock
|
||||
@@ -34,9 +34,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.138"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
--- a/vendor/cranelift-jit/Cargo.lock
|
||||
+++ b/vendor/cranelift-jit/Cargo.lock
|
||||
@@ -224,9 +224,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
--- a/vendor/crossbeam-channel/Cargo.lock
|
||||
+++ b/vendor/crossbeam-channel/Cargo.lock
|
||||
@@ -50,9 +50,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
--- a/vendor/elasticlunr-rs/Cargo.lock
|
||||
+++ b/vendor/elasticlunr-rs/Cargo.lock
|
||||
@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "lindera"
|
||||
--- a/vendor/handlebars/Cargo.lock
|
||||
+++ b/vendor/handlebars/Cargo.lock
|
||||
@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
--- a/vendor/icu_locid/Cargo.lock
|
||||
+++ b/vendor/icu_locid/Cargo.lock
|
||||
@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
--- a/vendor/libffi/Cargo.lock
|
||||
+++ b/vendor/libffi/Cargo.lock
|
||||
@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libffi"
|
||||
--- a/vendor/terminal_size/Cargo.lock
|
||||
+++ b/vendor/terminal_size/Cargo.lock
|
||||
@@ -47,9 +47,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
--- a/vendor/tracing-tree/Cargo.lock
|
||||
+++ b/vendor/tracing-tree/Cargo.lock
|
||||
@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
@@ -0,0 +1,19 @@
|
||||
https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
|
||||
https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497
|
||||
|
||||
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
|
||||
index f606fa483ca..8a2e1c40e8b 100644
|
||||
--- a/compiler/rustc_llvm/build.rs
|
||||
+++ b/compiler/rustc_llvm/build.rs
|
||||
@@ -237,10 +237,7 @@ fn main() {
|
||||
// of llvm-config, not the target that we're attempting to link.
|
||||
let mut cmd = Command::new(&llvm_config);
|
||||
cmd.arg(llvm_link_arg).arg("--libs");
|
||||
-
|
||||
- if !is_crossed {
|
||||
- cmd.arg("--system-libs");
|
||||
- }
|
||||
+ cmd.arg("--system-libs");
|
||||
|
||||
if (target.starts_with("arm") && !target.contains("freebsd"))
|
||||
|| target.starts_with("mips-")
|
||||
@@ -0,0 +1,45 @@
|
||||
From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001
|
||||
From: Arlo Siemsen <arsiem@microsoft.com>
|
||||
Date: Thu, 4 Jan 2024 11:40:56 -0600
|
||||
Subject: [PATCH] Handle vendored sources when remapping paths
|
||||
|
||||
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
|
||||
---
|
||||
src/bootstrap/src/core/builder.rs | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
|
||||
index 4e20babc55a..3770d0687b2 100644
|
||||
--- a/src/bootstrap/src/core/builder.rs
|
||||
+++ b/src/bootstrap/src/core/builder.rs
|
||||
@@ -1799,15 +1799,20 @@ pub fn cargo(
|
||||
}
|
||||
|
||||
if self.config.rust_remap_debuginfo {
|
||||
- // FIXME: handle vendored sources
|
||||
- let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
let mut env_var = OsString::new();
|
||||
- for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
- if !env_var.is_empty() {
|
||||
- env_var.push("\t");
|
||||
- }
|
||||
- env_var.push(t!(entry).path());
|
||||
+ if self.config.vendor {
|
||||
+ let vendor = self.build.src.join("vendor");
|
||||
+ env_var.push(vendor);
|
||||
env_var.push("=/rust/deps");
|
||||
+ } else {
|
||||
+ let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
+ for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
+ if !env_var.is_empty() {
|
||||
+ env_var.push("\t");
|
||||
+ }
|
||||
+ env_var.push(t!(entry).path());
|
||||
+ env_var.push("=/rust/deps");
|
||||
+ }
|
||||
}
|
||||
cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
|
||||
From: Jory Pratt <anarchy@gentoo.org>
|
||||
Date: Tue, 2 Aug 2022 18:32:53 -0500
|
||||
Subject: [PATCH] Enable dynamic linking by default for musl
|
||||
|
||||
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
|
||||
--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
|
||||
+++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
||||
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
|
||||
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
|
||||
|
||||
// These targets statically link libc by default
|
||||
- base.crt_static_default = true;
|
||||
+ base.crt_static_default = false;
|
||||
|
||||
base
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
@@ -0,0 +1,73 @@
|
||||
https://github.com/rust-lang/rust/pull/120661
|
||||
From: WANG Xuerui <xen0n@gentoo.org>
|
||||
Date: Mon, 5 Feb 2024 13:18:32 +0800
|
||||
Subject: [PATCH] target: default to the medium code model on LoongArch targets
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Rust LoongArch targets have been using the default LLVM code model
|
||||
so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
|
||||
As described in the "Code Model" section of LoongArch ELF psABI spec
|
||||
v20231219 [1], one can only make function calls as far as ±128MiB with
|
||||
the "normal" code model; this is insufficient for very large software
|
||||
containing Rust components that needs to be linked into the big text
|
||||
section, such as Chromium.
|
||||
|
||||
Because:
|
||||
|
||||
* we do not want to ask users to recompile std if they are to build
|
||||
such software,
|
||||
* objects compiled with larger code models can be linked with those
|
||||
with smaller code models without problems, and
|
||||
* the "medium" code model is comparable to the "small"/"normal" one
|
||||
performance-wise (same data access pattern; each function call
|
||||
becomes 2-insn long and indirect, but this may be relaxed back into
|
||||
the direct 1-insn form in a future LLVM version), but is able to
|
||||
perform function calls within ±128GiB,
|
||||
|
||||
it is better to just switch the targets to the "medium" code model,
|
||||
which is also "medium" in LLVM-speak.
|
||||
|
||||
[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use crate::spec::{base, Target, TargetOptions};
|
||||
+use crate::spec::{base, CodeModel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
@@ -7,6 +7,7 @@ pub fn target() -> Target {
|
||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
||||
arch: "loongarch64".into(),
|
||||
options: TargetOptions {
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
cpu: "generic".into(),
|
||||
features: "+f,+d".into(),
|
||||
llvm_abiname: "lp64d".into(),
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
|
||||
@@ -16,7 +16,7 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
- code_model: Some(CodeModel::Small),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
- code_model: Some(CodeModel::Small),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
|
||||
From: Jory Pratt <anarchy@gentoo.org>
|
||||
Date: Tue, 2 Aug 2022 18:32:53 -0500
|
||||
Subject: [PATCH] Enable dynamic linking by default for musl
|
||||
|
||||
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
|
||||
---
|
||||
compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
index 207a87ab0..8a5a43363 100644
|
||||
--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
|
||||
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
|
||||
|
||||
// These targets statically link libc by default
|
||||
- base.crt_static_default = true;
|
||||
+ base.crt_static_default = false;
|
||||
|
||||
base
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
@@ -0,0 +1,34 @@
|
||||
From 92aa5f6b272bcdc020a34f8d90f9ef851b5b4504 Mon Sep 17 00:00:00 2001
|
||||
From: John Millikin <john@john-millikin.com>
|
||||
Date: Mon, 9 Jan 2023 13:54:21 +0900
|
||||
Subject: [PATCH] Disable `linux_ext` in wasm32 and fortanix rustdoc builds.
|
||||
|
||||
The `std::os::unix` module is stubbed out when building docs for these
|
||||
target platforms. The introduction of Linux-specific extension traits
|
||||
caused `std::os::net` to depend on sub-modules of `std::os::unix`,
|
||||
which broke rustdoc for the `wasm32-unknown-unknown` target.
|
||||
|
||||
Adding an additional `#[cfg]` guard solves that rustdoc failure by
|
||||
not declaring `linux_ext` on targets with a stubbed `std::os::unix`.
|
||||
---
|
||||
library/std/src/os/net/mod.rs | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/library/std/src/os/net/mod.rs b/library/std/src/os/net/mod.rs
|
||||
index 5ec267c41e97c..b7046dd7c598c 100644
|
||||
--- a/library/std/src/os/net/mod.rs
|
||||
+++ b/library/std/src/os/net/mod.rs
|
||||
@@ -1,4 +1,13 @@
|
||||
//! OS-specific networking functionality.
|
||||
|
||||
+// See cfg macros in `library/std/src/os/mod.rs` for why these platforms must
|
||||
+// be special-cased during rustdoc generation.
|
||||
+#[cfg(not(all(
|
||||
+ doc,
|
||||
+ any(
|
||||
+ all(target_arch = "wasm32", not(target_os = "wasi")),
|
||||
+ all(target_vendor = "fortanix", target_env = "sgx")
|
||||
+ )
|
||||
+)))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android", doc))]
|
||||
pub(super) mod linux_ext;
|
||||
@@ -0,0 +1,30 @@
|
||||
From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 16 Sep 2018 16:38:48 +0000
|
||||
Subject: [PATCH 12/15] Ignore broken and non-applicable tests
|
||||
|
||||
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
|
||||
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
|
||||
long-linker-command-lines: takes >10 minutes to run (but still passes)
|
||||
simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
|
||||
sparc-struct-abi: no sparc target
|
||||
sysroot-crates-are-unstable: can't run rustc without RPATH
|
||||
---
|
||||
test/ui/env-funky-keys.rs | 1 +
|
||||
6 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
|
||||
index c5c824ac58d..f3fe047a79c 100644
|
||||
--- a/tests/ui/env-funky-keys.rs
|
||||
+++ b/tests/ui/env-funky-keys.rs
|
||||
@@ -1,6 +1,7 @@
|
||||
// run-pass
|
||||
// Ignore this test on Android, because it segfaults there.
|
||||
|
||||
+// ignore-test
|
||||
// ignore-android
|
||||
// ignore-windows
|
||||
// ignore-cloudabi no execve
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
https://github.com/rust-lang/rust/pull/113579 which reverts the broken
|
||||
https://github.com/rust-lang/rust/pull/110906.
|
||||
From: ekusiadadus <ekusiadadus@gmail.com>
|
||||
Date: Wed, 12 Jul 2023 00:54:27 +0900
|
||||
Subject: [PATCH] Revert "fix: :bug: etc/bash_complettion -> src/etc/... to
|
||||
avoid copy error"
|
||||
|
||||
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -1074,11 +1074,7 @@ impl Step for Cargo {
|
||||
|
||||
tarball.add_file(&cargo, "bin", 0o755);
|
||||
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
|
||||
- tarball.add_renamed_file(
|
||||
- etc.join("cargo.bashcomp.sh"),
|
||||
- "src/etc/bash_completion.d",
|
||||
- "cargo",
|
||||
- );
|
||||
+ tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
|
||||
tarball.add_dir(etc.join("man"), "share/man/man1");
|
||||
tarball.add_legal_and_readme_to("share/doc/cargo");
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
https://bugs.gentoo.org/910595
|
||||
https://github.com/rust-lang/rust/issues/113678
|
||||
|
||||
https://github.com/rust-lang/rust/commit/67b5990472e3cac643d8cf90f45fe42201ddec3c
|
||||
From: jyn <github@jyn.dev>
|
||||
Date: Mon, 10 Jul 2023 15:59:30 -0500
|
||||
Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
|
||||
enabled"
|
||||
|
||||
This was not the correct fix. The problem was two-fold:
|
||||
- `download-rustc` didn't respect `llvm.assertions`
|
||||
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`
|
||||
|
||||
The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
|
||||
--- a/src/tools/lint-docs/src/groups.rs
|
||||
+++ b/src/tools/lint-docs/src/groups.rs
|
||||
@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> {
|
||||
fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> {
|
||||
let mut result = BTreeMap::new();
|
||||
let mut cmd = Command::new(self.rustc_path);
|
||||
- cmd.env_remove("LD_LIBRARY_PATH");
|
||||
cmd.arg("-Whelp");
|
||||
let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?;
|
||||
if !output.status.success() {
|
||||
--- a/src/tools/lint-docs/src/lib.rs
|
||||
+++ b/src/tools/lint-docs/src/lib.rs
|
||||
@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> {
|
||||
fs::write(&tempfile, source)
|
||||
.map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?;
|
||||
let mut cmd = Command::new(self.rustc_path);
|
||||
- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself.
|
||||
- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source,
|
||||
- // and sometimes the paths conflict. In particular, when using `download-rustc`,
|
||||
- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`.
|
||||
- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler.
|
||||
- cmd.env_remove("LD_LIBRARY_PATH");
|
||||
if options.contains(&"edition2015") {
|
||||
cmd.arg("--edition=2015");
|
||||
} else {
|
||||
@@ -0,0 +1,26 @@
|
||||
https://github.com/rust-lang/rust/pull/114440
|
||||
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>
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -2004,7 +2004,8 @@ impl Config {
|
||||
.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!(
|
||||
@@ -0,0 +1,156 @@
|
||||
This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4.
|
||||
|
||||
--- a/vendor/addr2line-0.20.0/Cargo.lock
|
||||
+++ b/vendor/addr2line-0.20.0/Cargo.lock
|
||||
@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libtest-mimic"
|
||||
--- a/vendor/backtrace-0.3.67/Cargo.lock
|
||||
+++ b/vendor/backtrace-0.3.67/Cargo.lock
|
||||
@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.138"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
--- a/vendor/bstr/Cargo.lock
|
||||
+++ b/vendor/bstr/Cargo.lock
|
||||
@@ -34,9 +34,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.138"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
--- a/vendor/cranelift-jit/Cargo.lock
|
||||
+++ b/vendor/cranelift-jit/Cargo.lock
|
||||
@@ -224,9 +224,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
--- a/vendor/crossbeam-channel/Cargo.lock
|
||||
+++ b/vendor/crossbeam-channel/Cargo.lock
|
||||
@@ -50,9 +50,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
--- a/vendor/elasticlunr-rs/Cargo.lock
|
||||
+++ b/vendor/elasticlunr-rs/Cargo.lock
|
||||
@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "lindera"
|
||||
--- a/vendor/handlebars/Cargo.lock
|
||||
+++ b/vendor/handlebars/Cargo.lock
|
||||
@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
--- a/vendor/icu_locid/Cargo.lock
|
||||
+++ b/vendor/icu_locid/Cargo.lock
|
||||
@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
--- a/vendor/libffi/Cargo.lock
|
||||
+++ b/vendor/libffi/Cargo.lock
|
||||
@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "libffi"
|
||||
--- a/vendor/terminal_size/Cargo.lock
|
||||
+++ b/vendor/terminal_size/Cargo.lock
|
||||
@@ -47,9 +47,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.140"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
--- a/vendor/tracing-tree/Cargo.lock
|
||||
+++ b/vendor/tracing-tree/Cargo.lock
|
||||
@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.141"
|
||||
+version = "0.2.146"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
|
||||
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
@@ -0,0 +1,19 @@
|
||||
https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
|
||||
https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497
|
||||
|
||||
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
|
||||
index f606fa483ca..8a2e1c40e8b 100644
|
||||
--- a/compiler/rustc_llvm/build.rs
|
||||
+++ b/compiler/rustc_llvm/build.rs
|
||||
@@ -237,10 +237,7 @@ fn main() {
|
||||
// of llvm-config, not the target that we're attempting to link.
|
||||
let mut cmd = Command::new(&llvm_config);
|
||||
cmd.arg(llvm_link_arg).arg("--libs");
|
||||
-
|
||||
- if !is_crossed {
|
||||
- cmd.arg("--system-libs");
|
||||
- }
|
||||
+ cmd.arg("--system-libs");
|
||||
|
||||
if (target.starts_with("arm") && !target.contains("freebsd"))
|
||||
|| target.starts_with("mips-")
|
||||
@@ -0,0 +1,45 @@
|
||||
From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001
|
||||
From: Arlo Siemsen <arsiem@microsoft.com>
|
||||
Date: Thu, 4 Jan 2024 11:40:56 -0600
|
||||
Subject: [PATCH] Handle vendored sources when remapping paths
|
||||
|
||||
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
|
||||
---
|
||||
src/bootstrap/src/core/builder.rs | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
|
||||
index 4e20babc55a..3770d0687b2 100644
|
||||
--- a/src/bootstrap/src/core/builder.rs
|
||||
+++ b/src/bootstrap/src/core/builder.rs
|
||||
@@ -1799,15 +1799,20 @@ pub fn cargo(
|
||||
}
|
||||
|
||||
if self.config.rust_remap_debuginfo {
|
||||
- // FIXME: handle vendored sources
|
||||
- let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
let mut env_var = OsString::new();
|
||||
- for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
- if !env_var.is_empty() {
|
||||
- env_var.push("\t");
|
||||
- }
|
||||
- env_var.push(t!(entry).path());
|
||||
+ if self.config.vendor {
|
||||
+ let vendor = self.build.src.join("vendor");
|
||||
+ env_var.push(vendor);
|
||||
env_var.push("=/rust/deps");
|
||||
+ } else {
|
||||
+ let registry_src = t!(home::cargo_home()).join("registry").join("src");
|
||||
+ for entry in t!(std::fs::read_dir(registry_src)) {
|
||||
+ if !env_var.is_empty() {
|
||||
+ env_var.push("\t");
|
||||
+ }
|
||||
+ env_var.push(t!(entry).path());
|
||||
+ env_var.push("=/rust/deps");
|
||||
+ }
|
||||
}
|
||||
cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
|
||||
From: Jory Pratt <anarchy@gentoo.org>
|
||||
Date: Tue, 2 Aug 2022 18:32:53 -0500
|
||||
Subject: [PATCH] Enable dynamic linking by default for musl
|
||||
|
||||
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
|
||||
--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
|
||||
+++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
||||
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
|
||||
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
|
||||
|
||||
// These targets statically link libc by default
|
||||
- base.crt_static_default = true;
|
||||
+ base.crt_static_default = false;
|
||||
|
||||
base
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
@@ -0,0 +1,73 @@
|
||||
https://github.com/rust-lang/rust/pull/120661
|
||||
From: WANG Xuerui <xen0n@gentoo.org>
|
||||
Date: Mon, 5 Feb 2024 13:18:32 +0800
|
||||
Subject: [PATCH] target: default to the medium code model on LoongArch targets
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Rust LoongArch targets have been using the default LLVM code model
|
||||
so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
|
||||
As described in the "Code Model" section of LoongArch ELF psABI spec
|
||||
v20231219 [1], one can only make function calls as far as ±128MiB with
|
||||
the "normal" code model; this is insufficient for very large software
|
||||
containing Rust components that needs to be linked into the big text
|
||||
section, such as Chromium.
|
||||
|
||||
Because:
|
||||
|
||||
* we do not want to ask users to recompile std if they are to build
|
||||
such software,
|
||||
* objects compiled with larger code models can be linked with those
|
||||
with smaller code models without problems, and
|
||||
* the "medium" code model is comparable to the "small"/"normal" one
|
||||
performance-wise (same data access pattern; each function call
|
||||
becomes 2-insn long and indirect, but this may be relaxed back into
|
||||
the direct 1-insn form in a future LLVM version), but is able to
|
||||
perform function calls within ±128GiB,
|
||||
|
||||
it is better to just switch the targets to the "medium" code model,
|
||||
which is also "medium" in LLVM-speak.
|
||||
|
||||
[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use crate::spec::{base, Target, TargetOptions};
|
||||
+use crate::spec::{base, CodeModel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
@@ -7,6 +7,7 @@ pub fn target() -> Target {
|
||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
||||
arch: "loongarch64".into(),
|
||||
options: TargetOptions {
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
cpu: "generic".into(),
|
||||
features: "+f,+d".into(),
|
||||
llvm_abiname: "lp64d".into(),
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
|
||||
@@ -16,7 +16,7 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
- code_model: Some(CodeModel::Small),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
|
||||
+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
max_atomic_width: Some(64),
|
||||
relocation_model: RelocModel::Static,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
- code_model: Some(CodeModel::Small),
|
||||
+ code_model: Some(CodeModel::Medium),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
Reference in New Issue
Block a user