[PATCH] D69030: [cmake] Suppress unknown argument warning when linking with lld-link
Russell Gallop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 05:10:29 PDT 2019
russell.gallop created this revision.
russell.gallop added reviewers: rnk, thakis, ruiu.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
Linking with lld-link produced a lot of messages:
lld-link: warning: ignoring unknown argument '-fuse-ld=lld'
For example on the bot: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc
This avoids adding that argument when using lld-link.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69030
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -227,7 +227,7 @@
set(LLVM_USE_LINKER "lld")
endif()
-if( LLVM_USE_LINKER )
+if( LLVM_USE_LINKER AND NOT LINKER_IS_LLD_LINK )
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fuse-ld=${LLVM_USE_LINKER}")
check_cxx_source_compiles("int main() { return 0; }" CXX_SUPPORTS_CUSTOM_LINKER)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69030.225198.patch
Type: text/x-patch
Size: 570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191016/1318126c/attachment.bin>
More information about the llvm-commits
mailing list