From 960dafd0b61eb14032d13c1562566618be55133f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 13 Jun 2014 15:26:37 +0200 Subject: [PATCH] build: use -ffunction-sections and --gc-sections Signed-off-by: Jo-Philipp Wich --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22042e1..ef1a089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 2.6) PROJECT(jsonpath C) -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations) +ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -ffunction-sections) -SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections") IF(APPLE) INCLUDE_DIRECTORIES(/opt/local/include) -- 2.25.1