Skip to content

Conversation

@DavidSpickett
Copy link
Collaborator

If I take the command from the page and add my triple like so:

$ cmake -G Ninja -S llvm -B build
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_ENABLE_PROJECTS="clang" \ # Configure
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"
-DLLVM_RUNTIME_TARGETS="aarch64-unknown-linux-gnu"
CMake Warning:
Ignoring extra path from command line:

" "
<...>
-- Build files have been written to: /home/david.spickett/llvm-project/build -bash: -DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind;compiler-rt: command not found

As the comment is after the backslash, it's considered part of the next line. This comments out the ENABLE_RUNTIMES line and makes the RUNTIME_TARGETS line look like another command.

To fix this, put the comment before the configure command.

I also moved the other inline comments (which are fine) closer to the text since they don't have to line up with the configure one anymore.

If I take the command from the page and add my triple like so:

$ cmake -G Ninja -S llvm -B build                                       \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo                               \
        -DLLVM_ENABLE_PROJECTS="clang"                                  \  # Configure
        -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
        -DLLVM_RUNTIME_TARGETS="aarch64-unknown-linux-gnu"
CMake Warning:
  Ignoring extra path from command line:

   " "
<...>
-- Build files have been written to: /home/david.spickett/llvm-project/build
-bash: -DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind;compiler-rt: command not found

As the comment is after the backslash, it's considered part of the next line.
This comments out the ENABLE_RUNTIMES line and makes the RUNTIME_TARGETS
line look like another command.

To fix this, put the comment before the configure command.

I also moved the other inline comments (which are fine) closer to the text
since they don't have to line up with the configure one anymore.
@DavidSpickett DavidSpickett requested a review from a team as a code owner December 12, 2025 14:46
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2025

@llvm/pr-subscribers-libcxx

Author: David Spickett (DavidSpickett)

Changes

If I take the command from the page and add my triple like so:

$ cmake -G Ninja -S llvm -B build
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_ENABLE_PROJECTS="clang" \ # Configure
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"
-DLLVM_RUNTIME_TARGETS="aarch64-unknown-linux-gnu"
CMake Warning:
Ignoring extra path from command line:

" "
<...>
-- Build files have been written to: /home/david.spickett/llvm-project/build -bash: -DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind;compiler-rt: command not found

As the comment is after the backslash, it's considered part of the next line. This comments out the ENABLE_RUNTIMES line and makes the RUNTIME_TARGETS line look like another command.

To fix this, put the comment before the configure command.

I also moved the other inline comments (which are fine) closer to the text since they don't have to line up with the configure one anymore.


Full diff: https://github.com/llvm/llvm-project/pull/172015.diff

1 Files Affected:

  • (modified) libcxx/docs/VendorDocumentation.rst (+5-4)
diff --git a/libcxx/docs/VendorDocumentation.rst b/libcxx/docs/VendorDocumentation.rst
index 05dc3416d1df5..3e4b305707258 100644
--- a/libcxx/docs/VendorDocumentation.rst
+++ b/libcxx/docs/VendorDocumentation.rst
@@ -81,14 +81,15 @@ CMake invocation at ``<monorepo>/llvm``:
 .. code-block:: bash
 
   $ mkdir build
+  $ # Configure
   $ cmake -G Ninja -S llvm -B build                                       \
           -DCMAKE_BUILD_TYPE=RelWithDebInfo                               \
-          -DLLVM_ENABLE_PROJECTS="clang"                                  \  # Configure
+          -DLLVM_ENABLE_PROJECTS="clang"                                  \
           -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
           -DLLVM_RUNTIME_TARGETS="<target-triple>"
-  $ ninja -C build runtimes                                                  # Build
-  $ ninja -C build check-runtimes                                            # Test
-  $ ninja -C build install-runtimes                                          # Install
+  $ ninja -C build runtimes          # Build
+  $ ninja -C build check-runtimes    # Test
+  $ ninja -C build install-runtimes  # Install
 
 .. note::
   - This type of build is also commonly called a "Runtimes build", but we would like to move

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants