• 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-unknown-linux-gnu"
33 #elif defined(__i386__)
34 #define LLVM_DEFAULT_TARGET_TRIPLE "i686-pc-linux-gnu"
35 #elif defined(__arm__)
36 #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf"
37 #elif defined(__aarch64__)
38 #define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu"
39 #elif defined(__mips__)
40 #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu"
41 #elif defined(__mips64)
42 #define LLVM_DEFAULT_TARGET_TRIPLE "mips64el-linux-gnuabi64"
43 #elif defined(__powerpc64__)
44 #define LLVM_DEFAULT_TARGET_TRIPLE "powerpc64le-unknown-linux-gnu"
45 #elif defined(__riscv) && __riscv_xlen == 64
46 #define LLVM_DEFAULT_TARGET_TRIPLE "riscv64-unknown-linux-gnu"
47 #else
48 #error "unknown architecture"
49 #endif
50 
51 /* Define if threads enabled */
52 #define LLVM_ENABLE_THREADS 1
53 
54 /* Has gcc/MSVC atomic intrinsics */
55 #define LLVM_HAS_ATOMICS 1
56 
57 /* Host triple LLVM will be executed on */
58 #if defined(__x86_64__)
59 #define LLVM_HOST_TRIPLE "x86_64-unknown-linux-gnu"
60 #elif defined(__i386__)
61 #define LLVM_HOST_TRIPLE "i686-pc-linux-gnu"
62 #elif defined(__arm__)
63 #define LLVM_HOST_TRIPLE "armv7-linux-gnueabihf"
64 #elif defined(__aarch64__)
65 #define LLVM_HOST_TRIPLE "aarch64-linux-gnu"
66 #elif defined(__mips__)
67 #define LLVM_HOST_TRIPLE "mipsel-linux-gnu"
68 #elif defined(__mips64)
69 #define LLVM_HOST_TRIPLE "mips64el-linux-gnuabi64"
70 #elif defined(__powerpc64__)
71 #define LLVM_HOST_TRIPLE "powerpc64le-unknown-linux-gnu"
72 #elif defined(__riscv) && __riscv_xlen == 64
73 #define LLVM_HOST_TRIPLE "riscv64-unknown-linux-gnu"
74 #else
75 #error "unknown architecture"
76 #endif
77 
78 /* LLVM architecture name for the native architecture, if available */
79 #if defined(__aarch64__)
80 #define LLVM_NATIVE_ARCH AArch64
81 #elif defined(__arm__)
82 #define LLVM_NATIVE_ARCH ARM
83 #elif defined(__i386__) || defined(__x86_64__)
84 #define LLVM_NATIVE_ARCH X86
85 #elif defined(__mips__)
86 #define LLVM_NATIVE_ARCH Mips
87 #elif defined(__powerpc64__)
88 #define LLVM_NATIVE_ARCH PowerPC
89 #elif defined(__riscv)
90 #define LLVM_NATIVE_ARCH RISCV
91 #else
92 #error "unknown architecture"
93 #endif
94 
95 /* LLVM name for the native AsmParser init function, if available */
96 #if defined(__aarch64__)
97 #define LLVM_NATIVE_ASMPARSER LLVMInitializeAArch64AsmParser
98 #elif defined(__arm__)
99 #define LLVM_NATIVE_ASMPARSER LLVMInitializeARMAsmParser
100 #elif defined(__i386__) || defined(__x86_64__)
101 #define LLVM_NATIVE_ASMPARSER LLVMInitializeX86AsmParser
102 #elif defined(__mips__)
103 #define LLVM_NATIVE_ASMPARSER LLVMInitializeMipsAsmParser
104 #elif defined(__powerpc64__)
105 #define LLVM_NATIVE_ASMPARSER LLVMInitializePowerPCAsmParser
106 #elif defined(__riscv)
107 #define LLVM_NATIVE_ASMPARSER LLVMInitializeRISCVAsmParser
108 #else
109 #error "unknown architecture"
110 #endif
111 
112 /* LLVM name for the native AsmPrinter init function, if available */
113 #if defined(__aarch64__)
114 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeAArch64AsmPrinter
115 #elif defined(__arm__)
116 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeARMAsmPrinter
117 #elif defined(__i386__) || defined(__x86_64__)
118 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeX86AsmPrinter
119 #elif defined(__mips__)
120 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeMipsAsmPrinter
121 #elif defined(__powerpc64__)
122 #define LLVM_NATIVE_ASMPRINTER LLVMInitializePowerPCAsmPrinter
123 #elif defined(__riscv)
124 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeRISCVAsmPrinter
125 #else
126 #error "unknown architecture"
127 #endif
128 
129 /* LLVM name for the native Disassembler init function, if available */
130 #if defined(__aarch64__)
131 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeAArch64Disassembler
132 #elif defined(__arm__)
133 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeARMDisassembler
134 #elif defined(__i386__) || defined(__x86_64__)
135 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeX86Disassembler
136 #elif defined(__mips__)
137 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeMipsDisassembler
138 #elif defined(__powerpc64__)
139 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializePowerPCDisassembler
140 #elif defined(__riscv)
141 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeRISCVDisassembler
142 #else
143 #error "unknown architecture"
144 #endif
145 
146 /* LLVM name for the native Target init function, if available */
147 #if defined(__aarch64__)
148 #define LLVM_NATIVE_TARGET LLVMInitializeAArch64Target
149 #elif defined(__arm__)
150 #define LLVM_NATIVE_TARGET LLVMInitializeARMTarget
151 #elif defined(__i386__) || defined(__x86_64__)
152 #define LLVM_NATIVE_TARGET LLVMInitializeX86Target
153 #elif defined(__mips__)
154 #define LLVM_NATIVE_TARGET LLVMInitializeMipsTarget
155 #elif defined(__powerpc64__)
156 #define LLVM_NATIVE_TARGET LLVMInitializePowerPCTarget
157 #elif defined(__riscv)
158 #define LLVM_NATIVE_TARGET LLVMInitializeRISCVTarget
159 #else
160 #error "unknown architecture"
161 #endif
162 
163 /* LLVM name for the native TargetInfo init function, if available */
164 #if defined(__aarch64__)
165 #define LLVM_NATIVE_TARGETINFO LLVMInitializeAArch64TargetInfo
166 #elif defined(__arm__)
167 #define LLVM_NATIVE_TARGETINFO LLVMInitializeARMTargetInfo
168 #elif defined(__i386__) || defined(__x86_64__)
169 #define LLVM_NATIVE_TARGETINFO LLVMInitializeX86TargetInfo
170 #elif defined(__mips__)
171 #define LLVM_NATIVE_TARGETINFO LLVMInitializeMipsTargetInfo
172 #elif defined(__powerpc64__)
173 #define LLVM_NATIVE_TARGETINFO LLVMInitializePowerPCTargetInfo
174 #elif defined(__riscv)
175 #define LLVM_NATIVE_TARGETINFO LLVMInitializeRISCVTargetInfo
176 #else
177 #error "unknown architecture"
178 #endif
179 
180 /* LLVM name for the native target MC init function, if available */
181 #if defined(__aarch64__)
182 #define LLVM_NATIVE_TARGETMC LLVMInitializeAArch64TargetMC
183 #elif defined(__arm__)
184 #define LLVM_NATIVE_TARGETMC LLVMInitializeARMTargetMC
185 #elif defined(__i386__) || defined(__x86_64__)
186 #define LLVM_NATIVE_TARGETMC LLVMInitializeX86TargetMC
187 #elif defined(__mips__)
188 #define LLVM_NATIVE_TARGETMC LLVMInitializeMipsTargetMC
189 #elif defined(__powerpc64__)
190 #define LLVM_NATIVE_TARGETMC LLVMInitializePowerPCTargetMC
191 #elif defined(__riscv)
192 #define LLVM_NATIVE_TARGETMC LLVMInitializeRISCVTargetMC
193 #else
194 #error "unknown architecture"
195 #endif
196 
197 /* Define if this is Unixish platform */
198 #define LLVM_ON_UNIX 1
199 
200 /* Define if we have the Intel JIT API runtime support library */
201 #define LLVM_USE_INTEL_JITEVENTS 0
202 
203 /* Define if we have the oprofile JIT-support library */
204 #define LLVM_USE_OPROFILE 0
205 
206 /* Define if we have the perf JIT-support library */
207 #define LLVM_USE_PERF 0
208 
209 /* Major version of the LLVM API */
210 #define LLVM_VERSION_MAJOR 10
211 
212 /* Minor version of the LLVM API */
213 #define LLVM_VERSION_MINOR 0
214 
215 /* Patch version of the LLVM API */
216 #define LLVM_VERSION_PATCH 0
217 
218 /* LLVM version string */
219 #define LLVM_VERSION_STRING "10.0.0"
220 
221 /* Whether LLVM records statistics for use with GetStatistics(),
222  * PrintStatistics() or PrintStatisticsJSON()
223  */
224 #define LLVM_FORCE_ENABLE_STATS 0
225 
226 #endif
227