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