Skip to content

Commit

Permalink
Disabled gc-sections on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabunin committed Dec 6, 2017
1 parent da5242d commit cc43495
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/OpenCVCompilerOptions.cmake
Expand Up @@ -184,7 +184,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Remove unreferenced functions: function level linking
add_extra_compiler_option(-ffunction-sections)
add_extra_compiler_option(-fdata-sections)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
if(NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
endif()
endif()

if(ENABLE_COVERAGE)
Expand Down

0 comments on commit cc43495

Please sign in to comment.