Skip to content

Commit 1245a1e

Browse files
[Docs] Fix minor issues in AdvancedBuilds documentation
This patch modifies the commands under the Bootstrap builds section so that they include the -DLLVM_ENABLE_PROJECTS flag with the value "clang" so that the Clang build will actually get picked up. Without this patch they error out as the CLANG_BOOTSTRAP_PASSTHROUGH variable is processed in /clang/CMakeLists.txt which isn't picked up without the LLVM_ENABLE_PROJECTS variable being set appropriately. This patch also changes any remaining dangling <path to source> references to <path to source>/llvm to better match the rest of the file. Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D148451
1 parent 7ead39a commit 1245a1e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

llvm/docs/AdvancedBuilds.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ CLANG_ENABLE_BOOTSTRAP.
4141

4242
.. code-block:: console
4343
44-
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=On <path to source>
44+
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
45+
-DCLANG_ENABLE_BOOTSTRAP=On \
46+
-DLLVM_ENABLE_PROJECTS="clang" \
47+
<path to source>/llvm
4548
$ ninja stage2
4649
4750
This command itself isn't terribly useful because it assumes default
@@ -55,7 +58,11 @@ CMake option, each variable separated by a ";". As example:
5558

5659
.. code-block:: console
5760
58-
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE" <path to source>
61+
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
62+
-DCLANG_ENABLE_BOOTSTRAP=On \
63+
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE" \
64+
-DLLVM_ENABLE_PROJECTS="clang" \
65+
<path to source>/llvm
5966
$ ninja stage2
6067
6168
CMake options starting by ``BOOTSTRAP_`` will be passed only to the stage2 build.
@@ -88,7 +95,7 @@ You can build an Apple Clang compiler using the following commands:
8895

8996
.. code-block:: console
9097
91-
$ cmake -G Ninja -C <path to source>/clang/cmake/caches/Apple-stage1.cmake <path to source>
98+
$ cmake -G Ninja -C <path to source>/clang/cmake/caches/Apple-stage1.cmake <path to source>/llvm
9299
$ ninja stage2-distribution
93100
94101
This CMake invocation configures the stage1 host compiler, and sets
@@ -268,7 +275,7 @@ following commands:
268275

269276
.. code-block:: console
270277
271-
$ cmake -G Ninja -C <path to source>/clang/cmake/caches/3-stage.cmake <path to source>
278+
$ cmake -G Ninja -C <path to source>/clang/cmake/caches/3-stage.cmake <path to source>/llvm
272279
$ cmake --build . --target stage3 --parallel
273280
274281
After the build you can compare the stage2 & stage3 compilers.

0 commit comments

Comments
 (0)