xref: /aosp_15_r20/external/google-fruit/configuration/android/fruit/impl/fruit-config-base.h (revision a65addddcf69f38db5b288d787b6b7571a57bb8f)
1*a65addddSAndroid Build Coastguard Worker /*
2*a65addddSAndroid Build Coastguard Worker  * Copyright 2014 Google Inc. All rights reserved.
3*a65addddSAndroid Build Coastguard Worker  *
4*a65addddSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*a65addddSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*a65addddSAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*a65addddSAndroid Build Coastguard Worker  *
8*a65addddSAndroid Build Coastguard Worker  *     http://www.apache.org/licenses/LICENSE-2.0
9*a65addddSAndroid Build Coastguard Worker  *
10*a65addddSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*a65addddSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*a65addddSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*a65addddSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*a65addddSAndroid Build Coastguard Worker  * limitations under the License.
15*a65addddSAndroid Build Coastguard Worker  */
16*a65addddSAndroid Build Coastguard Worker 
17*a65addddSAndroid Build Coastguard Worker #ifndef FRUIT_CONFIG_BASE_H
18*a65addddSAndroid Build Coastguard Worker #define FRUIT_CONFIG_BASE_H
19*a65addddSAndroid Build Coastguard Worker 
20*a65addddSAndroid Build Coastguard Worker // Needed for all Clang versions (as of January 2016), not needed for GCC.
21*a65addddSAndroid Build Coastguard Worker // This can also be defined for GCC, but it slightly slows down compile time of code using Fruit.
22*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_CLANG_ARBITRARY_OVERLOAD_RESOLUTION_BUG 1
23*a65addddSAndroid Build Coastguard Worker 
24*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines std::max_align_t.
25*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_STD_MAX_ALIGN_T 1
26*a65addddSAndroid Build Coastguard Worker 
27*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines ::max_align_t.
28*a65addddSAndroid Build Coastguard Worker // Ignored if FRUIT_HAS_STD_MAX_ALIGN_T is set.
29*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_MAX_ALIGN_T 1
30*a65addddSAndroid Build Coastguard Worker 
31*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines std::is_trivially_copyable.
32*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE 1
33*a65addddSAndroid Build Coastguard Worker 
34*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines __has_trivial_copy.
35*a65addddSAndroid Build Coastguard Worker // Ignored if FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE is set.
36*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_HAS_TRIVIAL_COPY 1
37*a65addddSAndroid Build Coastguard Worker 
38*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines __is_trivially_copyable.
39*a65addddSAndroid Build Coastguard Worker // Ignored if FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE is set.
40*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_IS_TRIVIALLY_COPYABLE 1
41*a65addddSAndroid Build Coastguard Worker 
42*a65addddSAndroid Build Coastguard Worker // Whether the compiler defines std::is_trivially_copy_constructible.
43*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_STD_IS_TRIVIALLY_COPY_CONSTRUCTIBLE 1
44*a65addddSAndroid Build Coastguard Worker 
45*a65addddSAndroid Build Coastguard Worker // Whether typeid() is available. Typically, it is unless RTTI is disabled.
46*a65addddSAndroid Build Coastguard Worker // Android-changed: Android does not use RTTI by default.
47*a65addddSAndroid Build Coastguard Worker // #define FRUIT_HAS_TYPEID 1
48*a65addddSAndroid Build Coastguard Worker 
49*a65addddSAndroid Build Coastguard Worker // Whether typeid() is constexpr. Typically, it is except in MSVC.
50*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_CONSTEXPR_TYPEID 1
51*a65addddSAndroid Build Coastguard Worker 
52*a65addddSAndroid Build Coastguard Worker // Whether abi::__cxa_demangle() is available after including cxxabi.h.
53*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_CXA_DEMANGLE 1
54*a65addddSAndroid Build Coastguard Worker 
55*a65addddSAndroid Build Coastguard Worker // Android-changed: Android does not have boost library.
56*a65addddSAndroid Build Coastguard Worker #define FRUIT_USES_BOOST 0
57*a65addddSAndroid Build Coastguard Worker 
58*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_ALWAYS_INLINE_ATTRIBUTE 1
59*a65addddSAndroid Build Coastguard Worker 
60*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_FORCEINLINE 0
61*a65addddSAndroid Build Coastguard Worker 
62*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_ATTRIBUTE_DEPRECATED 0
63*a65addddSAndroid Build Coastguard Worker 
64*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_GCC_ATTRIBUTE_DEPRECATED 1
65*a65addddSAndroid Build Coastguard Worker 
66*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_DECLSPEC_DEPRECATED 0
67*a65addddSAndroid Build Coastguard Worker 
68*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_MSVC_ASSUME 0
69*a65addddSAndroid Build Coastguard Worker 
70*a65addddSAndroid Build Coastguard Worker #define FRUIT_HAS_BUILTIN_UNREACHABLE 1
71*a65addddSAndroid Build Coastguard Worker 
72*a65addddSAndroid Build Coastguard Worker #endif // FRUIT_CONFIG_BASE_H
73