Abstract ifunc support into a define
authorOwen Yamauchi <oyamauchi@fb.com>
Tue, 19 Feb 2013 20:20:43 +0000 (12:20 -0800)
committerJordan DeLong <jdelong@fb.com>
Tue, 19 Mar 2013 00:07:54 +0000 (17:07 -0700)
commit3a976a95d97a91f59a49ca507fde66d0f4f4fcf1
tree4f9184ed80eb322aec3d45591a76988b7bea2bc3
parentd059cdd4f5791dd6c40772f817ed469cbe3a4132
Abstract ifunc support into a define

Summary:
There are platforms other than clang that don't support ifuncs. (The one
I'm concerned about is ARM.) I changed the ifdef __clang__ around the
ifunc attributes to be more abstract, so we can can pass in this flag on
the command line, or use autoconf to detect it.

Test Plan:
fbmake runtests. Manually define HAVE_IFUNC 0 and make sure the
popcount() and popcountll() functions get compiled as calls to
popcount_builtin.

Run autoreconf, ./configure, make sure the feature gets detected
properly by looking at config.h.

Reviewed By: andrewjcg@fb.com

FB internal diff: D712192
folly/Bits.cpp
folly/configure.ac