Skip to content

Commit 81d9710

Browse files
keith-packardstephanosio
authored andcommitted
cmake: Switch TOOLCHAIN_VARIANT_COMPILER test around for old Zephyr bisectabilty
When building with Zephyr that doesn't have full SDK 1.0 support, the TOOLCHAIN_VARIANT_COMPILER variable will not be set. So, instead of checking whether that is equal to "gnu", check if it is not equal to "llvm" so that we ensure that we use the -O2 version of libstdc++ when exceptions are required. Signed-off-by: Keith Packard <[email protected]>
1 parent 5cd845a commit 81d9710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/zephyr/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ config PICOLIBC_DEFAULT
2525

2626
# libstdc++ is built without exception support in -Os mode
2727
choice COMPILER_OPTIMIZATIONS
28-
default SPEED_OPTIMIZATIONS if ("$(TOOLCHAIN_VARIANT_COMPILER)" = "gnu") && CPP_EXCEPTIONS
28+
default SPEED_OPTIMIZATIONS if ("$(TOOLCHAIN_VARIANT_COMPILER)" != "llvm") && CPP_EXCEPTIONS
2929
endchoice

0 commit comments

Comments
 (0)