Skip to content

Commit e204802

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

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

+2
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

+7
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ 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+
// FIXME: we should really investigate these...
275+
// cfg(bootstrap)
276+
if compiler.stage != 0 {
277+
self.rustflags.arg("-Alinker-messages");
278+
}
279+
273280
// Throughout the build Cargo can execute a number of build scripts
274281
// compiling C/C++ code and we need to pass compilers, archivers, flags, etc
275282
// obtained previously to those build scripts.

0 commit comments

Comments
 (0)