<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/112105>112105</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            No 'check-builtins' target and builtins unit tests not built for runtimes-based compiler-rt build
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            cmake,
            compiler-rt:builtins
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          asb
      </td>
    </tr>
</table>

<pre>
    For the following config:

```
    mkdir -p build/release.max && cd build/release.max
    cmake -G Ninja \
 -DCMAKE_BUILD_TYPE="Release" \
 -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;mlir;polly" \
 -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind;openmp;pstl" \
      -DLLVM_ENABLE_ASSERTIONS=ON \
      -DLLVM_CCACHE_BUILD=ON \
      -DCMAKE_C_COMPILER=clang \
      -DCMAKE_CXX_COMPILER=clang++ \
      -DLLVM_ENABLE_LLD=True \
 -DLLVM_TARGETS_TO_BUILD="all" \
      -DLLVM_BUILD_TESTS=True \
 -DLLVM_APPEND_VC_REV=False \
      -DCOMPILER_RT_INCLUDE_TESTS=ON \
      -DCOMPILER_RT_BUILD_SANITIZERS=False \
      ../../llvm
 cmake --build .
```

`ninja check-all` and `ninja check-compiler-rt`  or `ninja check-runtimes` all fail to build / execute the builtins tests in `compiler-rt/test/builtins/Unit` and there is no `check-builtins` target. I can see the builtins themselves are built in `./runtimes/builtins-bins/CMakeFiles/clang_rt.builtins-x86_64.dir/`. Possible this is user error of course, but seems surprising behaviour regardless. Found via crafting a buld-as-much-as-possible X86 configuration to act as a baseline for some work on another target.

CC @petrhosek 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VVGTojgQ_jXxpQsKwoj6wIMi7HnnOJY6W3v3QgVoNWtIrCTM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