From 32dca9ea3f86975615b6ef62278ee3840c7096bd Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 31 May 2018 18:54:10 +1000 Subject: [PATCH] [client] only provide linker flags at link time --- client/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 07eb7876..c1e4c198 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -3,7 +3,8 @@ project(looking-glass-client C) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") -SET(CMAKE_C_FLAGS "-std=gnu99 -g -O3 -march=native -Wall -Werror -Wfatal-errors -ffast-math -fdata-sections -ffunction-sections -Wl,--gc-sections") +SET(CMAKE_C_FLAGS "-std=gnu99 -g -O3 -march=native -Wall -Werror -Wfatal-errors -ffast-math -fdata-sections -ffunction-sections") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections") find_package(PkgConfig) pkg_check_modules(PKGCONFIG REQUIRED