Skip to content

Commit

Permalink
Ignore linker warnings on macOS for ui-fulldeps
Browse files Browse the repository at this point in the history
ld is showing things like this:
```
ld: ignoring duplicate libraries: '-lm'
```

I don't have time or a macbook that lets me investigate these. Just silence them for now.
  • Loading branch information
jyn514 committed Jan 20, 2025
1 parent 2e0b908 commit 3d48f5e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1862,12 +1862,19 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
let mut hostflags = flags.clone();
hostflags.push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display()));
hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No));
for flag in hostflags {
cmd.arg("--host-rustcflags").arg(flag);
}

let mut targetflags = flags;
targetflags.push(format!("-Lnative={}", builder.test_helpers_out(target).display()));

// FIXME: on macOS, we get linker warnings about duplicate `-lm` flags. We should investigate why this happens.
if suite == "ui-fulldeps" && target.ends_with("darwin") {
hostflags.push("-Alinker_messages".into());
targetflags.push("-Alinker_messages".into());
}

for flag in hostflags {
cmd.arg("--host-rustcflags").arg(flag);
}
for flag in targetflags {
cmd.arg("--target-rustcflags").arg(flag);
}
Expand Down

0 comments on commit 3d48f5e

Please sign in to comment.