[llvm-branch-commits] [llvm] 914355e - [CMake] Re-enable use --gc-sections on OpenBSD

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 21 12:36:28 PDT 2021


Author: Brad Smith
Date: 2021-10-21T12:36:10-07:00
New Revision: 914355ee793c14baa90bac8352cbd36c9b38324a

URL: https://github.com/llvm/llvm-project/commit/914355ee793c14baa90bac8352cbd36c9b38324a
DIFF: https://github.com/llvm/llvm-project/commit/914355ee793c14baa90bac8352cbd36c9b38324a.diff

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

Most archs have switched to lld.

(cherry picked from commit 89f0587154bd66ca78963f5c5a07982e5e0b1ff0)

Added: 
    

Modified: 
    llvm/cmake/modules/AddLLVM.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 29e40f45fef89..5a9480aa67681 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-branch-commits mailing list