Skip to content

Conversation

@DavidSpickett
Copy link
Collaborator

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) 
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) ```
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Sep 19, 2023
@DavidSpickett
Copy link
Collaborator Author

The other way to do this is adding the information to https://llvm.org/docs/CMake.html#llvm-use-linker, but it's not as immediate. I could do both if it helps to have something to cite in answers.

@DavidSpickett
Copy link
Collaborator Author

ping!

@DavidSpickett DavidSpickett merged commit 864beb1 into llvm:main Oct 3, 2023
@DavidSpickett DavidSpickett deleted the llvm-linker-error branch October 3, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular

3 participants