Use compiler flags -ffunction-sections, -fdata-sections and gc sections in both jni and core
Summary: Use compiler flags -ffunction-sections, -fdata-sections and -Wl,--gc-sections in both jni and yoga core Reviewed By: amir-shalem Differential Revision: D18029671 fbshipit-source-id: 5192fb6d682248b16781dead0d7b0a0377861fb6
This commit is contained in:
committed by
Facebook Github Bot
parent
8c3ee81d6e
commit
6327893b9b
@@ -11,6 +11,8 @@ add_compile_options(
|
||||
-fno-omit-frame-pointer
|
||||
-fexceptions
|
||||
-fvisibility=hidden
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-Wall
|
||||
-std=c++11)
|
||||
|
||||
|
@@ -26,6 +26,8 @@ yoga_cxx_library(
|
||||
"-fno-omit-frame-pointer",
|
||||
"-fexceptions",
|
||||
"-fvisibility=hidden",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-fPIC",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
@@ -25,6 +25,8 @@ add_compile_options(
|
||||
-fno-omit-frame-pointer
|
||||
-fexceptions
|
||||
-fvisibility=hidden
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-Wall
|
||||
-std=c++11)
|
||||
|
||||
@@ -37,4 +39,4 @@ target_include_directories(yoga PRIVATE
|
||||
${libfb_DIR}/include
|
||||
${yogacore_DIR})
|
||||
|
||||
target_link_libraries(yoga yogacore fb)
|
||||
target_link_libraries(yoga -Wl,--gc-sections yogacore fb)
|
||||
|
@@ -54,6 +54,8 @@ BASE_COMPILER_FLAGS = [
|
||||
"-fno-omit-frame-pointer",
|
||||
"-fexceptions",
|
||||
"-fvisibility=hidden",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-O2",
|
||||
|
Reference in New Issue
Block a user