Use compiler flag -fvisibility=hidden
Summary: Using compiler flag -fvisibility=hidden and explicitly setting visibility to default to public methods #Changelog: [Internal] [Yoga] Use compiler flag -fvisibility=hidden for reducing yoga binary size Reviewed By: astreet Differential Revision: D18029030 fbshipit-source-id: 545e73f9c25f3108fc9d9bb7f08c157dbc8da005
This commit is contained in:
committed by
Facebook Github Bot
parent
fb07dcff40
commit
8c3ee81d6e
@@ -12,12 +12,20 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#ifndef YOGA_EXPORT
|
||||
#ifdef _MSC_VER
|
||||
#define YOGA_EXPORT
|
||||
#else
|
||||
#define YOGA_EXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
namespace detail {
|
||||
|
||||
class FreeList {
|
||||
class YOGA_EXPORT FreeList {
|
||||
std::stack<void*> free_;
|
||||
void* getRaw();
|
||||
|
||||
@@ -72,7 +80,7 @@ public:
|
||||
/// std::accumulate(counters.begin(), counters.end(), 0);
|
||||
///
|
||||
template <typename T, void (*ReturnPolicy)(T&) = nullptr>
|
||||
class SingleWriterValueList {
|
||||
class YOGA_EXPORT SingleWriterValueList {
|
||||
std::forward_list<T> values_{};
|
||||
std::mutex acquireMutex_{};
|
||||
detail::FreeList freeValuesList_{};
|
||||
|
Reference in New Issue
Block a user