Bug 109155 - Update documentation for using custom llvm to build Mesa with Meson
Summary: Update documentation for using custom llvm to build Mesa with Meson
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-26 20:27 UTC by Shmerl
Modified: 2019-01-16 06:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Shmerl 2018-12-26 20:27:22 UTC
Current documentation at https://www.mesa3d.org/meson.html says:

> 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.

That's really a very inflexible method, for instance you can't use different llvm configs installed in the same directory.

As per https://github.com/mesonbuild/meson/issues/2887#issuecomment-439586787
as of Meson 0.49, it's now possible to override llvm-config using --native-file option.

Here is an example:

    llvm_config=/usr/bin/llvm-config-8 # or whatever you need

    read -r -d '' native_config <<EOF
    [binaries]
    llvm-config = "$llvm_config"
    EOF
    
    meson ... --native-file=<(echo "$native_config") ...

Please update Mesa documentation above, since this option is very obscure and hard to find.
Comment 1 Shmerl 2019-01-16 06:12:34 UTC
Thanks for updating!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.