CMakeLists.txt: parse zephyr_stdint.h after compiler specific flags

The zephyr_stdint.h file enforces Zephyr specific policies on the
compilation environment. Let's give compilers a chance to provide
definitions of their own via TOOLCHAIN_C_FLAGS prior the inclusion
of zephyr_stdint.h.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2019-07-02 16:22:04 -04:00 committed by Anas Nashif
parent e53c0d0ec7
commit b86aa65723

View file

@ -220,9 +220,6 @@ toolchain_cc_nostdinc()
# @Intent: Set compiler specific macro inclusion of AUTOCONF_H
toolchain_cc_imacros(${AUTOCONF_H})
# @Intent: Enforce standard integer type correspondance to match Zephyr usage.
toolchain_cc_imacros(${ZEPHYR_BASE}/include/toolchain/zephyr_stdint.h)
# @Intent: Set compiler specific flag for bare metal freestanding option
toolchain_cc_freestanding()
@ -240,6 +237,10 @@ zephyr_compile_options(
$<$<COMPILE_LANGUAGE:ASM>:${ASM_BASE_FLAG}>
)
# @Intent: Enforce standard integer type correspondance to match Zephyr usage.
# (must be after compiler specific flags)
toolchain_cc_imacros(${ZEPHYR_BASE}/include/toolchain/zephyr_stdint.h)
# Common toolchain-agnostic assembly flags
zephyr_compile_options(
$<$<COMPILE_LANGUAGE:ASM>:-D_ASMLANGUAGE>