From 1245a1ed07bab52fd4a5501f50651d65f43b9971 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 24 Apr 2023 19:40:21 +0000 Subject: [PATCH] [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 references to /llvm to better match the rest of the file. Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D148451 --- llvm/docs/AdvancedBuilds.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/llvm/docs/AdvancedBuilds.rst b/llvm/docs/AdvancedBuilds.rst index ba3f3c3..a172e5d 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 + $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \ + -DCLANG_ENABLE_BOOTSTRAP=On \ + -DLLVM_ENABLE_PROJECTS="clang" \ + /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" + $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \ + -DCLANG_ENABLE_BOOTSTRAP=On \ + -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE" \ + -DLLVM_ENABLE_PROJECTS="clang" \ + /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 /clang/cmake/caches/Apple-stage1.cmake + $ cmake -G Ninja -C /clang/cmake/caches/Apple-stage1.cmake /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 /clang/cmake/caches/3-stage.cmake + $ cmake -G Ninja -C /clang/cmake/caches/3-stage.cmake /llvm $ cmake --build . --target stage3 --parallel After the build you can compare the stage2 & stage3 compilers. -- 2.7.4