From 46a7659136462deadec1d7506d5b9d66cb540310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 11 Feb 2026 14:37:11 +0100 Subject: [PATCH] package: enable _LIBCPP_REMOVE_TRANSITIVE_INCLUDES for all libc++ builds. Which makes libc++ since version 16 not use transitive includes for backwards compatibility, both for faster build times and to detect if some code is missing a transitive include (which could blow up for the user even w/o this macro defined, as compiling with -std=c++23 also removes quite a lot such includes). For this repository this affects solely macOS on the CI, but right now it uses a VM with older libc++, which means it does nothing, but it's done there anyway to future-proof. --- package/ci/circleci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index 90de9a0..a9b2194 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -394,7 +394,11 @@ jobs: macos-gl: executor: xcode-14_3 environment: - CMAKE_CXX_FLAGS: --coverage + # Make libc++ remove transitive includes, both for faster build times and + # to detect if we're missing a transitive include. Works with libc++ 16+, + # which is used by Xcode 15 (i.e., will get used on the next CircleCI + # executor update). + CMAKE_CXX_FLAGS: --coverage -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES PLATFORM_GL_API: CGL steps: - install-base-macos: @@ -410,7 +414,11 @@ jobs: macos-gles3: executor: xcode-14_3 environment: - CMAKE_CXX_FLAGS: --coverage + # Make libc++ remove transitive includes, both for faster build times and + # to detect if we're missing a transitive include. Works with libc++ 16+, + # which is used by Xcode 15 (i.e., will get used on the next CircleCI + # executor update). + CMAKE_CXX_FLAGS: --coverage -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES PLATFORM_GL_API: EGL # STUPID yml interprets unquoted OFF as a boolean TARGET_GLES2: "OFF" @@ -432,7 +440,11 @@ jobs: environment: # STUPID yml interprets unquoted ON as a boolean BUILD_STATIC: "ON" - CMAKE_CXX_FLAGS: --coverage + # Make libc++ remove transitive includes, both for faster build times and + # to detect if we're missing a transitive include. Works with libc++ 16+, + # which is used by Xcode 15 (i.e., will get used on the next CircleCI + # executor update). + CMAKE_CXX_FLAGS: --coverage -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES PLATFORM_GL_API: CGL steps: - install-base-macos: