Skip to content

Fix bug in documentation regarding dependencies. #84930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

EricWF
Copy link
Member

@EricWF EricWF commented Mar 12, 2024

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.

@EricWF EricWF requested a review from a team as a code owner March 12, 2024 15:20
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Mar 12, 2024
@llvmbot
Copy link
Member

llvmbot commented Mar 12, 2024

@llvm/pr-subscribers-libcxx

Author: Eric (EricWF)

Changes

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.


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

1 Files Affected:

  • (modified) libcxx/docs/Modules.rst (+2)
diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst
index ee2b81d3b9e7ca..234cb53cecfb27 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

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.
@mordante mordante self-assigned this Mar 12, 2024
@mordante
Copy link
Member

I just approved #84936 which contains this fix. So this patch is no longer needed.

@mordante mordante closed this Mar 14, 2024
@EricWF EricWF deleted the mod-doc1 branch March 15, 2024 12:23
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.

3 participants