+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="cross-compile">Cross-Compiling LLVM</a>
+</div>
+
+<div class="doc_text">
+ <p>It is possible to cross-compile LLVM. That is, you can create LLVM
+ executables and libraries for a platform different than the one one which you
+ are compiling. To do this, a few additional steps are
+ required. <sup><a href="#ccn_1">1</a></sup> To cross-compile LLVM, use
+ these instructions:</p>
+ <ol>
+ <li>Configure and build LLVM as a native compiler. You will need
+ just <tt>TableGen</tt> from that build.
+ <ul>
+ <li>If you have <tt>$LLVM_OBJ_ROOT=$LLVM_SRC_ROOT</tt> just execute
+ <tt>make -C utils/TableGen</tt> after configuring.</li>
+ <li>Otherwise you will need to monitor building process and terminate
+ it just after <tt>TableGen</tt> was built.</li>
+ </ul>
+ </li>
+ <li>Copy the TableGen binary to somewhere safe (out of your build tree).
+ </li>
+ <li>Configure LLVM to build with a cross-compiler. To do this, supply the
+ configure script with <tt>--build</tt> and <tt>--host</tt> options that
+ are different. The values of these options must be legal target triples
+ that your GCC compiler supports.</li>
+ <li>Put the saved <tt>TableGen</tt> executable into the
+ into <tt>$LLVM_OBJ_ROOT/{BUILD_TYPE}/bin</tt> directory (e.g. into
+ <tt>.../Release/bin</tt> for a Release build).</li>
+ <li>Build LLVM as usual.</li>
+ </ol>
+ <p>The result of such a build will produce executables that are not executable
+ on your build host (--build option) but can be executed on your compile host
+ (--host option).</p>
+ <p><b>Notes:</b></p>
+ <div class="doc_notes">
+ <ol>
+ <li><a name="ccn_1">Cross-compiling</a> was tested only with Linux as
+ build platform and Windows as host using mingw32 cross-compiler. Other
+ combinations have not been tested.</li>
+ </ol>
+ </div>
+</div>
+