llvm.org GIT mirror llvm / fc3dae1
Support Solaris unused sections' gc link syntax. It is not clear if this would work or not with LLVM_NO_DEAD_STRIP binaries, so be conservative for now. Patch by Xan López. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240287 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 4 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
185185 # ld64's implementation of -dead_strip breaks tools that use plugins.
186186 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
187187 LINK_FLAGS " -Wl,-dead_strip")
188 elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
189 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
190 LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections")
188191 elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
189192 # Object files are compiled with -ffunction-data-sections.
190193 # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks