From 36b5063e9ae341728412985736d658e8c90a31ae Mon Sep 17 00:00:00 2001 From: Alexander Novikov Date: Thu, 6 Aug 2026 17:33:20 +0200 Subject: [PATCH] Force-include arm_acle.h on aarch64 macOS to work around Qt qyieldcpu.h Qt's qyieldcpu.h calls the ACLE intrinsic __yield() under __has_builtin(__yield) without including . Apple clang 21 reports the builtin as available but makes the resulting implicit declaration an error, so every translation unit reaching fails to compile. Co-Authored-By: Claude Opus 5 --- meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meson.build b/meson.build index 41c9392d..f2a0175c 100644 --- a/meson.build +++ b/meson.build @@ -191,6 +191,18 @@ elif system == 'darwin' general_link_args += [ '-mmacosx-version-min=10.15' ] + + # Qt's qyieldcpu.h (through 6.9.x at least) calls the ACLE intrinsic + # __yield() under __has_builtin(__yield) without including + # . Apple clang 21 reports the builtin as available but + # makes the resulting implicit declaration an error, so every + # translation unit that reaches fails to compile. + # Force-including the ACLE header supplies the declaration. + if architecture == 'aarch64' and meson.get_compiler('cpp').has_header('arm_acle.h') + general_defines += [ + '-include', 'arm_acle.h' + ] + endif feature_defines = [ '-DHAVE_BZ2',