Skip to content

Commit 91fe687

Browse files
committed
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.
1 parent 6cd68c2 commit 91fe687

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libcxx/docs/Modules.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ This is a small sample program that uses the module ``std``. It consists of a
206206
#
207207
208208
add_executable(main)
209+
add_dependencies(main std)
210+
target_link_libraries(std)
209211
target_sources(main
210212
PRIVATE
211213
main.cpp
@@ -218,13 +220,9 @@ Building this project is done with the following steps, assuming the files
218220
219221
$ mkdir build
220222
$ cmake -G Ninja -S . -B build -DCMAKE_CXX_COMPILER=<path-to-compiler> -DLIBCXX_BUILD=<build>
221-
$ ninja -j1 std -C build
222223
$ ninja -C build
223224
$ build/main
224225
225-
.. note:: The ``std`` dependencies of ``std.compat`` is not always resolved when
226-
building the ``std`` target using multiple jobs.
227-
228226
.. warning:: ``<path-to-compiler>`` should point point to the real binary and
229227
not to a symlink.
230228

0 commit comments

Comments
 (0)