diff --git a/llvm/utils/benchmark/README.LLVM b/llvm/utils/benchmark/README.LLVM index b425ec75305f0b92d4483271d15a0e87fc89bfb0..0121b145deddbd8c9f8c348db3b32a58f9ad5c10 100644 --- a/llvm/utils/benchmark/README.LLVM +++ b/llvm/utils/benchmark/README.LLVM @@ -17,3 +17,5 @@ Changes: 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 diff --git a/llvm/utils/benchmark/src/cycleclock.h b/llvm/utils/benchmark/src/cycleclock.h index 3b376ac57d5ff7d17036054ced0e33c5a15662bc..e1f18cc64d20222237b5595d90c1fbe56bab95a9 100644 --- a/llvm/utils/benchmark/src/cycleclock.h +++ b/llvm/utils/benchmark/src/cycleclock.h @@ -41,7 +41,7 @@ extern "C" uint64_t __rdtsc(); #pragma intrinsic(__rdtsc) #endif -#ifndef BENCHMARK_OS_WINDOWS +#if !defined(BENCHMARK_OS_WINDOWS) || defined(BENCHMARK_OS_MINGW) #include #include #endif diff --git a/llvm/utils/benchmark/src/internal_macros.h b/llvm/utils/benchmark/src/internal_macros.h index 3c1cda39c2fd48ea357e2ce9c3e2f9a4dd0f9dfc..f2d54bfcbd9dde9d87b4d6a800ea620f9e815feb 100644 --- a/llvm/utils/benchmark/src/internal_macros.h +++ b/llvm/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"