-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[clang][docs] Improve "Obtaining Clang" section #71313
Conversation
@llvm/pr-subscribers-clang Author: Robin Caloudis (robincaloudis) ChangesThe documentation is written relatively to Full diff: https://github.com/llvm/llvm-project/pull/71313.diff 1 Files Affected:
diff --git a/clang/docs/LibASTMatchersTutorial.rst b/clang/docs/LibASTMatchersTutorial.rst
index 37c9f178fa8df31..2a3f052f2e9ce15 100644
--- a/clang/docs/LibASTMatchersTutorial.rst
+++ b/clang/docs/LibASTMatchersTutorial.rst
@@ -22,8 +22,8 @@ started guide <https://llvm.org/docs/GettingStarted.html>`_.
.. code-block:: console
- cd ~/clang-llvm
- git clone https://github.com/llvm/llvm-project.git
+ mkdir ~/clang-llvm && cd ~/clang-llvm
+ git clone https://github.com/llvm/llvm-project.git .
Next you need to obtain the CMake build system and Ninja build tool.
|
85d6cfb
to
a2862b1
Compare
@r4nt, could you please review? Thank you. |
Ping. |
Ping |
LGTM, but wair for other reviewers. |
cd ~/clang-llvm | ||
git clone https://github.com/llvm/llvm-project.git | ||
mkdir ~/clang-llvm && cd ~/clang-llvm | ||
git clone https://github.com/llvm/llvm-project.git . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the:
cd ~/clang-llvm
git clone git://cmake.org/stage/cmake.git
(which will clash with the cmake/ in llvm-project's root) this isn't a good idea. Better to clone it to an llvm-project subdirectory (i.e. drop the .) and alter later steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @jrtc27. Indeed, having the llvm-project
subdirectory is much cleaner. I updated all required steps. Found some more outdated details. Updated PR description. Please re-review. Thank you.
dcf3552
to
a23a5aa
Compare
The documentation is written relatively to `clang-llvm`, not the root repository directory. Therefore, the `llvm-project` repo needs to be cloned into the existing directory `clang-llvm`. I added `mkdir ~/clang-llvm` to make the intent of creating an empty directory explicit. Furthermore, additional steps have been modified accordingly.
a23a5aa
to
5e9e94d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks better now
Though please make sure to update the PR message (which will become the commit message) before merging, as it's no longer accurate |
Thanks. Updated it. |
@jrtc27, I do not have write access. All checks passed. Can you merge the PR? Thanks. |
Why
The documentation is written relatively to
clang-llvm
, not the root repository directory. However, some steps in the documentation are relative to the repository root, which is not correct.What
Documentation steps have been modified to make them correct and outdated ones were updated. Some details:
bootstrap.py
->configure.py
since bootstraping Ninja has slightly changed