[llvm] 89f0587 - [CMake] Re-enable use --gc-sections on OpenBSD

Brad Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 4 11:18:41 PDT 2021


Author: Brad Smith
Date: 2021-09-04T14:18:30-04:00
New Revision: 89f0587154bd66ca78963f5c5a07982e5e0b1ff0

URL: https://github.com/llvm/llvm-project/commit/89f0587154bd66ca78963f5c5a07982e5e0b1ff0
DIFF: https://github.com/llvm/llvm-project/commit/89f0587154bd66ca78963f5c5a07982e5e0b1ff0.diff

LOG: [CMake] Re-enable use --gc-sections on OpenBSD

Most archs have switched to lld.

Added: 
    

Modified: 
    llvm/cmake/modules/AddLLVM.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 2d497d0dc20c3..57def13f22868 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -263,7 +263,7 @@ function(add_link_opts target_name)
           set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                        LINK_FLAGS " -Wl,-z,discard-unused=sections")
         endif()
-      elseif(NOT MSVC AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD|AIX|OS390")
+      elseif(NOT MSVC AND NOT CMAKE_SYSTEM_NAME MATCHES "AIX|OS390")
         # TODO Revisit this later on z/OS.
         set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                      LINK_FLAGS " -Wl,--gc-sections")


        


More information about the llvm-commits mailing list