Skip to content

Commit 512cc35

Browse files
committed
Always check cg_llvm with ./x.py check
Previously it would be skipped if codegen-backends doesn't contain llvm.
1 parent c651ba8 commit 512cc35

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/bootstrap/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ impl Step for Rustc {
648648
pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection) {
649649
cargo
650650
.arg("--features")
651-
.arg(builder.rustc_features())
651+
.arg(builder.rustc_features(builder.kind))
652652
.arg("--manifest-path")
653653
.arg(builder.src.join("compiler/rustc/Cargo.toml"));
654654
rustc_cargo_env(builder, cargo, target);

src/bootstrap/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ use std::os::windows::fs::symlink_file;
119119
use build_helper::{mtime, output, run, run_suppressed, t, try_run, try_run_suppressed};
120120
use filetime::FileTime;
121121

122+
use crate::builder::Kind;
122123
use crate::config::{LlvmLibunwind, TargetSelection};
123124
use crate::util::{exe, libdir, CiEnv};
124125

@@ -669,12 +670,12 @@ impl Build {
669670
}
670671

671672
/// Gets the space-separated set of activated features for the compiler.
672-
fn rustc_features(&self) -> String {
673+
fn rustc_features(&self, kind: Kind) -> String {
673674
let mut features = String::new();
674675
if self.config.jemalloc {
675676
features.push_str("jemalloc");
676677
}
677-
if self.config.llvm_enabled() {
678+
if self.config.llvm_enabled() || kind == Kind::Check {
678679
features.push_str(" llvm");
679680
}
680681

0 commit comments

Comments
 (0)