未验证 提交 ae6770e4 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #93273 - bjorn3:rustbuild_improvements, r=Mark-Simulacrum

Always check cg_llvm with ./x.py check

Previously it would be skipped if codegen-backends doesn't contain llvm.
......@@ -648,7 +648,7 @@ fn run(self, builder: &Builder<'_>) {
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);
......
......@@ -119,6 +119,7 @@
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 @@ fn std_features(&self, target: TargetSelection) -> String {
}
/// 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");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册