• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/
2 /*                                                                            */
3 /* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
4 /* Exceptions.                                                                */
5 /* See https://llvm.org/LICENSE.txt for license information.                  */
6 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
7 /*                                                                            */
8 /*===----------------------------------------------------------------------===*/
9 
10 /* This file enumerates variables from the LLVM configuration so that they
11    can be in exported headers and won't override package specific directives.
12    This is a C header that can be included in the llvm-c headers. */
13 
14 #ifndef LLVM_CONFIG_H
15 #define LLVM_CONFIG_H
16 
17 #if !defined(__i386__) && defined(_M_IX86)
18 #define __i386__ 1
19 #endif
20 
21 #if !defined(__x86_64__) && (defined(_M_AMD64) || defined (_M_X64))
22 #define __x86_64__ 1
23 #endif
24 
25 #define LLVM_CONFIG_H
26 
27 /* Define if LLVM_ENABLE_DUMP is enabled */
28 /* #undef LLVM_ENABLE_DUMP */
29 
30 /* Target triple LLVM will generate code for by default */
31 #if defined(__x86_64__)
32 #define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-linux-android"
33 #elif defined(__i386__)
34 #define LLVM_DEFAULT_TARGET_TRIPLE "i686-linux-android"
35 #elif defined(__arm__)
36 #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-androideabi"
37 #elif defined(__aarch64__)
38 #define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-android"
39 #else
40 #error "unknown architecture"
41 #endif
42 
43 /* Define if threads enabled */
44 #define LLVM_ENABLE_THREADS 1
45 
46 /* Has gcc/MSVC atomic intrinsics */
47 #define LLVM_HAS_ATOMICS 1
48 
49 /* Host triple LLVM will be executed on */
50 #if defined(__x86_64__)
51 #define LLVM_HOST_TRIPLE "x86_64-linux-android"
52 #elif defined(__i386__)
53 #define LLVM_HOST_TRIPLE "i686-linux-android"
54 #elif defined(__arm__)
55 #define LLVM_HOST_TRIPLE "armv7-linux-androideabi"
56 #elif defined(__aarch64__)
57 #define LLVM_HOST_TRIPLE "aarch64-linux-android"
58 #else
59 #error "unknown architecture"
60 #endif
61 
62 /* LLVM architecture name for the native architecture, if available */
63 #if defined(__aarch64__)
64 #define LLVM_NATIVE_ARCH AArch64
65 #elif defined(__arm__)
66 #define LLVM_NATIVE_ARCH ARM
67 #elif defined(__i386__) || defined(__x86_64__)
68 #define LLVM_NATIVE_ARCH X86
69 #elif defined(__mips__)
70 #define LLVM_NATIVE_ARCH Mips
71 #elif defined(__powerpc64__)
72 #define LLVM_NATIVE_ARCH PowerPC
73 #else
74 #error "unknown architecture"
75 #endif
76 
77 /* LLVM name for the native AsmParser init function, if available */
78 #if defined(__aarch64__)
79 #define LLVM_NATIVE_ASMPARSER LLVMInitializeAArch64AsmParser
80 #elif defined(__arm__)
81 #define LLVM_NATIVE_ASMPARSER LLVMInitializeARMAsmParser
82 #elif defined(__i386__) || defined(__x86_64__)
83 #define LLVM_NATIVE_ASMPARSER LLVMInitializeX86AsmParser
84 #elif defined(__mips__)
85 #define LLVM_NATIVE_ASMPARSER LLVMInitializeMipsAsmParser
86 #elif defined(__powerpc64__)
87 #define LLVM_NATIVE_ASMPARSER LLVMInitializePowerPCAsmParser
88 #else
89 #error "unknown architecture"
90 #endif
91 
92 /* LLVM name for the native AsmPrinter init function, if available */
93 #if defined(__aarch64__)
94 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeAArch64AsmPrinter
95 #elif defined(__arm__)
96 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeARMAsmPrinter
97 #elif defined(__i386__) || defined(__x86_64__)
98 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeX86AsmPrinter
99 #elif defined(__mips__)
100 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeMipsAsmPrinter
101 #elif defined(__powerpc64__)
102 #define LLVM_NATIVE_ASMPRINTER LLVMInitializePowerPCAsmPrinter
103 #else
104 #error "unknown architecture"
105 #endif
106 
107 /* LLVM name for the native Disassembler init function, if available */
108 #if defined(__aarch64__)
109 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeAArch64Disassembler
110 #elif defined(__arm__)
111 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeARMDisassembler
112 #elif defined(__i386__) || defined(__x86_64__)
113 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeX86Disassembler
114 #elif defined(__mips__)
115 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeMipsDisassembler
116 #elif defined(__powerpc64__)
117 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializePowerPCDisassembler
118 #else
119 #error "unknown architecture"
120 #endif
121 
122 /* LLVM name for the native Target init function, if available */
123 #if defined(__aarch64__)
124 #define LLVM_NATIVE_TARGET LLVMInitializeAArch64Target
125 #elif defined(__arm__)
126 #define LLVM_NATIVE_TARGET LLVMInitializeARMTarget
127 #elif defined(__i386__) || defined(__x86_64__)
128 #define LLVM_NATIVE_TARGET LLVMInitializeX86Target
129 #elif defined(__mips__)
130 #define LLVM_NATIVE_TARGET LLVMInitializeMipsTarget
131 #elif defined(__powerpc64__)
132 #define LLVM_NATIVE_TARGET LLVMInitializePowerPCTarget
133 #else
134 #error "unknown architecture"
135 #endif
136 
137 /* LLVM name for the native TargetInfo init function, if available */
138 #if defined(__aarch64__)
139 #define LLVM_NATIVE_TARGETINFO LLVMInitializeAArch64TargetInfo
140 #elif defined(__arm__)
141 #define LLVM_NATIVE_TARGETINFO LLVMInitializeARMTargetInfo
142 #elif defined(__i386__) || defined(__x86_64__)
143 #define LLVM_NATIVE_TARGETINFO LLVMInitializeX86TargetInfo
144 #elif defined(__mips__)
145 #define LLVM_NATIVE_TARGETINFO LLVMInitializeMipsTargetInfo
146 #elif defined(__powerpc64__)
147 #define LLVM_NATIVE_TARGETINFO LLVMInitializePowerPCTargetInfo
148 #else
149 #error "unknown architecture"
150 #endif
151 
152 /* LLVM name for the native target MC init function, if available */
153 #if defined(__aarch64__)
154 #define LLVM_NATIVE_TARGETMC LLVMInitializeAArch64TargetMC
155 #elif defined(__arm__)
156 #define LLVM_NATIVE_TARGETMC LLVMInitializeARMTargetMC
157 #elif defined(__i386__) || defined(__x86_64__)
158 #define LLVM_NATIVE_TARGETMC LLVMInitializeX86TargetMC
159 #elif defined(__mips__)
160 #define LLVM_NATIVE_TARGETMC LLVMInitializeMipsTargetMC
161 #elif defined(__powerpc64__)
162 #define LLVM_NATIVE_TARGETMC LLVMInitializePowerPCTargetMC
163 #else
164 #error "unknown architecture"
165 #endif
166 
167 /* Define if this is Unixish platform */
168 #define LLVM_ON_UNIX 1
169 
170 /* Define if we have the Intel JIT API runtime support library */
171 #define LLVM_USE_INTEL_JITEVENTS 0
172 
173 /* Define if we have the oprofile JIT-support library */
174 #define LLVM_USE_OPROFILE 0
175 
176 /* Define if we have the perf JIT-support library */
177 #define LLVM_USE_PERF 0
178 
179 /* Major version of the LLVM API */
180 #define LLVM_VERSION_MAJOR 10
181 
182 /* Minor version of the LLVM API */
183 #define LLVM_VERSION_MINOR 0
184 
185 /* Patch version of the LLVM API */
186 #define LLVM_VERSION_PATCH 0
187 
188 /* LLVM version string */
189 #define LLVM_VERSION_STRING "10.0.0"
190 
191 /* Whether LLVM records statistics for use with GetStatistics(),
192  * PrintStatistics() or PrintStatisticsJSON()
193  */
194 #define LLVM_FORCE_ENABLE_STATS 0
195 
196 #endif
197