Skip to content

Commit ad5b9c2

Browse files
authored
Rollup merge of #128589 - onur-ozkan:llvm-configs, r=cuviper
allow setting `link-shared` and `static-libstdcpp` with CI LLVM These options also affect `compiler/rustc_llvm` builds. They should be configurable even when using CI LLVM. r? ```@cuviper```
2 parents 8c82692 + 5ce554f commit ad5b9c2

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/bootstrap/src/core/config/config.rs

+17-3
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,23 @@ impl Config {
18451845
config.llvm_from_ci = config.parse_download_ci_llvm(download_ci_llvm, asserts);
18461846

18471847
if config.llvm_from_ci {
1848+
let warn = |option: &str| {
1849+
println!(
1850+
"WARNING: `{option}` will only be used on `compiler/rustc_llvm` build, not for the LLVM build."
1851+
);
1852+
println!(
1853+
"HELP: To use `{option}` for LLVM builds, set `download-ci-llvm` option to false."
1854+
);
1855+
};
1856+
1857+
if static_libstdcpp.is_some() {
1858+
warn("static-libstdcpp");
1859+
}
1860+
1861+
if link_shared.is_some() {
1862+
warn("link-shared");
1863+
}
1864+
18481865
// None of the LLVM options, except assertions, are supported
18491866
// when using downloaded LLVM. We could just ignore these but
18501867
// that's potentially confusing, so force them to not be
@@ -1854,9 +1871,6 @@ impl Config {
18541871
check_ci_llvm!(optimize_toml);
18551872
check_ci_llvm!(thin_lto);
18561873
check_ci_llvm!(release_debuginfo);
1857-
// CI-built LLVM can be either dynamic or static. We won't know until we download it.
1858-
check_ci_llvm!(link_shared);
1859-
check_ci_llvm!(static_libstdcpp);
18601874
check_ci_llvm!(targets);
18611875
check_ci_llvm!(experimental_targets);
18621876
check_ci_llvm!(clang_cl);

0 commit comments

Comments
 (0)