Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Leung
fb92a654e3 toolchain: introduce macro TOOLCHAIN_HAS_C_AUTO_TYPE
This introduces the macro TOOLCHAIN_HAS_C_AUTO_TYPE to
indicate that the toolchain supports __auto_type. This is
supported since GCC 4.9.0 and Clang 3.8.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-28 10:52:51 +01:00
Daniel Leung
0726955978 toolchain: introduce macro TOOLCHAIN_HAS_C_GENERIC
This introduces the macro TOOLCHAIN_HAS_C_GENERIC to indicate
that the toolchain supports C Generic (i.e. _Generic keyword).
This is introduced in C11, and is also supported since GCC 4.9.0
and Clang 3.8.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-28 10:52:51 +01:00
Daniel Leung
6bb278a53c toolchain: introduce macro TOOLCHAIN_HAS_PRAGMA_DIAG
This introduces the macro TOOLCHAIN_HAS_PRAGMA_DIAG to indicate
that the toolchain supports #pragma diagnostics. This is
supported since GCC 4.6.0 and, AFAIK, all Clang.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-28 10:52:51 +01:00
Daniel Leung
8798fecd8e toolchain: introduce CLANG_VERSION macro
Adds a CLANG_VERSION macro to make it easier to write
preprocessor conditionals.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-28 10:52:51 +01:00
Daniel Leung
601b2b20ef llvm: add __fallthrough macro for Clang
LLVM defines __GNUC__ to 4 so the __fallthrough is nothing
through include/toolchain/gcc.h. So add a few lines for
a functional __fallthrough macro for LLVM. The fallthrough
attribute is supported since Clang 10.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-24 08:35:22 -06:00
Anas Nashif
1b95d96a72 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>
2021-04-22 07:42:58 -04:00
Anas Nashif
9614581ebe tests: dsp: filtering: exclude on llvm
optimize attribute is not supported by LLVM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 07:42:58 -04:00