Skip to content

Commit

Permalink
update the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Sep 4, 2024
1 parent af6950b commit 5114b54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ if(UNIX AND NOT APPLE)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LOWER)
if(CMAKE_SYSTEM_PROCESSOR_LOWER MATCHES "x86_64|amd64|x86|i386|i686" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
# Add -msse2 for x86-32bit because of https://github.com/aws/aws-lc/commit/6fe8dcbe96e580ea85233fdb98a142e42951b70b
# In some cases such as when building in Docker, where the host-level architecture is 64-bit
# but the Docker image should result in building for a 32-bit architecture. So that when ARCH
# is originally detected as 64-bit, perform an additional check to determine whether to build as 32-bit or 64-bit.
# Be wary that CMAKE_SYSTEM_PROCESSOR may not correspond to the target architecture when cross-compiling.
# (E.g. on Windows, the host may be AMD64 even when using a MSVC cl compiler with a 32-bit target).
# The CMAKE_TOOLCHAIN_FILE is supposed to set it correctly, but may not have.
# So, check for both CMAKE_SIZEOF_VOID_P and CMAKE_SYSTEM_PROCESSOR_LOWER for x86-32bit
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()

Expand Down

0 comments on commit 5114b54

Please sign in to comment.