Skip to content

Commit 5ce554f

Browse files
committed
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. Signed-off-by: onur-ozkan <[email protected]>
1 parent 5367673 commit 5ce554f

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
@@ -1840,6 +1840,23 @@ impl Config {
18401840
config.llvm_from_ci = config.parse_download_ci_llvm(download_ci_llvm, asserts);
18411841

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

0 commit comments

Comments
 (0)