Skip to content

Commit

Permalink
i#5365: Build AArch64 unit tests with SVE enabled
Browse files Browse the repository at this point in the history
Add BUILD_TESTS_SVE build option to compile with SVE flags and high
optimisation (-O3).

Add some error checking to allow the -O3 build and consequently
update a template (expected output) file.

Issue: #5365
  • Loading branch information
philramsey-arm committed Oct 18, 2023
1 parent 4b822fb commit 9098fb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ if (BUILD_TESTS)
include(CTest)
endif (BUILD_TESTS)

# TODO i#5365: auto set this using CHECK_C_COMPILER_FLAG once any new test failures have been investigated
if (AARCH64)
option(BUILD_TESTS_SVE "Build tests with SVE enabled and high optimization (-O3)" OFF)
endif (AARCH64)
Expand Down
2 changes: 2 additions & 0 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ function(add_exe test source)
"${CMAKE_GENERATOR}" MATCHES "Visual Studio")
add_dependencies(${test} ${gen_asm_tgt})
endif ()

# TODO i#5365: auto set this using CHECK_C_COMPILER_FLAG once any new test failures have been investigated
if (BUILD_TESTS_SVE)
target_compile_options(${test} PRIVATE
"-march=armv8.4-a+crypto+rcpc+sha3+sm4+sve+rng+ssbs+nodotprod")
Expand Down

0 comments on commit 9098fb8

Please sign in to comment.