[llvm] af61b8e - [cmake] Add check_linker_flag import (#85128)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 14:43:19 PDT 2024
Author: Justice Adams
Date: 2024-03-13T14:42:04-07:00
New Revision: af61b8e8f18df2545017ade74baee7a8a8ca99f8
URL: https://github.com/llvm/llvm-project/commit/af61b8e8f18df2545017ade74baee7a8a8ca99f8
DIFF: https://github.com/llvm/llvm-project/commit/af61b8e8f18df2545017ade74baee7a8a8ca99f8.diff
LOG: [cmake] Add check_linker_flag import (#85128)
Fixing
```
CMake Error at cmake/llvm/AddLLVM.cmake:266 (check_linker_flag):
Unknown CMake command "check_linker_flag".
```
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index eb9e6101bdce71..f6fb56eb51e833 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -263,6 +263,7 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32)
# -no_warn_duplicate_libraries, but only in versions of the linker that
# support that flag.
if(NOT LLVM_USE_LINKER AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ include(CheckLinkerFlag)
check_linker_flag(C "-Wl,-no_warn_duplicate_libraries" LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES)
else()
set(LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES OFF CACHE INTERNAL "")
More information about the llvm-commits
mailing list