Always check cg_llvm with ./x.py check

Previously it would be skipped if codegen-backends doesn't contain llvm.
This commit is contained in:
bjorn3 2022-01-24 14:16:36 +01:00
parent c651ba8a54
commit 512cc355b3
2 changed files with 4 additions and 3 deletions

View File

@ -648,7 +648,7 @@ impl Step for Rustc {
pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection) {
cargo
.arg("--features")
.arg(builder.rustc_features())
.arg(builder.rustc_features(builder.kind))
.arg("--manifest-path")
.arg(builder.src.join("compiler/rustc/Cargo.toml"));
rustc_cargo_env(builder, cargo, target);

View File

@ -119,6 +119,7 @@ use std::os::windows::fs::symlink_file;
use build_helper::{mtime, output, run, run_suppressed, t, try_run, try_run_suppressed};
use filetime::FileTime;
use crate::builder::Kind;
use crate::config::{LlvmLibunwind, TargetSelection};
use crate::util::{exe, libdir, CiEnv};
@ -669,12 +670,12 @@ impl Build {
}
/// Gets the space-separated set of activated features for the compiler.
fn rustc_features(&self) -> String {
fn rustc_features(&self, kind: Kind) -> String {
let mut features = String::new();
if self.config.jemalloc {
features.push_str("jemalloc");
}
if self.config.llvm_enabled() {
if self.config.llvm_enabled() || kind == Kind::Check {
features.push_str(" llvm");
}