From 0605217f5d60257a53ec875e2e4ff36a3e14f825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 11 Sep 2023 14:19:28 +0300 Subject: [PATCH] headers: Provide __cpuidex for Clang 17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In 2b6c9247613aa830374e3686e09d3b8d582a92a6, we changed so that we don't provide __cpuidex for Clang 17 or newer, as Clang itself provided that as a builtin. The __cpuidex builtin was added in Clang during the course of development of Clang 17, but it was reverted before version 17 was released (it was added initially in 2df77ac20a1ed996706b164b0c4ed5ad140f635f, in llvm-project, on May 24th, but later reverted in f3baf63d9a1ba91974f4df6abb8f2abd9a0df5b5 on August 4th, which also was cherrypicked to the 17.x release branch). Clang 17 isn't formally released yet, but it has been agreed to not reland the change within the 17.x release series - in https://reviews.llvm.org/D157115#4561681. In current git main of llvm-project, the __cpuidex builtin isn't yet readded, but it is being planned and it seems likely to be readded before version 18 gets released in 6 months; thus bump the version to 18 instead of removing the condition entirely. Relanding it is being discussed in https://reviews.llvm.org/D158348. Signed-off-by: Martin Storsjö --- mingw-w64-headers/include/psdk_inc/intrin-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-headers/include/psdk_inc/intrin-impl.h index 73bb70ec2..97cfaf2e3 100644 --- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h +++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h @@ -2023,7 +2023,7 @@ void __cpuid(int CPUInfo[4], int InfoType) { #define __INTRINSIC_DEFINED___cpuid #endif /* __INTRINSIC_PROLOG */ -#if (!defined(__GNUC__) || __GNUC__ < 11) && (!defined(__clang__) || __clang_major__ < 17) +#if (!defined(__GNUC__) || __GNUC__ < 11) && (!defined(__clang__) || __clang_major__ < 18) #if __INTRINSIC_PROLOG(__cpuidex) void __cpuidex(int CPUInfo[4], int, int); #if !__has_builtin(__cpuidex)