1*770cf0a5SDimitry Andric /*===------- llvm/Config/Targets.h - LLVM target checks -----------*- C -*-===*/ 2*770cf0a5SDimitry Andric /* */ 3*770cf0a5SDimitry Andric /* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ 4*770cf0a5SDimitry Andric /* Exceptions. */ 5*770cf0a5SDimitry Andric /* See https://llvm.org/LICENSE.txt for license information. */ 6*770cf0a5SDimitry Andric /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 7*770cf0a5SDimitry Andric /* */ 8*770cf0a5SDimitry Andric /*===----------------------------------------------------------------------===*/ 9*770cf0a5SDimitry Andric 10*770cf0a5SDimitry Andric /* This file enables clients to know whether specific targets are enabled. */ 11*770cf0a5SDimitry Andric 12*770cf0a5SDimitry Andric #ifndef LLVM_CONFIG_TARGETS_H 13*770cf0a5SDimitry Andric #define LLVM_CONFIG_TARGETS_H 14*770cf0a5SDimitry Andric 15*770cf0a5SDimitry Andric /* Define if the AArch64 target is built in */ 16*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_AARCH64 17*770cf0a5SDimitry Andric #define LLVM_HAS_AARCH64_TARGET 1 18*770cf0a5SDimitry Andric #else 19*770cf0a5SDimitry Andric #define LLVM_HAS_AARCH64_TARGET 0 20*770cf0a5SDimitry Andric #endif 21*770cf0a5SDimitry Andric 22*770cf0a5SDimitry Andric /* Define if the AMDGPU target is built in */ 23*770cf0a5SDimitry Andric #define LLVM_HAS_AMDGPU_TARGET 0 24*770cf0a5SDimitry Andric 25*770cf0a5SDimitry Andric /* Define if the ARC target is built in */ 26*770cf0a5SDimitry Andric #define LLVM_HAS_ARC_TARGET 0 27*770cf0a5SDimitry Andric 28*770cf0a5SDimitry Andric /* Define if the ARM target is built in */ 29*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_ARM 30*770cf0a5SDimitry Andric #define LLVM_HAS_ARM_TARGET 1 31*770cf0a5SDimitry Andric #else 32*770cf0a5SDimitry Andric #define LLVM_HAS_ARM_TARGET 0 33*770cf0a5SDimitry Andric #endif 34*770cf0a5SDimitry Andric 35*770cf0a5SDimitry Andric /* Define if the AVR target is built in */ 36*770cf0a5SDimitry Andric #define LLVM_HAS_AVR_TARGET 0 37*770cf0a5SDimitry Andric 38*770cf0a5SDimitry Andric /* Define if the BPF target is built in */ 39*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_BPF 40*770cf0a5SDimitry Andric #define LLVM_HAS_BPF_TARGET 1 41*770cf0a5SDimitry Andric #else 42*770cf0a5SDimitry Andric #define LLVM_HAS_BPF_TARGET 0 43*770cf0a5SDimitry Andric #endif 44*770cf0a5SDimitry Andric 45*770cf0a5SDimitry Andric /* Define if the CSKY target is built in */ 46*770cf0a5SDimitry Andric #define LLVM_HAS_CSKY_TARGET 0 47*770cf0a5SDimitry Andric 48*770cf0a5SDimitry Andric /* Define if the DirectX target is built in */ 49*770cf0a5SDimitry Andric #define LLVM_HAS_DIRECTX_TARGET 0 50*770cf0a5SDimitry Andric 51*770cf0a5SDimitry Andric /* Define if the Hexagon target is built in */ 52*770cf0a5SDimitry Andric #define LLVM_HAS_HEXAGON_TARGET 0 53*770cf0a5SDimitry Andric 54*770cf0a5SDimitry Andric /* Define if the Lanai target is built in */ 55*770cf0a5SDimitry Andric #define LLVM_HAS_LANAI_TARGET 0 56*770cf0a5SDimitry Andric 57*770cf0a5SDimitry Andric /* Define if the LoongArch target is built in */ 58*770cf0a5SDimitry Andric #define LLVM_HAS_LOONGARCH_TARGET 0 59*770cf0a5SDimitry Andric 60*770cf0a5SDimitry Andric /* Define if the M68k target is built in */ 61*770cf0a5SDimitry Andric #define LLVM_HAS_M68K_TARGET 0 62*770cf0a5SDimitry Andric 63*770cf0a5SDimitry Andric /* Define if the Mips target is built in */ 64*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_MIPS 65*770cf0a5SDimitry Andric #define LLVM_HAS_MIPS_TARGET 1 66*770cf0a5SDimitry Andric #else 67*770cf0a5SDimitry Andric #define LLVM_HAS_MIPS_TARGET 0 68*770cf0a5SDimitry Andric #endif 69*770cf0a5SDimitry Andric 70*770cf0a5SDimitry Andric /* Define if the MSP430 target is built in */ 71*770cf0a5SDimitry Andric #define LLVM_HAS_MSP430_TARGET 0 72*770cf0a5SDimitry Andric 73*770cf0a5SDimitry Andric /* Define if the NVPTX target is built in */ 74*770cf0a5SDimitry Andric #define LLVM_HAS_NVPTX_TARGET 0 75*770cf0a5SDimitry Andric 76*770cf0a5SDimitry Andric /* Define if the PowerPC target is built in */ 77*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_POWERPC 78*770cf0a5SDimitry Andric #define LLVM_HAS_POWERPC_TARGET 1 79*770cf0a5SDimitry Andric #else 80*770cf0a5SDimitry Andric #define LLVM_HAS_POWERPC_TARGET 0 81*770cf0a5SDimitry Andric #endif 82*770cf0a5SDimitry Andric 83*770cf0a5SDimitry Andric /* Define if the RISCV target is built in */ 84*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_RISCV 85*770cf0a5SDimitry Andric #define LLVM_HAS_RISCV_TARGET 1 86*770cf0a5SDimitry Andric #else 87*770cf0a5SDimitry Andric #define LLVM_HAS_RISCV_TARGET 0 88*770cf0a5SDimitry Andric #endif 89*770cf0a5SDimitry Andric 90*770cf0a5SDimitry Andric /* Define if the Sparc target is built in */ 91*770cf0a5SDimitry Andric #define LLVM_HAS_SPARC_TARGET 0 92*770cf0a5SDimitry Andric 93*770cf0a5SDimitry Andric /* Define if the SPIRV target is built in */ 94*770cf0a5SDimitry Andric #define LLVM_HAS_SPIRV_TARGET 0 95*770cf0a5SDimitry Andric 96*770cf0a5SDimitry Andric /* Define if the SystemZ target is built in */ 97*770cf0a5SDimitry Andric #define LLVM_HAS_SYSTEMZ_TARGET 0 98*770cf0a5SDimitry Andric 99*770cf0a5SDimitry Andric /* Define if the VE target is built in */ 100*770cf0a5SDimitry Andric #define LLVM_HAS_VE_TARGET 0 101*770cf0a5SDimitry Andric 102*770cf0a5SDimitry Andric /* Define if the WebAssembly target is built in */ 103*770cf0a5SDimitry Andric #define LLVM_HAS_WEBASSEMBLY_TARGET 0 104*770cf0a5SDimitry Andric 105*770cf0a5SDimitry Andric /* Define if the X86 target is built in */ 106*770cf0a5SDimitry Andric #ifdef LLVM_TARGET_ENABLE_X86 107*770cf0a5SDimitry Andric #define LLVM_HAS_X86_TARGET 1 108*770cf0a5SDimitry Andric #else 109*770cf0a5SDimitry Andric #define LLVM_HAS_X86_TARGET 0 110*770cf0a5SDimitry Andric #endif 111*770cf0a5SDimitry Andric 112*770cf0a5SDimitry Andric /* Define if the XCore target is built in */ 113*770cf0a5SDimitry Andric #define LLVM_HAS_XCORE_TARGET 0 114*770cf0a5SDimitry Andric 115*770cf0a5SDimitry Andric /* Define if the Xtensa target is built in */ 116*770cf0a5SDimitry Andric #define LLVM_HAS_XTENSA_TARGET 0 117*770cf0a5SDimitry Andric 118*770cf0a5SDimitry Andric #endif 119