Skip to content

Commit 296ea50

Browse files
authored
add compiler flag -msse2 for aws-lc on x86 (#291)
1 parent ed3514b commit 296ea50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

builder/imports/awslc.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ def __init__(self, **kwargs):
5454
**kwargs)
5555

5656
def cmake_args(self, env):
57+
result = super().cmake_args(env)
5758
if env.spec.compiler == 'gcc' and env.spec.compiler_version.startswith('4.'):
5859
# Disable AVX512 on old GCC versions for aws-lc as they dont support AVX512 instructions used by aws-lc
59-
return super().cmake_args(env) + ['-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON']
60-
61-
return super().cmake_args(env)
60+
result = result + ['-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON']
61+
if env.spec.arch == 'x86':
62+
# Add -msse2 for compiler on x86.
63+
result = result + ['-DCMAKE_C_FLAGS=-msse2']
64+
return result

0 commit comments

Comments
 (0)