--- 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})