Add warning to the Builder::llvm_config function

This commit is contained in:
Jakub Beránek 2025-08-22 21:06:49 +02:00
parent c064521cc7
commit 6315b4973a
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

@ -1647,6 +1647,10 @@ You have to build a stage1 compiler for `{}` first, and then use it to build a s
///
/// Note that this returns `None` if LLVM is disabled, or if we're in a
/// check build or dry-run, where there's no need to build all of LLVM.
///
/// FIXME(@kobzol)
/// **WARNING**: This actually returns the **HOST** LLVM config, not LLVM config for the given
/// *target*.
pub fn llvm_config(&self, target: TargetSelection) -> Option<PathBuf> {
if self.config.llvm_enabled(target) && self.kind != Kind::Check && !self.config.dry_run() {
let llvm::LlvmResult { host_llvm_config, .. } = self.ensure(llvm::Llvm { target });