cmake: clang: Provide toolchain_cc_nostdinc() macro

native_posix should build with standard includes.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
Oleg Zhurakivskyy 2019-03-08 13:46:27 +02:00 committed by Anas Nashif
commit f2c4779b84

View file

@ -62,6 +62,13 @@ set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
# Load toolchain_cc-family macros
macro(toolchain_cc_nostdinc)
if(NOT "${ARCH}" STREQUAL "posix")
zephyr_compile_options( -nostdinc)
endif()
endmacro()
# Clang and GCC are almost feature+flag compatible, so reuse freestanding gcc
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_canaries.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)