File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,16 @@ mod c {
327327 // in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19.
328328 cfg. flag_if_supported ( "-fomit-frame-pointer" ) ;
329329 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+ }
332340 }
333341
334342 // int_util.c tries to include stdlib.h if `_WIN32` is defined,
You can’t perform that action at this time.
0 commit comments