[PATCH] D123777: [CMake] Check for problematic MSVC + /arch:AVX configuration

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 21:53:24 PDT 2022


smeenai added a comment.

LGTM!



================
Comment at: llvm/cmake/modules/CheckProblematicConfigurations.cmake:2
+
+option(LLVM_ALLOW_PROBLEMATIC_CONFIGURATIONS OFF "Set this option to ON to force problematic toolchain configurations. Use on your own risk.")
+
----------------
Maybe "allow" would be better than "force"? "force" kinda sounds like the build system will purposely use a problematic toolchain configuration if you turn the flag on.


================
Comment at: llvm/cmake/modules/CheckProblematicConfigurations.cmake:17
+  if(_FLAGS MATCHES "/arch:avx[0-9]*")
+    LOG_PROBLEMATIC("Compiling LLVM with MSVC and the /arch:AVX flag is known to cause issues with parts of LLVM. Use clang-cl if you want to enable AVX instructions.")
+  endif()
----------------
Might be nice to reference the bug URL in the message as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123777/new/

https://reviews.llvm.org/D123777



More information about the llvm-commits mailing list