[crac] RFR: 8376959: [CRaC] Turn simengine into shared library [v2]
Radim Vansa
rvansa at openjdk.org
Tue Feb 3 14:56:18 UTC 2026
On Tue, 3 Feb 2026 13:14:20 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Implement static build & other platforms
>
> src/java.base/share/native/libcrcommon/crcommon.hpp line 74:
>
>> 72: void *_image_constraints;
>> 73: void *_image_score;
>> 74: };
>
> Since this is not exposed to C, can't this have the actual classes as field types? Also the fields are not private/protected so no underscores should be used.
>
> Actually, since all users of this is also C++ code compiled by the same compiler, isn't it possible to omit the C API layer of `crcommon`?
While probably technically possible (with the same compiler) I don't think it's a good practice to expose C++ ABI across shared libraries. That's why I rather intended this structure as more or less opaque; a little boilerplate aside I don't see downsides.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/289#discussion_r2759491728
More information about the crac-dev
mailing list