[llvm] [llvm][CMake] Introduce LLVM_RUNTIME_<project>_BUILD in CMake (PR #88934)

Michael Klemm via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 05:48:05 PDT 2024


mjklemm wrote:

> Can you explain what the motivation behind introducing these variables is (and also ideally include it in the description of the PR)? I can try to think a better way we could address your needs but I need to understand the use case.

Sure, one use case is to determine if, say, the OpenMP runtime was built and enable the tests for it.  Right now `flang/test/lit.site.cfg.py.in` has this:

```Python
config.have_openmp_rtl = ("@LLVM_TOOL_OPENMP_BUILD@" == "TRUE")
```

However, there's no good way to detect and enable that test configuration if OpenMP is built via `LLVM_ENABLE_RUNTIMES`.  There's a clumsy way doing it by looking at `LLVM_ENABLE_RUNTIMES` using Python string search, but does not seem like a good solution either,  So, I was hoping for something along the lines of `LLVM_TOOL_<project>_BUILD`.


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


More information about the llvm-commits mailing list