diff --git a/llvm/docs/HowToCrossCompileLLVM.rst b/llvm/docs/HowToCrossCompileLLVM.rst --- a/llvm/docs/HowToCrossCompileLLVM.rst +++ b/llvm/docs/HowToCrossCompileLLVM.rst @@ -40,7 +40,7 @@ The CMake options you need to add are: - * ``-DCMAKE_CROSSCOMPILING=True`` + * ``-DCMAKE_SYSTEM_NAME=`` * ``-DCMAKE_INSTALL_PREFIX=`` * ``-DLLVM_TABLEGEN=/llvm-tblgen`` * ``-DCLANG_TABLEGEN=/clang-tblgen`` @@ -48,6 +48,8 @@ * ``-DLLVM_TARGET_ARCH=ARM`` * ``-DLLVM_TARGETS_TO_BUILD=ARM`` +Note: ``CMAKE_CROSSCOMPILING`` is always set automatically when ``CMAKE_SYSTEM_NAME`` is set. Don't put ``-DCMAKE_CROSSCOMPILING=TRUE`` in your options. + If you're compiling with GCC, you can use architecture options for your target, and the compiler driver will detect everything that it needs: