Commit 925f6ebc authored by Jasem Mutlaq's avatar Jasem Mutlaq

Only do size optimization on Linux since it causes issues on Mac

parent 70b20594
......@@ -150,8 +150,10 @@ add_definitions(-Dfexceptions)
add_definitions(-Wno-non-virtual-dtor)
# Optimize binary size by dropping unneeded symbols at linking stage
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
endif()
endif(UNIX)
configure_file(
......
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