From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: Re: [PATCH v3 6/7] buildtools/chkincs: use a staging directory for headers
Date: Thu, 25 Sep 2025 11:31:00 +0100 [thread overview]
Message-ID: <aNUZ5EATVthRDXb-@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8xY74d7-W1AGxYAKGAgcX4Lwd5KDaX493kkjPLZ-TOXZA@mail.gmail.com>
On Thu, Sep 25, 2025 at 12:29:08PM +0200, David Marchand wrote:
> On Thu, 25 Sept 2025 at 11:22, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Thu, Sep 25, 2025 at 10:42:47AM +0200, David Marchand wrote:
> > > Hello Bruce,
> > >
> > > On Thu, 25 Sept 2025 at 10:00, Bruce Richardson
> > > <bruce.richardson@intel.com> wrote:
> > > >
> > > > On Wed, Sep 24, 2025 at 07:25:34PM +0200, David Marchand wrote:
> > > > > A problem with the current headers check is that it relies on meson
> > > > > dependencies objects that come with their include_directories
> > > > > directives, and all of those point at the library / driver sources.
> > > > >
> > > > > This means that we won't detect a public header including a private
> > > > > (as in, not exported) header, or a driver only header.
> > > > >
> > > > > To address this issue, a staging directory is added and every header
> > > > > is copied to it.
> > > > >
> > > > > Drivers and library headers are staged to two different directories
> > > > > and the check is updated accordingly.
> > > > >
> > > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > >
> > > > In general looks ok to me. One small comment though - can we not have
> > > > "staging" as a top-level directory, but instead hide it inside the
> > > > buildtools directory, or even the chkincs directory? I dislike having
> > > > too many subdirectories directly off the root of the project,
> > > > especially ones purely for internal tooling.
> > >
> > > Well, at first I was trying to change the whole build process iow rely
> > > only on the staging directory and remove all the include_directories:
> > > directives from the declare_dependency() objects. Libraries and apps
> > > were ok, but there were a *lot* of complications with drivers (what a
> > > *huge mess*, especially for NXP drivers with "compat.h" includes, and
> > > Marvell drivers to a smaller extent). I may retry in the future with
> > > some AI tool that will brute force this :-).
> > >
> > One note of caution here: if doing this, you may want to consider using
> > run_command rather than a custom_target to copy the headers in order to
> > avoid potentially slowing down the build.
> >
> > We used to do this copying of header files in the old make build system,
> > and one downside of it is that it means that the build of ".c" files in one
> > directory cannot be started until the copying of headers from the dependent
> > components are completed. The decision to use the include paths in the
> > dependency objects rather than copying the headers to a central location
> > was a deliberate decision when moving build system because it means that
> > when you run "ninja", every single .c file can be compiled to a .o file
> > in parallel, because all dependent headers are available at their original
> > locations. For most components, it's only the final link stage that has any
> > dependencies, the compile commands are all independent.
> >
> > On the other hand, using run_command is not necessarily a good solution
> > either, because it means that all changes to the headers require a re-run
> > of meson, which will also be slower because of all the copying. :-(
> >
> > Therefore, I'd tend towards keeping things as they are here, in order to
> > minimise reconfiguration and build times.
>
> I am sticking to the headers check update atm.
> The slow down should only concern developers using check_includes,
> once I properly gate those deps to the meson option.
>
> Is it still a concern for you?
>
No, no concerns about copying the headers over for check_includes checks,
that makes sense. I'm just flagging a potential issue if you want to switch
back to the old model of copying the headers as part of a normal build.
/Bruce
next prev parent reply other threads:[~2025-09-25 10:31 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 11:26 [RFC 0/6] Add a stricter headers check David Marchand
2024-11-27 11:26 ` [RFC 1/6] baseband/acc: fix exported header David Marchand
2024-11-27 11:26 ` [RFC 2/6] drivers: drop export of driver headers David Marchand
2024-11-27 11:26 ` [RFC 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-11-27 13:49 ` [EXTERNAL] " Amit Prakash Shukla
2024-11-27 11:26 ` [RFC 4/6] drivers: fix exported headers David Marchand
2024-11-27 11:26 ` [RFC 5/6] build: install indirect headers to a dedicated directory David Marchand
2024-11-27 11:42 ` Bruce Richardson
2024-12-10 13:36 ` David Marchand
2024-11-27 11:26 ` [RFC 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 10:50 ` [PATCH v2 0/6] Add a stricter headers check David Marchand
2024-12-13 10:50 ` [PATCH v2 1/6] baseband/acc: fix exported header David Marchand
2024-12-13 11:01 ` Bruce Richardson
2024-12-13 10:50 ` [PATCH v2 2/6] drivers: drop export of driver headers David Marchand
2024-12-13 11:03 ` Bruce Richardson
2024-12-16 9:13 ` Andrew Rybchenko
2024-12-13 10:50 ` [PATCH v2 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-12-13 11:04 ` Bruce Richardson
2024-12-13 10:50 ` [PATCH v2 4/6] drivers: fix exported headers David Marchand
2024-12-13 11:14 ` Bruce Richardson
2024-12-13 13:46 ` David Marchand
2024-12-16 8:15 ` David Marchand
2024-12-13 17:10 ` Stephen Hemminger
2024-12-13 10:50 ` [PATCH v2 5/6] build: install indirect headers to a dedicated directory David Marchand
2024-12-13 10:50 ` [PATCH v2 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 11:27 ` [PATCH v2 0/6] Add a stricter headers check Bruce Richardson
2024-12-13 13:38 ` David Marchand
2025-09-24 17:25 ` [PATCH v3 0/7] " David Marchand
2025-09-24 17:25 ` [PATCH v3 1/7] baseband/acc: fix exported header David Marchand
2025-09-24 17:25 ` [PATCH v3 2/7] drivers: drop export of driver headers David Marchand
2025-09-24 17:25 ` [PATCH v3 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-24 17:25 ` [PATCH v3 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25 7:53 ` Bruce Richardson
2025-09-25 8:43 ` David Marchand
2025-09-24 17:25 ` [PATCH v3 5/7] drivers: fix some exported headers David Marchand
2025-09-24 17:25 ` [PATCH v3 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25 8:00 ` Bruce Richardson
2025-09-25 8:42 ` David Marchand
2025-09-25 9:22 ` Bruce Richardson
2025-09-25 10:29 ` David Marchand
2025-09-25 10:31 ` Bruce Richardson [this message]
2025-09-25 9:31 ` Bruce Richardson
2025-09-25 10:17 ` Morten Brørup
2025-09-25 10:22 ` Bruce Richardson
2025-09-25 10:22 ` David Marchand
2025-09-25 10:31 ` Bruce Richardson
2025-09-24 17:25 ` [PATCH v3 7/7] power: separate public and driver headers David Marchand
2025-09-25 12:31 ` [PATCH v4 0/7] Add a stricter headers check David Marchand
2025-09-25 12:31 ` [PATCH v4 1/7] baseband/acc: fix exported header David Marchand
2025-09-25 12:31 ` [PATCH v4 2/7] drivers: drop export of driver headers David Marchand
2025-09-25 12:34 ` [EXTERNAL] " Akhil Goyal
2025-09-25 12:31 ` [PATCH v4 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-25 12:31 ` [PATCH v4 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25 12:43 ` Bruce Richardson
2025-09-25 12:31 ` [PATCH v4 5/7] drivers: fix some exported headers David Marchand
2025-09-25 12:44 ` Bruce Richardson
2025-09-25 12:31 ` [PATCH v4 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25 14:46 ` Bruce Richardson
2025-09-26 8:14 ` David Marchand
2025-09-26 9:06 ` Bruce Richardson
2025-09-26 9:18 ` David Marchand
2025-09-25 12:31 ` [PATCH v4 7/7] power: separate public and driver headers David Marchand
2025-09-26 12:40 ` [PATCH v5 0/9] Add a stricter headers check David Marchand
2025-09-26 12:40 ` [PATCH v5 1/9] baseband/acc: fix exported header David Marchand
2025-09-26 12:40 ` [PATCH v5 2/9] drivers: drop export of driver headers David Marchand
2025-09-26 12:40 ` [PATCH v5 3/9] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-26 12:40 ` [PATCH v5 4/9] gpudev: fix driver header for Windows David Marchand
2025-09-26 12:40 ` [PATCH v5 5/9] drivers: fix some exported headers David Marchand
2025-09-26 12:40 ` [PATCH v5 6/9] eal/arm: fix C++ build for 32-bit memcpy David Marchand
2025-09-26 13:01 ` Bruce Richardson
2025-09-26 19:55 ` Morten Brørup
2025-09-26 12:41 ` [PATCH v5 7/9] build: factorize headers installation David Marchand
2025-09-26 13:08 ` Bruce Richardson
2025-09-26 12:41 ` [PATCH v5 8/9] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-26 12:41 ` [PATCH v5 9/9] power: separate public and driver headers David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aNUZ5EATVthRDXb-@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).