Re: Meson build updates

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tristan Partin <tristan@neon.tech>
Cc: pgsql-hackers@postgresql.org
Date: 2023-06-12T17:20:38Z
Lists: pgsql-hackers
Hi,

On 2023-06-12 11:54:42 -0500, Tristan Partin wrote:
> On Fri Jun 9, 2023 at 1:36 PM CDT, Andres Freund wrote:
> > The biggest change to make them more usable would be to properly reconfigure
> > when the contents of machine file change. IIRC configure is rerun, but the
> > changes aren't taken into account.
> 
> I could not reproduce this. Perhaps you were testing with an older Meson
> where that was the case
> 
> # meson.build
> project('mytest')
> 
> myprog = find_program('myprog')
> message(myprog.full_path())
> 
> test('dummy', find_program('echo'), args: [myprog.full_path()])
> 
> # file.ini
> [binaries]
> myprog = '/usr/bin/python3'
> 
> # CLI
> meson setup build
> meson test -C build
> sed -i 's/python3/python2/' file.ini
> meson test -C build

It's possible that it doesn't happen in all contexts. I just reproduced the
problem I had, changing

[binaries]
llvm-config = '/usr/bin/llvm-config-13'

to

[binaries]
llvm-config = '/usr/bin/llvm-config-14'

does not change which version is used in an existing build tree, but does
change what's used in a new build tree.

Same with e.g. changing the C compiler version in a machine file. That also
only takes effect in a new tree.


This is with meson HEAD, updated earlier today.


> > In the end, I also just don't see a meaningful benefit in forcing the use of
> > machine files.
> 
> I think it is best to use patterns tools want you to use.

Sometimes. I'd perhaps have a different view if we weren't migrating from
autoconf, where overwriting binaries was trivially possible...

Greetings,

Andres Freund



Commits

  1. meson: Make detection of python more robust

  2. meson: Pass more feature option through to required kwargs

  3. meson: Tie adding C++ support to the llvm Meson option

  4. meson: Fix intl misspelling

  5. meson: Use a better error message in an impossible case

  6. meson: Make some Meson style more consistent with surrounding code

  7. meson: Fix some grammar usage in Meson comments

  8. meson: Mention the correct way to disable readline support

  9. meson: Remove old comment

  10. meson: Use the not_found_dep constant

  11. meson: Attach colon to keyword argument

  12. meson: Use consistent Meson option description formats

  13. meson: Use consistent casing in Meson option descriptions

  14. meson: Remove triple-quoted strings