From a57dbe69717244df854218ffef1e1d4b9000f2ee Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 20 Dec 2018 11:46:08 -0800 Subject: [PATCH] docs/meson: Update LLVM section with information about native files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Eric Engeström --- docs/meson.html | 53 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/docs/meson.html b/docs/meson.html index 63c106147d1..3bef8083f9b 100644 --- a/docs/meson.html +++ b/docs/meson.html @@ -140,11 +140,56 @@ the popular compilers, a complete list is available
LLVM

Meson includes upstream logic to wrap llvm-config using its standard -dependency interface. It will search $PATH (or %PATH% 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 -PATH=/path/with/llvm-config:$PATH meson build. +dependency interface.

+ +

+As of meson 0.49.0 meson also has the concept of a +"native file", +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 +

+    [binaries]
+    llvm-config = '/usr/local/bin/llvm/llvm-config'
+
+ +Then configure meson: + +
+    meson builddir/ --native-file custom-llvm.ini
+
+

+ +

+For selecting llvm-config for cross compiling a +"cross file" +should be used. It uses the same format as the native file above: + +cross-llvm.ini +

+    [binaries]
+    ...
+    llvm-config = '/usr/lib/llvm-config-32'
+
+ +Then configure meson: + +
+    meson builddir/ --cross-file cross-llvm.ini
+
+ +See the Cross Compilation section for more information. +

+ +

+For older versions of meson $PATH (or %PATH% 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: PATH=/path/with/llvm-config:$PATH meson build. +

-- 2.30.2