[Mesa-dev] Lets talk about autotools

Kai Wasserbäch kai at dev.carbon-project.org
Wed Sep 19 15:04:35 UTC 2018

Hey Dylan,
Dylan Baker wrote on 9/18/18 10:43 PM:
> Quoting Kai Wasserbäch (2018-09-18 11:14:19)
>> Dylan Baker wrote on 9/18/18 6:40 PM:
>>> Quoting Kai Wasserbäch (2018-09-18 08:56:30)
>>>> Dylan Baker wrote on 9/18/18 5:35 PM:
>>>>> [...]
>>>>> The other option you have it to set the $PATH variable, as long as the
>>>>> llvm-config you want returns the highest version things will work as you expect.
>>>> This might do as a workaround, though I'm not too keen on extending $PATH. But
>>>> as the /usr/lib/llvm-${LLVM_VERSION}/bin directories should only contain that
>>>> versions binaries, putting it first into the path could work.
>>> meson will cache the llvm-config values, so you should be able to just do
>>> something like:
>>> PATH=/path/to/my/llvm meson build-with-my-llvm
>> Ok. Where's the cache? In the build directory or is this something, that's kept
>> globally and needs potential clearing? A quick search for this feature yielded
>> <https://mesonbuild.com/Release-notes-for-0-38-0.html>. That makes it sound like
>> it is global, which I would almost consider broken design. Or is it local but
>> kept between multiple invocations of meson? That also sounds like a recipe for
>> disaster, though it would be easier to deal with: just nuke the build directory.
> It's per build directory, and is kept on subsequent rebuilds. The idea is that
> if you need to reconfigure a build (say meson.build changes) when you do a `git
> pull` that pkg-config, llvm-config, and fiends don't get reinvoked, it makes the
> rebuild faster. I don't think there is a cache-invalidation method, though that
> would be a nice feature to have.

I think I can work with that: one build-directory per build and nuke it afterwards.

As a side note: to me this sounds like a mis-feature or at least something that
you should have to turn on explicitly. I'd rather pay a little time penalty
(which isn't too much these days, given how fast SSDs and systems in general
have become), than using some stale value. Especially since it sounds like meson
is caching the values of environment variables as well? Which would make usage
of MESA_GIT_SHA1_OVERRIDE after some changes awkward (which value is used and why).

In any case, thanks for your replies. I'll see if I can scare up some time over
the weekend and check if I can get Mesa building with meson. Nevertheless I'd
like to ask for not making meson mandatory until something like today's
LLVM_CONFIG or something equivalent within a released version of meson is available.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180919/4901dd76/attachment.sig>

More information about the mesa-dev mailing list