Added option for lax vector conversions when compiling Helium code.

In relation with issue #58

When HELIUM, MVEF or MVEI are used as cmake options, the option
LAXVECTORCONVERSIONS can be set to ON or OFF to enable / disable
lax vector conversions in GCC or ArmClang.

Currently, CMSIS-DSP won't build if lax vector conversions are disabled.
The option is ON by default.
pull/95/head
Christophe Favergeon 3 years ago
parent 2458ff8670
commit 33c01206f0

@ -18,6 +18,7 @@ option(MVEFLOAT16 "Float16 MVE intrinsics supported" OFF)
option(DISABLEFLOAT16 "Disable building float16 kernels" OFF)
option(HOST "Build for host" OFF)
option(AUTOVECTORIZE "Prefer autovectorizable code to one using C intrinsics" OFF)
option(LAXVECTORCONVERSIONS "Lax vector conversions" ON)
# Select which parts of the CMSIS-DSP must be compiled.
# There are some dependencies between the parts but they are not tracked

@ -50,7 +50,13 @@ endif()
if (MVEI OR MVEF OR HELIUM)
# By default, GCC does not enable implicit conversion between vectors of different numbers or types of elements
# which is required by some code in CMSIS-DSP
target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
if (LAXVECTORCONVERSIONS)
target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=all>)
else()
target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-fno-lax-vector-conversions>)
target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=none>)
endif()
endif()
if (DISABLEFLOAT16)

Loading…
Cancel
Save