From: Jim Meyering Date: Mon, 9 Jun 2014 20:32:26 +0000 (-0700) Subject: folly: do not disable RW_SPINLOCK_USE_X86_INTRINSIC_ for clang X-Git-Tag: v0.22.0~513 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd5e0d076cdde2bce70ee309b931e9781b18a3d9;p=folly.git folly: do not disable RW_SPINLOCK_USE_X86_INTRINSIC_ for clang Summary: Without this, we'd see problems like this in tao, when building with clang: With this change, this now works with clang-3.4 and clang.dev (3.4+). This change reverts D950285, which change appears to have been made to accommodate weakness in clang-3.3 or older. In file included from tao/data_providers/common/simpledp.cpp:7: ./tao/data_providers/common/stats.h:175:18: error: no type named 'RWTicketSpinLockT' in namespace 'folly' typedef folly::RWTicketSpinLockT<64, true> RWLockType; ~~~~~~~^ ./tao/data_providers/common/stats.h:175:35: error: expected member name or ';' after declaration specifiers typedef folly::RWTicketSpinLockT<64, true> RWLockType; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Test Plan: ensure that all of these pass: fbconfig -r --clang folly/test:rw_spinlock_test && fbmake runtests fbconfig -r --clang folly/test:rw_spinlock_test && fbmake runtests_opt fbconfig -r folly/test:rw_spinlock_test && fbmake runtests_opt fbconfig -r --clang --with-project-version clang:dev \ folly/test:rw_spinlock_test && fbmake runtests_opt Reviewed By: delong.j@fb.com Subscribers: folly@lists, mathieubaudet FB internal diff: D1370024 Tasks: 4090011 --- diff --git a/folly/RWSpinLock.h b/folly/RWSpinLock.h index dbef6388..b3d4dd99 100644 --- a/folly/RWSpinLock.h +++ b/folly/RWSpinLock.h @@ -108,7 +108,7 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us #include "folly/Portability.h" -#if defined(__GNUC__) && !defined(__clang__) && \ +#if defined(__GNUC__) && \ (defined(__i386) || FOLLY_X64 || \ defined(ARCH_K8)) #define RW_SPINLOCK_USE_X86_INTRINSIC_