Commit add97bf4 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

add kHasWeakSymbols

Summary: Add `kHasWeakSymbols` to `folly/Portability.h` so that downstream call-sites may detect availability of weak symbols at compile time in normal C++.

Reviewed By: luciang

Differential Revision: D25788659

fbshipit-source-id: 66768486317986396440099adecfc8dc8e553c7c
parent ea46f07e
...@@ -334,6 +334,15 @@ constexpr auto kIsLittleEndian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__; ...@@ -334,6 +334,15 @@ constexpr auto kIsLittleEndian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__;
constexpr auto kIsBigEndian = !kIsLittleEndian; constexpr auto kIsBigEndian = !kIsLittleEndian;
} // namespace folly } // namespace folly
// Weak
namespace folly {
#if FOLLY_HAVE_WEAK_SYMBOLS
constexpr auto kHasWeakSymbols = true;
#else
constexpr auto kHasWeakSymbols = false;
#endif
} // namespace folly
#ifndef FOLLY_SSE #ifndef FOLLY_SSE
#if defined(__SSE4_2__) #if defined(__SSE4_2__)
#define FOLLY_SSE 4 #define FOLLY_SSE 4
......
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