Skip to content

Commit 6127724

Browse files
authored
[cmake] Remove obsolete files, docs and CMake variables related to the standalone build (#112741)
The runtimes used to support a build mode called the "Standalone build", which isn't supported anymore (and hasn't been for a few years). However, various places in the code still contained stuff whose only purpose was to support that build mode, and some outdated documentation. This patch cleans that up (although I probably missed some). - Remove HandleOutOfTreeLLVM.cmake which isn't referenced anymore - Remove the LLVM_PATH CMake variable which isn't used anymore - Update some outdated documentation referencing standalone builds
1 parent 97b7474 commit 6127724

File tree

5 files changed

+6
-115
lines changed

5 files changed

+6
-115
lines changed

cmake/Modules/HandleOutOfTreeLLVM.cmake

-80
This file was deleted.

compiler-rt/cmake/Modules/AddCompilerRT.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,6 @@ macro(add_custom_libcxx name prefix)
690690
-DCMAKE_CXX_FLAGS=${LIBCXX_CXX_FLAGS}
691691
-DCMAKE_BUILD_TYPE=Release
692692
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
693-
-DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
694693
-DLLVM_ENABLE_RUNTIMES=libcxx|libcxxabi
695694
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF
696695
-DLIBCXXABI_ENABLE_SHARED=OFF

libunwind/docs/BuildingLibunwind.rst

+1-18
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ On Mac OS, the easiest way to get this library is to link with -lSystem.
1616
However if you want to build tip-of-trunk from here (getting the bleeding
1717
edge), read on.
1818

19-
The basic steps needed to build libc++ are:
19+
The basic steps needed to build libunwind are:
2020

2121
#. Checkout LLVM, libunwind, and related projects:
2222

@@ -50,23 +50,6 @@ The basic steps needed to build libc++ are:
5050
* ``make install-unwind`` --- Will install the libraries and the headers
5151

5252

53-
It is sometimes beneficial to build outside of the LLVM tree. An out-of-tree
54-
build would look like this:
55-
56-
.. code-block:: bash
57-
58-
$ cd where-you-want-libunwind-to-live
59-
$ # Check out llvm, and libunwind
60-
$ ``svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm``
61-
$ ``svn co https://llvm.org/svn/llvm-project/libunwind/trunk libunwind``
62-
$ cd where-you-want-to-build
63-
$ mkdir build && cd build
64-
$ export CC=clang CXX=clang++
65-
$ cmake -DLLVM_PATH=path/to/llvm \
66-
path/to/libunwind
67-
$ make
68-
69-
7053
.. _CMake Options:
7154

7255
CMake Options

llvm/docs/HowToBuildWindowsItaniumPrograms.rst

+5-13
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,11 @@ The procedure is:
7373

7474
It is also possible to cross-compile from Linux.
7575

76-
One method of building the libraries in step 2. is to build them "stand-alone".
77-
A stand-alone build doesn't involve the rest of the LLVM tree. The steps are:
78-
79-
* ``cd build-dir``
80-
* ``cmake -DLLVM_PATH=<path to llvm checkout e.g. /llvm-project/> -DCMAKE_INSTALL_PREFIX=<install path> <other options> <path to project e.g. /llvm-project/libcxxabi>``
81-
* ``<make program e.g. ninja>``
82-
* ``<make program> install``
83-
84-
More information on standalone builds can be found in the build documentation for
85-
the respective libraries. The next section discuss the salient options and modifications
86-
required for building and installing the libraries using standalone builds. This assumes
87-
that we are building libunwind and ibc++ as DLLs and statically linking libc++abi into
88-
libc++. Other build configurations are possible, but they are not discussed here.
76+
To build the libraries in step 2, refer to the `libc++ documentation <https://libcxx.llvm.org/VendorDocumentation.html#the-default-build>`_.
77+
78+
The next section discuss the salient options and modifications required for building and installing the
79+
libraries. This assumes that we are building libunwind and libc++ as DLLs and statically linking libc++abi
80+
into libc++. Other build configurations are possible, but they are not discussed here.
8981

9082
Common CMake configuration options:
9183
-----------------------------------

runtimes/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR})
7575
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../llvm)
7676
set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules)
7777

78-
# This variable is used by individual runtimes to locate LLVM files.
79-
set(LLVM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../llvm)
80-
8178
include(CheckLibraryExists)
8279
include(LLVMCheckCompilerLinkerFlag)
8380
include(CheckCCompilerFlag)

0 commit comments

Comments
 (0)