[Title] Disable rtti optioin
[Issue#] N/A
[Problem] rtti is not needed.
[Cause] N/A
[Solution] N/A
Change-Id: I83faf95e5901c83aa798d0a69607ef0feab46a18
# Optimize binary size for release builds by removing dead sections on unix/gcc
if (CMAKE_COMPILER_IS_GNUCC AND UNIX AND NOT APPLE)
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections ${CMAKE_C_FLAGS}")
- set(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -fno-rtti ${CMAKE_CXX_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--gc-sections ${CMAKE_SHARED_LINKER_FLAGS}")
endif ()