-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
I used the main branch and noticed the following warning(#124016)
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;compiler-rt"
CMake Warning at CMakeLists.txt:189 (message):
Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a
fatal error in the LLVM 21 release. Please use
-DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at
https://compiler-rt.llvm.org/ for building the runtimes.
So I maked with -DLLVM_ENABLE_RUNTIMES="compiler-rt"
However, just using LLVM_ENABLE_RUNTIMES will cause the following problems
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" -DLLVM_ENABLE_RUNTIMES="compiler-rt"
-- clang project is enabled
-- clang-tools-extra project is enabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
This is due to ${proj}(compiler-rt) is not in LLVM_ENABLE_PROJECTS, The project will not be generated
llvm-project/llvm/CMakeLists.txt
Lines 260 to 270 in 7138397
| set(LLVM_ENABLE_PROJECTS_USED OFF CACHE BOOL "") | |
| mark_as_advanced(LLVM_ENABLE_PROJECTS_USED) | |
| if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "") | |
| set(LLVM_ENABLE_PROJECTS_USED ON CACHE BOOL "" FORCE) | |
| foreach(proj ${LLVM_KNOWN_PROJECTS} ${LLVM_EXTERNAL_PROJECTS}) | |
| string(TOUPPER "${proj}" upper_proj) | |
| string(REGEX REPLACE "-" "_" upper_proj ${upper_proj}) | |
| if ("${proj}" IN_LIST LLVM_ENABLE_PROJECTS) | |
| message(STATUS "${proj} project is enabled") | |
| set(SHOULD_ENABLE_PROJECT TRUE) |
Does LLVM_ENABLE_PROJECTS=compiler-rt need to be adapted or is there any other command?
@petrhosek Can you help me with this problem if you have time?
Metadata
Metadata
Assignees
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!