• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-------------------------- __cxxabi_config.h -------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef ____CXXABI_CONFIG_H
11 #define ____CXXABI_CONFIG_H
12 
13 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) &&                 \
14     !defined(__ARM_DWARF_EH__)
15 #define _LIBCXXABI_ARM_EHABI
16 #endif
17 
18 #if !defined(__has_attribute)
19 #define __has_attribute(_attribute_) 0
20 #endif
21 
22 #if defined(_WIN32)
23  #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
24   #define _LIBCXXABI_HIDDEN
25   #define _LIBCXXABI_DATA_VIS
26   #define _LIBCXXABI_FUNC_VIS
27   #define _LIBCXXABI_TYPE_VIS
28  #elif defined(_LIBCXXABI_BUILDING_LIBRARY)
29   #define _LIBCXXABI_HIDDEN
30   #define _LIBCXXABI_DATA_VIS __declspec(dllexport)
31   #define _LIBCXXABI_FUNC_VIS __declspec(dllexport)
32   #define _LIBCXXABI_TYPE_VIS __declspec(dllexport)
33  #else
34   #define _LIBCXXABI_HIDDEN
35   #define _LIBCXXABI_DATA_VIS __declspec(dllimport)
36   #define _LIBCXXABI_FUNC_VIS __declspec(dllimport)
37   #define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
38  #endif
39 #else
40  #if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
41   #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
42   #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
43   #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
44   #if __has_attribute(__type_visibility__)
45    #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
46   #else
47    #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
48   #endif
49  #else
50   #define _LIBCXXABI_HIDDEN
51   #define _LIBCXXABI_DATA_VIS
52   #define _LIBCXXABI_FUNC_VIS
53   #define _LIBCXXABI_TYPE_VIS
54  #endif
55 #endif
56 
57 #if defined(_WIN32)
58 #define _LIBCXXABI_WEAK
59 #else
60 #define _LIBCXXABI_WEAK __attribute__((__weak__))
61 #endif
62 
63 #if defined(__clang__)
64 #define _LIBCXXABI_COMPILER_CLANG
65 #endif
66 
67 #if __has_attribute(__no_sanitize__) && defined(_LIBCXXABI_COMPILER_CLANG)
68 #define _LIBCXXABI_NO_CFI __attribute__((__no_sanitize__("cfi")))
69 #else
70 #define _LIBCXXABI_NO_CFI
71 #endif
72 
73 #endif // ____CXXABI_CONFIG_H
74