Skip to content

Commit af61b8e

Browse files
[cmake] Add check_linker_flag import (llvm#85128)
Fixing ``` CMake Error at cmake/llvm/AddLLVM.cmake:266 (check_linker_flag): Unknown CMake command "check_linker_flag". ```
1 parent ccfb9e6 commit af61b8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32)
263263
# -no_warn_duplicate_libraries, but only in versions of the linker that
264264
# support that flag.
265265
if(NOT LLVM_USE_LINKER AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
266+
include(CheckLinkerFlag)
266267
check_linker_flag(C "-Wl,-no_warn_duplicate_libraries" LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES)
267268
else()
268269
set(LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES OFF CACHE INTERNAL "")

0 commit comments

Comments
 (0)