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:
parent
a3999243a1
commit
f2c4779b84
1 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,13 @@ set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--
|
||||||
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
|
||||||
# Load toolchain_cc-family macros
|
# 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
|
# 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_security_canaries.cmake)
|
||||||
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)
|
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue