Skip to content

Commit 18bd64d

Browse files
committed
gate pragma behind defined(__clang__)
Change-Id: Ice32fabe79286ec6cf93987608cd989cf7b28e74
1 parent 5ad7be5 commit 18bd64d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/runtime/cgo/gcc_libinit.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
//go:build unix
66

7-
// When cross-compiling to linux/armv5, atomics are emulated and cause a
8-
// compiler warning. This results in a build failure since cgo uses
9-
// -Werror. See #65290.
7+
// When cross-compiling with clang to linux/armv5, atomics are emulated
8+
// and cause a compiler warning. This results in a build failure since
9+
// cgo uses -Werror. See #65290.
10+
#if defined(__clang__)
1011
#pragma GCC diagnostic ignored "-Watomic-alignment"
12+
#endif
1113

1214
#include <pthread.h>
1315
#include <errno.h>

0 commit comments

Comments
 (0)