Mesa (master): docs/meson: Update LLVM section with information about native files

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 27 17:06:41 UTC 2018


Module: Mesa
Branch: master
Commit: a57dbe69717244df854218ffef1e1d4b9000f2ee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a57dbe69717244df854218ffef1e1d4b9000f2ee

Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Thu Dec 20 11:46:08 2018 -0800

docs/meson: Update LLVM section with information about native files

Reviewed-by: Eric Engeström <eric at engestrom.ch>

---

 docs/meson.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 49 insertions(+), 4 deletions(-)

diff --git a/docs/meson.html b/docs/meson.html
index 63c106147d..3bef8083f9 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -140,11 +140,56 @@ the popular compilers, a complete list is available
 
 <dt><code>LLVM</code></dt>
 <dd><p>Meson includes upstream logic to wrap llvm-config using its standard
-dependency interface. It will search <code>$PATH</code> (or <code>%PATH%</code> on windows) for
-llvm-config (and llvm-config$version and llvm-config-$version), so using an
-LLVM from a non-standard path is as easy as
-<code>PATH=/path/with/llvm-config:$PATH meson build</code>.
+dependency interface.
 </p></dd>
+
+<dd><p>
+As of meson 0.49.0 meson also has the concept of a
+<a href="https://mesonbuild.com/Native-environments.html">"native file"</a>,
+these files provide information about the native build environment (as opposed
+to a cross build environment). They are ini formatted and can override where to
+find llvm-config:
+
+custom-llvm.ini
+<pre>
+    [binaries]
+    llvm-config = '/usr/local/bin/llvm/llvm-config'
+</pre>
+
+Then configure meson:
+
+<pre>
+    meson builddir/ --native-file custom-llvm.ini
+</pre>
+</p></dd>
+
+<dd><p>
+For selecting llvm-config for cross compiling a
+<a href="https://mesonbuild.com/Cross-compilation.html#defining-the-environment">"cross file"</a>
+should be used. It uses the same format as the native file above:
+
+cross-llvm.ini
+<pre>
+    [binaries]
+    ...
+    llvm-config = '/usr/lib/llvm-config-32'
+</pre>
+
+Then configure meson:
+
+<pre>
+    meson builddir/ --cross-file cross-llvm.ini
+</pre>
+
+See the <a href="#cross-compilation">Cross Compilation</a> section for more information.
+</dd></p>
+
+<dd><p>
+For older versions of meson <code>$PATH</code> (or <code>%PATH%</code> on
+windows) will be searched for llvm-config (and llvm-config$version and
+llvm-config-$version), you can override this environment variable to control
+the search: <code>PATH=/path/with/llvm-config:$PATH meson build</code>.
+</dd></p>
 </dl>
 
 <dl>




More information about the mesa-commit mailing list