From 78dc6d9702dc00284166188467555868cb917354 Mon Sep 17 00:00:00 2001 From: David Racine Date: Sun, 13 Sep 2026 14:21:36 -0400 Subject: [PATCH] Don't erase __attribute__ under clang-cl (#7186) * Don't erase __attribute__ under clang-cl The shim fires when __GNUC__ is absent, which clang-cl does not define even though it supports __attribute__ fully. Erasing it breaks clang's own intrinsics headers: mmintrin.h declares __m64 as a vector via __attribute__((vector_size)), so it degrades to a scalar and every use of it fails to compile. * Don't erase __attribute__ under clang-cl clang-cl supports it but does not define __GNUC__, so the shim fired and broke clang's own intrinsics headers. --- soh/include/attributes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/include/attributes.h b/soh/include/attributes.h index f58cc8122d..ae65dd78c4 100644 --- a/soh/include/attributes.h +++ b/soh/include/attributes.h @@ -1,7 +1,7 @@ #ifndef ATTRIBUTES_H #define ATTRIBUTES_H -#if !defined(__GNUC__) && !defined(__attribute__) +#if !defined(__GNUC__) && !defined(__clang__) && !defined(__attribute__) #define __attribute__(x) #endif