Skip to content

Commit

Permalink
Always check cg_llvm with ./x.py check
Browse files Browse the repository at this point in the history
Previously it would be skipped if codegen-backends doesn't contain llvm.
  • Loading branch information
bjorn3 committed Feb 23, 2022
1 parent c651ba8 commit 512cc35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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");
}

Expand Down

0 comments on commit 512cc35

Please sign in to comment.