VSF Documented
arm_compiler_detect.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __ARM_COMPILER_DETECT_H__
19#define __ARM_COMPILER_DETECT_H__
20
23
25#ifdef __IS_COMPILER_IAR__
26# undef __IS_COMPILER_IAR__
27#endif
28#if defined(__IAR_SYSTEMS_ICC__)
29# define __IS_COMPILER_IAR__ 1
30#endif
31
33#ifdef __IS_COMPILER_ARM_COMPILER_5__
34# undef __IS_COMPILER_ARM_COMPILER_5__
35#endif
36#if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000))
37# define __IS_COMPILER_ARM_COMPILER_5__ 1
38#endif
40
42#ifdef __IS_COMPILER_ARM_COMPILER_6__
43# undef __IS_COMPILER_ARM_COMPILER_6__
44#endif
45#if ((__ARMCC_VERSION >= 6000000) && (__ARMCC_VERSION < 7000000))
46# define __IS_COMPILER_ARM_COMPILER_6__ 1
47#endif
48
49#ifdef __IS_COMPILER_LLVM__
50# undef __IS_COMPILER_LLVM__
51#endif
52#if defined(__clang__) && !__IS_COMPILER_ARM_COMPILER_6__
53# define __IS_COMPILER_LLVM__ 1
54#else
56#ifdef __IS_COMPILER_GCC__
57# undef __IS_COMPILER_GCC__
58#endif
59#if defined(__GNUC__) && !( __IS_COMPILER_ARM_COMPILER_6__ \
60 || __IS_COMPILER_LLVM__ \
61 || __IS_COMPILER_ARM_COMPILER_5__)
62# define __IS_COMPILER_GCC__ 1
63#endif
65#endif
67
68#endif // __ARM_COMPILER_DETECT_H__