Skip to content

Commit

Permalink
Rollup merge of rust-lang#128589 - onur-ozkan:llvm-configs, r=cuviper
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
matthiaskrgr committed Aug 4, 2024
2 parents 56402aa + 5ce554f commit 3a348d1
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,23 @@ impl Config {
config.llvm_from_ci = config.parse_download_ci_llvm(download_ci_llvm, asserts);

if config.llvm_from_ci {
let warn = |option: &str| {
println!(
"WARNING: `{option}` will only be used on `compiler/rustc_llvm` build, not for the LLVM build."
);
println!(
"HELP: To use `{option}` for LLVM builds, set `download-ci-llvm` option to false."
);
};

if static_libstdcpp.is_some() {
warn("static-libstdcpp");
}

if link_shared.is_some() {
warn("link-shared");
}

// None of the LLVM options, except assertions, are supported
// when using downloaded LLVM. We could just ignore these but
// that's potentially confusing, so force them to not be
Expand All @@ -1854,9 +1871,6 @@ impl Config {
check_ci_llvm!(optimize_toml);
check_ci_llvm!(thin_lto);
check_ci_llvm!(release_debuginfo);
// CI-built LLVM can be either dynamic or static. We won't know until we download it.
check_ci_llvm!(link_shared);
check_ci_llvm!(static_libstdcpp);
check_ci_llvm!(targets);
check_ci_llvm!(experimental_targets);
check_ci_llvm!(clang_cl);
Expand Down

0 comments on commit 3a348d1

Please sign in to comment.