graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Fix and improve building with clang-cl

Open fanc999 opened this issue 3 years ago • 0 comments

Hi,

This attempts to fix building with clang-cl (the clang compiler that attempts to be MSVC compatible), by:

  • Fixing graphene-macros.h by checking for the existance of __GNUC__ before trying to check its value, since clang-cl defines _MSC_VER but not __GNUC__, unlike clang on *NIX.
  • Improve detection of compiler flags used for clang-cl, which follows more the ones used on GCC than Visual Studio, and filter out those that aren't supported. Also, force -msse4.1 since that is required for bulding the SSE 4.1 code on clang-cl.
  • Disable the deprecation warnings that result form the Visual Studio headers, which clang-cl utilizes.
  • For the SSE/ARM NEON SIMD implementations, make clang-cl follow the GCC codepath, since __extension__ is supported there as well.

With blessings, thank you!

fanc999 avatar May 11 '22 03:05 fanc999