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
@@ -25,6 +25,7 @@ yoga_cxx_library(
|
||||
compiler_flags = [
|
||||
"-fno-omit-frame-pointer",
|
||||
"-fexceptions",
|
||||
"-fvisibility=hidden",
|
||||
"-fPIC",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
@@ -24,6 +24,7 @@ add_subdirectory(${yogacore_DIR} ${yogacore_build_DIR})
|
||||
add_compile_options(
|
||||
-fno-omit-frame-pointer
|
||||
-fexceptions
|
||||
-fvisibility=hidden
|
||||
-Wall
|
||||
-std=c++11)
|
||||
|
||||
|
@@ -42,7 +42,8 @@ jint ensureInitialized(JNIEnv** env, JavaVM* vm) {
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
JNIEnv* getCurrentEnv() {
|
||||
// TODO why we need JNIEXPORT for getCurrentEnv ?
|
||||
JNIEXPORT JNIEnv* getCurrentEnv() {
|
||||
JNIEnv* env;
|
||||
jint ret = globalVm->GetEnv((void**) &env, JNI_VERSION_1_6);
|
||||
if (ret != JNI_OK) {
|
||||
|
Reference in New Issue
Block a user