[PATCH] D52262: [benchmark] Cherrypick fix for MinGW/ARM from upstream

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 07:32:21 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342549: [benchmark] Cherrypick fix for MinGW/ARM from upstream (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D52262?vs=166105&id=166126#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D52262

Files:
  llvm/trunk/utils/benchmark/README.LLVM
  llvm/trunk/utils/benchmark/src/cycleclock.h
  llvm/trunk/utils/benchmark/src/internal_macros.h


Index: llvm/trunk/utils/benchmark/src/internal_macros.h
===================================================================
--- llvm/trunk/utils/benchmark/src/internal_macros.h
+++ llvm/trunk/utils/benchmark/src/internal_macros.h
@@ -35,6 +35,9 @@
   #define BENCHMARK_OS_CYGWIN 1
 #elif defined(_WIN32)
   #define BENCHMARK_OS_WINDOWS 1
+  #if defined(__MINGW32__)
+    #define BENCHMARK_OS_MINGW 1
+  #endif
 #elif defined(__APPLE__)
   #define BENCHMARK_OS_APPLE 1
   #include "TargetConditionals.h"
Index: llvm/trunk/utils/benchmark/src/cycleclock.h
===================================================================
--- llvm/trunk/utils/benchmark/src/cycleclock.h
+++ llvm/trunk/utils/benchmark/src/cycleclock.h
@@ -41,7 +41,7 @@
 #pragma intrinsic(__rdtsc)
 #endif
 
-#ifndef BENCHMARK_OS_WINDOWS
+#if !defined(BENCHMARK_OS_WINDOWS) || defined(BENCHMARK_OS_MINGW)
 #include <sys/time.h>
 #include <time.h>
 #endif
Index: llvm/trunk/utils/benchmark/README.LLVM
===================================================================
--- llvm/trunk/utils/benchmark/README.LLVM
+++ llvm/trunk/utils/benchmark/README.LLVM
@@ -17,3 +17,5 @@
   is applied to fix 32-bit build failure on macOS
 * https://github.com/google/benchmark/commit/52613079824ac58d06c070aa9fbbb186a5859e2c
   is applied to fix cross compilation with MinGW headers
+* https://github.com/google/benchmark/commit/439d6b1c2a6da5cb6adc4c4dfc555af235722396
+  is applied to fix building with MinGW headers for ARM


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52262.166126.patch
Type: text/x-patch
Size: 1479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180919/1c4fb8e1/attachment.bin>


More information about the llvm-commits mailing list