public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: vspefs <vspefs@protonmail.com>
To: Ben Boeckel <ben.boeckel@kitware.com>
Cc: Nathaniel Shead <nathanieloshead@gmail.com>,
	"Jose E. Marchesi" <jose.marchesi@oracle.com>,
	gcc <gcc@gcc.gnu.org>, joergboe <joergboe@snafu.de>
Subject: Re: Generation of Make Dependencies for C++ Modules
Date: Mon, 29 Dec 2025 06:12:59 +0000	[thread overview]
Message-ID: <QDAE52GL3gVVryBRiWB3AZleCrFMzTLL6DkVbDHJGQBQpaea0AGJr4k5sdpOSFQTwqanknptaO15rECsgzPb-mZDD4qTGX8Jjf0QvsoGO68=@protonmail.com> (raw)
In-Reply-To: <aVHoEGati-v6tOPh@rotor>


> I haven't dug into xmake's implementation, but Bazel (AFAIK) is much
> stricter about flag sets across the build and can kind of wave it away
> by convention.

I think about distribution mainly in 2 ways, source distribution and binary
distribution. The former ships the full project, both source files and build
scripts. Source packages typically need running the corresponding build system
to consume. The latter, on the contrary, distributes as final output artifacts
as possible, and uses minimal meta information, whose logic (if there's any)
is kept minimal as well. Xmake and Bazel both strongly tend towards source
distribution. CMake packages, if export targets and install exported targets
and do other stuff right, is "binary distribution + meta info in CMake
script".Of course, CMake also supports source distribution and other forms of
binary distribution (none of which support C++20 modules now though).

The crucial difference is source distribution makes use of the full power of
the build system. No semantic information within the scope of that certain
build system is lost. So does "binary distribution + build system script".
Binary distribution kinda has to be fixed, universal, and simple (or what's
the point?). So I think the problem is not "making modules work in source
packages", because that's totally a per-build-system business, and all it
requires from the build system is a working dependency scanner. Binary
distribution + universal meta info is where it's tricky.

And honestly, the position of compiler in this picture? We don't know exactly
until we are clear of what that "universal meta info" would look like. But if
it's for Autotools, then I think it might be acceptable for GCC to have a
dedicated `dep-format`. Of course, if Autotools figures things out from only
P1689R5 format output, that's even better.

> Please see CPS for shipping package information without using CMake
> script. CPS export support is currently experimental in CMake, but it is
> coming.
> 
> https://github.com/cps-org/cps
> 
> And yes, please consider joining EcoStd for discussion about such
> things.

I know CPS as a good attempt to unify binary distribution meta info. It doesn't
natively support C++20 modules far as I know. And I don't think adding an
"interface_units" field could fix this problem. I think there has to be a way
to inform users which compilation flags are compatible with this artifact and
which are not. SG15 used to have core options which could beautifully solve
this problem (and a few others). Seems like has to be another EcoStd stuff now.



  reply	other threads:[~2025-12-29  6:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 18:11 joergboe
2025-12-23 16:23 ` Ben Boeckel
2025-12-25 18:28   ` joergboe
2025-12-26  3:16     ` Ben Boeckel
2025-12-27  5:50 ` vspefs
2025-12-27 11:24   ` Jose E. Marchesi
2025-12-27 12:01     ` Arsen Arsenović
2025-12-28  4:31     ` vspefs
2025-12-28 14:30       ` Jose E. Marchesi
2025-12-28 21:50         ` Nathaniel Shead
2025-12-29  0:03           ` vspefs
2025-12-29  2:31             ` Ben Boeckel
2025-12-29  6:12               ` vspefs [this message]
2025-12-29 16:13                 ` Ben Boeckel
2025-12-30 13:47                   ` vspefs
2025-12-30 16:19                     ` Ben Boeckel
2025-12-30 16:54                     ` Arsen Arsenović
2025-12-29  2:50         ` Ben Boeckel

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='QDAE52GL3gVVryBRiWB3AZleCrFMzTLL6DkVbDHJGQBQpaea0AGJr4k5sdpOSFQTwqanknptaO15rECsgzPb-mZDD4qTGX8Jjf0QvsoGO68=@protonmail.com' \
    --to=vspefs@protonmail.com \
    --cc=ben.boeckel@kitware.com \
    --cc=gcc@gcc.gnu.org \
    --cc=joergboe@snafu.de \
    --cc=jose.marchesi@oracle.com \
    --cc=nathanieloshead@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).