[PATCH] D123968: docs: Add instructions for stand-alone builds of clang
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 11:07:39 PDT 2022
tstellar marked an inline comment as done.
tstellar added inline comments.
================
Comment at: llvm/docs/GettingStarted.rst:127
+
+LLVM_ROOT should point to the prefix of your llvm installation, so for example,
+if llvm is installed into /usr/bin and /usr/lib64, then you should pass
----------------
MaskRay wrote:
> What files are needed for the llvm installation? `LLVM_ENABLE_PROJECTS=llvm` with everything installed by `ninja install` ?
I updated the patch now with instructions about how to build LLVM.
================
Comment at: llvm/docs/GettingStarted.rst:129
+if llvm is installed into /usr/bin and /usr/lib64, then you should pass
+-DLLVM_ROOT=/usr/. Both the LLVM_ROOT and LLVM_EXTERNAL_LIT options
+are required to do stand-alone builds for all sub-projects. Additional required
----------------
MaskRay wrote:
> Add backsticks for /usr/bin, -D, etc.
>
> Is `Clang_DIR` worth mentioning? See https://lldb.llvm.org/resources/build.html#standalone-builds
> Is Clang_DIR worth mentioning? See https://lldb.llvm.org/resources/build.html#standalone-builds
I will mention this if/when I add documention for lldb, but it's not needed for the clang builds.
================
Comment at: llvm/docs/GettingStarted.rst:139
+============ ======================== ======================
+clang clang, cmake CLANG_INCLUDE_TESTS=ON (Required for check-clang only)
+============ ======================== ======================
----------------
mgorny wrote:
> h-vetinari wrote:
> > Isn't CLANG_BUILT_STANDALONE also necessary (honest question)?
> In Gentoo, we also check `llvm/lib/Transforms/Hello` out unconditionally (don't recall why we added it, maybe it's not needed anymore, gotta check at some point), and `llvm/lib/Testing/Support` and `llvm/utils` for tests.
Transforms/Hello is only needed if you build clang-tools-extra (which is not enabled with these instructions). I also have a patch to make the D120301.
Testing/Support is only needed for the unittests which aren't run in the documented configuration (because there is no googletest).
I don't think llvm/utils is needed after https://github.com/llvm/llvm-project/commit/74384c7fcec71cb040b0c874743e5fc38b2cd7a6
This documentation is for the most minimal config that I could get working without any additional changes, so no clang-tools-extra and no unittests.
================
Comment at: llvm/docs/GettingStarted.rst:139
+============ ======================== ======================
+clang clang, cmake CLANG_INCLUDE_TESTS=ON (Required for check-clang only)
+============ ======================== ======================
----------------
tstellar wrote:
> mgorny wrote:
> > h-vetinari wrote:
> > > Isn't CLANG_BUILT_STANDALONE also necessary (honest question)?
> > In Gentoo, we also check `llvm/lib/Transforms/Hello` out unconditionally (don't recall why we added it, maybe it's not needed anymore, gotta check at some point), and `llvm/lib/Testing/Support` and `llvm/utils` for tests.
> Transforms/Hello is only needed if you build clang-tools-extra (which is not enabled with these instructions). I also have a patch to make the D120301.
>
> Testing/Support is only needed for the unittests which aren't run in the documented configuration (because there is no googletest).
>
> I don't think llvm/utils is needed after https://github.com/llvm/llvm-project/commit/74384c7fcec71cb040b0c874743e5fc38b2cd7a6
>
> This documentation is for the most minimal config that I could get working without any additional changes, so no clang-tools-extra and no unittests.
> Isn't CLANG_BUILT_STANDALONE also necessary (honest question)?
No, this value is auto-detected based on the source layout.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123968/new/
https://reviews.llvm.org/D123968
More information about the llvm-commits
mailing list