# SPDX-License-Identifier: Apache-2.0

config TOOLCHAIN_ZEPHYR_1_0
	def_bool y

config TOOLCHAIN_ZEPHYR_SUPPORTS_THREAD_LOCAL_STORAGE
	def_bool y
	select TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE

config TOOLCHAIN_ZEPHYR_SUPPORTS_GNU_EXTENSIONS
	def_bool y
	select TOOLCHAIN_SUPPORTS_GNU_EXTENSIONS

config PICOLIBC_SUPPORTED
	def_bool y
	depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"
	help
	  Zephyr SDK >=0.16 always supports Picolibc for C and C++ development.

config PICOLIBC_DEFAULT
	def_bool y
	depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"
	help
	  Zephyr SDK >=0.17.1 always uses Picolibc

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