diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index 323281f5..e22561bc 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt @@ -37,6 +37,7 @@ if(BUILD_SHARED) $) endif() if(BUILD_STATIC) + add_compile_definitions(BUILD_STATIC) add_library(blosc2_static STATIC) # ALIAS for superbuilds that use Blosc2 as sub-project # must be the same as the NAMESPACE in Blosc2Targets diff --git a/blosc/shuffle.c b/blosc/shuffle.c index 62587639..ca9e3747 100644 --- a/blosc/shuffle.c +++ b/blosc/shuffle.c @@ -52,7 +52,7 @@ // __builtin_cpu_supports() fixed in GCC 8: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85100 // Also, clang added support for it in clang 10 at very least (and possibly since 3.8) -#if (defined(__clang__) && (__clang_major__ >= 10)) || \ +#if (defined(__clang__) && (__clang_major__ >= 10)) && !(defined(__APPLE__) && defined(__x86_64__) && defined(BUILD_STATIC)) || \ (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ >= 8) #define HAVE_CPU_FEAT_INTRIN #endif