[crac] RFR: 8368929: [CRaC] Move CPUFeatures check to C/R engine [v2]
Jan Kratochvil
jkratochvil at openjdk.org
Thu Oct 2 14:07:01 UTC 2025
On Thu, 2 Oct 2025 10:09:39 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> It is true there are no target-specific files/classes. But there still can be:
>>
>> class crac {
>> static bool is_x86_64() {
>> #ifdef __x86_64__
>> return true;
>> #else
>> return false;
>> #endif
>> };
>> };
>> if (is_x86_64()) {
>> ...
>> }
>>
>> Then all arch-specific code is compile-time checked on all arches.
>
> The ifdef in here is doing exactly that - guarding a VM option that is defined only on x86_64... though it looks like the CI is compiling against the 'zero' architecture (which lacks the VM option despite the macro is defined).
I do not mind how it is done, I was trying to suggest more compile-time checks. If you disagree then let's just close this thread.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/266#discussion_r2398956354
More information about the crac-dev
mailing list