Skip to content

[libc++] -DLIBCXX_CXX_ABI=system-libcxxabi not usable? #104672

Closed
@h-vetinari

Description

@h-vetinari

I recently noticed ba4f1e4, which is exactly the kind of build we need to do for our distribution 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cmakeBuild system in general and CMake in particularlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++abilibc++abi C++ Runtime Library. Not libc++.release:backport

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions