[libc-commits] [PATCH] D147350: [libc] Add two more recipes to do a cross build.
Jeff Bailey via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Mar 31 12:43:35 PDT 2023
jeffbailey accepted this revision.
jeffbailey added a comment.
This revision is now accepted and ready to land.
Comments within. Generally LGTM
================
Comment at: libc/docs/full_cross_build.rst:39
+
+In the *standalone crossbuild* recipe, the compiler of user's choice is used to
+build the libc. The necessary build tools for the host are built first, and
----------------
I'd say "a system or custom compiler is used ..."
================
Comment at: libc/docs/full_cross_build.rst:58
-DLLVM_ENABLE_PROJECTS=libc \
- -DCMAKE_C_COMPILER=clang \
- -DCMAKE_CXX_COMPILER=clang++ \
+ -DCMAKE_C_COMPILER=<C compiler> \ # For example, clang or gcc
+ -DCMAKE_CXX_COMPILER=<C++ compiler> \ # For example, clang++ or g++
----------------
I'd like us to move from <...> notation to $VAR notation. That way someone could set the variables and cut&paste.
================
Comment at: libc/docs/full_cross_build.rst:93
+user will have to first build the libc build tools separately. At the time of
+this writing, there is only one libc build tool that has to be built separately.
+It is done as follows:
----------------
Are there protections against version mismatch? I'm a little reluctant to document this process if an out of date tool might cause silent corruption.
================
Comment at: libc/docs/full_cross_build.rst:130
+ -DLLVM_LIBC_FULL_BUILD=ON \
+ -DLIBC_HDRGEN_EXE=/path/to/libc-hdrgen \
+ -DLIBC_TARGET_TRIPLE=<Your target triple> \
----------------
The notation <...> has been used here for things that should be replaced, so whether it's $... or <...> this should be used here.
================
Comment at: libc/docs/full_cross_build.rst:201
+The above ninja command should build the libc static archives for the target
+speficied with ``-DLLVM_RUNTIMES_TARGET``.
----------------
typo
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147350/new/
https://reviews.llvm.org/D147350
More information about the libc-commits
mailing list