| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Headerscheck support for meson |
| Date: | 2026-02-18 22:11:54 |
| Message-ID: | CAN4CZFM5eyS44CFpy++XLkB4U4fMfvLqhSneN7bN1z+vuGeS5Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
See attached v2, which uses a meson-integrated version while only
duplicating some of the code (and adding some python scripts).
It uses static libraries, at first I tried to exclude it from the
default build and add it as a test dependency, so it only gets built
as part of `meson test` (but only once).
I had multiple problems with this:
* Meson before 1.7 ignores this and builds it anyway
* Doing it in 2 steps is significantly slower than everything
together, I guess it's better if the minimal work and real work
compilations get mixed together.
On my laptop, meson build time went from ~7 seconds to ~10 seconds
with headerscheck enabled, and I didn't see any difference in
configuration time. I also added a configuration flag for it in case
somebody wants to disable it, or if it's slower in other environments,
but it is enabled by default.
The header-guessing part is duplicated instead of using a common
configuration file as that seemed smaller overall. The python code is
a bit uglier because it uses chained ifs - I'm not sure what's the
minimum python version the postgres builds officially requires? The
current meson version depends only on 3.6, so I didn't want to use
pattern matching.
Compared to headerscheck, this build can't use -fsyntax-only because
meson needs build artifacts - but those are basically empty, so it
shouldn't matter that much. And thanks to ninja, it's parallel!
What do you think?
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Integrate-headerscheck-into-the-meson-build.patch | application/octet-stream | 24.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-02-18 22:28:31 | Re: Row pattern recognition |
| Previous Message | Andreas Karlsson | 2026-02-18 21:56:56 | Re: updates for handling optional argument in system functions |