Skip to content

Commit 7407c12

Browse files
committed
Ignore linker warnings on macOS for ui-fulldeps
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.
1 parent 0ff369c commit 7407c12

File tree

1 file changed

+10
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+10
-3
lines changed

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

+10-3
Original file line numberDiff line numberDiff line change
@@ -1862,12 +1862,19 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18621862
let mut hostflags = flags.clone();
18631863
hostflags.push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display()));
18641864
hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No));
1865-
for flag in hostflags {
1866-
cmd.arg("--host-rustcflags").arg(flag);
1867-
}
18681865

18691866
let mut targetflags = flags;
18701867
targetflags.push(format!("-Lnative={}", builder.test_helpers_out(target).display()));
1868+
1869+
// FIXME: on macOS, we get linker warnings about duplicate `-lm` flags. We should investigate why this happens.
1870+
if suite == "ui-fulldeps" && target.ends_with("darwin") {
1871+
hostflags.push("-Alinker_messages".into());
1872+
targetflags.push("-Alinker_messages".into());
1873+
}
1874+
1875+
for flag in hostflags {
1876+
cmd.arg("--host-rustcflags").arg(flag);
1877+
}
18711878
for flag in targetflags {
18721879
cmd.arg("--target-rustcflags").arg(flag);
18731880
}

0 commit comments

Comments
 (0)