C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] Module metadata distributed with pre-built libraries

From: Chuanqi Xu <chuanqi.xcq_at_[hidden]>
Date: Thu, 23 May 2024 22:28:51 +0800
> The object files produced for such modules will
be effectively empty.
No, this is not true. Currently, the object part of a module interface is never empty. At least it contains an empty initializer.
Thanks,
Chuanqi
------------------------------------------------------------------
From:Boris Kolpackov <boris_at_[hidden]>
Send Time:2024 May. 23 (Thu.) 22:00
To:SG15<sg15_at_[hidden]>
Cc:Chuanqi<chuanqi.xcq_at_[hidden]>; Daniel Ruoso<daniel_at_[hidden]>
Subject:Re: [isocpp-sg15] Module metadata distributed with pre-built libraries
Daniel Ruoso via SG15 <sg15_at_[hidden]> writes:
> Requiring each project to build their own versions of the module objects
> is, pardon my bluntness, nonsensical.
Consider a library that only provides modules with inline/template
implementations. The object files produced for such modules will
be effectively empty. It feels wasteful to link, install, package,
etc., a library out of this empty object files.
FWIW, in build2 we by default always build a "binful" modular library
but the library author may explicitly request a "binless" library
(in which case the object files for module interfaces will be built
for each consumer). We do warn that if such modules contain any non-
inline/template functions or global variables, then whether the result
is usable is platform-dependent.

Received on 2024-05-23 14:28:56