[libcxx-commits] [libcxx] Fix bug in documentation regarding dependencies. (PR #84930)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 12 08:22:34 PDT 2024
https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/84930
>From 91fe687ef666e809b3759f93a66fedb311ca28fb Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Tue, 12 Mar 2024 11:18:23 -0400
Subject: [PATCH] Fix bug in documentation regarding dependencies.
The docs for building modules suggest you have to build with -j1 and
build the std modules first. Fortunetly, that's just a bug in the
documentation. By correctly listing the libraries as dependencies,
the build system will order the builds correctly.
---
libcxx/docs/Modules.rst | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst
index ee2b81d3b9e7ca..fc267cb8761b1e 100644
--- a/libcxx/docs/Modules.rst
+++ b/libcxx/docs/Modules.rst
@@ -206,6 +206,8 @@ This is a small sample program that uses the module ``std``. It consists of a
#
add_executable(main)
+ add_dependencies(main std)
+ target_link_libraries(std)
target_sources(main
PRIVATE
main.cpp
@@ -218,13 +220,9 @@ Building this project is done with the following steps, assuming the files
$ mkdir build
$ cmake -G Ninja -S . -B build -DCMAKE_CXX_COMPILER=<path-to-compiler> -DLIBCXX_BUILD=<build>
- $ ninja -j1 std -C build
$ ninja -C build
$ build/main
-.. note:: The ``std`` dependencies of ``std.compat`` is not always resolved when
- building the ``std`` target using multiple jobs.
-
.. warning:: ``<path-to-compiler>`` should point point to the real binary and
not to a symlink.
More information about the libcxx-commits
mailing list