VSF Documented
rv_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 __RV_COMPILER_DETECT_H__
19#define __RV_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
32#ifdef __IS_COMPILER_LLVM__
33# undef __IS_COMPILER_LLVM__
34#endif
35#if defined(__clang__)
36# define __IS_COMPILER_LLVM__ 1
37#else
39#ifdef __IS_COMPILER_GCC__
40# undef __IS_COMPILER_GCC__
41#endif
42#if defined(__GNUC__) && !__IS_COMPILER_LLVM__
43# define __IS_COMPILER_GCC__ 1
44#endif
46#endif
48
49#endif // __RV_COMPILER_DETECT_H__