about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2024-11-29 10:28:54 -0500
committerjyn <github@jyn.dev>2025-01-20 16:46:00 -0500
commitcedd4cad21298ca8b825ab3c56a84753176dc8e8 (patch)
tree0609698e0a3241b1634e7ae5e0a1c944caa1c7e5 /src/bootstrap
parentfda23843337472d03d9d789ce2b90f0efdb06ae0 (diff)
downloadrust-cedd4cad21298ca8b825ab3c56a84753176dc8e8.tar.gz
rust-cedd4cad21298ca8b825ab3c56a84753176dc8e8.zip
ignore linker errors on all platforms
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs2
-rw-r--r--src/bootstrap/src/core/builder/cargo.rs7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 9f3e4d9cc89..38e056cbc14 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -3577,6 +3577,8 @@ impl Step for CodegenGCC {
         let mut cargo = build_cargo();
 
         cargo
+            // cg_gcc's build system ignores RUSTFLAGS. pass some flags through CG_RUSTFLAGS instead.
+            .env("CG_RUSTFLAGS", "-Alinker-messages")
             .arg("--")
             .arg("test")
             .arg("--use-system-gcc")
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index f9fb19ddb09..031cbb7dcdb 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -269,6 +269,13 @@ impl Cargo {
             self.rustflags.arg("-Clink-arg=-gz");
         }
 
+        // Ignore linker warnings for now. These are complicated to fix and don't affect the build.
+        // FIXME: we should really investigate these...
+        // cfg(bootstrap)
+        if compiler.stage != 0 {
+            self.rustflags.arg("-Alinker-messages");
+        }
+
         // Throughout the build Cargo can execute a number of build scripts
         // compiling C/C++ code and we need to pass compilers, archivers, flags, etc
         // obtained previously to those build scripts.