[PATCH] D38665: [CMake] Fix linker detection in AddLLVM.cmake

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 15:24:21 PDT 2017


ruiu added inline comments.


================
Comment at: cmake/modules/AddLLVM.cmake:153
+  if( LLVM_USE_LINKER )
+    set(command ${CMAKE_C_COMPILER} -fuse-ld=${LLVM_USE_LINKER} -Wl,--version)
+  else()
----------------
lichray wrote:
> ruiu wrote:
> > Is this safe if a C compiler does not support the -fuse-ld option?
> That may be too old to compile LLVM.  I would say wait them come to us.  After all, this option is to assist detection, and more users are specifying linkers directly.
You can use compilers other than clang to build clang and llvm, and I believe only clang supports this -fuse-ld option.


Repository:
  rL LLVM

https://reviews.llvm.org/D38665





More information about the llvm-commits mailing list