Bug 1485751 - add aarch64 windows support to protobuf; r=Mossop
authorNathan Froyd <froydnj@mozilla.com>
Thu, 23 Aug 2018 15:07:19 -0400
changeset 488295 010c8880c277c04fb99b5f6d135c99f36e6c3734
parent 488294 c4897ce254c2bb0fb1ae1a38bb414a175f3af290
child 488296 4a57ba156ecf7f94641e860bb42e7113c54d788e
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1485751
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1485751 - add aarch64 windows support to protobuf; r=Mossop Otherwise the giant chain of ifdefs that we're modifying won't be able to figure out what platform we're on, and we'll get a compilation error.
toolkit/components/protobuf/m-c-changes.patch
toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
--- a/toolkit/components/protobuf/m-c-changes.patch
+++ b/toolkit/components/protobuf/m-c-changes.patch
@@ -38,8 +38,30 @@ diff --git a/toolkit/components/protobuf
  
  // Atomically execute:
  //      result = *ptr;
  //      if (*ptr == old_value)
  //        *ptr = new_value;
  //      return result;
  //
  // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
+diff --git a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
+--- a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
++++ b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
+@@ -45,17 +45,17 @@
+ #define GOOGLE_PROTOBUF_ARCH_IA32 1
+ #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+ #elif defined(__QNX__)
+ #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
+ #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+ #elif defined(_M_ARM) || defined(__ARMEL__)
+ #define GOOGLE_PROTOBUF_ARCH_ARM 1
+ #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || defined(_M_ARM64)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+ #elif defined(__MIPSEL__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+ #else
+ #define GOOGLE_PROTOBUF_ARCH_MIPS 1
--- a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
+++ b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
@@ -45,17 +45,17 @@
 #define GOOGLE_PROTOBUF_ARCH_IA32 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
 #elif defined(__QNX__)
 #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
 #elif defined(_M_ARM) || defined(__ARMEL__)
 #define GOOGLE_PROTOBUF_ARCH_ARM 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || defined(_M_ARM64)
 #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
 #elif defined(__MIPSEL__)
 #if defined(__LP64__)
 #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
 #else
 #define GOOGLE_PROTOBUF_ARCH_MIPS 1