File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,16 @@ mod c {
327
327
// in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19.
328
328
cfg. flag_if_supported ( "-fomit-frame-pointer" ) ;
329
329
cfg. define ( "VISIBILITY_HIDDEN" , None ) ;
330
- // Avoid implicitly creating references to undefined functions
331
- cfg. flag ( "-Werror=implicit-function-declaration" ) ;
330
+
331
+ if let "aarch64" | "arm64ec" = target. arch . as_str ( ) {
332
+ // FIXME(llvm20): Older GCCs on A64 fail to build with
333
+ // -Werror=implicit-function-declaration due to a compiler-rt bug.
334
+ // With a newer LLVM we should be able to enable the flag everywhere.
335
+ // https://github.com/llvm/llvm-project/commit/8aa9d6206ce55bdaaf422839c351fbd63f033b89
336
+ } else {
337
+ // Avoid implicitly creating references to undefined functions
338
+ cfg. flag ( "-Werror=implicit-function-declaration" ) ;
339
+ }
332
340
}
333
341
334
342
// int_util.c tries to include stdlib.h if `_WIN32` is defined,
You can’t perform that action at this time.
0 commit comments