[Openmp-commits] [clang] [openmp] [OpenMP] Remove standalone build mode (PR #149878)

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 20 02:27:50 PST 2026


mstorsjo wrote:

> Please use
> 
> ```shell
> $ cmake -S <llvm-project>/runtimes -B build -DLLVM_ENABLE_RUNTIMES=openmp -DLLVM_BINARY_DIR=path/to/precompiled/llvm
> $ ninja -C build check-openmp
> ```
> 
> as documented on https://openmp.llvm.org/Building.html#runtimes-default-standalone-build-using-a-pre-built-llvm .
> 
> The `FileCheck` target is an import target listed in `LLVMBuildTreeOnlyTargets.cmake` which is included by `find_package(LLVM)`.

Thanks for the pointers!

There's one drawback in that approach currently; it requires the build tree pointed to by `LLVM_BINARY_DIR` to contain a build of Clang too. In my setups, I already have a prebuilt distribution package of my toolchain, including a fresh Clang matching the current version of llvm/openmp to test. But I don't have a copy of the build directory from that build, and the distribution doesn't contain `not` and `FileCheck`, so I just build them from scratch before testing openmp. They can be built in a couple minutes, while rebuilding the whole Clang takes hours.

It doesn't seem too hard to fix this though; I'll post a PR for that in a moment.

---

Secondly, I noticed that `LLVMBuildTreeOnlyTargets.cmake` doesn't contain `FileCheck`, if the LLVM build is configured with `-DLLVM_INSTALL_TOOLCHAIN_ONLY=TRUE`, which I do to make `ninja install` omit some of the files. This happens both for a bootstrapping build and a default runtimes build.

I.e. in a configuration like this, one can't run the tests:
```
cmake ../llvm -G Ninja                                           \
    -DCMAKE_BUILD_TYPE=Release                                   \
    -DCMAKE_INSTALL_PREFIX=<PATH>                                \
    -DLLVM_INSTALL_TOOLCHAIN_ONLY=TRUE                           \
    -DLLVM_ENABLE_PROJECTS=clang                                 \
    -DLLVM_ENABLE_RUNTIMES=openmp                                \
```


https://github.com/llvm/llvm-project/pull/149878


More information about the Openmp-commits mailing list