Skip to content
Permalink
Browse files

cmake: clang: Provide toolchain_cc_nostdinc() macro

native_posix should build with standard includes.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
  • Loading branch information...
ozhuraki authored and nashif committed Mar 8, 2019
1 parent a399924 commit f2c4779b8492496a2a6d14c3ef37bd52d5452ea2
Showing with 7 additions and 0 deletions.
  1. +7 −0 cmake/compiler/clang/target.cmake
@@ -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)

0 comments on commit f2c4779

Please sign in to comment.
You can’t perform that action at this time.