Skip to content

Commit

Permalink
add an extra compiler flag for sse2
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Sep 3, 2024
1 parent ed3514b commit a051ce8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions builder/imports/awslc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ def __init__(self, **kwargs):
**kwargs)

def cmake_args(self, env):
result = super().cmake_args(env)
if env.spec.compiler == 'gcc' and env.spec.compiler_version.startswith('4.'):
# Disable AVX512 on old GCC versions for aws-lc as they dont support AVX512 instructions used by aws-lc
return super().cmake_args(env) + ['-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON']

return super().cmake_args(env)
result = result + ['-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON']
if env.spec.arch == 'x86':
# Add -msse2 for compiler on x86.
result = result + ['-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -msse2"']
return result

0 comments on commit a051ce8

Please sign in to comment.