[libcxx-commits] [libcxx] [libc++] Enable compiler-rt when performing a bootstrapping build (PR #167065)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 7 16:54:09 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
Otherwise, we end up using whatever system-provided compiler runtime is available, which doesn't work on macOS since compiler-rt is located inside the toolchain path, which can't be found by default.
However, disable the tests for compiler-rt since those are linking against the system C++ standard library while using the just-built libc++ headers, which is non-sensical and leads to undefined references on macOS.
---
Full diff: https://github.com/llvm/llvm-project/pull/167065.diff
2 Files Affected:
- (modified) libcxx/docs/VendorDocumentation.rst (+8-6)
- (modified) libcxx/utils/ci/run-buildbot (+2-1)
``````````diff
diff --git a/libcxx/docs/VendorDocumentation.rst b/libcxx/docs/VendorDocumentation.rst
index 7eba598909a74..babd22ff00ead 100644
--- a/libcxx/docs/VendorDocumentation.rst
+++ b/libcxx/docs/VendorDocumentation.rst
@@ -81,12 +81,14 @@ CMake invocation at ``<monorepo>/llvm``:
.. code-block:: bash
$ mkdir build
- $ cmake -G Ninja -S llvm -B build -DLLVM_ENABLE_PROJECTS="clang" \ # Configure
- -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
- -DLLVM_RUNTIME_TARGETS="<target-triple>"
- $ ninja -C build runtimes # Build
- $ ninja -C build check-runtimes # Test
- $ ninja -C build install-runtimes # Install
+ $ cmake -G Ninja -S llvm -B build \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DLLVM_ENABLE_PROJECTS="clang" \ # Configure
+ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
+ -DLLVM_RUNTIME_TARGETS="<target-triple>"
+ $ ninja -C build runtimes # Build
+ $ ninja -C build check-runtimes # Test
+ $ ninja -C build install-runtimes # Install
.. note::
- This type of build is also commonly called a "Runtimes build", but we would like to move
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 57ecf1e49dbf2..15dbd8eb31729 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -391,11 +391,12 @@ bootstrapping-build)
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
- -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
+ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
-DLLVM_RUNTIME_TARGETS="$(${CXX} --print-target-triple)" \
-DLLVM_HOST_TRIPLE="$(${CXX} --print-target-triple)" \
-DLLVM_TARGETS_TO_BUILD="host" \
-DRUNTIMES_BUILD_ALLOW_DARWIN=ON \
+ -DCOMPILER_RT_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
``````````
</details>
https://github.com/llvm/llvm-project/pull/167065
More information about the libcxx-commits
mailing list