Skip to content

Commit

Permalink
Include instructions for disabling SSE2
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Sep 10, 2024
1 parent e522724 commit b8942d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,11 @@ else()
set(ARCH "generic")
endif()

# Require SSE2 when targetting 32-bit x86.
# SS2 is usually enabled by default for GCC and Clang, but not always.
# See: https://github.com/aws/aws-lc/commit/6fe8dcbe96e580ea85233fdb98a142e42951b70b
# If target ARCH is 32-bit x86, ensure SSE2 is enabled since it's used by the optimized assembly.
# To build for targets that do not support SSE2, use the `OPENSSL_NO_ASM` flag.
if(ARCH STREQUAL "x86" AND NOT OPENSSL_NO_SSE2_FOR_TESTING)
# Most compilers enable SSE2 in 32-bit x86 by default, but in some cases GCC and Clang don't.
# See: https://github.com/aws/aws-lc/commit/6fe8dcbe96e580ea85233fdb98a142e42951b70b
if(GCC OR CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()
Expand Down

0 comments on commit b8942d5

Please sign in to comment.