소스 검색

Add aarch64 architecture to platform_macros.h (patch by Sylvain Defresne)

Both gcc and clang defines the __aarch64__ macro when building
for the 64-bit AArch64 execution state of ARMv8 processors, so
use this to detect the architecture.
liujisi@google.com 11 년 전
부모
커밋
f0b6a5cfeb
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/google/protobuf/stubs/platform_macros.h

+ 3 - 0
src/google/protobuf/stubs/platform_macros.h

@@ -49,6 +49,9 @@
 #elif defined(__ARMEL__)
 #define GOOGLE_PROTOBUF_ARCH_ARM 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#elif defined(__aarch64__)
+#define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
 #elif defined(__MIPSEL__)
 #define GOOGLE_PROTOBUF_ARCH_MIPS 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1