Skip to content

Pass -Werror when building the LLVM wrapper #143807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compiler/rustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ fn main() {
let cxxflags = output(&mut cmd);
let mut cfg = cc::Build::new();
cfg.warnings(false);

// Prevent critical warnings when we're compiling from rust-lang/rust CI
if std::env::var_os("CI").is_some() {
cfg.warnings_into_errors(true);
}
for flag in cxxflags.split_whitespace() {
// Ignore flags like `-m64` when we're doing a cross build
if is_crossed && flag.starts_with("-m") {
Expand Down
Loading