Skip to content

Commit 07d290d

Browse files
committed
ignore linker errors on all platforms
1 parent 21ec339 commit 07d290d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,6 +3611,8 @@ impl Step for CodegenGCC {
36113611
let mut cargo = build_cargo();
36123612

36133613
cargo
3614+
// cg_gcc's build system ignores RUSTFLAGS. pass some flags through CG_RUSTFLAGS instead.
3615+
.env("CG_RUSTFLAGS", "-Alinker-messages")
36143616
.arg("--")
36153617
.arg("test")
36163618
.arg("--use-system-gcc")

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ impl Cargo {
270270
self.rustflags.arg("-Clink-arg=-gz");
271271
}
272272

273+
// Ignore linker warnings for now. These are complicated to fix and don't affect the build.
274+
// cfg(bootstrap)
275+
if compiler.stage != 0 {
276+
self.rustflags.arg("-Alinker-messages");
277+
}
278+
273279
// Throughout the build Cargo can execute a number of build scripts
274280
// compiling C/C++ code and we need to pass compilers, archivers, flags, etc
275281
// obtained previously to those build scripts.

0 commit comments

Comments
 (0)