From 5b4df015653f1f8c8df170499e16e206c6dfde20 Mon Sep 17 00:00:00 2001 From: maj00r Date: Thu, 10 Sep 2026 14:14:53 +0200 Subject: [PATCH] pick the AVX2 spelling by driver, not by platform betterRenderer gated on WIN32, and WIN32 is true for clang's GNU driver too, so /arch:AVX2 reached a driver that reads it as a file name. Swept every compile and link option in the tree for MSVC-style flags without an MSVC guard; this was the only one left. --- betterRenderer/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/betterRenderer/CMakeLists.txt b/betterRenderer/CMakeLists.txt index 9b6bea0a..01753f3d 100644 --- a/betterRenderer/CMakeLists.txt +++ b/betterRenderer/CMakeLists.txt @@ -111,10 +111,12 @@ else () target_compile_definitions(${LIBMANUL_NAME} PUBLIC "LIBMANUL_WITH_VULKAN=0") endif () +# Which spelling to use follows the compiler driver, not the platform: the +# Windows build runs clang's GNU driver, which reads /arch:AVX2 as a file name. if(ENABLE_AVX2) - if (WIN32) + if (MSVC) target_compile_options(${LIBMANUL_NAME} PRIVATE "/arch:AVX2") - elseif (UNIX) + else () target_compile_options(${LIBMANUL_NAME} PRIVATE "-mavx2") endif () endif()