diff --git a/cmake/system.cmake b/cmake/system.cmake index 631e7fe69f..417bfc1736 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -66,6 +66,12 @@ if ((DEFINED BINARY AND BINARY EQUAL 32) OR ("$CMAKE_SIZEOF_VOID_P}" EQUAL "4")) endif () endif () +# Disable AVX-512 for LLVM Flang +# FIXME: Check if this is still needed with LLVM 17 or later. +if (X86_64 AND CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang") + set(NO_AVX512 ON) +endif () + if (INTERFACE64) message(STATUS "Using 64-bit integers.") set(GETARCH_FLAGS "${GETARCH_FLAGS} -DUSE64BITINT")