Skip to content

Commit 261079f

Browse files
authored
Unrolled build for rust-lang#136973
Rollup merge of rust-lang#136973 - jyn514:fulldeps-stage1, r=jieyouxu Fix `x test --stage 1 ui-fulldeps` on macOS (until the next beta bump) "stage 1" for fulldeps means "compile with stage 0, link against stage 1". But this code wanted to switch on the compiler that's building, not the compiler that's being tested. Fix the check. Previously, it would fail with a warning about linker-messages: ``` --- stderr ------------------------------- warning[E0602]: unknown lint: `linker_messages` | = note: requested on the command line with `-A linker_messages` = note: `#[warn(unknown_lints)]` on by default ``` cc https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/unknown.20lint.3A.20.60linker_messages.60.20when.20blessing.20tests.20on.20.2E.2E.2E, rust-lang#136960
2 parents a567209 + f7a03d0 commit 261079f

File tree

1 file changed

+8
-6
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+8
-6
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -1845,19 +1845,21 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18451845
}
18461846
}
18471847

1848+
// FIXME(136096): on macOS, we get linker warnings about duplicate `-lm` flags.
1849+
// NOTE: `stage > 1` here because `test --stage 1 ui-fulldeps` is a hack that compiles
1850+
// with stage 0, but links the tests against stage 1.
1851+
// cfg(bootstrap) - remove only the `stage > 1` check, leave everything else.
1852+
if suite == "ui-fulldeps" && compiler.stage > 1 && target.ends_with("darwin") {
1853+
flags.push("-Alinker_messages".into());
1854+
}
1855+
18481856
let mut hostflags = flags.clone();
18491857
hostflags.push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display()));
18501858
hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No));
18511859

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

1855-
// FIXME: on macOS, we get linker warnings about duplicate `-lm` flags. We should investigate why this happens.
1856-
if suite == "ui-fulldeps" && target.ends_with("darwin") {
1857-
hostflags.push("-Alinker_messages".into());
1858-
targetflags.push("-Alinker_messages".into());
1859-
}
1860-
18611863
for flag in hostflags {
18621864
cmd.arg("--host-rustcflags").arg(flag);
18631865
}

0 commit comments

Comments
 (0)