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