cmake: Move check for '-nostdinc' up.

This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
This commit is contained in:
Håkon Øye Amundsen 2018-11-29 09:12:38 +00:00 committed by Anas Nashif
parent d6551b5dea
commit 2a3f43458b

View file

@ -336,6 +336,10 @@ zephyr_ld_options(
${LINKERFLAGPREFIX},--build-id=none
)
if(NOT CONFIG_NATIVE_APPLICATION)
set(NOSTDINC_F -nostdinc)
endif()
if(NOT CONFIG_NATIVE_APPLICATION)
# Funny thing is if this is set to =error, some architectures will
# skip this flag even though the compiler flag check passes
@ -1188,10 +1192,6 @@ set_property(TARGET zephyr_prebuilt PROPERTY LINK_DEPENDS ${PROJECT_BINARY_DIR
add_dependencies( zephyr_prebuilt ${ALIGN_SIZING_DEP} ${PRIV_STACK_DEP} linker_script offsets)
if(NOT CONFIG_NATIVE_APPLICATION)
set(NOSTDINC_F -nostdinc)
endif()
if(GKOF OR GKSF)
set(logical_target_for_zephyr_elf kernel_elf)