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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] `-DLIBCXX_CXX_ABI=system-libcxxabi` not usable?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            libc++abi
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          h-vetinari
      </td>
    </tr>
</table>

<pre>
    I recently noticed https://github.com/llvm/llvm-project/commit/ba4f1e44e480d661d99973007a39dc642f5d79a4, which is exactly the kind of build we need to do for our [distribution](https://conda-forge.org) for various reasons. I've tried this with LLVM 18.1.8 and 19.1.0-rc2, but in both cases, I get
```
-- Configuring done (25.4s)
CMake Error at $SRC_DIR/libcxx/cmake/Modules/HandleLibCXXABI.cmake:59 (add_library):
  No SOURCES given to target: libcxx-abi-headers-generate-private-headers
Call Stack (most recent call first):
 $SRC_DIR/libcxx/cmake/Modules/HandleLibCXXABI.cmake:135 (import_private_headers)
  $SRC_DIR/libcxx/CMakeLists.txt:511 (include)
```

Our build invocation roughly boils down to the following (removed some uninteresting things, but happy to elaborate);
```
cmake -G Ninja -B build -S runtimes \
 -DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind \
 -DCMAKE_INSTALL_PREFIX=$PREFIX \
    -DCMAKE_BUILD_TYPE=Release \
 -DLIBCXX_ENABLE_TIME_ZONE_DATABASE=ON \
 -DLIBCXX_INCLUDE_BENCHMARKS=OFF \
    -DLIBCXX_INCLUDE_DOCS=OFF \
 -DLIBCXX_INCLUDE_TESTS=OFF \
    -DLIBCXX_HARDENING_MODE=none \
 -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
 -DLIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS=ON \
 -DLIBCXX_CXX_ABI=system-libcxxabi

ninja -C build cxx cxxabi unwind
```

I've tried removing `libcxxabi` from `-DLLVM_ENABLE_RUNTIMES=` (and the build invocation) though the result stays the same.

CC @ldionne @mgorny 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVttu2zwSfhr6ZiBBR9u68IVOboXflgPb6aZ7I1AiZbGRyICknPjtF5SdNoe2i8UCSkSTc_jmmxkNsVLsxCldoTBBYTbDo-6EXHXWmWrGsWSzWpDLqgBJG8p1fwEuNGsogU7rJ4X8GHlr5K1PTHdjbTdiQN6678-vL-tJih-00chbN2IYmFnUOGhdGgQ0WDpkPndJFEUL33EW2I9IMw-8NiSLCAfIS-G5Y00HTAF9wY1xrzsKj4wTEC3UI-sJPFPglBLQAoiAVkgQowQUJoQpLVk9aiY4CjPkLd9jbgQn2GqFPFFbyBPyokn7jCUTowJJsRJc2VAgb3GmoCUzXjqm4JnpDjabb1twl7ZrLwFzAm5ku7ZjycYzwOtRA-NQC91BgxVVZrOAE9XIyZATo7lze6aflgWp4C07jZLxExDBKSBv6YV2oJAXXYXSLX6kkEspJGANyAsO-7TKir0hm9XNy4uJasCPFHnrrSBjb9yuv2JOerphdfrwECeFfZXw4zAyLjAhVc9qieXFOPLjqy-AUsBhd79P8wOc2JlyQ7DG0kTgx3D1Z-GaWR3FhEplnSinEmtqPUl2Nu_bwQ087ns4aNw8Gq-DUPpWU9CYk5ZJpd8B-H_Dc_3QeGLDk5C6umGqXjG9cgp_8DNxvWFKK1u_mIhD153M8aYfCf2p_yGP1_-7Ud6Kk_GzaLCpQJBiPHX9BWrBegVEPF8Z7Si0ou_Fs8k78paSDuJMCSgxUBg545pKqrQ51R3jJ_VaXR1-eroYE7THtTDET_Qlv8U1kQLWFygZ_4HBSm74rAPIkWs2UAUoTG-cWJkp7iov42STV_v78lhs8wPysxs9fnJd4Jpd1yN_Nj351kK6jf_Jq6I8HOPNpr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