Skip to content

Commit 5694318

Browse files
keith-packardnashif
authored andcommitted
cmake: Make Zephyr use full libstdc++ with CPP_EXCEPTIONS
When we're using C++ exceptions, we need to use the full version of libstdc++ that includes exception support. With multilib-space, that means using the -O2 version instead of the -Os version. Signed-off-by: Keith Packard <[email protected]>
1 parent f47bfe6 commit 5694318

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/zephyr/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ config PICOLIBC_DEFAULT
2222
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"
2323
help
2424
Zephyr SDK >=0.17.1 always uses Picolibc
25+
26+
choice COMPILER_OPTIMIZATIONS
27+
default SPEED_OPTIMIZATIONS if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" && CPP_EXCEPTIONS
28+
endchoice

0 commit comments

Comments
 (0)