Issue 181898
Summary Configure fails on 22.1.0-rc3 with ENABLE_PROJECTS=all and ENABLE_RUNTIMES=all
Labels new issue
Assignees
Reporter jcalvinowens
    This is a minor annoyance, I'm primarily opening this issue so a solution will appear in search engines.

Previously, using `all` for both values worked. Now, it fails like this:

```
CMake Error at cmake/modules/LLVMExternalProjectUtils.cmake:471 (add_custom_target):
 add_custom_target cannot create target "check-builtins" because another
 target with the same name already exists.  The existing target is a custom
 target created in source directory 
  "/home/calvinow/git/llvm/compiler-rt/test/builtins".  See documentation for
  policy CMP0002 for more details. 
Call Stack (most recent call first): 
  runtimes/CMakeLists.txt:271 (llvm_ExternalProject_Add)
 runtimes/CMakeLists.txt:594 (runtime_default_target)
```

Starting with llvm-22 it is necessary to spell out both arguments and ensure they have no overlap:

```
        cmake -G Ninja \
 -DCMAKE_BUILD_TYPE=${llvm_reltype} \
- -DLLVM_ENABLE_PROJECTS=all \
-               -DLLVM_ENABLE_RUNTIMES=all \
+ -DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;cross-project-tests;lld;lldb;mlir;polly;flang" \
+ -DLLVM_ENABLE_RUNTIMES="libc;libunwind;libcxxabi;libcxx;compiler-rt;openmp;llvm-libgcc;offload;flang-rt;libclc;libsycl;orc-rt" \
                -DCLANG_ENABLE_BOOTSTRAP=ON \
```

The docs say:

```
Some projects listed here can also go in LLVM_ENABLE_RUNTIMES. They should only appear in one of the two lists. If a project is a valid possibility for both, prefer putting it in LLVM_ENABLE_RUNTIMES.
```

Does anybody object to adding logic which excludes the projects which exist in both lists from `PROJECTS` when `all` is passed? I'll send a PR to do that when I have a chance to dig into it, unless somebody beats me to it.


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to