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 @@ -135,6 +135,12 @@ else()
135
135
set (_local_TOOLCHAIN_HAS_GLIBCXX n)
136
136
endif ()
137
137
138
+ if (TOOLCHAIN_HAS_LIBCXX)
139
+ set (_local_TOOLCHAIN_HAS_LIBCXX y)
140
+ else ()
141
+ set (_local_TOOLCHAIN_HAS_LIBCXX n)
142
+ endif ()
143
+
138
144
# APP_DIR: Path to the main image (sysbuild) or synonym for APPLICATION_SOURCE_DIR (non-sysbuild)
139
145
zephyr_get(APP_DIR VAR APP_DIR APPLICATION_SOURCE_DIR)
140
146
@@ -164,6 +170,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
164
170
TOOLCHAIN_HAS_NEWLIB=${_local_TOOLCHAIN_HAS_NEWLIB}
165
171
TOOLCHAIN_HAS_PICOLIBC=${_local_TOOLCHAIN_HAS_PICOLIBC}
166
172
TOOLCHAIN_HAS_GLIBCXX=${_local_TOOLCHAIN_HAS_GLIBCXX}
173
+ TOOLCHAIN_HAS_LIBCXX=${_local_TOOLCHAIN_HAS_LIBCXX}
167
174
EDT_PICKLE=${EDT_PICKLE}
168
175
# Export all Zephyr modules to Kconfig
169
176
${ZEPHYR_KCONFIG_MODULES_DIR}
Original file line number Diff line number Diff line change @@ -41,4 +41,6 @@ if(NOT LLVM_TOOLCHAIN_PATH STREQUAL "")
41
41
endif ()
42
42
endif ()
43
43
44
+ set (TOOLCHAIN_HAS_LIBCXX ON CACHE BOOL "True if toolchain supports libc++" )
45
+
44
46
message (STATUS "Found toolchain: llvm (clang/ld)" )
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ set(LINKER xt-ld)
16
16
# obtain license information from remote licensing servers. So here
17
17
# forces the assembler ID to be GNU to speed things up a bit.
18
18
set (CMAKE_ASM_COMPILER_ID "GNU" )
19
+ set (TOOLCHAIN_HAS_LIBCXX ON CACHE BOOL "True if toolchain supports libc++" )
19
20
20
21
message (STATUS "Found toolchain: xt-clang (${XTENSA_TOOLCHAIN_PATH} )" )
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ config FULL_LIBCPP_SUPPORTED
101
101
choice LIBCPP_IMPLEMENTATION
102
102
prompt "C++ Standard Library Implementation"
103
103
default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_BUILD
104
- default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(ZEPHYR_TOOLCHAIN_VARIANT )" = "llvm "
104
+ default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_LIBCXX )" = "y "
105
105
default GLIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_GLIBCXX)" = "y"
106
106
default MINIMAL_LIBCPP
107
107
@@ -126,8 +126,8 @@ config GLIBCXX_LIBCPP
126
126
127
127
config LIBCXX_LIBCPP
128
128
bool "LLVM C++ Standard Library"
129
+ depends on "$(TOOLCHAIN_HAS_LIBCXX)" = "y"
129
130
depends on NEWLIB_LIBC
130
- depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
131
131
select FULL_LIBCPP_SUPPORTED
132
132
help
133
133
Build with LLVM C++ Standard Library (libc++) provided by LLVM
You can’t perform that action at this time.
0 commit comments