Fix -fuse-ld feature detection error.
authorRui Ueyama <ruiu@google.com>
Mon, 30 Oct 2017 21:19:54 +0000 (21:19 +0000)
committerRui Ueyama <ruiu@google.com>
Mon, 30 Oct 2017 21:19:54 +0000 (21:19 +0000)
commitb7da57ccd02b739aa79acb6104ad9c5c428df9a3
treead7b7fc2350c936d3e355646259c1d5b850abd8d
parentd23f23d81cbb6730e745a996148adea237a77f84
Fix -fuse-ld feature detection error.

check_cxx_compiler_flag doesn't seem to try to link a program, so
the existing code doesn't correctly detect the availability of a given
linker.  This patch uses check_cxx_source_compiles instead.

I confirmed that cmake now reports this error

  Host compiler does not support '-fuse-ld=foo'

for -DLLVM_USE_LINKER=foo.

Differential Revision: https://reviews.llvm.org/D39274

llvm-svn: 316958
llvm/cmake/modules/HandleLLVMOptions.cmake