File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,16 @@ fn main() {
171
171
let cxxflags = output ( & mut cmd) ;
172
172
let mut cfg = cc:: Build :: new ( ) ;
173
173
cfg. warnings ( false ) ;
174
+
175
+ // Prevent critical warnings when we're compiling from rust-lang/rust CI,
176
+ // except on MSVC, as the compiler throws warnings that are only reported
177
+ // for this platform. See https://github.com/rust-lang/rust/pull/145031#issuecomment-3162677202
178
+ // FIXME(llvm22): It looks like the specific problem code has been removed
179
+ // in https://github.com/llvm/llvm-project/commit/e8fc808bf8e78a3c80d1f8e293a92677b92366dd,
180
+ // retry msvc once we bump our LLVM version.
181
+ if std:: env:: var_os ( "CI" ) . is_some ( ) && !target. contains ( "msvc" ) {
182
+ cfg. warnings_into_errors ( true ) ;
183
+ }
174
184
for flag in cxxflags. split_whitespace ( ) {
175
185
// Ignore flags like `-m64` when we're doing a cross build
176
186
if is_crossed && flag. starts_with ( "-m" ) {
You can’t perform that action at this time.
0 commit comments