summaryrefslogtreecommitdiff
blob: 8fe769ada3288e59707190b6aceaaca776a65464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,15 +114,6 @@
 
 if(CMAKE_BUILD_TYPE MATCHES Debug)
    set(USE_LTO_DEFAULT off)
-else()
-   set(CMAKE_REQUIRED_FLAGS "-Wl,--gc-sections")
-   CHECK_CXX_COMPILER_FLAG("-Os -fdata-sections -ffunction-sections -Wl,--gc-sections" GC_SECTIONS)
-   if(GC_SECTIONS)
-           _append(ACNG_COMPFLAGS -fdata-sections -ffunction-sections)
-           _append(CMAKE_EXE_LINKER_FLAGS -Wl,--gc-sections)
-           _append(CMAKE_SHARED_LINKER_FLAGS -Wl,--gc-sections)
-   endif()
-   set(CMAKE_REQUIRED_FLAGS "")
 endif()
 
 option(USE_LTO "Enable Link Time Optimization (requires modern compilers)" ${USE_LTO_DEFAULT})