C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] P3470R0: Interface-Unit-Only Module Library Support

From: Chuanqi Xu <chuanqi.xcq_at_[hidden]>
Date: Mon, 21 Oct 2024 09:43:28 +0800
> Interesting. That is the current implementation in clang, IIUC.
Clarification on the clang’s behavior: I made this as an optimization some months ago. So the behavior of clang matches the wording for Itanium C++ ABI in the PR of Nathan.
And I felt the current mechanism as stable too. We've already used modules in business products in a (relatively) large scale and we didn’t observe observable performance loss.
Thanks,
Chuanqi
------------------------------------------------------------------
From: SG15 <sg15_at_[hidden]>
Send Time:2024 Oct. 18 (Fri.) 02:27
To:SG15<sg15_at_[hidden]>
Cc:Daniel Ruoso<daniel_at_[hidden]>; Nathan Sidwell<nathan_at_[hidden]>
Subject:Re: [isocpp-sg15] P3470R0: Interface-Unit-Only Module Library Support
Em qua., 16 de out. de 2024 às 19:28, Nathan Sidwell via SG15 <sg15_at_[hidden] <mailto:sg15_at_[hidden] >> escreveu:
> It is important to note that, in the Itanium ABI, even if the module doesn’t currently have
> anything that needs static initialization, the translation unit importing that module will still
> generate the code to call the initializer, because we don’t want the addition of a static initializer
> to a shared object to result in an ABI break
 this is false.
Interesting. That is the current implementation in clang, IIUC.
We probably need to clarify that point, because it is indeed problematic if adding a new static initializer means an ABI breakage for the library.
daniel

Received on 2024-10-21 01:43:33