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 @@ -144,6 +144,12 @@ else()
144
144
set (_local_TOOLCHAIN_HAS_GLIBCXX n )
145
145
endif ()
146
146
147
+ if (TOOLCHAIN_HAS_LIBCXX )
148
+ set (_local_TOOLCHAIN_HAS_LIBCXX y )
149
+ else ()
150
+ set (_local_TOOLCHAIN_HAS_LIBCXX n )
151
+ endif ()
152
+
147
153
set (COMMON_KCONFIG_ENV_SETTINGS
148
154
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
149
155
srctree=${ZEPHYR_BASE}
@@ -166,6 +172,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
166
172
TOOLCHAIN_HAS_NEWLIB=${_local_TOOLCHAIN_HAS_NEWLIB}
167
173
TOOLCHAIN_HAS_PICOLIBC=${_local_TOOLCHAIN_HAS_PICOLIBC}
168
174
TOOLCHAIN_HAS_GLIBCXX=${_local_TOOLCHAIN_HAS_GLIBCXX}
175
+ TOOLCHAIN_HAS_LIBCXX=${_local_TOOLCHAIN_HAS_LIBCXX}
169
176
EDT_PICKLE=${EDT_PICKLE}
170
177
# Export all Zephyr modules to Kconfig
171
178
${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 @@ -95,7 +95,7 @@ config FULL_LIBCPP_SUPPORTED
95
95
choice LIBCPP_IMPLEMENTATION
96
96
prompt "C++ Standard Library Implementation"
97
97
default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_BUILD
98
- default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(ZEPHYR_TOOLCHAIN_VARIANT )" = "llvm "
98
+ default LIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_LIBCXX )" = "y "
99
99
default GLIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP && "$(TOOLCHAIN_HAS_GLIBCXX)" = "y"
100
100
default MINIMAL_LIBCPP
101
101
@@ -121,9 +121,9 @@ config GLIBCXX_LIBCPP
121
121
122
122
config LIBCXX_LIBCPP
123
123
bool "LLVM C++ Standard Library"
124
+ depends on "$(TOOLCHAIN_HAS_LIBCXX)" = "y"
124
125
depends on !NATIVE_APPLICATION
125
126
depends on NEWLIB_LIBC
126
- depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
127
127
select FULL_LIBCPP_SUPPORTED
128
128
help
129
129
Build with LLVM C++ Standard Library (libc++) provided by LLVM
You can’t perform that action at this time.
0 commit comments