[llvm-branch-commits] [libcxx] 43f2179 - [runtimes] Add a warning about the Standalone build being deprecated

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 9 10:07:04 PST 2022


Author: Louis Dionne
Date: 2022-02-09T13:06:54-05:00
New Revision: 43f21792e4af17c88d9740fb63d7c26dbb1560b9

URL: https://github.com/llvm/llvm-project/commit/43f21792e4af17c88d9740fb63d7c26dbb1560b9
DIFF: https://github.com/llvm/llvm-project/commit/43f21792e4af17c88d9740fb63d7c26dbb1560b9.diff

LOG: [runtimes] Add a warning about the Standalone build being deprecated

We are removing support for the Standalone build altogether on the main
branch, so this is going to help give an additional heads up to users
that don't read our release notes.

Also, as a fly-by fix, fixup incorrect documentation for libcxxabi and
mention libunwind in our release notes.

Differential Revision: https://reviews.llvm.org/D119341

Added: 
    

Modified: 
    libcxx/CMakeLists.txt
    libcxx/docs/ReleaseNotes.rst
    libcxxabi/CMakeLists.txt
    libcxxabi/www/index.html
    libunwind/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 183b3df621b42..6cd36ecfa7224 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -27,6 +27,8 @@ set(LIBCXX_BINARY_DIR  ${CMAKE_CURRENT_BINARY_DIR})
 set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
 
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+  message(WARNING "The Standalone build is deprecated in this release. Please use one of the ways "
+                  "described at https://libcxx.llvm.org/BuildingLibcxx.html for building libc++.")
   project(libcxx CXX C)
 
   set(PACKAGE_NAME libcxx)

diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index dd8d2648ca019..a9dd06e9490d2 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -189,14 +189,14 @@ Build System Changes
   Consider using a Bootstrapping build to build libc++ with a fresh Clang if you
   can't use the system compiler to build libc++ anymore.
 
-- Historically, there have been numerous ways of building libc++ and libc++abi. This has
-  led to at least 5 
diff erent ways to build the runtimes, which was impossible to
-  maintain with a good level of support. Starting with this release, libc++ and libc++abi support
-  exactly two ways of being built, which should cater to all use-cases. Furthermore,
-  these builds are as lightweight as possible and will work consistently even when targeting
-  embedded platforms, which used not to be the case. :doc:`BuildingLibcxx` describes
-  those two ways of building. Please migrate over to the appropriate build instructions
-  as soon as possible.
+- Historically, there have been numerous ways of building libc++, libc++abi, and libunwind.
+  This has led to at least 5 
diff erent ways to build the runtimes, which was impossible to
+  maintain with a good level of support. Starting with this release, libc++, libc++abi, and
+  libunwind support exactly two ways of being built, which should cater to all use-cases.
+  Furthermore, these builds are as lightweight as possible and will work consistently even
+  when targeting embedded platforms, which used not to be the case. :doc:`BuildingLibcxx`
+  describes those two ways of building. Please migrate over to the appropriate build
+  instructions as soon as possible.
 
   All other ways to build are deprecated and will not be supported in the next release.
   We understand that making these changes can be daunting. For that reason, here's a
@@ -206,8 +206,8 @@ Build System Changes
     (which was the previously advertised way to build the runtimes), please simply root your CMake invocation at
     ``<monorepo>/runtimes`` and pass ``-DLLVM_ENABLE_RUNTIMES=<...>``.
 
-  - If you were doing two CMake invocations, one rooted at ``<monorepo>/libcxx`` and one rooted at
-    ``<monorepo>/libcxxabi`` (this used to be called a "Standalone build"), please move them to a
+  - If you were doing multiple CMake invocations, e.g. one rooted at ``<monorepo>/libcxx`` and one rooted
+    at ``<monorepo>/libcxxabi`` (this used to be called a "Standalone build"), please move them to a
     single invocation like so:
 
     .. code-block:: bash

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index ecbc7091864e7..58c21059c6025 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -28,6 +28,9 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
         "Specify path to libc++ source.")
 
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+  message(WARNING "The Standalone build is deprecated in this release. Please use one of the ways "
+                  "described at https://libcxx.llvm.org/BuildingLibcxx.html for building libc++abi.")
+
   project(libcxxabi CXX C)
 
   set(PACKAGE_NAME libcxxabi)

diff  --git a/libcxxabi/www/index.html b/libcxxabi/www/index.html
index b6275e61da938..88035047dd391 100644
--- a/libcxxabi/www/index.html
+++ b/libcxxabi/www/index.html
@@ -73,52 +73,14 @@ <h2 id="dir-structure">Current Status</h2>
   <h2>Get it and get involved!</h2>
   <!--=====================================================================-->
 
-  <p>To check out the code (including llvm and others), use:</p>
-
-  <ul>
-  <li><code>git clone https://github.com/llvm/llvm-project.git</code></li>
-  </ul>
-
-  <p>To build:</p>
-  <ul>
-  <li><code>cd llvm-project</code></li>
-  <li><code>mkdir build && cd build</code></li>
-  <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>
-  <li><code>make</code></li>
-  </ul>
-
-  <p>To do a standalone build:</p>
-  <ul>
-  <li>
-    Check out the source tree. This includes the other subprojects, but you'll only use the libcxxabi part.
-  </li>
-  <li><code>cd llvm-project</code></li>
-  <li><code>mkdir build-libcxxabi && cd build-libcxxabi</code></li>
-  <li><code>cmake ../libcxxabi # on linux you may need -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
-  <li><code>make</code></li>
-  </ul>
-  <p> By default CMake uses <code>llvm-config</code> to locate the required
-      LLVM sources. If CMake cannot find <code>llvm-config</code> then you must
-      configure CMake using either of the following options.
+  <p>For building libc++abi, please see the libc++ documentation on
+     <a href="https://libcxx.llvm.org/BuildingLibcxx.html">building the runtimes</a>.
   </p>
-  <ul>
-  <li><code>-DLLVM_CONFIG_PATH=path/to/llvm-config</code></li>
-  <li><code>-DLLVM_PATH=path/to/llvm-source-root</code></li>
-  </ul>
 
+  <p>For getting involved with libc++abi, please see the libc++ documentation on
+      <a href="https://libcxx.llvm.org/Contributing.html">getting involved</a>.
   </p>
 
-  <p>To run the tests:</p>
-  <ul>
-  <li><code>make check-cxxabi</code></li>
-  </ul>
-  <p>Note: in a standalone build, the system's libc++ will be used for tests. If
-  the system's libc++ was statically linked against libc++abi (or linked against
-  a 
diff erent ABI library), this may interfere with test results.</p>
-
-  <p>Send discussions to the
-  (<a href="https://lists.llvm.org/mailman/listinfo/libcxx-dev">libcxx-dev mailing list</a>).</p>
-
   <!--=====================================================================-->
   <h2>Frequently asked questions</h2>
   <!--=====================================================================-->

diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 04550ae51a422..87d51b7894459 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -24,6 +24,9 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
         "Specify path to libc++ source.")
 
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+  message(WARNING "The Standalone build is deprecated in this release. Please use one of the ways "
+                  "described at https://libcxx.llvm.org/BuildingLibcxx.html for building libunwind.")
+
   # We may have an incomplete toolchain - do language support tests without
   # linking.
   include(EnableLanguageNolink)


        


More information about the llvm-branch-commits mailing list