Skip to content

Commit

Permalink
add compiler flag -msse2 for aws-lc on x86 (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK authored Sep 3, 2024
1 parent ed3514b commit 296ea50
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=-msse2']
return result

0 comments on commit 296ea50

Please sign in to comment.