From: Jo-Philipp Wich Date: Fri, 13 Jun 2014 13:26:37 +0000 (+0200) Subject: build: use -ffunction-sections and --gc-sections X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=960dafd0b61eb14032d13c1562566618be55133f;p=oweals%2Fjsonpath.git build: use -ffunction-sections and --gc-sections Signed-off-by: Jo-Philipp Wich --- 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)