Summary: Fixes compiling crc32c function on older hardware. (I believe this problem was introduced by
7ec1fc0e0e27ed56c1d18d33af9711a17e9ec750).
Also ensures is in final library since the API suggests it should be. This should correct a number of build problems for other projects like wdt and hhvm when they are compiled using a shared folly library rather than borrowing sources at compile time.
Closes #296
Reviewed By: @yfeldblum
Differential Revision:
D2340699
Pulled By: @sgolemon
#define __has_builtin(x) 0
#endif
-#if (__has_builtin(__builtin_ia32_crc32qi) && \
+#if __SSE4_2__ && \
+ ((__has_builtin(__builtin_ia32_crc32qi) && \
__has_builtin(__builtin_ia32_crc32di)) || \
(FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
- (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407))
+ (((__GNUC__ * 100) + __GNUC_MINOR__) >= 407)))
// Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,
libfolly_la_SOURCES = \
Bits.cpp \
+ Checksum.cpp \
detail/CacheLocality.cpp \
dynamic.cpp \
File.cpp \