Skip to content

Add Build Option to Control CPU Extension Usage (MinGW/Clang)#1236

Open
eranif wants to merge 1 commit intoawslabs:mainfrom
eranif:mingw-clang64
Open

Add Build Option to Control CPU Extension Usage (MinGW/Clang)#1236
eranif wants to merge 1 commit intoawslabs:mainfrom
eranif:mingw-clang64

Conversation

@eranif
Copy link

@eranif eranif commented Feb 22, 2026

Introduce a new CMake configuration option (USE_CPU_EXTENSIONS) that conditionally defines HAS_CPU_EXTENSTIONS at compile time. When disabled, SIMD-optimized routines (such as SSE4.1 base64 encoding/decoding) are excluded from the build by updating the preprocessor guard in encoding.c to check both USE_SIMD_ENCODING and the new HAS_CPU_EXTENSTIONS flag.

This change allows builds to opt out of CPU-specific optimizations when targeting platforms without the required instruction set support.

This fix is required in order to build aws-sdk-cpp on MinGW/Clang64 (Windows 11).

  • CMake build configuration
  • SIMD encoding feature guards

** Generated by CodeLite. **

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Introduce a new CMake configuration option (USE_CPU_EXTENSIONS) that conditionally defines HAS_CPU_EXTENSTIONS at compile time. When disabled, SIMD-optimized routines (such as SSE4.1 base64 encoding/decoding) are excluded from the build by updating the preprocessor guard in encoding.c to check both USE_SIMD_ENCODING and the new HAS_CPU_EXTENSTIONS flag.

This change allows builds to opt out of CPU-specific optimizations when targeting platforms without the required instruction set support.

* CMake build configuration
* SIMD encoding feature guards

** Generated by CodeLite. **

Signed-off-by: Eran Ifrah <eran@codelite.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant