Skip to content

Commit 6f17768

Browse files
committed
[runtimes] Remove support for standalone builds
Standalone build have been deprecated for some time now, so this commit removes support for those builds entirely from libc++, libc++abi and libunwind. This, along with the removal of other legacy ways to build, will allow for major build system simplifications. Differential Revision: https://reviews.llvm.org/D119255
1 parent eceb401 commit 6f17768

File tree

7 files changed

+19
-97
lines changed

7 files changed

+19
-97
lines changed

libcxx/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
2727
set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
2828

2929
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
30+
message(FATAL_ERROR "The Standalone build has been deprecated since LLVM 14, and it is not supported anymore. "
31+
"Please use one of the ways described at https://libcxx.llvm.org/BuildingLibcxx.html for "
32+
"building libc++.")
3033
project(libcxx CXX C)
3134

3235
set(PACKAGE_NAME libcxx)

libcxx/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ ABI Changes
5757

5858
Build System Changes
5959
--------------------
60+
61+
- Support for standalone builds have been entirely removed from libc++, libc++abi and
62+
libunwind. Please use :ref:`these instructions <build instructions>` for building
63+
libc++, libc++abi and/or libunwind.

libcxx/utils/ci/buildkite-pipeline.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,6 @@ steps:
297297
limit: 2
298298
timeout_in_minutes: 120
299299

300-
- label: "Legacy standalone build"
301-
command: "libcxx/utils/ci/run-buildbot legacy-standalone"
302-
artifact_paths:
303-
- "**/test-results.xml"
304-
agents:
305-
queue: "libcxx-builders"
306-
os: "linux"
307-
retry:
308-
automatic:
309-
- exit_status: -1 # Agent was lost
310-
limit: 2
311-
timeout_in_minutes: 120
312-
313300
- label: "Legacy LLVM_ENABLE_PROJECTS build"
314301
command: "libcxx/utils/ci/run-buildbot legacy-project-build"
315302
artifact_paths:

libcxx/utils/ci/run-buildbot

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -516,48 +516,6 @@ legacy-project-build)
516516
-DLIBCXX_CXX_ABI=libcxxabi
517517
check-runtimes
518518
;;
519-
legacy-standalone)
520-
clean
521-
522-
echo "--- Generating CMake"
523-
${CMAKE} \
524-
-S "${MONOREPO_ROOT}/libcxx" \
525-
-B "${BUILD_DIR}/libcxx" \
526-
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
527-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
528-
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
529-
-DLLVM_PATH="${MONOREPO_ROOT}/llvm" \
530-
-DLIBCXX_CXX_ABI=libcxxabi \
531-
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
532-
-DLIBCXX_CXX_ABI_INCLUDE_PATHS="${MONOREPO_ROOT}/libcxxabi/include" \
533-
-DLIBCXX_CXX_ABI_LIBRARY_PATH="${BUILD_DIR}/libcxxabi/lib"
534-
535-
${CMAKE} \
536-
-S "${MONOREPO_ROOT}/libcxxabi" \
537-
-B "${BUILD_DIR}/libcxxabi" \
538-
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
539-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
540-
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
541-
-DLLVM_PATH="${MONOREPO_ROOT}/llvm" \
542-
-DLIBCXXABI_LIBCXX_PATH="${MONOREPO_ROOT}/libcxx" \
543-
-DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}/libcxx/include/c++/v1" \
544-
-DLIBCXXABI_LIBCXX_LIBRARY_PATH="${BUILD_DIR}/libcxx/lib"
545-
546-
echo "+++ Generating libc++ headers"
547-
${NINJA} -vC "${BUILD_DIR}/libcxx" generate-cxx-headers
548-
549-
echo "+++ Building libc++abi"
550-
${NINJA} -vC "${BUILD_DIR}/libcxxabi" cxxabi
551-
552-
echo "+++ Building libc++"
553-
${NINJA} -vC "${BUILD_DIR}/libcxx" cxx
554-
555-
echo "+++ Running the libc++ tests"
556-
${NINJA} -vC "${BUILD_DIR}/libcxx" check-cxx
557-
558-
echo "+++ Running the libc++abi tests"
559-
${NINJA} -vC "${BUILD_DIR}/libcxxabi" check-cxxabi
560-
;;
561519
aarch64)
562520
clean
563521
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" \

libcxxabi/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
2828
"Specify path to libc++ source.")
2929

3030
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
31+
message(FATAL_ERROR "The Standalone build has been deprecated since LLVM 14, and it is not supported anymore. "
32+
"Please use one of the ways described at https://libcxx.llvm.org/BuildingLibcxx.html for "
33+
"building libc++abi.")
34+
3135
project(libcxxabi CXX C)
3236

3337
set(PACKAGE_NAME libcxxabi)

libcxxabi/www/index.html

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -73,52 +73,14 @@ <h2 id="dir-structure">Current Status</h2>
7373
<h2>Get it and get involved!</h2>
7474
<!--=====================================================================-->
7575

76-
<p>To check out the code (including llvm and others), use:</p>
77-
78-
<ul>
79-
<li><code>git clone https://github.com/llvm/llvm-project.git</code></li>
80-
</ul>
81-
82-
<p>To build:</p>
83-
<ul>
84-
<li><code>cd llvm-project</code></li>
85-
<li><code>mkdir build &amp;&amp; cd build</code></li>
86-
<li><code>cmake -DLLVM_ENABLE_PROJECTS=libcxxabi ../llvm # on linux you may need to specify -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
87-
<li><code>make</code></li>
88-
</ul>
89-
90-
<p>To do a standalone build:</p>
91-
<ul>
92-
<li>
93-
Check out the source tree. This includes the other subprojects, but you'll only use the libcxxabi part.
94-
</li>
95-
<li><code>cd llvm-project</code></li>
96-
<li><code>mkdir build-libcxxabi &amp;&amp; cd build-libcxxabi</code></li>
97-
<li><code>cmake ../libcxxabi # on linux you may need -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
98-
<li><code>make</code></li>
99-
</ul>
100-
<p> By default CMake uses <code>llvm-config</code> to locate the required
101-
LLVM sources. If CMake cannot find <code>llvm-config</code> then you must
102-
configure CMake using either of the following options.
76+
<p>For building libc++abi, please see the libc++ documentation on
77+
<a href="https://libcxx.llvm.org/BuildingLibcxx.html">building the runtimes</a>.
10378
</p>
104-
<ul>
105-
<li><code>-DLLVM_CONFIG_PATH=path/to/llvm-config</code></li>
106-
<li><code>-DLLVM_PATH=path/to/llvm-source-root</code></li>
107-
</ul>
10879

80+
<p>For getting involved with libc++abi, please see the libc++ documentation on
81+
<a href="https://libcxx.llvm.org/Contributing.html">getting involved</a>.
10982
</p>
11083

111-
<p>To run the tests:</p>
112-
<ul>
113-
<li><code>make check-cxxabi</code></li>
114-
</ul>
115-
<p>Note: in a standalone build, the system's libc++ will be used for tests. If
116-
the system's libc++ was statically linked against libc++abi (or linked against
117-
a different ABI library), this may interfere with test results.</p>
118-
119-
<p>Send discussions to the
120-
(<a href="https://lists.llvm.org/mailman/listinfo/libcxx-dev">libcxx-dev mailing list</a>).</p>
121-
12284
<!--=====================================================================-->
12385
<h2>Frequently asked questions</h2>
12486
<!--=====================================================================-->

libunwind/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
2424
"Specify path to libc++ source.")
2525

2626
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
27+
message(FATAL_ERROR "The Standalone build has been deprecated since LLVM 14, and it is not supported anymore. "
28+
"Please use one of the ways described at https://libcxx.llvm.org/BuildingLibcxx.html for "
29+
"building libunwind.")
30+
2731
# We may have an incomplete toolchain - do language support tests without
2832
# linking.
2933
include(EnableLanguageNolink)

0 commit comments

Comments
 (0)