Skip to content

Commit e255101

Browse files
Auto merge of #143807 - rperier:rustc_llvm_werror, r=<try>
Pass -Werror when building the LLVM wrapper try-job: aarch64-msvc-1
2 parents cd43430 + 57491cb commit e255101

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_llvm/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ fn main() {
171171
let cxxflags = output(&mut cmd);
172172
let mut cfg = cc::Build::new();
173173
cfg.warnings(false);
174+
175+
// Prevent critical warnings when we're compiling from rust-lang/rust CI
176+
if std::env::var_os("CI").is_some() && !target.contains("msvc") {
177+
cfg.warnings_into_errors(true);
178+
}
174179
for flag in cxxflags.split_whitespace() {
175180
// Ignore flags like `-m64` when we're doing a cross build
176181
if is_crossed && flag.starts_with("-m") {

0 commit comments

Comments
 (0)