[all-commits] [llvm/llvm-project] 864beb: [llvm][CMake] Expand error message shown when -fus...

David Spickett via All-commits all-commits at lists.llvm.org
Tue Oct 3 01:09:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 864beb179280f9b2e81b303462dfff90c283c8be
      https://github.com/llvm/llvm-project/commit/864beb179280f9b2e81b303462dfff90c283c8be
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

  Changed paths:
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  -----------
  [llvm][CMake] Expand error message shown when -fuse-ld= test fails (#66778)

This is one of the most common issues new users face, especially as so
many reccomended CMake configurations include `-DLLVM_ENABLE_LLD=ON`.

I don't want the error message to get too long but let's at least say
that there are 2 main reasons for the failure. If it's not those then
maybe folks will find the actual problem while trying to discount them.

The new message looks like:
```
CMake Error at cmake/modules/HandleLLVMOptions.cmake:330 (message):
  Host compiler does not support '-fuse-ld=not_a_linker'.  Please make sure
  that 'not_a_linker' is installed and that your host compiler can compile a
  simple program when given the option '-fuse-ld=not_a_linker'.
Call Stack (most recent call first):
  CMakeLists.txt:910 (include)
```




More information about the All-commits mailing list