@@ -42,8 +42,7 @@ The CMake options you need to add are:
42
42
43
43
* ``-DCMAKE_SYSTEM_NAME=<target-system> ``
44
44
* ``-DCMAKE_INSTALL_PREFIX=<install-dir> ``
45
- * ``-DLLVM_TABLEGEN=<path-to-host-bin>/llvm-tblgen ``
46
- * ``-DCLANG_TABLEGEN=<path-to-host-bin>/clang-tblgen ``
45
+ * ``-DLLVM_NATIVE_TOOL_DIR=<path-to-host-bin> ``
47
46
* ``-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf ``
48
47
* ``-DLLVM_TARGET_ARCH=ARM ``
49
48
* ``-DLLVM_TARGETS_TO_BUILD=ARM ``
@@ -66,9 +65,12 @@ In addition to the ones above, you'll also need:
66
65
* Appropriate use of ``-I `` and ``-L ``, depending on how the cross GCC is installed,
67
66
and where are the libraries and headers.
68
67
69
- The TableGen options are required to compile it with the host compiler,
70
- so you'll need to compile LLVM (or at least ``llvm-tblgen ``) to your host
71
- platform before you start. The CXX flags define the target, cpu (which in this case
68
+ The ``LLVM_NATIVE_TOOL_DIR `` option allows you to reuse prebuilt binaries
69
+ (``llvm-tblgen ``, ``clang-tblgen `` etc) for the build host, if such are
70
+ available. If that's not available, the LLVM cross build will automatically
71
+ launch a nested build to build the tools that are required.
72
+
73
+ The CXX flags define the target, cpu (which in this case
72
74
defaults to ``fpu=VFP3 `` with NEON), and forcing the hard-float ABI. If you're
73
75
using Clang as a cross-compiler, you will *also * have to set ``--sysroot ``
74
76
to make sure it picks the correct linker.
0 commit comments