Commit cd5e0d07 authored by Jim Meyering's avatar Jim Meyering Committed by Anton Likhtarov

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
parent 587427e7
......@@ -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_
......
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