Commit c20978fc authored by Link Mauve's avatar Link Mauve

CMakeLists: Set symbol visibility to hidden.

This reduces the size of the final binary by 12% by not including
symbols, and thus function bodies that have been inlined for example.
parent fe222112
...@@ -20,7 +20,7 @@ find_library(LIBUBSAN NAMES ubsan ...@@ -20,7 +20,7 @@ find_library(LIBUBSAN NAMES ubsan
# #
## Set various debug flags (instrumentation libs, coverage, …) ## Set various debug flags (instrumentation libs, coverage, …)
# #
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra -Wconversion") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra -Wconversion -fvisibility=hidden -fvisibility-inlines-hidden")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage")
endif() endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment