We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fb9d42 commit 38c62f6Copy full SHA for 38c62f6
cmake/OpenCVCompilerOptions.cmake
@@ -184,8 +184,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
184
# Remove unreferenced functions: function level linking
185
add_extra_compiler_option(-ffunction-sections)
186
add_extra_compiler_option(-fdata-sections)
187
- if(NOT APPLE)
188
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+ if(NOT APPLE AND NOT OPENCV_SKIP_GC_SECTIONS)
+ set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} -Wl,--gc-sections")
189
endif()
190
191
0 commit comments