toolchain: add llvm abstraction

Add abstraction for llvm to allow for toolchain customizations that are
different from the gcc defaults.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-04-19 00:12:57 -04:00
commit 1b95d96a72
2 changed files with 2 additions and 9 deletions

View file

@ -37,6 +37,8 @@
#include <toolchain/xcc.h> #include <toolchain/xcc.h>
#elif defined(__CCAC__) #elif defined(__CCAC__)
#include <toolchain/mwdt.h> #include <toolchain/mwdt.h>
#elif defined(__llvm__)
#include <toolchain/llvm.h>
#elif defined(__GNUC__) || (defined(_LINKER) && defined(__GCC_LINKER_CMD__)) #elif defined(__GNUC__) || (defined(_LINKER) && defined(__GCC_LINKER_CMD__))
#include <toolchain/gcc.h> #include <toolchain/gcc.h>
#else #else

View file

@ -7,18 +7,9 @@
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_ #ifndef ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
#define ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_ #define ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
#ifndef _LINKER
#if defined(_ASMLANGUAGE)
#include <toolchain/common.h>
#else /* defined(_ASMLANGUAGE) */
#define __no_optimization __attribute__((optnone)) #define __no_optimization __attribute__((optnone))
#include <toolchain/gcc.h> #include <toolchain/gcc.h>
#endif /* _ASMLANGUAGE */
#endif /* !_LINKER */
#endif /* ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_ */ #endif /* ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_ */