<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Update documentation for using custom llvm to build Mesa with Meson"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=109155">109155</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Update documentation for using custom llvm to build Mesa with Meson
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>shtetldik@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Current documentation at <a href="https://www.mesa3d.org/meson.html">https://www.mesa3d.org/meson.html</a> says:

<span class="quote">> 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.</span >

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

As per <a href="https://github.com/mesonbuild/meson/issues/2887#issuecomment-439586787">https://github.com/mesonbuild/meson/issues/2887#issuecomment-439586787</a>
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>