[PATCH] [docs] Add necessary CMake options for cross-compiling
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 20:39:47 PDT 2016
LGTM with a nit.
+ Chris Bieneman in case any more changes are needed.
vedant
> On Jun 30, 2016, at 1:33 AM, He Kuang via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Mention CMAKE_{C,CXX}_COMPILER in CMake options section for
> cross-compiling. If user follows the current docs without those options,
> the building system will succesfully generate the wrong result by using
> the host compiler. This may take extra works to find the answer from
> other docs[1].
>
> [1]: http://www.vtk.org/Wiki/CMake_Cross_Compiling#Information_how_to_set_up_various_cross_compiling_toolchains
>
> Signed-off-by: He Kuang <hekuang at huawei.com>
> ---
> docs/HowToCrossCompileLLVM.rst | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/docs/HowToCrossCompileLLVM.rst b/docs/HowToCrossCompileLLVM.rst
> index e71c0b0..e05fcb7 100644
> --- a/docs/HowToCrossCompileLLVM.rst
> +++ b/docs/HowToCrossCompileLLVM.rst
> @@ -48,6 +48,11 @@ The CMake options you need to add are:
> * ``-DLLVM_TARGET_ARCH=ARM``
> * ``-DLLVM_TARGETS_TO_BUILD=ARM``
>
> +And specifiy the cross-compiler to use:
specifiy -> specify
> +
> + * ``-DCMAKE_C_COMPILER=<c-cross-compiler>``
> + * ``-DCMAKE_CXX_COMPILER=<c++-cross-compiler>``
> +
> If you're compiling with GCC, you can use architecture options for your target,
> and the compiler driver will detect everything that it needs:
>
> --
> 1.8.5.2
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list