From 39f757ebce5ecfd97b55487d740cf4b7ea4ae2f6 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Wed, 5 Aug 2026 10:46:15 +0200 Subject: [PATCH] fix(cxx): skip flag setup for custom-toolchain subprojects Skip processing cxx/project_include.cmake when building subprojects such as ULP as they use custom toolchain and IDF toolchain helpers are not available. --- components/cxx/project_include.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/cxx/project_include.cmake b/components/cxx/project_include.cmake index 01bd8a5013f..8214c4fa302 100644 --- a/components/cxx/project_include.cmake +++ b/components/cxx/project_include.cmake @@ -1,3 +1,9 @@ +# Sub-projects with a custom toolchain (e.g. ULP) do not use the IDF +# toolchain response file machinery. Skip flag manipulation. +if(IDF_CUSTOM_TOOLCHAIN) + return() +endif() + if(NOT CONFIG_IDF_TARGET_LINUX) if(CONFIG_COMPILER_CXX_ATOMIC_LOCK_POLICY) idf_toolchain_add_flags(CXX_COMPILE_OPTIONS "-D_GLIBCXX_HAVE_ATOMIC_LOCK_POLICY=1")