Skip to content

Commit

Permalink
ignore linker errors on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Dec 1, 2024
1 parent 814451a commit b3b0202
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3582,6 +3582,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")
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/src/core/builder/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ impl Cargo {
self.rustflags.arg("-Clink-arg=-gz");
}

// Ignore linker warnings for now. These are complicated to fix and don't affect the build.
// 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.
Expand Down

0 comments on commit b3b0202

Please sign in to comment.