Do not attempt to use __rdtsc on non-x64/x86 MSVC targets (#1461)
Summary: Currently, Hardware.h assumes the `__rdtsc` intrinsic is always available when building with MSVC. However, this is not the case when building for Windows for ARM64. This blocks successful compilation of https://github.com/facebook/rocksdb on Windows for ARM64, since that library embeds Folly and includes this specific header. Instead, use a condition similar to the check in `asm_volatile_pause` in Asm.h. This results in successful compilation and a fallback to `steady_clock::now()` on Windows for ARM64 targets. Pull Request resolved: https://github.com/facebook/folly/pull/1461 Reviewed By: yfeldblum Differential Revision: D23952622 Pulled By: Orvid fbshipit-source-id: 1f02d04cbbbde42c80ad56d8d7ccc4dd7fe86847
Showing
Please register or sign in to comment