1 //===--- TargetOptions.h ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// Defines the clang::TargetOptions class.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_BASIC_TARGETOPTIONS_H
16 #define LLVM_CLANG_BASIC_TARGETOPTIONS_H
18 #include "clang/Basic/OpenCLOptions.h"
19 #include "llvm/Support/VersionTuple.h"
20 #include "llvm/Target/TargetOptions.h"
26 /// Options for controlling the target.
29 /// The name of the target triple to compile for.
32 /// When compiling for the device side, contains the triple used to compile
34 std::string HostTriple;
36 /// If given, the name of the target CPU to generate code for.
39 /// If given, the unit to use for floating point math.
42 /// If given, the name of the target ABI to use.
45 /// The EABI version to use
46 llvm::EABI EABIVersion;
48 /// If given, the version string of the linker in use.
49 std::string LinkerVersion;
51 /// The list of target specific features to enable or disable, as written on the command line.
52 std::vector<std::string> FeaturesAsWritten;
54 /// The list of target specific features to enable or disable -- this should
55 /// be a list of strings starting with by '+' or '-'.
56 std::vector<std::string> Features;
58 /// Supported OpenCL extensions and optional core features.
59 OpenCLOptions SupportedOpenCLOptions;
61 /// The list of OpenCL extensions to enable or disable, as written on
63 std::vector<std::string> OpenCLExtensionsAsWritten;
65 /// If given, enables support for __int128_t and __uint128_t types.
66 bool ForceEnableInt128 = false;
68 /// \brief If enabled, use 32-bit pointers for accessing const/local/shared
70 bool NVPTXUseShortPointers = false;
72 // The code model to be used as specified by the user. Corresponds to
73 // CodeModel::Model enum defined in include/llvm/Support/CodeGen.h, plus
74 // "default" for the case when the user has not explicitly specified a
76 std::string CodeModel;
78 /// The version of the SDK which was used during the compilation.
79 llvm::VersionTuple SDKVersion;
82 } // end namespace clang