[llvm] 1245a1e - [Docs] Fix minor issues in AdvancedBuilds documentation
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 12:49:18 PDT 2023
Author: Aiden Grossman
Date: 2023-04-24T19:41:47Z
New Revision: 1245a1ed07bab52fd4a5501f50651d65f43b9971
URL: https://github.com/llvm/llvm-project/commit/1245a1ed07bab52fd4a5501f50651d65f43b9971
DIFF: https://github.com/llvm/llvm-project/commit/1245a1ed07bab52fd4a5501f50651d65f43b9971.diff
LOG: [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
Added:
Modified:
llvm/docs/AdvancedBuilds.rst
Removed:
################################################################################
diff --git a/llvm/docs/AdvancedBuilds.rst b/llvm/docs/AdvancedBuilds.rst
index ba3f3c3e498f..a172e5da63c4 100644
--- a/llvm/docs/AdvancedBuilds.rst
+++ b/llvm/docs/AdvancedBuilds.rst
@@ -41,7 +41,10 @@ CLANG_ENABLE_BOOTSTRAP.
.. code-block:: console
- $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=On <path to source>
+ $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
+ -DCLANG_ENABLE_BOOTSTRAP=On \
+ -DLLVM_ENABLE_PROJECTS="clang" \
+ <path to source>/llvm
$ ninja stage2
This command itself isn't terribly useful because it assumes default
@@ -55,7 +58,11 @@ CMake option, each variable separated by a ";". As example:
.. code-block:: console
- $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=On -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE" <path to source>
+ $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
+ -DCLANG_ENABLE_BOOTSTRAP=On \
+ -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE" \
+ -DLLVM_ENABLE_PROJECTS="clang" \
+ <path to source>/llvm
$ ninja stage2
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:
.. code-block:: console
- $ cmake -G Ninja -C <path to source>/clang/cmake/caches/Apple-stage1.cmake <path to source>
+ $ cmake -G Ninja -C <path to source>/clang/cmake/caches/Apple-stage1.cmake <path to source>/llvm
$ ninja stage2-distribution
This CMake invocation configures the stage1 host compiler, and sets
@@ -268,7 +275,7 @@ following commands:
.. code-block:: console
- $ cmake -G Ninja -C <path to source>/clang/cmake/caches/3-stage.cmake <path to source>
+ $ cmake -G Ninja -C <path to source>/clang/cmake/caches/3-stage.cmake <path to source>/llvm
$ cmake --build . --target stage3 --parallel
After the build you can compare the stage2 & stage3 compilers.
More information about the llvm-commits
mailing list