Skip to content

Check for 128bit CAS in CMake build#9851

Merged
bneradt merged 1 commit intoapache:masterfrom
JosiahWI:feat/cmake-128bit-cas
Jun 15, 2023
Merged

Check for 128bit CAS in CMake build#9851
bneradt merged 1 commit intoapache:masterfrom
JosiahWI:feat/cmake-128bit-cas

Conversation

@JosiahWI
Copy link
Contributor

This adds a script that sets the following variables: TS_HAS_128BIT_CAS, TS_NEEDS_MCX16_FOR_CAS. The source code for the compile check was taken from the autotools build with some minor modifications (removed void arg to main, removed extraneous semicolon, brought main body back to 1 level of indentation).

Testing Note: I checked the behavior of both paths through the module by simulating the first check failing, but I cannot verify that the first check will actually fail.

This adds a script that sets the following variables:
TS_HAS_128BIT_CAS, TS_NEEDS_MCX16_FOR_CAS. The source code for
the compile check was taken from the autotools build with some
minor modifications (removed void arg to main, removed extraneous
semicolon, brought main body back to 1 level of indentation).
@JosiahWI JosiahWI self-assigned this Jun 15, 2023
@JosiahWI JosiahWI added Build work related to build configuration or environment CMake work related to CMakes scripts or issues labels Jun 15, 2023
@JosiahWI JosiahWI added this to the 10.0.0 milestone Jun 15, 2023
@JosiahWI JosiahWI requested a review from cmcfarlen June 15, 2023 12:46
Copy link
Contributor

@cmcfarlen cmcfarlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve this but I wonder if this is necessary at all. Are there any compilers or architectures that don't support this or is there even a reason to make a distinction anymore?

@JosiahWI
Copy link
Contributor Author

It appears that -mcx16 is necessary on x86 systems, but we may always be able to build with that option.

https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/x86-Options.html

@bneradt bneradt merged commit da99b1d into apache:master Jun 15, 2023
@JosiahWI JosiahWI deleted the feat/cmake-128bit-cas branch June 16, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build work related to build configuration or environment CMake work related to CMakes scripts or issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants