llvm-mos-sdk
cxxabi-config.h
Go to the documentation of this file.
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef ____CXXABI_CONFIG_H
10 #define ____CXXABI_CONFIG_H
11 
12 #if !defined(__has_attribute)
13 #define __has_attribute(_attribute_) 0
14 #endif
15 
16 #if defined(__clang__)
17 #define _LIBCXXABI_COMPILER_CLANG
18 #ifndef __apple_build_version__
19 #define _LIBCXXABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
20 #endif
21 #endif
22 
23 #if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
24 #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
25 #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
26 #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
27 #if __has_attribute(__type_visibility__)
28 #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
29 #else
30 #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
31 #endif
32 #else
33 #define _LIBCXXABI_HIDDEN
34 #define _LIBCXXABI_DATA_VIS
35 #define _LIBCXXABI_FUNC_VIS
36 #define _LIBCXXABI_TYPE_VIS
37 #endif
38 
39 #define _LIBCXXABI_WEAK __attribute__((__weak__))
40 
41 #if defined(__clang__)
42 #define _LIBCXXABI_COMPILER_CLANG
43 #endif
44 
45 #if __has_attribute(__no_sanitize__) && defined(_LIBCXXABI_COMPILER_CLANG)
46 #define _LIBCXXABI_NO_CFI __attribute__((__no_sanitize__("cfi")))
47 #else
48 #define _LIBCXXABI_NO_CFI
49 #endif
50 
51 #if defined(_LIBCXXABI_COMPILER_CLANG)
52 #if !__has_feature(cxx_exceptions)
53 #define _LIBCXXABI_NO_EXCEPTIONS
54 #endif
55 #endif
56 
57 #endif // ____CXXABI_CONFIG_H