Add -flax-vector-conversions for GCC on ARM (#311)

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
Kawrakow
2025-04-04 11:04:19 +02:00
committed by GitHub
parent 9ab6dc9f91
commit c7fceae221

View File

@@ -1147,6 +1147,10 @@ if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR
if (GGML_SVE)
list(APPEND ARCH_FLAGS -march=armv8.6-a+sve)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# else we fail on Gravitons and such
list(APPEND ARCH_FLAGS -flax-vector-conversions)
endif()
endif()
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LWR MATCHES "^(x86_64|i686|amd64|x64|win32)$" OR
(NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_GENERATOR_PLATFORM_LWR AND