Skip to content

Commit 4898434

Browse files
committed
cmake: Don't build AVX-512 kernels with LLVM Flang.
1 parent 4dc9c6b commit 4898434

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/system.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ if ((DEFINED BINARY AND BINARY EQUAL 32) OR ("$CMAKE_SIZEOF_VOID_P}" EQUAL "4"))
6666
endif ()
6767
endif ()
6868

69+
# Disable AVX-512 for LLVM Flang
70+
# FIXME: Check if this is still needed with LLVM 17 or later.
71+
if (X86_64 AND CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
72+
set(NO_AVX512 ON)
73+
endif ()
74+
6975
if (INTERFACE64)
7076
message(STATUS "Using 64-bit integers.")
7177
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DUSE64BITINT")

0 commit comments

Comments
 (0)