|
|
|
@@ -6,14 +6,14 @@ Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
|
|
|
|
extended by various void contributors to match our musl setup
|
|
|
|
extended by various void contributors to match our musl setup
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
index e020bb8523..7b0cc7b556 100644
|
|
|
|
index 42aa1e1a6..c7d0433bb 100644
|
|
|
|
--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
+++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
+++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
|
|
@@ -1,15 +1,9 @@
|
|
|
|
@@ -1,15 +1,9 @@
|
|
|
|
-use crate::spec::{LinkSelfContainedDefault, TargetOptions, base, crt_objects};
|
|
|
|
-use crate::spec::{base, crt_objects, LinkSelfContainedDefault, TargetOptions};
|
|
|
|
+use crate::spec::{base, TargetOptions};
|
|
|
|
+use crate::spec::{base, TargetOptions};
|
|
|
|
|
|
|
|
|
|
|
|
pub(crate) fn opts() -> TargetOptions {
|
|
|
|
pub fn opts() -> TargetOptions {
|
|
|
|
let mut base = base::linux::opts();
|
|
|
|
let mut base = base::linux::opts();
|
|
|
|
|
|
|
|
|
|
|
|
base.env = "musl".into();
|
|
|
|
base.env = "musl".into();
|
|
|
|
@@ -27,7 +27,7 @@ index e020bb8523..7b0cc7b556 100644
|
|
|
|
base
|
|
|
|
base
|
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
index e3b6430a46..13a96e2cb7 100644
|
|
|
|
index e3b6430a4..13a96e2cb 100644
|
|
|
|
--- a/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
--- a/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
|
|
|
|
@@ -62,28 +62,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
|
|
|
|
@@ -62,28 +62,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
|
|
|
|
@@ -60,10 +60,10 @@ index e3b6430a46..13a96e2cb7 100644
|
|
|
|
new(&[
|
|
|
|
new(&[
|
|
|
|
(LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
|
|
|
|
(LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
|
|
|
|
diff --git a/config.example.toml b/config.example.toml
|
|
|
|
diff --git a/config.example.toml b/config.example.toml
|
|
|
|
index 4b591b949b..a157b6f1c9 100644
|
|
|
|
index f1dc32234..462a86f5b 100644
|
|
|
|
--- a/config.example.toml
|
|
|
|
--- a/config.example.toml
|
|
|
|
+++ b/config.example.toml
|
|
|
|
+++ b/config.example.toml
|
|
|
|
@@ -615,14 +615,6 @@
|
|
|
|
@@ -599,14 +599,6 @@
|
|
|
|
# behavior -- this may lead to miscompilations or other bugs.
|
|
|
|
# behavior -- this may lead to miscompilations or other bugs.
|
|
|
|
#description = ""
|
|
|
|
#description = ""
|
|
|
|
|
|
|
|
|
|
|
|
@@ -79,10 +79,10 @@ index 4b591b949b..a157b6f1c9 100644
|
|
|
|
# platforms to ensure that the compiler is usable by default from the build
|
|
|
|
# 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
|
|
|
|
# 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
|
|
|
|
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
|
|
|
|
index a555a26367..f5db75bc71 100755
|
|
|
|
index 768aac912..6aebd9189 100755
|
|
|
|
--- a/src/bootstrap/configure.py
|
|
|
|
--- a/src/bootstrap/configure.py
|
|
|
|
+++ b/src/bootstrap/configure.py
|
|
|
|
+++ b/src/bootstrap/configure.py
|
|
|
|
@@ -100,34 +100,6 @@ v("llvm-config", None, "set path to llvm-config")
|
|
|
|
@@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config")
|
|
|
|
v("llvm-filecheck", None, "set path to LLVM's FileCheck utility")
|
|
|
|
v("llvm-filecheck", None, "set path to LLVM's FileCheck utility")
|
|
|
|
v("python", "build.python", "set path to python")
|
|
|
|
v("python", "build.python", "set path to python")
|
|
|
|
v("android-ndk", "build.android-ndk", "set path to Android NDK")
|
|
|
|
v("android-ndk", "build.android-ndk", "set path to Android NDK")
|
|
|
|
@@ -118,10 +118,10 @@ index a555a26367..f5db75bc71 100755
|
|
|
|
"riscv32gc-unknown-linux-musl install directory")
|
|
|
|
"riscv32gc-unknown-linux-musl install directory")
|
|
|
|
v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
|
|
|
|
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
|
|
|
|
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
|
|
|
|
index 27bbc8bd8f..8b95c4a1fc 100644
|
|
|
|
index edf18e2eb..7597d6cd2 100644
|
|
|
|
--- a/src/bootstrap/src/core/build_steps/compile.rs
|
|
|
|
--- a/src/bootstrap/src/core/build_steps/compile.rs
|
|
|
|
+++ b/src/bootstrap/src/core/build_steps/compile.rs
|
|
|
|
+++ b/src/bootstrap/src/core/build_steps/compile.rs
|
|
|
|
@@ -368,39 +368,7 @@ fn copy_self_contained_objects(
|
|
|
|
@@ -372,39 +372,7 @@ fn copy_self_contained_objects(
|
|
|
|
let mut target_deps = vec![];
|
|
|
|
let mut target_deps = vec![];
|
|
|
|
|
|
|
|
|
|
|
|
// Copies the libc and CRT objects.
|
|
|
|
// Copies the libc and CRT objects.
|
|
|
|
@@ -162,7 +162,7 @@ index 27bbc8bd8f..8b95c4a1fc 100644
|
|
|
|
let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| {
|
|
|
|
let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| {
|
|
|
|
panic!(
|
|
|
|
panic!(
|
|
|
|
"Target {:?} does not have a \"wasi-root\" key in Config.toml \
|
|
|
|
"Target {:?} does not have a \"wasi-root\" key in Config.toml \
|
|
|
|
@@ -562,15 +530,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
|
|
|
|
@@ -566,15 +534,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
|
|
|
|
.arg("--manifest-path")
|
|
|
|
.arg("--manifest-path")
|
|
|
|
.arg(builder.src.join("library/sysroot/Cargo.toml"));
|
|
|
|
.arg(builder.src.join("library/sysroot/Cargo.toml"));
|
|
|
|
|
|
|
|
|
|
|
|
@@ -179,10 +179,10 @@ index 27bbc8bd8f..8b95c4a1fc 100644
|
|
|
|
if let Some(dir) = builder.wasi_libdir(target) {
|
|
|
|
if let Some(dir) = builder.wasi_libdir(target) {
|
|
|
|
let root = format!("native={}", dir.to_str().unwrap());
|
|
|
|
let root = format!("native={}", dir.to_str().unwrap());
|
|
|
|
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
|
|
|
|
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
|
|
|
|
index f768470c4f..a9a77e8e3c 100644
|
|
|
|
index bdfee55d8..18db92320 100644
|
|
|
|
--- a/src/bootstrap/src/core/config/config.rs
|
|
|
|
--- a/src/bootstrap/src/core/config/config.rs
|
|
|
|
+++ b/src/bootstrap/src/core/config/config.rs
|
|
|
|
+++ b/src/bootstrap/src/core/config/config.rs
|
|
|
|
@@ -326,7 +326,6 @@ pub struct Config {
|
|
|
|
@@ -321,7 +321,6 @@ pub struct Config {
|
|
|
|
pub print_step_rusage: bool,
|
|
|
|
pub print_step_rusage: bool,
|
|
|
|
|
|
|
|
|
|
|
|
// Fallback musl-root for all targets
|
|
|
|
// Fallback musl-root for all targets
|
|
|
|
@@ -190,7 +190,7 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
pub prefix: Option<PathBuf>,
|
|
|
|
pub prefix: Option<PathBuf>,
|
|
|
|
pub sysconfdir: Option<PathBuf>,
|
|
|
|
pub sysconfdir: Option<PathBuf>,
|
|
|
|
pub datadir: Option<PathBuf>,
|
|
|
|
pub datadir: Option<PathBuf>,
|
|
|
|
@@ -597,8 +596,6 @@ pub struct Target {
|
|
|
|
@@ -582,8 +581,6 @@ pub struct Target {
|
|
|
|
pub profiler: Option<StringOrBool>,
|
|
|
|
pub profiler: Option<StringOrBool>,
|
|
|
|
pub rpath: Option<bool>,
|
|
|
|
pub rpath: Option<bool>,
|
|
|
|
pub crt_static: Option<bool>,
|
|
|
|
pub crt_static: Option<bool>,
|
|
|
|
@@ -199,7 +199,7 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
pub wasi_root: Option<PathBuf>,
|
|
|
|
pub wasi_root: Option<PathBuf>,
|
|
|
|
pub qemu_rootfs: Option<PathBuf>,
|
|
|
|
pub qemu_rootfs: Option<PathBuf>,
|
|
|
|
pub runner: Option<String>,
|
|
|
|
pub runner: Option<String>,
|
|
|
|
@@ -1122,7 +1119,6 @@ define_config! {
|
|
|
|
@@ -1104,7 +1101,6 @@ define_config! {
|
|
|
|
default_linker: Option<String> = "default-linker",
|
|
|
|
default_linker: Option<String> = "default-linker",
|
|
|
|
channel: Option<String> = "channel",
|
|
|
|
channel: Option<String> = "channel",
|
|
|
|
description: Option<String> = "description",
|
|
|
|
description: Option<String> = "description",
|
|
|
|
@@ -207,7 +207,7 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
rpath: Option<bool> = "rpath",
|
|
|
|
rpath: Option<bool> = "rpath",
|
|
|
|
strip: Option<bool> = "strip",
|
|
|
|
strip: Option<bool> = "strip",
|
|
|
|
frame_pointers: Option<bool> = "frame-pointers",
|
|
|
|
frame_pointers: Option<bool> = "frame-pointers",
|
|
|
|
@@ -1177,8 +1173,6 @@ define_config! {
|
|
|
|
@@ -1158,8 +1154,6 @@ define_config! {
|
|
|
|
profiler: Option<StringOrBool> = "profiler",
|
|
|
|
profiler: Option<StringOrBool> = "profiler",
|
|
|
|
rpath: Option<bool> = "rpath",
|
|
|
|
rpath: Option<bool> = "rpath",
|
|
|
|
crt_static: Option<bool> = "crt-static",
|
|
|
|
crt_static: Option<bool> = "crt-static",
|
|
|
|
@@ -216,7 +216,7 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
wasi_root: Option<String> = "wasi-root",
|
|
|
|
wasi_root: Option<String> = "wasi-root",
|
|
|
|
qemu_rootfs: Option<String> = "qemu-rootfs",
|
|
|
|
qemu_rootfs: Option<String> = "qemu-rootfs",
|
|
|
|
no_std: Option<bool> = "no-std",
|
|
|
|
no_std: Option<bool> = "no-std",
|
|
|
|
@@ -1678,7 +1672,6 @@ impl Config {
|
|
|
|
@@ -1632,7 +1626,6 @@ impl Config {
|
|
|
|
default_linker,
|
|
|
|
default_linker,
|
|
|
|
channel,
|
|
|
|
channel,
|
|
|
|
description,
|
|
|
|
description,
|
|
|
|
@@ -224,15 +224,15 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
rpath,
|
|
|
|
rpath,
|
|
|
|
verbose_tests,
|
|
|
|
verbose_tests,
|
|
|
|
optimize_tests,
|
|
|
|
optimize_tests,
|
|
|
|
@@ -1762,7 +1755,6 @@ impl Config {
|
|
|
|
@@ -1722,7 +1715,6 @@ impl Config {
|
|
|
|
config.llvm_enzyme =
|
|
|
|
config.rustc_parallel =
|
|
|
|
llvm_enzyme.unwrap_or(config.channel == "dev" || config.channel == "nightly");
|
|
|
|
parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly");
|
|
|
|
config.rustc_default_linker = default_linker;
|
|
|
|
config.rustc_default_linker = default_linker;
|
|
|
|
- config.musl_root = musl_root.map(PathBuf::from);
|
|
|
|
- config.musl_root = musl_root.map(PathBuf::from);
|
|
|
|
config.save_toolstates = save_toolstates.map(PathBuf::from);
|
|
|
|
config.save_toolstates = save_toolstates.map(PathBuf::from);
|
|
|
|
set(&mut config.deny_warnings, match flags.warnings {
|
|
|
|
set(
|
|
|
|
Warnings::Deny => Some(true),
|
|
|
|
&mut config.deny_warnings,
|
|
|
|
@@ -1999,8 +1991,6 @@ impl Config {
|
|
|
|
@@ -1973,8 +1965,6 @@ impl Config {
|
|
|
|
target.ranlib = cfg.ranlib.map(PathBuf::from);
|
|
|
|
target.ranlib = cfg.ranlib.map(PathBuf::from);
|
|
|
|
target.linker = cfg.linker.map(PathBuf::from);
|
|
|
|
target.linker = cfg.linker.map(PathBuf::from);
|
|
|
|
target.crt_static = cfg.crt_static;
|
|
|
|
target.crt_static = cfg.crt_static;
|
|
|
|
@@ -241,8 +241,8 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
target.wasi_root = cfg.wasi_root.map(PathBuf::from);
|
|
|
|
target.wasi_root = cfg.wasi_root.map(PathBuf::from);
|
|
|
|
target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
|
|
|
|
target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
|
|
|
|
target.runner = cfg.runner;
|
|
|
|
target.runner = cfg.runner;
|
|
|
|
@@ -3088,7 +3078,6 @@ fn check_incompatible_options_for_ci_rustc(
|
|
|
|
@@ -2919,7 +2909,6 @@ fn check_incompatible_options_for_ci_rustc(
|
|
|
|
debuginfo_level_tests: _,
|
|
|
|
split_debuginfo: _,
|
|
|
|
backtrace: _,
|
|
|
|
backtrace: _,
|
|
|
|
parallel_compiler: _,
|
|
|
|
parallel_compiler: _,
|
|
|
|
- musl_root: _,
|
|
|
|
- musl_root: _,
|
|
|
|
@@ -250,7 +250,7 @@ index f768470c4f..a9a77e8e3c 100644
|
|
|
|
optimize_tests: _,
|
|
|
|
optimize_tests: _,
|
|
|
|
codegen_tests: _,
|
|
|
|
codegen_tests: _,
|
|
|
|
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
|
|
|
|
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
|
|
|
|
index 6fbdd76ed5..486670f776 100644
|
|
|
|
index 60ec57d0d..31b411259 100644
|
|
|
|
--- a/src/bootstrap/src/core/sanity.rs
|
|
|
|
--- a/src/bootstrap/src/core/sanity.rs
|
|
|
|
+++ b/src/bootstrap/src/core/sanity.rs
|
|
|
|
+++ b/src/bootstrap/src/core/sanity.rs
|
|
|
|
@@ -11,7 +11,7 @@
|
|
|
|
@@ -11,7 +11,7 @@
|
|
|
|
@@ -260,9 +260,9 @@ index 6fbdd76ed5..486670f776 100644
|
|
|
|
-use std::{env, fs};
|
|
|
|
-use std::{env, fs};
|
|
|
|
+use std::env;
|
|
|
|
+use std::env;
|
|
|
|
|
|
|
|
|
|
|
|
use crate::Build;
|
|
|
|
|
|
|
|
#[cfg(not(feature = "bootstrap-self-test"))]
|
|
|
|
#[cfg(not(feature = "bootstrap-self-test"))]
|
|
|
|
@@ -330,28 +330,6 @@ than building it.
|
|
|
|
use crate::builder::Builder;
|
|
|
|
|
|
|
|
@@ -325,28 +325,6 @@ than building it.
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -292,10 +292,10 @@ index 6fbdd76ed5..486670f776 100644
|
|
|
|
// There are three builds of cmake on windows: MSVC, MinGW, and
|
|
|
|
// There are three builds of cmake on windows: MSVC, MinGW, and
|
|
|
|
// Cygwin. The Cygwin build does not have generators for Visual
|
|
|
|
// Cygwin. The Cygwin build does not have generators for Visual
|
|
|
|
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
|
|
|
|
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
|
|
|
|
index ecb219ea33..9255dd481c 100644
|
|
|
|
index 82b640f54..d906d2186 100644
|
|
|
|
--- a/src/bootstrap/src/lib.rs
|
|
|
|
--- a/src/bootstrap/src/lib.rs
|
|
|
|
+++ b/src/bootstrap/src/lib.rs
|
|
|
|
+++ b/src/bootstrap/src/lib.rs
|
|
|
|
@@ -1308,25 +1308,6 @@ Executed at: {executed_at}"#,
|
|
|
|
@@ -1282,25 +1282,6 @@ Executed at: {executed_at}"#,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -322,10 +322,10 @@ index ecb219ea33..9255dd481c 100644
|
|
|
|
/// configured.
|
|
|
|
/// configured.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
index 0df0046945..f044b1791e 100644
|
|
|
|
index 29e6b74aa..a32fddbac 100644
|
|
|
|
--- a/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
--- a/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
+++ b/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
+++ b/src/bootstrap/src/utils/cc_detect.rs
|
|
|
|
@@ -210,30 +210,6 @@ fn default_compiler(
|
|
|
|
@@ -197,30 +197,6 @@ fn default_compiler(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|