Build with -fvisibility-inlines-hidden
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sat, 21 Jan 2012 23:29:21 +0000 (20:29 -0300)
committerCristian Rodríguez <crrodriguez@opensuse.org>
Sat, 21 Jan 2012 23:29:21 +0000 (20:29 -0300)
This reduces the exported symbol table in 2k number of entries
and code size around half a megabyte

CMakeLists.txt

index 8e42ebd..2672785 100644 (file)
@@ -25,7 +25,7 @@ include(CheckCXXCompilerFlag)
 CHECK_C_COMPILER_FLAG("-Werror=format-security" CC_FORMAT_SECURITY)
 CHECK_CXX_COMPILER_FLAG("-Werror=format-security" CXX_FORMAT_SECURITY)
 
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fPIC -g -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed -std=c++0x" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden -fno-strict-aliasing -fPIC -g -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed -std=c++0x" )
 SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fno-strict-aliasing -fPIC -g -Wall -Wl,-as-needed" )
 
 set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )