Commit 8efd1d12 authored by Rosen Penev's avatar Rosen Penev Committed by Facebook Github Bot

hardware: Move cpuid include and make conditional (#1202)

Summary:
Fixes compilation on non x86.
Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
Pull Request resolved: https://github.com/facebook/folly/pull/1202

Differential Revision: D16760427

Pulled By: yfeldblum

fbshipit-source-id: 6f31d5a17b9fe9c1f91d884eb94967ba06756f3e
parent 59799039
...@@ -23,12 +23,6 @@ ...@@ -23,12 +23,6 @@
#include <glog/logging.h> #include <glog/logging.h>
#if defined(__GNUC__) || defined(__clang__)
#include <cpuid.h>
#elif defined(_MSC_VER)
#include <intrin.h>
#endif
#if FOLLY_X64 && defined(__RTM__) #if FOLLY_X64 && defined(__RTM__)
#include <folly/lang/Assume.h> #include <folly/lang/Assume.h>
#include <immintrin.h> #include <immintrin.h>
...@@ -36,6 +30,14 @@ ...@@ -36,6 +30,14 @@
#elif FOLLY_X64 #elif FOLLY_X64
#endif #endif
#if FOLLY_RTM_SUPPORT
#if defined(__GNUC__) || defined(__clang__)
#include <cpuid.h>
#elif defined(_MSC_VER)
#include <intrin.h>
#endif
#endif
namespace folly { namespace folly {
namespace hardware { namespace hardware {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment