From: Dave Watson Date: Thu, 29 Aug 2013 22:40:57 +0000 (-0700) Subject: x86intrinsic seems to be problematic for clang X-Git-Tag: v0.22.0~886 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=38220af4dc50f723282e7b7bf592ad595468e0b9;p=folly.git x86intrinsic seems to be problematic for clang Summary: fbinject (clang code parser) throws some errors when including the x86intrinsic header. Test Plan: D929356 compiles after this diff. It adds a dep on RWSpinLock. Reviewed By: beng@fb.com FB internal diff: D950285 --- diff --git a/folly/RWSpinLock.h b/folly/RWSpinLock.h index ab467c5c..80777207 100644 --- a/folly/RWSpinLock.h +++ b/folly/RWSpinLock.h @@ -106,8 +106,9 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us */ -#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64__) || \ - defined(ARCH_K8)) +#if defined(__GNUC__) && !defined(__clang__) && \ + (defined(__i386) || defined(__x86_64__) || \ + defined(ARCH_K8)) #define RW_SPINLOCK_USE_X86_INTRINSIC_ #include #else