File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,12 @@ else()
157157 set (_local_TOOLCHAIN_HAS_GLIBCXX n)
158158endif ()
159159
160+ if (TOOLCHAIN_HAS_LIBCXX)
161+ set (_local_TOOLCHAIN_HAS_LIBCXX y)
162+ else ()
163+ set (_local_TOOLCHAIN_HAS_LIBCXX n)
164+ endif ()
165+
160166set (COMMON_KCONFIG_ENV_SETTINGS
161167 PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
162168 srctree=${ZEPHYR_BASE}
@@ -178,6 +184,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
178184 TOOLCHAIN_HAS_NEWLIB=${_local_TOOLCHAIN_HAS_NEWLIB}
179185 TOOLCHAIN_HAS_PICOLIBC=${_local_TOOLCHAIN_HAS_PICOLIBC}
180186 TOOLCHAIN_HAS_GLIBCXX=${_local_TOOLCHAIN_HAS_GLIBCXX}
187+ TOOLCHAIN_HAS_LIBCXX=${_local_TOOLCHAIN_HAS_LIBCXX}
181188 EDT_PICKLE=${EDT_PICKLE}
182189 # Export all Zephyr modules to Kconfig
183190 ${ZEPHYR_KCONFIG_MODULES_DIR}
Original file line number Diff line number Diff line change @@ -41,4 +41,6 @@ if(NOT LLVM_TOOLCHAIN_PATH STREQUAL "")
4141 endif ()
4242endif ()
4343
44+ set (TOOLCHAIN_HAS_LIBCXX ON CACHE BOOL "True if toolchain supports libc++" )
45+
4446message (STATUS "Found toolchain: llvm (clang/ld)" )
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ set(LINKER xt-ld)
1616# obtain license information from remote licensing servers. So here
1717# forces the assembler ID to be GNU to speed things up a bit.
1818set (CMAKE_ASM_COMPILER_ID "GNU" )
19+ set (TOOLCHAIN_HAS_LIBCXX ON CACHE BOOL "True if toolchain supports libc++" )
1920
2021message (STATUS "Found toolchain: xt-clang (${XTENSA_TOOLCHAIN_PATH} )" )
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ config FULL_LIBCPP_SUPPORTED
7474choice LIBCPP_IMPLEMENTATION
7575 prompt "C++ Standard Library Implementation"
7676 default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_BUILD
77- default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(ZEPHYR_TOOLCHAIN_VARIANT )" = "llvm "
77+ default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_LIBCXX )" = "y "
7878 default GLIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_GLIBCXX)" = "y"
7979 default MINIMAL_LIBCPP
8080
@@ -100,9 +100,9 @@ config GLIBCXX_LIBCPP
100100
101101config LIBCXX_LIBCPP
102102 bool "LLVM C++ Standard Library"
103+ depends on "$(TOOLCHAIN_HAS_LIBCXX)" = "y"
103104 depends on !NATIVE_APPLICATION
104105 depends on NEWLIB_LIBC
105- depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
106106 select FULL_LIBCPP_SUPPORTED
107107 help
108108 Build with LLVM C++ Standard Library (libc++) provided by LLVM
You can’t perform that action at this time.
0 commit comments