clang 20.0.0git
|
ToolChain - Access to tools for a single platform. More...
#include "clang/Driver/ToolChain.h"
Classes | |
struct | BitCodeLibraryInfo |
Public Types | |
enum | CXXStdlibType { CST_Libcxx , CST_Libstdcxx } |
enum | RuntimeLibType { RLT_CompilerRT , RLT_Libgcc } |
enum | UnwindLibType { UNW_None , UNW_CompilerRT , UNW_Libgcc } |
enum class | UnwindTableLevel { None , Synchronous , Asynchronous } |
enum | RTTIMode { RM_Enabled , RM_Disabled } |
enum | ExceptionsMode { EM_Enabled , EM_Disabled } |
enum | FileType { FT_Object , FT_Static , FT_Shared } |
using | path_list = SmallVector< std::string, 16 > |
Public Member Functions | |
virtual | ~ToolChain () |
const Driver & | getDriver () const |
llvm::vfs::FileSystem & | getVFS () const |
const llvm::Triple & | getTriple () const |
virtual const llvm::Triple * | getAuxTriple () const |
Get the toolchain's aux triple, if it has one. | |
virtual std::string | getInputFilename (const InputInfo &Input) const |
Some toolchains need to modify the file name, for example to replace the extension for object files with .cubin for OpenMP offloading to Nvidia GPUs. | |
llvm::Triple::ArchType | getArch () const |
StringRef | getArchName () const |
StringRef | getPlatform () const |
StringRef | getOS () const |
StringRef | getDefaultUniversalArchName () const |
Provide the default architecture name (as expected by -arch) for this toolchain. | |
std::string | getTripleString () const |
const llvm::Triple & | getEffectiveTriple () const |
Get the toolchain's effective clang triple. | |
bool | hasEffectiveTriple () const |
path_list & | getLibraryPaths () |
const path_list & | getLibraryPaths () const |
path_list & | getFilePaths () |
const path_list & | getFilePaths () const |
path_list & | getProgramPaths () |
const path_list & | getProgramPaths () const |
const MultilibSet & | getMultilibs () const |
const llvm::SmallVector< Multilib > & | getSelectedMultilibs () const |
Multilib::flags_list | getMultilibFlags (const llvm::opt::ArgList &) const |
Get flags suitable for multilib selection, based on the provided clang command line arguments. | |
SanitizerArgs | getSanitizerArgs (const llvm::opt::ArgList &JobArgs) const |
const XRayArgs & | getXRayArgs () const |
const llvm::opt::Arg * | getRTTIArg () const |
RTTIMode | getRTTIMode () const |
ExceptionsMode | getExceptionsMode () const |
virtual llvm::opt::DerivedArgList * | TranslateArgs (const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const |
TranslateArgs - Create a new derived argument list for any argument translations this ToolChain may wish to perform, or 0 if no tool chain specific translations are needed. | |
virtual llvm::opt::DerivedArgList * | TranslateOpenMPTargetArgs (const llvm::opt::DerivedArgList &Args, bool SameTripleAsHost, SmallVectorImpl< llvm::opt::Arg * > &AllocatedArgs) const |
TranslateOpenMPTargetArgs - Create a new derived argument list for that contains the OpenMP target specific flags passed via -Xopenmp-target -opt=val OR -Xopenmp-target=<triple> -opt=val. | |
virtual void | TranslateXarchArgs (const llvm::opt::DerivedArgList &Args, llvm::opt::Arg *&A, llvm::opt::DerivedArgList *DAL, SmallVectorImpl< llvm::opt::Arg * > *AllocatedArgs=nullptr) const |
Append the argument following A to DAL assuming A is an Xarch argument. | |
virtual llvm::opt::DerivedArgList * | TranslateXarchArgs (const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind, SmallVectorImpl< llvm::opt::Arg * > *AllocatedArgs) const |
Translate -Xarch_ arguments. | |
virtual Tool * | SelectTool (const JobAction &JA) const |
Choose a tool to use to handle the action JA . | |
std::string | GetFilePath (const char *Name) const |
std::string | GetProgramPath (const char *Name) const |
std::string | GetLinkerPath (bool *LinkerIsLLD=nullptr) const |
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name. | |
std::string | GetStaticLibToolPath () const |
Returns the linker path for emitting a static library. | |
virtual void | printVerboseInfo (raw_ostream &OS) const |
Dispatch to the specific toolchain for verbose printing. | |
virtual bool | isCrossCompiling () const |
Returns true if the toolchain is targeting a non-native architecture. | |
virtual bool | HasNativeLLVMSupport () const |
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support. | |
virtual types::ID | LookupTypeForExtension (StringRef Ext) const |
LookupTypeForExtension - Return the default language type to use for the given extension. | |
virtual bool | IsBlocksDefault () const |
IsBlocksDefault - Does this tool chain enable -fblocks by default. | |
virtual bool | IsIntegratedAssemblerDefault () const |
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default. | |
virtual bool | IsIntegratedBackendDefault () const |
IsIntegratedBackendDefault - Does this tool chain enable -fintegrated-objemitter by default. | |
virtual bool | IsIntegratedBackendSupported () const |
IsIntegratedBackendSupported - Does this tool chain support -fintegrated-objemitter. | |
virtual bool | IsNonIntegratedBackendSupported () const |
IsNonIntegratedBackendSupported - Does this tool chain support -fno-integrated-objemitter. | |
virtual bool | useIntegratedAs () const |
Check if the toolchain should use the integrated assembler. | |
virtual bool | useIntegratedBackend () const |
Check if the toolchain should use the integrated backend. | |
virtual bool | parseInlineAsmUsingAsmParser () const |
Check if the toolchain should use AsmParser to parse inlineAsm when integrated assembler is not default. | |
virtual bool | IsMathErrnoDefault () const |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default. | |
virtual bool | IsEncodeExtendedBlockSignatureDefault () const |
IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature by default. | |
virtual bool | IsObjCNonFragileABIDefault () const |
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default. | |
virtual bool | UseObjCMixedDispatch () const |
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used? | |
virtual bool | useRelaxRelocations () const |
Check whether to enable x86 relax relocations by default. | |
bool | defaultToIEEELongDouble () const |
Check whether use IEEE binary128 as long double format by default. | |
virtual LangOptions::StackProtectorMode | GetDefaultStackProtectorLevel (bool KernelOrKext) const |
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain. | |
virtual LangOptions::TrivialAutoVarInitKind | GetDefaultTrivialAutoVarInit () const |
Get the default trivial automatic variable initialization. | |
virtual const char * | getDefaultLinker () const |
GetDefaultLinker - Get the default linker to use. | |
virtual RuntimeLibType | GetDefaultRuntimeLibType () const |
GetDefaultRuntimeLibType - Get the default runtime library variant to use. | |
virtual CXXStdlibType | GetDefaultCXXStdlibType () const |
virtual UnwindLibType | GetDefaultUnwindLibType () const |
virtual std::string | getCompilerRTPath () const |
virtual std::string | getCompilerRT (const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const |
const char * | getCompilerRTArgString (const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const |
std::string | getCompilerRTBasename (const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const |
std::optional< std::string > | getRuntimePath () const |
std::optional< std::string > | getStdlibPath () const |
std::optional< std::string > | getStdlibIncludePath () const |
virtual path_list | getArchSpecificLibPaths () const |
virtual StringRef | getOSLibName () const |
virtual UnwindTableLevel | getDefaultUnwindTableLevel (const llvm::opt::ArgList &Args) const |
How detailed should the unwind tables be by default. | |
virtual bool | IsAArch64OutlineAtomicsDefault (const llvm::opt::ArgList &Args) const |
Test whether this toolchain supports outline atomics by default. | |
virtual bool | isPICDefault () const =0 |
Test whether this toolchain defaults to PIC. | |
virtual bool | isPIEDefault (const llvm::opt::ArgList &Args) const =0 |
Test whether this toolchain defaults to PIE. | |
virtual bool | isPICDefaultForced () const =0 |
Tests whether this toolchain forces its default for PIC, PIE or non-PIC. | |
virtual bool | SupportsProfiling () const |
SupportsProfiling - Does this tool chain support -pg. | |
virtual void | CheckObjCARC () const |
Complain if this tool chain doesn't support Objective-C ARC. | |
virtual llvm::codegenoptions::DebugInfoFormat | getDefaultDebugFormat () const |
Get the default debug info format. Typically, this is DWARF. | |
virtual bool | UseDwarfDebugFlags () const |
UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information. | |
virtual std::string | GetGlobalDebugPathRemapping () const |
Add an additional -fdebug-prefix-map entry. | |
virtual unsigned | GetDefaultDwarfVersion () const |
virtual unsigned | getMaxDwarfVersion () const |
virtual bool | GetDefaultStandaloneDebug () const |
virtual llvm::DebuggerKind | getDefaultDebuggerTuning () const |
virtual bool | supportsDebugInfoOption (const llvm::opt::Arg *) const |
Does this toolchain supports given debug info option or not. | |
virtual void | adjustDebugInfoKind (llvm::codegenoptions::DebugInfoKind &DebugInfoKind, const llvm::opt::ArgList &Args) const |
Adjust debug information kind considering all passed options. | |
virtual llvm::ExceptionHandling | GetExceptionModel (const llvm::opt::ArgList &Args) const |
GetExceptionModel - Return the tool chain exception model. | |
virtual bool | SupportsEmbeddedBitcode () const |
SupportsEmbeddedBitcode - Does this tool chain support embedded bitcode. | |
virtual std::string | getThreadModel () const |
getThreadModel() - Which thread model does this target use? | |
virtual bool | isThreadModelSupported (const StringRef Model) const |
isThreadModelSupported() - Does this target support a thread model? | |
virtual bool | isBareMetal () const |
isBareMetal - Is this a bare metal target. | |
virtual std::string | getMultiarchTriple (const Driver &D, const llvm::Triple &TargetTriple, StringRef SysRoot) const |
virtual std::string | ComputeLLVMTriple (const llvm::opt::ArgList &Args, types::ID InputType=types::TY_INVALID) const |
ComputeLLVMTriple - Return the LLVM target triple to use, after taking command line arguments into account. | |
virtual std::string | ComputeEffectiveClangTriple (const llvm::opt::ArgList &Args, types::ID InputType=types::TY_INVALID) const |
ComputeEffectiveClangTriple - Return the Clang triple to use for this target, which may take into account the command line arguments. | |
virtual ObjCRuntime | getDefaultObjCRuntime (bool isNonFragile) const |
getDefaultObjCRuntime - Return the default Objective-C runtime for this platform. | |
virtual bool | hasBlocksRuntime () const |
hasBlocksRuntime - Given that the user is compiling with -fblocks, does this tool chain guarantee the existence of a blocks runtime? | |
virtual std::string | computeSysRoot () const |
Return the sysroot, possibly searching for a default sysroot using target-specific logic. | |
virtual void | AddClangSystemIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add the clang cc1 arguments for system include paths. | |
virtual void | addClangTargetOptions (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadKind) const |
Add options that need to be passed to cc1 for this target. | |
virtual void | addClangCC1ASTargetOptions (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CC1ASArgs) const |
Add options that need to be passed to cc1as for this target. | |
virtual void | addClangWarningOptions (llvm::opt::ArgStringList &CC1Args) const |
Add warning options that need to be passed to cc1 for this target. | |
virtual RuntimeLibType | GetRuntimeLibType (const llvm::opt::ArgList &Args) const |
virtual CXXStdlibType | GetCXXStdlibType (const llvm::opt::ArgList &Args) const |
virtual UnwindLibType | GetUnwindLibType (const llvm::opt::ArgList &Args) const |
virtual std::string | detectLibcxxVersion (StringRef IncludePath) const |
virtual void | AddClangCXXStdlibIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for the given C++ standard library type. | |
void | AddClangCXXStdlibIsystemArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
AddClangCXXStdlibIsystemArgs - Add the clang -cc1 level arguments to set the specified include paths for the C++ standard library. | |
bool | ShouldLinkCXXStdlib (const llvm::opt::ArgList &Args) const |
Returns if the C++ standard library should be linked in. | |
virtual void | AddCXXStdlibLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard library type. | |
void | AddFilePathLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
AddFilePathLibArgs - Add each thing in getFilePaths() as a "-L" option. | |
virtual void | AddCCKextLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
AddCCKextLibArgs - Add the system specific linker arguments to use for kernel extensions (Darwin-specific). | |
virtual bool | isFastMathRuntimeAvailable (const llvm::opt::ArgList &Args, std::string &Path) const |
If a runtime library exists that sets global flags for unsafe floating point math, return true. | |
bool | addFastMathRuntimeIfAvailable (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
AddFastMathRuntimeIfAvailable - If a runtime library exists that sets global flags for unsafe floating point math, add it and return true. | |
virtual Expected< SmallVector< std::string > > | getSystemGPUArchs (const llvm::opt::ArgList &Args) const |
getSystemGPUArchs - Use a tool to detect the user's availible GPUs. | |
virtual void | addProfileRTLibs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime library to the linker. | |
virtual void | AddCudaIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add arguments to use system-specific CUDA includes. | |
virtual void | AddHIPIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add arguments to use system-specific HIP includes. | |
virtual void | AddIAMCUIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add arguments to use MCU GCC toolchain includes. | |
virtual VersionTuple | computeMSVCVersion (const Driver *D, const llvm::opt::ArgList &Args) const |
On Windows, returns the MSVC compatibility version. | |
virtual llvm::SmallVector< BitCodeLibraryInfo, 12 > | getDeviceLibs (const llvm::opt::ArgList &Args) const |
Get paths for device libraries. | |
virtual void | AddHIPRuntimeLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
Add the system specific linker arguments to use for the given HIP runtime library type. | |
virtual SanitizerMask | getSupportedSanitizers () const |
Return sanitizers which are available in this toolchain. | |
virtual SanitizerMask | getDefaultSanitizers () const |
Return sanitizers which are enabled by default. | |
virtual bool | canSplitThinLTOUnit () const |
Returns true when it's possible to split LTO unit to use whole program devirtualization and CFI santiizers. | |
virtual llvm::DenormalMode | getDefaultDenormalModeForType (const llvm::opt::ArgList &DriverArgs, const JobAction &JA, const llvm::fltSemantics *FPType=nullptr) const |
Returns the output denormal handling type in the default floating point environment for the given FPType if given. | |
Static Public Member Functions | |
static ParsedClangName | getTargetAndModeFromProgramName (StringRef ProgName) |
Return any implicit target and/or mode flag for an invocation of the compiler driver as ProgName . | |
static bool | needsProfileRT (const llvm::opt::ArgList &Args) |
needsProfileRT - returns true if instrumentation profile is on. | |
static bool | needsGCovInstrumentation (const llvm::opt::ArgList &Args) |
Returns true if gcov instrumentation (-fprofile-arcs or –coverage) is on. | |
static llvm::Triple | getOpenMPTriple (StringRef TripleStr) |
Protected Member Functions | |
ToolChain (const Driver &D, const llvm::Triple &T, const llvm::opt::ArgList &Args) | |
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > | executeToolChainProgram (StringRef Executable) const |
Executes the given Executable and returns the stdout. | |
void | setTripleEnvironment (llvm::Triple::EnvironmentType Env) |
virtual Tool * | buildAssembler () const |
virtual Tool * | buildLinker () const |
virtual Tool * | buildStaticLibTool () const |
virtual Tool * | getTool (Action::ActionClass AC) const |
virtual std::string | buildCompilerRTBasename (const llvm::opt::ArgList &Args, StringRef Component, FileType Type, bool AddArch) const |
std::optional< std::string > | getTargetSubDirPath (StringRef BaseDir) const |
Find the target-specific subdirectory for the current target triple under BaseDir , doing fallback triple searches as necessary. | |
Static Protected Member Functions | |
Utilities for implementing subclasses. | |
static void | addSystemInclude (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
Utility function to add a system include directory to CC1 arguments. | |
static void | addExternCSystemInclude (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
Utility function to add a system include directory with extern "C" semantics to CC1 arguments. | |
static void | addExternCSystemIncludeIfExists (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
static void | addSystemIncludes (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, ArrayRef< StringRef > Paths) |
Utility function to add a list of system include directories to CC1. | |
static std::string | concat (StringRef Path, const Twine &A, const Twine &B="", const Twine &C="", const Twine &D="") |
Protected Attributes | |
MultilibSet | Multilibs |
llvm::SmallVector< Multilib > | SelectedMultilibs |
Friends | |
class | RegisterEffectiveTriple |
ToolChain - Access to tools for a single platform.
Definition at line 92 of file ToolChain.h.
using clang::driver::ToolChain::path_list = SmallVector<std::string, 16> |
Definition at line 94 of file ToolChain.h.
Enumerator | |
---|---|
CST_Libcxx | |
CST_Libstdcxx |
Definition at line 96 of file ToolChain.h.
Enumerator | |
---|---|
EM_Enabled | |
EM_Disabled |
Definition at line 123 of file ToolChain.h.
Enumerator | |
---|---|
FT_Object | |
FT_Static | |
FT_Shared |
Definition at line 135 of file ToolChain.h.
Enumerator | |
---|---|
RM_Enabled | |
RM_Disabled |
Definition at line 118 of file ToolChain.h.
Enumerator | |
---|---|
RLT_CompilerRT | |
RLT_Libgcc |
Definition at line 101 of file ToolChain.h.
Enumerator | |
---|---|
UNW_None | |
UNW_CompilerRT | |
UNW_Libgcc |
Definition at line 106 of file ToolChain.h.
|
strong |
Enumerator | |
---|---|
None | |
Synchronous | |
Asynchronous |
Definition at line 112 of file ToolChain.h.
|
protected |
Definition at line 89 of file ToolChain.cpp.
References getArchSpecificLibPaths(), getFilePaths(), getLibraryPaths(), getRuntimePath(), getStdlibPath(), getVFS(), and Path.
|
virtualdefault |
|
virtual |
AddCCKextLibArgs - Add the system specific linker arguments to use for kernel extensions (Darwin-specific).
Reimplemented in clang::driver::toolchains::DarwinClang.
Definition at line 1324 of file ToolChain.cpp.
|
virtual |
Add options that need to be passed to cc1as for this target.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 1089 of file ToolChain.cpp.
Referenced by clang::driver::tools::ClangAs::ConstructJob().
|
virtual |
AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for the given C++ standard library type.
Reimplemented in clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::AIX, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Definition at line 1260 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::CudaToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::HIPAMDToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::HIPSPVToolChain::AddClangCXXStdlibIncludeArgs(), and clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs().
void ToolChain::AddClangCXXStdlibIsystemArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const |
AddClangCXXStdlibIsystemArgs - Add the clang -cc1 level arguments to set the specified include paths for the C++ standard library.
Definition at line 1274 of file ToolChain.cpp.
References addSystemInclude(), and P.
|
virtual |
Add the clang cc1 arguments for system include paths.
This routine is responsible for adding the necessary cc1 arguments to include headers from standard system header directories.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::AVRToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::CSKYToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::DragonFly, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Haiku, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::Hurd, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NaClToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PPCFreeBSDToolChain, clang::driver::toolchains::PPCLinuxToolChain, clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::RISCVToolChain, clang::driver::toolchains::Solaris, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Definition at line 1080 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::AMDGPUOpenMPToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::CudaToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::HIPAMDToolChain::AddClangSystemIncludeArgs(), and clang::driver::toolchains::HIPSPVToolChain::AddClangSystemIncludeArgs().
|
virtual |
Add options that need to be passed to cc1 for this target.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::ZOS, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::ROCMToolChain, clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::AVRToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::Darwin, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_ELF, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, clang::driver::toolchains::CSKYToolChain, clang::driver::toolchains::MSP430ToolChain, and clang::driver::toolchains::RISCVToolChain.
Definition at line 1085 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::AMDGPUOpenMPToolChain::addClangTargetOptions(), clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), clang::driver::toolchains::HIPAMDToolChain::addClangTargetOptions(), clang::driver::toolchains::HIPSPVToolChain::addClangTargetOptions(), and clang::driver::tools::Clang::ConstructJob().
|
virtual |
Add warning options that need to be passed to cc1 for this target.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::HIPAMDToolChain, and clang::driver::toolchains::HIPSPVToolChain.
Definition at line 1092 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::AMDGPUOpenMPToolChain::addClangWarningOptions(), clang::driver::toolchains::CudaToolChain::addClangWarningOptions(), clang::driver::toolchains::HIPAMDToolChain::addClangWarningOptions(), clang::driver::toolchains::HIPSPVToolChain::addClangWarningOptions(), and clang::driver::tools::Clang::ConstructJob().
|
virtual |
Add arguments to use system-specific CUDA includes.
Reimplemented in clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::Darwin, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, and clang::driver::toolchains::MSVCToolChain.
Definition at line 1407 of file ToolChain.cpp.
|
virtual |
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard library type.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::NaClToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Definition at line 1298 of file ToolChain.cpp.
References CST_Libcxx, CST_Libstdcxx, and GetCXXStdlibType().
Referenced by clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), and clang::driver::tools::zos::Linker::ConstructJob().
|
staticprotected |
Utility function to add a system include directory with extern "C" semantics to CC1 arguments.
Note that this should be used rarely, and only for directories that historically and for legacy reasons are treated as having implicit extern "C" semantics. These semantics are ignored by and large today, but its important to preserve the preprocessor changes resulting from the classification.
Definition at line 1205 of file ToolChain.cpp.
References Path.
Referenced by clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangSystemIncludeArgs(), clang::driver::toolchains::DragonFly::AddClangSystemIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::Haiku::AddClangSystemIncludeArgs(), clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::OHOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::OpenBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), and addExternCSystemIncludeIfExists().
|
staticprotected |
Definition at line 1212 of file ToolChain.cpp.
References addExternCSystemInclude(), and Path.
Referenced by clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), and clang::driver::toolchains::Generic_GCC::AddMultilibIncludeArgs().
bool ToolChain::addFastMathRuntimeIfAvailable | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const |
AddFastMathRuntimeIfAvailable - If a runtime library exists that sets global flags for unsafe floating point math, add it and return true.
This checks for presence of the -Ofast, -ffast-math or -funsafe-math flags.
Definition at line 1365 of file ToolChain.cpp.
References isFastMathRuntimeAvailable(), and Path.
Referenced by clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), and clang::driver::tools::solaris::Linker::ConstructJob().
void ToolChain::AddFilePathLibArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const |
AddFilePathLibArgs - Add each thing in getFilePaths() as a "-L" option.
Definition at line 1317 of file ToolChain.cpp.
References getFilePaths().
Referenced by clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::msp430::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), and clang::driver::tools::zos::Linker::ConstructJob().
|
virtual |
Add arguments to use system-specific HIP includes.
Reimplemented in clang::driver::toolchains::Darwin, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, and clang::driver::toolchains::MSVCToolChain.
Definition at line 1410 of file ToolChain.cpp.
|
inlinevirtual |
Add the system specific linker arguments to use for the given HIP runtime library type.
Reimplemented in clang::driver::toolchains::Linux, and clang::driver::toolchains::MSVCToolChain.
Definition at line 779 of file ToolChain.h.
Referenced by clang::driver::tools::addHIPRuntimeLibArgs().
|
virtual |
Add arguments to use MCU GCC toolchain includes.
Reimplemented in clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, and clang::driver::toolchains::Linux.
Definition at line 1418 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::AMDGPUOpenMPToolChain::AddIAMCUIncludeArgs(), clang::driver::toolchains::CudaToolChain::AddIAMCUIncludeArgs(), clang::driver::toolchains::HIPAMDToolChain::AddIAMCUIncludeArgs(), and clang::driver::toolchains::HIPSPVToolChain::AddIAMCUIncludeArgs().
|
virtual |
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime library to the linker.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::MachO, clang::driver::toolchains::Darwin, clang::driver::toolchains::Linux, and clang::driver::toolchains::OHOS.
Definition at line 1094 of file ToolChain.cpp.
References getCompilerRTArgString(), needsGCovInstrumentation(), and needsProfileRT().
Referenced by clang::driver::toolchains::AIX::addProfileRTLibs(), clang::driver::toolchains::Linux::addProfileRTLibs(), clang::driver::toolchains::OHOS::addProfileRTLibs(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), and clang::driver::tools::solaris::Linker::ConstructJob().
|
staticprotected |
Utility function to add a system include directory to CC1 arguments.
Definition at line 1190 of file ToolChain.cpp.
References Path.
Referenced by clang::driver::toolchains::AIX::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::OHOS::AddClangCXXStdlibIncludeArgs(), AddClangCXXStdlibIsystemArgs(), clang::driver::toolchains::AIX::AddClangSystemIncludeArgs(), clang::driver::toolchains::AVRToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::BareMetal::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::CSKYToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangSystemIncludeArgs(), clang::driver::toolchains::DragonFly::AddClangSystemIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::Haiku::AddClangSystemIncludeArgs(), clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSP430ToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::OHOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::OpenBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::PPCFreeBSDToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::PPCLinuxToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::RISCVToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::VEToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::ZOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths(), clang::driver::toolchains::FreeBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Haiku::addLibCxxIncludePaths(), clang::driver::toolchains::MipsLLVMToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::toolchains::OpenBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Generic_GCC::addLibStdCXXIncludePaths(), clang::driver::toolchains::Generic_GCC::AddMultilibIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddSystemIncludeWithSubfolder(), and clang::driver::toolchains::ZOS::TryAddIncludeFromPath().
|
staticprotected |
Utility function to add a list of system include directories to CC1.
Definition at line 1220 of file ToolChain.cpp.
References Path.
Referenced by clang::driver::toolchains::VEToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::XCoreToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::VEToolChain::AddClangSystemIncludeArgs(), and clang::driver::toolchains::XCoreToolChain::AddClangSystemIncludeArgs().
|
inlinevirtual |
Adjust debug information kind considering all passed options.
Reimplemented in clang::driver::toolchains::NVPTXToolChain, and clang::driver::toolchains::HIPSPVToolChain.
Definition at line 611 of file ToolChain.h.
Referenced by renderDebugOptions().
|
protectedvirtual |
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::DragonFly, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::Hurd, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NaClToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PS4CPU, clang::driver::toolchains::PS5CPU, clang::driver::toolchains::Solaris, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Definition at line 482 of file ToolChain.cpp.
|
protectedvirtual |
Definition at line 653 of file ToolChain.cpp.
References Env, FT_Object, FT_Shared, FT_Static, getArchNameForCompilerRTLib(), and getTriple().
Referenced by getCompilerRT(), and clang::driver::toolchains::OpenBSD::getCompilerRT().
|
protectedvirtual |
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::AVRToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::CSKYToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::DragonFly, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::Haiku, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::Hurd, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NaClToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PS4CPU, clang::driver::toolchains::PS5CPU, clang::driver::toolchains::RISCVToolChain, clang::driver::toolchains::Solaris, clang::driver::toolchains::SPIRVToolChain, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Definition at line 486 of file ToolChain.cpp.
|
protectedvirtual |
Reimplemented in clang::driver::toolchains::BareMetal, clang::driver::toolchains::MachO, clang::driver::toolchains::Fuchsia, and clang::driver::toolchains::Linux.
Definition at line 490 of file ToolChain.cpp.
|
inlinevirtual |
Returns true when it's possible to split LTO unit to use whole program devirtualization and CFI santiizers.
Reimplemented in clang::driver::toolchains::MachO, and clang::driver::toolchains::PS4CPU.
Definition at line 792 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
inlinevirtual |
Complain if this tool chain doesn't support Objective-C ARC.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 570 of file ToolChain.h.
Referenced by RenderObjCOptions().
|
virtual |
ComputeEffectiveClangTriple - Return the Clang triple to use for this target, which may take into account the command line arguments.
For example, on Darwin the -mmacos-version-min= command line argument (which sets the deployment target) determines the version in the triple passed to Clang.
Reimplemented in clang::driver::toolchains::Darwin, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::MSVCToolChain, and clang::driver::toolchains::NaClToolChain.
Definition at line 1071 of file ToolChain.cpp.
References ComputeLLVMTriple().
Referenced by clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), getMultilibFlags(), and clang::driver::Driver::HandleImmediateArgs().
|
virtual |
ComputeLLVMTriple - Return the LLVM target triple to use, after taking command line arguments into account.
Definition at line 1022 of file ToolChain.cpp.
References getArch(), getDriver(), getTriple(), getTripleString(), clang::driver::tools::arm::setArchNameInTriple(), clang::driver::tools::arm::setFloatABIInTriple(), and clang::driver::tools::aarch64::setPAuthABIInTriple().
Referenced by clang::driver::toolchains::Darwin::ComputeEffectiveClangTriple(), clang::driver::toolchains::Fuchsia::ComputeEffectiveClangTriple(), clang::driver::toolchains::NaClToolChain::ComputeEffectiveClangTriple(), ComputeEffectiveClangTriple(), and clang::driver::toolchains::Darwin::GetExceptionModel().
|
virtual |
On Windows, returns the MSVC compatibility version.
Reimplemented in clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, and clang::driver::toolchains::MSVCToolChain.
Definition at line 1435 of file ToolChain.cpp.
References D, and separateMSVCFullVersion().
Referenced by addVSDefines(), clang::driver::toolchains::AMDGPUOpenMPToolChain::computeMSVCVersion(), clang::driver::toolchains::CudaToolChain::computeMSVCVersion(), clang::driver::toolchains::HIPAMDToolChain::computeMSVCVersion(), clang::driver::toolchains::HIPSPVToolChain::computeMSVCVersion(), clang::driver::toolchains::MSVCToolChain::computeMSVCVersion(), and clang::driver::tools::Clang::ConstructJob().
|
virtual |
Return the sysroot, possibly searching for a default sysroot using target-specific logic.
Reimplemented in clang::driver::toolchains::BareMetal, clang::driver::toolchains::Linux, clang::driver::toolchains::MipsLLVMToolChain, and clang::driver::toolchains::OHOS.
Definition at line 1076 of file ToolChain.cpp.
References clang::driver::Driver::SysRoot.
Referenced by clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths(), and clang::driver::toolchains::Hurd::Hurd().
|
staticprotected |
Definition at line 1229 of file ToolChain.cpp.
References clang::C, D, Path, and clang::Result.
Referenced by clang::driver::toolchains::DragonFly::AddClangSystemIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::Haiku::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::OpenBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::FreeBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Haiku::addLibCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::toolchains::OpenBSD::addLibCxxIncludePaths(), clang::driver::toolchains::DragonFly::addLibStdCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibStdCxxIncludePaths(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Linux::getMultiarchTriple(), clang::driver::toolchains::Haiku::Haiku(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::NetBSD::NetBSD(), and clang::driver::toolchains::OpenBSD::OpenBSD().
bool ToolChain::defaultToIEEELongDouble | ( | ) | const |
Check whether use IEEE binary128 as long double format by default.
Definition at line 193 of file ToolChain.cpp.
References getTriple().
|
virtual |
Definition at line 1237 of file ToolChain.cpp.
References getVFS(), and Path.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), and clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths().
|
protected |
Executes the given Executable
and returns the stdout.
Definition at line 108 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::AMDGPUToolChain::getSystemGPUArchs().
|
inline |
Definition at line 268 of file ToolChain.h.
Referenced by clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::OHOS::addExtraOpts(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::NaClToolChain::buildAssembler(), clang::driver::toolchains::HIPAMDToolChain::buildLinker(), clang::driver::toolchains::HIPSPVToolChain::buildLinker(), ComputeLLVMTriple(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::dragonfly::Assembler::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Assembler::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Assembler::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Assembler::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), getArchNameForCompilerRTLib(), getArchSpecificLibPaths(), clang::driver::toolchains::NetBSD::GetDefaultCXXStdlibType(), clang::driver::toolchains::Fuchsia::getDefaultSanitizers(), clang::driver::toolchains::CrossWindowsToolChain::getDefaultUnwindTableLevel(), clang::driver::toolchains::MachO::getDefaultUnwindTableLevel(), clang::driver::toolchains::Generic_GCC::getDefaultUnwindTableLevel(), clang::driver::toolchains::MSVCToolChain::getDefaultUnwindTableLevel(), clang::driver::toolchains::OpenBSD::getDefaultUnwindTableLevel(), clang::driver::toolchains::HIPAMDToolChain::getDeviceLibs(), clang::driver::toolchains::Hurd::getDynamicLinker(), clang::driver::toolchains::Linux::getDynamicLinker(), clang::driver::toolchains::OHOS::getDynamicLinker(), clang::driver::toolchains::Darwin::GetExceptionModel(), clang::driver::toolchains::MachO::getMachOArchName(), clang::driver::Driver::getOffloadArchs(), clang::driver::toolchains::MSVCToolChain::getSubDirectoryPath(), clang::driver::toolchains::Linux::getSupportedSanitizers(), getTargetSubDirPath(), clang::driver::toolchains::MSVCToolChain::getUniversalCRTLibraryPath(), clang::driver::toolchains::MSVCToolChain::getWindowsSDKLibraryPath(), isCrossCompiling(), clang::driver::toolchains::Generic_GCC::IsIntegratedAssemblerDefault(), clang::driver::toolchains::CrossWindowsToolChain::isPICDefault(), clang::driver::toolchains::Generic_GCC::isPICDefault(), clang::driver::toolchains::MSVCToolChain::isPICDefault(), clang::driver::toolchains::CrossWindowsToolChain::isPICDefaultForced(), clang::driver::toolchains::MachO::isPICDefaultForced(), clang::driver::toolchains::Generic_GCC::isPICDefaultForced(), clang::driver::toolchains::MSVCToolChain::isPICDefaultForced(), clang::driver::toolchains::CrossWindowsToolChain::isPIEDefault(), RenderFloatingPointOptions(), RenderObjCOptions(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), clang::driver::toolchains::AMDGPUOpenMPToolChain::TranslateArgs(), clang::driver::toolchains::CudaToolChain::TranslateArgs(), clang::driver::toolchains::MSVCToolChain::TranslateArgs(), and clang::driver::toolchains::MSVCToolChain::useUniversalCRT().
|
inline |
|
virtual |
Reimplemented in clang::driver::toolchains::OHOS.
Definition at line 834 of file ToolChain.cpp.
References getArch(), getDriver(), getOSLibName(), getTriple(), and Path.
Referenced by ToolChain(), and clang::driver::toolchains::VEToolChain::VEToolChain().
|
inlinevirtual |
Get the toolchain's aux triple, if it has one.
Exactly what the aux triple represents depends on the toolchain, but for example when compiling CUDA code for the GPU, the triple might be NVPTX, while the aux triple is the host (CPU) toolchain, e.g. x86-linux-gnu.
Reimplemented in clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::HIPAMDToolChain, and clang::driver::toolchains::HIPSPVToolChain.
Definition at line 261 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
virtual |
Reimplemented in clang::driver::toolchains::AVRToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::Darwin, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::OHOS, and clang::driver::toolchains::OpenBSD.
Definition at line 687 of file ToolChain.cpp.
References buildCompilerRTBasename(), getCompilerRTPath(), getLibraryPaths(), getTriple(), getVFS(), P, and Path.
Referenced by addSanitizerDynamicList(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::toolchains::OpenBSD::getCompilerRT(), getCompilerRTArgString(), getCompilerRTBasename(), and clang::driver::Driver::HandleImmediateArgs().
const char * ToolChain::getCompilerRTArgString | ( | const llvm::opt::ArgList & | Args, |
StringRef | Component, | ||
FileType | Type = ToolChain::FT_Static |
||
) | const |
Definition at line 718 of file ToolChain.cpp.
References getCompilerRT().
Referenced by clang::driver::toolchains::BareMetal::AddLinkRuntimeLib(), addProfileRTLibs(), addSanitizerRuntime(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), and clang::driver::tools::RISCV::Linker::ConstructJob().
std::string ToolChain::getCompilerRTBasename | ( | const llvm::opt::ArgList & | Args, |
StringRef | Component, | ||
FileType | Type = ToolChain::FT_Static |
||
) | const |
Definition at line 646 of file ToolChain.cpp.
References getCompilerRT().
Referenced by clang::driver::SanitizerArgs::addArgs(), addPGOAndCoverageFlags(), and processVSRuntimeLibrary().
|
virtual |
Reimplemented in clang::driver::toolchains::HexagonToolChain.
Definition at line 631 of file ToolChain.cpp.
References getDriver(), getOSLibName(), isBareMetal(), Path, and SelectedMultilibs.
Referenced by clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::toolchains::AVRToolChain::getCompilerRT(), getCompilerRT(), clang::driver::Driver::GetFilePath(), and clang::driver::Driver::HandleImmediateArgs().
|
virtual |
Reimplemented in clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::NaClToolChain, clang::driver::toolchains::OHOS, and clang::driver::toolchains::VEToolChain.
Definition at line 1164 of file ToolChain.cpp.
References CST_Libcxx, CST_Libstdcxx, clang::driver::Driver::Diag(), GetDefaultCXXStdlibType(), and getDriver().
Referenced by clang::driver::toolchains::AIX::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Generic_GCC::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::ZOS::AddClangCXXStdlibIncludeArgs(), AddCXXStdlibLibArgs(), clang::driver::toolchains::AIX::AddCXXStdlibLibArgs(), clang::driver::toolchains::BareMetal::AddCXXStdlibLibArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddCXXStdlibLibArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), clang::driver::toolchains::ZOS::AddCXXStdlibLibArgs(), clang::driver::toolchains::AMDGPUOpenMPToolChain::GetCXXStdlibType(), clang::driver::toolchains::CudaToolChain::GetCXXStdlibType(), clang::driver::toolchains::HIPAMDToolChain::GetCXXStdlibType(), clang::driver::toolchains::HIPSPVToolChain::GetCXXStdlibType(), clang::driver::Driver::GetStdModuleManifestPath(), and RenderObjCOptions().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::BareMetal, clang::driver::toolchains::Darwin, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Linux, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::ZOS.
Definition at line 500 of file ToolChain.h.
References CST_Libstdcxx.
Referenced by GetCXXStdlibType().
|
inlinevirtual |
Get the default debug info format. Typically, this is DWARF.
Reimplemented in clang::driver::toolchains::MSVCToolChain.
Definition at line 573 of file ToolChain.h.
Referenced by renderDebugOptions().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::MSVCToolChain, and clang::driver::toolchains::PS4PS5Base.
Definition at line 600 of file ToolChain.h.
Referenced by renderDebugOptions().
|
inlinevirtual |
Returns the output denormal handling type in the default floating point environment for the given FPType
if given.
Otherwise, the default assumed mode for any floating point type.
Reimplemented in clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::AMDGPUToolChain, and clang::driver::toolchains::CudaToolChain.
Definition at line 797 of file ToolChain.h.
Referenced by RenderFloatingPointOptions().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::DarwinClang, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Haiku, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HLSLToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PS4CPU, clang::driver::toolchains::PS5CPU, and clang::driver::toolchains::ZOS.
Definition at line 586 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::GetDefaultDwarfVersion(), and clang::driver::tools::getDwarfVersion().
|
inlinevirtual |
GetDefaultLinker - Get the default linker to use.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Haiku, clang::driver::toolchains::HexagonToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::Solaris, clang::driver::toolchains::VEToolChain, and clang::driver::toolchains::ZOS.
Definition at line 493 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::getDefaultLinker(), GetLinkerPath(), clang::driver::tools::solaris::Linker::getLinkerPath(), and clang::driver::tools::wasm::Linker::getLinkerPath().
|
virtual |
getDefaultObjCRuntime - Return the default Objective-C runtime for this platform.
FIXME: this really belongs on some sort of DeploymentTarget abstraction
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 999 of file ToolChain.cpp.
References clang::ObjCRuntime::GCC, and clang::ObjCRuntime::GNUstep.
|
inlinevirtual |
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CSKYToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Linux, clang::driver::toolchains::MipsLLVMToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::RISCVToolChain, clang::driver::toolchains::VEToolChain, and clang::driver::toolchains::ZOS.
Definition at line 496 of file ToolChain.h.
References RLT_Libgcc.
Referenced by clang::driver::toolchains::Linux::GetDefaultRuntimeLibType(), and GetRuntimeLibType().
|
inlinevirtual |
Return sanitizers which are enabled by default.
Reimplemented in clang::driver::toolchains::Fuchsia.
Definition at line 786 of file ToolChain.h.
Referenced by clang::driver::SanitizerArgs::SanitizerArgs().
|
inlinevirtual |
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::Darwin, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::PS4PS5Base.
Definition at line 482 of file ToolChain.h.
References clang::LangOptionsBase::SSPOff.
Referenced by RenderSSPOptions().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::DarwinClang, clang::driver::toolchains::FreeBSD, and clang::driver::toolchains::Haiku.
Definition at line 597 of file ToolChain.h.
Referenced by renderDebugOptions().
|
inlinevirtual |
Get the default trivial automatic variable initialization.
Definition at line 488 of file ToolChain.h.
References clang::LangOptionsBase::Uninitialized.
Referenced by RenderTrivialAutoVarInitOptions().
StringRef ToolChain::getDefaultUniversalArchName | ( | ) | const |
Provide the default architecture name (as expected by -arch) for this toolchain.
Definition at line 436 of file ToolChain.cpp.
References getTriple().
Referenced by clang::driver::Driver::BuildUniversalActions(), and clang::driver::toolchains::MachO::getMachOArchName().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::OHOS.
Definition at line 504 of file ToolChain.h.
References UNW_None.
Referenced by GetUnwindLibType().
|
virtual |
How detailed should the unwind tables be by default.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::RISCVToolChain.
Definition at line 466 of file ToolChain.cpp.
References None.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
virtual |
Get paths for device libraries.
Reimplemented in clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::HIPAMDToolChain, and clang::driver::toolchains::HIPSPVToolChain.
Definition at line 1414 of file ToolChain.cpp.
|
inline |
Definition at line 252 of file ToolChain.h.
References D.
Referenced by clang::driver::SanitizerArgs::addArgs(), clang::driver::XRayArgs::addArgs(), clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::OHOS::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::ZOS::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::AIX::AddClangSystemIncludeArgs(), clang::driver::toolchains::BareMetal::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangSystemIncludeArgs(), clang::driver::toolchains::DragonFly::AddClangSystemIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::Haiku::AddClangSystemIncludeArgs(), clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::OHOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::OpenBSD::AddClangSystemIncludeArgs(), clang::driver::toolchains::PPCFreeBSDToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::PPCLinuxToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::RISCVToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::VEToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::ZOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::AIX::addClangTargetOptions(), clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), clang::driver::toolchains::AMDGPUOpenMPToolChain::addClangTargetOptions(), clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), clang::driver::toolchains::HexagonToolChain::AddCXXStdlibLibArgs(), clang::driver::toolchains::HIPSPVToolChain::AddHIPIncludeArgs(), clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths(), clang::driver::toolchains::FreeBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Haiku::addLibCxxIncludePaths(), clang::driver::toolchains::HexagonToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::MipsLLVMToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::toolchains::OpenBSD::addLibCxxIncludePaths(), clang::driver::toolchains::DragonFly::addLibStdCxxIncludePaths(), clang::driver::toolchains::HexagonToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibStdCxxIncludePaths(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::tools::addLinkerCompressDebugSectionsOption(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addPGOAndCoverageFlags(), clang::driver::tools::ClangAs::AddX86TargetArgs(), clang::driver::toolchains::AIX::AIX(), clang::driver::toolchains::AMDGPUOpenMPToolChain::AMDGPUOpenMPToolChain(), clang::driver::toolchains::BareMetal::BareMetal(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), clang::driver::toolchains::Darwin::CheckObjCARC(), clang::driver::toolchains::AMDGPUToolChain::checkTargetID(), clang::driver::toolchains::HIPAMDToolChain::checkTargetID(), CollectARMPACBTIOptions(), ComputeLLVMTriple(), clang::driver::toolchains::BareMetal::computeSysRoot(), clang::driver::toolchains::Linux::computeSysRoot(), clang::driver::toolchains::MipsLLVMToolChain::computeSysRoot(), clang::driver::toolchains::OHOS::computeSysRoot(), constructHexagonLinkArgs(), clang::driver::tools::aix::Assembler::ConstructJob(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::Flang::ConstructJob(), clang::driver::tools::freebsd::Assembler::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::msp430::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Assembler::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Assembler::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::PS4cpu::Linker::ConstructJob(), clang::driver::tools::PS5cpu::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), clang::driver::tools::zos::Linker::ConstructJob(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::CC1Command::Execute(), clang::driver::toolchains::AVRToolChain::findAVRLibcInstallation(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::toolchains::Generic_GCC::Generic_GCC(), getArchSpecificLibPaths(), clang::driver::toolchains::OHOS::getArchSpecificLibPaths(), clang::driver::toolchains::ROCMToolChain::getCommonDeviceLibNames(), clang::driver::toolchains::MachO::getCompilerRT(), clang::driver::toolchains::Darwin::getCompilerRT(), clang::driver::toolchains::MipsLLVMToolChain::getCompilerRT(), clang::driver::toolchains::OHOS::getCompilerRT(), clang::driver::toolchains::OpenBSD::getCompilerRT(), getCompilerRTPath(), GetCXXStdlibType(), clang::driver::toolchains::Fuchsia::GetCXXStdlibType(), clang::driver::toolchains::HexagonToolChain::GetCXXStdlibType(), clang::driver::toolchains::MipsLLVMToolChain::GetCXXStdlibType(), clang::driver::toolchains::NaClToolChain::GetCXXStdlibType(), clang::driver::toolchains::OHOS::GetCXXStdlibType(), clang::driver::toolchains::AMDGPUOpenMPToolChain::getDeviceLibs(), clang::driver::toolchains::HIPAMDToolChain::getDeviceLibs(), clang::driver::toolchains::HIPSPVToolChain::getDeviceLibs(), clang::driver::tools::getDwarfVersion(), clang::driver::toolchains::Linux::getDynamicLinker(), clang::driver::toolchains::CudaToolChain::getInputFilename(), GetLinkerPath(), clang::driver::tools::solaris::Linker::getLinkerPath(), clang::driver::tools::wasm::Linker::getLinkerPath(), clang::driver::toolchains::MachO::getLinkerVersion(), clang::driver::Driver::getOffloadArchs(), GetRuntimeLibType(), clang::driver::toolchains::DarwinClang::GetRuntimeLibType(), clang::driver::toolchains::Fuchsia::GetRuntimeLibType(), clang::driver::toolchains::OHOS::GetRuntimeLibType(), clang::driver::toolchains::OHOS::getRuntimePaths(), getStaticPIE(), GetUnwindLibType(), getVFS(), clang::driver::toolchains::Haiku::Haiku(), clang::driver::toolchains::HIPAMDToolChain::HIPAMDToolChain(), clang::driver::toolchains::HIPSPVToolChain::HIPSPVToolChain(), clang::driver::tools::isTLSDESCEnabled(), clang::driver::toolchains::MachO::MachO(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::MSVCToolChain::MSVCToolChain(), clang::driver::toolchains::NaClToolChain::NaClToolChain(), clang::driver::toolchains::NetBSD::NetBSD(), clang::driver::toolchains::OpenBSD::OpenBSD(), ParseDebugDefaultVersion(), clang::driver::toolchains::HLSLToolChain::requiresValidation(), clang::driver::SanitizerArgs::SanitizerArgs(), SelectTool(), SetRISCVSmallDataLimit(), ShouldLinkCXXStdlib(), shouldSkipSanitizeOption(), clang::driver::toolchains::TCEToolChain::TCEToolChain(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), clang::driver::toolchains::AMDGPUOpenMPToolChain::TranslateArgs(), clang::driver::toolchains::CudaToolChain::TranslateArgs(), clang::driver::toolchains::MachO::TranslateArgs(), clang::driver::toolchains::Darwin::TranslateArgs(), clang::driver::toolchains::Generic_GCC::TranslateArgs(), clang::driver::toolchains::HIPAMDToolChain::TranslateArgs(), clang::driver::toolchains::HLSLToolChain::TranslateArgs(), clang::driver::toolchains::MSVCToolChain::TranslateArgs(), TranslateOpenMPTargetArgs(), TranslateXarchArgs(), and clang::driver::XRayArgs::XRayArgs().
|
inline |
Get the toolchain's effective clang triple.
Definition at line 282 of file ToolChain.h.
Referenced by clang::driver::toolchains::Darwin::addMinVersionArgs(), clang::driver::toolchains::Darwin::addPlatformVersionArgs(), CollectARMPACBTIOptions(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), clang::driver::tools::Flang::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::toolchains::Linux::getMultiarchTriple(), clang::driver::tools::isTLSDESCEnabled(), RenderSCPOptions(), and RenderSSPOptions().
|
virtual |
GetExceptionModel - Return the tool chain exception model.
Reimplemented in clang::driver::toolchains::MachO, clang::driver::toolchains::Darwin, clang::driver::toolchains::MinGW, clang::driver::toolchains::NetBSD, and clang::driver::toolchains::VEToolChain.
Definition at line 1005 of file ToolChain.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
inline |
Definition at line 329 of file ToolChain.h.
Referenced by getMultilibFlags().
std::string ToolChain::GetFilePath | ( | const char * | Name | ) | const |
Definition at line 880 of file ToolChain.cpp.
References clang::driver::Driver::GetFilePath().
Referenced by clang::driver::toolchains::Darwin::addStartObjectFileArgs(), constructHexagonLinkArgs(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), isFastMathRuntimeAvailable(), and clang::driver::toolchains::NaClToolChain::NaClToolChain().
|
inline |
Definition at line 294 of file ToolChain.h.
Referenced by AddFilePathLibArgs(), clang::driver::tools::addOpenMPDeviceRTL(), clang::driver::toolchains::BareMetal::BareMetal(), constructHexagonLinkArgs(), clang::driver::toolchains::CSKYToolChain::CSKYToolChain(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::Driver::GetFilePath(), clang::driver::toolchains::Haiku::Haiku(), clang::driver::Driver::HandleImmediateArgs(), clang::driver::toolchains::HexagonToolChain::HexagonToolChain(), clang::driver::toolchains::Hurd::Hurd(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::MipsLLVMToolChain::MipsLLVMToolChain(), clang::driver::toolchains::MSP430ToolChain::MSP430ToolChain(), clang::driver::toolchains::NaClToolChain::NaClToolChain(), clang::driver::toolchains::NetBSD::NetBSD(), clang::driver::toolchains::OHOS::OHOS(), clang::driver::toolchains::OpenBSD::OpenBSD(), clang::driver::toolchains::PS4PS5Base::PS4PS5Base(), clang::driver::toolchains::RISCVToolChain::RISCVToolChain(), clang::driver::toolchains::Solaris::Solaris(), ToolChain(), and clang::driver::toolchains::VEToolChain::VEToolChain().
|
inline |
Definition at line 295 of file ToolChain.h.
|
inlinevirtual |
Add an additional -fdebug-prefix-map entry.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 582 of file ToolChain.h.
Referenced by addDebugPrefixMapArg().
|
virtual |
Some toolchains need to modify the file name, for example to replace the extension for object files with .cubin for OpenMP offloading to Nvidia GPUs.
Reimplemented in clang::driver::toolchains::CudaToolChain.
Definition at line 461 of file ToolChain.cpp.
References clang::driver::InputInfo::getFilename().
Referenced by clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::OffloadBundler::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), and clang::driver::toolchains::CudaToolChain::getInputFilename().
|
inline |
Definition at line 291 of file ToolChain.h.
Referenced by clang::driver::toolchains::AIX::AIX(), clang::driver::toolchains::BareMetal::BareMetal(), clang::driver::tools::MinGW::Linker::ConstructJob(), getCompilerRT(), clang::driver::Driver::GetFilePath(), clang::driver::toolchains::OHOS::OHOS(), and ToolChain().
|
inline |
Definition at line 292 of file ToolChain.h.
std::string ToolChain::GetLinkerPath | ( | bool * | LinkerIsLLD = nullptr | ) | const |
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name.
If LinkerIsLLD is non-nullptr, it is set to true if the returned linker is LLD. If it's set, it can be assumed that the linker is LLD built at the same revision as clang, and clang can make assumptions about LLD's supported flags, error output, etc.
Definition at line 888 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), getDefaultLinker(), getDriver(), GetProgramPath(), and Path.
Referenced by constructHexagonLinkArgs(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), and clang::driver::tools::zos::Linker::ConstructJob().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::NVPTXToolChain.
Definition at line 591 of file ToolChain.h.
References UINT_MAX.
Referenced by renderDebugOptions().
|
inlinevirtual |
Reimplemented in clang::driver::toolchains::Hurd, clang::driver::toolchains::Linux, and clang::driver::toolchains::OHOS.
Definition at line 630 of file ToolChain.h.
Multilib::flags_list ToolChain::getMultilibFlags | ( | const llvm::opt::ArgList & | Args | ) | const |
Get flags suitable for multilib selection, based on the provided clang command line arguments.
The command line arguments aren't suitable to be used directly for multilib selection because they are not normalized and normalization is a complex process. The result of this function is similar to clang command line arguments except that the list of arguments is incomplete. Only certain command line arguments are processed. If more command line arguments are needed for multilib selection then this function should be extended. To allow users to find out what flags are returned, clang accepts a -print-multi-flags-experimental argument.
Definition at line 272 of file ToolChain.cpp.
References ComputeEffectiveClangTriple(), EM_Disabled, getAArch64MultilibFlags(), getARMMultilibFlags(), getExceptionsMode(), getRTTIMode(), clang::Result, and RM_Disabled.
Referenced by findMultilibsFromYAML(), and clang::driver::Driver::HandleImmediateArgs().
|
inline |
Definition at line 300 of file ToolChain.h.
References Multilibs.
Referenced by clang::driver::Driver::HandleImmediateArgs().
|
inlinestatic |
Definition at line 805 of file ToolChain.h.
Referenced by clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::Driver::CreateOffloadingDeviceToolChains(), clang::driver::Driver::getOffloadArchs(), and TranslateOpenMPTargetArgs().
|
inline |
Definition at line 271 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::getCompilerRT(), and getOSLibName().
|
virtual |
Reimplemented in clang::driver::toolchains::BareMetal.
Definition at line 611 of file ToolChain.cpp.
References getOS().
Referenced by getArchSpecificLibPaths(), and getCompilerRTPath().
|
inline |
Definition at line 270 of file ToolChain.h.
std::string ToolChain::GetProgramPath | ( | const char * | Name | ) | const |
Definition at line 884 of file ToolChain.cpp.
References clang::driver::Driver::GetProgramPath().
Referenced by clang::driver::tools::dragonfly::Assembler::ConstructJob(), clang::driver::tools::freebsd::Assembler::ConstructJob(), clang::driver::tools::hlsl::Validator::ConstructJob(), clang::driver::tools::ifstool::Merger::ConstructJob(), clang::driver::tools::msp430::Linker::ConstructJob(), clang::driver::tools::netbsd::Assembler::ConstructJob(), clang::driver::tools::openbsd::Assembler::ConstructJob(), clang::driver::tools::PScpu::Assembler::ConstructJob(), clang::driver::tools::PS4cpu::Linker::ConstructJob(), clang::driver::tools::PS5cpu::Linker::ConstructJob(), clang::driver::tools::SPIRV::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), GetLinkerPath(), clang::driver::tools::wasm::Linker::getLinkerPath(), GetStaticLibToolPath(), clang::driver::toolchains::AMDGPUToolChain::getSystemGPUArchs(), and clang::driver::toolchains::HLSLToolChain::requiresValidation().
|
inline |
Definition at line 297 of file ToolChain.h.
Referenced by clang::driver::toolchains::AIX::AIX(), clang::driver::toolchains::AMDGPUOpenMPToolChain::AMDGPUOpenMPToolChain(), clang::driver::toolchains::AVRToolChain::AVRToolChain(), clang::driver::toolchains::BareMetal::BareMetal(), clang::driver::toolchains::CSKYToolChain::CSKYToolChain(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::toolchains::Generic_GCC::Generic_GCC(), clang::driver::Driver::GetProgramPath(), clang::driver::Driver::HandleImmediateArgs(), clang::driver::toolchains::HexagonToolChain::HexagonToolChain(), clang::driver::toolchains::HIPAMDToolChain::HIPAMDToolChain(), clang::driver::toolchains::HIPSPVToolChain::HIPSPVToolChain(), clang::driver::toolchains::HLSLToolChain::HLSLToolChain(), clang::driver::toolchains::Hurd::Hurd(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::MachO::MachO(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::MSP430ToolChain::MSP430ToolChain(), clang::driver::toolchains::MSVCToolChain::MSVCToolChain(), clang::driver::toolchains::NaClToolChain::NaClToolChain(), clang::driver::toolchains::RISCVToolChain::RISCVToolChain(), clang::driver::toolchains::TCEToolChain::TCEToolChain(), and clang::driver::toolchains::VEToolChain::VEToolChain().
|
inline |
Definition at line 298 of file ToolChain.h.
|
inline |
Definition at line 323 of file ToolChain.h.
Referenced by clang::driver::SanitizerArgs::SanitizerArgs().
|
inline |
Definition at line 326 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob(), getMultilibFlags(), and clang::driver::SanitizerArgs::SanitizerArgs().
|
virtual |
Reimplemented in clang::driver::toolchains::DarwinClang, clang::driver::toolchains::Fuchsia, and clang::driver::toolchains::OHOS.
Definition at line 1102 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), GetDefaultRuntimeLibType(), getDriver(), RLT_CompilerRT, and RLT_Libgcc.
Referenced by clang::driver::toolchains::BareMetal::AddLinkRuntimeLib(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), GetUnwindLibType(), clang::driver::Driver::HandleImmediateArgs(), and clang::driver::toolchains::Linux::IsAArch64OutlineAtomicsDefault().
std::optional< std::string > ToolChain::getRuntimePath | ( | ) | const |
Definition at line 810 of file ToolChain.cpp.
References getTargetSubDirPath(), P, and clang::driver::Driver::ResourceDir.
Referenced by clang::driver::Driver::HandleImmediateArgs(), and ToolChain().
SanitizerArgs ToolChain::getSanitizerArgs | ( | const llvm::opt::ArgList & | JobArgs | ) | const |
Definition at line 314 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::ROCMToolChain::addClangTargetOptions(), clang::driver::toolchains::NetBSD::addClangTargetOptions(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::toolchains::HIPAMDToolChain::getDeviceLibs(), clang::driver::toolchains::Linux::getDynamicLinker(), clang::driver::toolchains::FreeBSD::isPIEDefault(), and clang::driver::toolchains::Linux::isPIEDefault().
|
inline |
Definition at line 302 of file ToolChain.h.
References SelectedMultilibs.
Referenced by clang::driver::Driver::HandleImmediateArgs().
std::string ToolChain::GetStaticLibToolPath | ( | ) | const |
Returns the linker path for emitting a static library.
Definition at line 960 of file ToolChain.cpp.
References GetProgramPath().
std::optional< std::string > ToolChain::getStdlibIncludePath | ( | ) | const |
Definition at line 828 of file ToolChain.cpp.
References clang::driver::Driver::Dir, getTargetSubDirPath(), and P.
Referenced by clang::driver::toolchains::BareMetal::AddClangSystemIncludeArgs(), and clang::driver::tools::addGPULibraries().
std::optional< std::string > ToolChain::getStdlibPath | ( | ) | const |
Definition at line 822 of file ToolChain.cpp.
References clang::driver::Driver::Dir, getTargetSubDirPath(), and P.
Referenced by clang::driver::toolchains::VEToolChain::AddCXXStdlibLibArgs(), clang::driver::toolchains::Fuchsia::Fuchsia(), ToolChain(), and clang::driver::toolchains::VEToolChain::VEToolChain().
|
virtual |
Return sanitizers which are available in this toolchain.
Reimplemented in clang::driver::toolchains::ROCMToolChain, clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::Darwin, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::PS5CPU, and clang::driver::toolchains::Solaris.
Definition at line 1381 of file ToolChain.cpp.
References getTriple().
Referenced by clang::driver::toolchains::AMDGPUOpenMPToolChain::getSupportedSanitizers(), clang::driver::toolchains::BareMetal::getSupportedSanitizers(), clang::driver::toolchains::CrossWindowsToolChain::getSupportedSanitizers(), clang::driver::toolchains::CudaToolChain::getSupportedSanitizers(), clang::driver::toolchains::Darwin::getSupportedSanitizers(), clang::driver::toolchains::FreeBSD::getSupportedSanitizers(), clang::driver::toolchains::Fuchsia::getSupportedSanitizers(), clang::driver::toolchains::HIPAMDToolChain::getSupportedSanitizers(), clang::driver::toolchains::HIPSPVToolChain::getSupportedSanitizers(), clang::driver::toolchains::Linux::getSupportedSanitizers(), clang::driver::toolchains::MinGW::getSupportedSanitizers(), clang::driver::toolchains::MSVCToolChain::getSupportedSanitizers(), clang::driver::toolchains::NetBSD::getSupportedSanitizers(), clang::driver::toolchains::OHOS::getSupportedSanitizers(), clang::driver::toolchains::OpenBSD::getSupportedSanitizers(), clang::driver::toolchains::PS4PS5Base::getSupportedSanitizers(), clang::driver::toolchains::Solaris::getSupportedSanitizers(), and clang::driver::SanitizerArgs::SanitizerArgs().
|
virtual |
getSystemGPUArchs - Use a tool to detect the user's availible GPUs.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, and clang::driver::toolchains::NVPTXToolChain.
Definition at line 1377 of file ToolChain.cpp.
Referenced by clang::driver::Driver::getOffloadArchs().
|
static |
Return any implicit target and/or mode flag for an invocation of the compiler driver as ProgName
.
For example, when called with i686-linux-android-g++, the first element of the return value will be set to "i686-linux-android"
and the second will be set to "--driver-mode=g++"`. It is OK if the target name is not registered. In this case the return value contains false in the field TargetIsValid.
llvm::InitializeAllTargets()
has been called. ProgName | The name the Clang driver was invoked with (from, e.g., argv[0]). |
Definition at line 412 of file ToolChain.cpp.
References normalizeProgramName(), and parseDriverSuffix().
Referenced by clang::tooling::addTargetAndModeForProgramName(), and clang::driver::getDriverMode().
|
protected |
Find the target-specific subdirectory for the current target triple under BaseDir
, doing fallback triple searches as necessary.
Definition at line 769 of file ToolChain.cpp.
References getArch(), getTriple(), getVFS(), P, and Path.
Referenced by clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths(), getRuntimePath(), getStdlibIncludePath(), and getStdlibPath().
|
inlinevirtual |
getThreadModel() - Which thread model does this target use?
Definition at line 622 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::Driver::PrintVersion().
|
protectedvirtual |
Reimplemented in clang::driver::toolchains::MachO, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::HLSLToolChain, clang::driver::toolchains::MinGW, and clang::driver::toolchains::SPIRVToolChain.
Definition at line 542 of file ToolChain.cpp.
References clang::driver::Action::AnalyzeJobClass, clang::driver::Action::AssembleJobClass, clang::driver::Action::BackendJobClass, clang::driver::Action::BinaryAnalyzeJobClass, clang::driver::Action::BindArchClass, clang::driver::Action::CompileJobClass, clang::driver::Action::DsymutilJobClass, clang::driver::Action::ExtractAPIJobClass, clang::driver::Action::IfsMergeJobClass, clang::driver::Action::InputClass, clang::driver::Action::LinkerWrapperJobClass, clang::driver::Action::LinkJobClass, clang::driver::Action::LipoJobClass, clang::driver::Action::MigrateJobClass, clang::driver::Action::OffloadBundlingJobClass, clang::driver::Action::OffloadClass, clang::driver::Action::OffloadPackagerJobClass, clang::driver::Action::OffloadUnbundlingJobClass, clang::driver::Action::PrecompileJobClass, clang::driver::Action::PreprocessJobClass, clang::driver::Action::StaticLibJobClass, clang::driver::Action::VerifyDebugInfoJobClass, and clang::driver::Action::VerifyPCHJobClass.
Referenced by clang::driver::toolchains::MachO::getTool(), clang::driver::toolchains::Generic_GCC::getTool(), clang::driver::toolchains::HLSLToolChain::getTool(), clang::driver::toolchains::MinGW::getTool(), clang::driver::toolchains::SPIRVToolChain::getTool(), and SelectTool().
|
inline |
Definition at line 254 of file ToolChain.h.
Referenced by clang::driver::SanitizerArgs::addArgs(), clang::driver::tools::addAsNeededOption(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::OHOS::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::OHOS::AddClangSystemIncludeArgs(), clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), clang::driver::toolchains::HexagonToolChain::addClangTargetOptions(), clang::driver::toolchains::HIPAMDToolChain::addClangTargetOptions(), clang::driver::toolchains::NetBSD::addClangTargetOptions(), clang::driver::toolchains::DarwinClang::addClangWarningOptions(), clang::driver::toolchains::FreeBSD::AddCXXStdlibLibArgs(), clang::driver::toolchains::HexagonToolChain::AddCXXStdlibLibArgs(), addExceptionArgs(), addIncludeLinkerOption(), clang::driver::toolchains::Generic_GCC::addLibCxxIncludePaths(), clang::driver::toolchains::HexagonToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::tools::ClangAs::AddMIPSTargetArgs(), addPGOAndCoverageFlags(), clang::driver::toolchains::Darwin::addPlatformVersionArgs(), clang::driver::tools::ClangAs::AddRISCVTargetArgs(), addSanitizerDynamicList(), AddUnwindLibrary(), addVSDefines(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), clang::driver::toolchains::NaClToolChain::buildAssembler(), clang::driver::Driver::BuildCompilation(), buildCompilerRTBasename(), clang::driver::toolchains::AVRToolChain::buildLinker(), clang::driver::toolchains::HIPAMDToolChain::buildLinker(), clang::driver::toolchains::HIPSPVToolChain::buildLinker(), collectSanitizerRuntimes(), ComputeLLVMTriple(), clang::driver::toolchains::MSVCToolChain::computeMSVCVersion(), clang::driver::toolchains::BareMetal::computeSysRoot(), clang::driver::toolchains::Linux::computeSysRoot(), clang::driver::toolchains::OHOS::computeSysRoot(), constructHexagonLinkArgs(), clang::driver::tools::aix::Assembler::ConstructJob(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), clang::driver::tools::OffloadBundler::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::tools::freebsd::Assembler::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::netbsd::Assembler::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Assembler::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::PS4cpu::Linker::ConstructJob(), clang::driver::tools::PS5cpu::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), clang::driver::Driver::ConstructPhaseAction(), clang::driver::Driver::CreateOffloadingDeviceToolChains(), defaultToIEEELongDouble(), clang::driver::Driver::generateCompilationDiagnostics(), getArchNameForCompilerRTLib(), getArchSpecificLibPaths(), clang::driver::toolchains::OHOS::getArchSpecificLibPaths(), clang::driver::Compilation::getArgsForToolChain(), clang::driver::toolchains::AMDGPUOpenMPToolChain::getAuxTriple(), clang::driver::toolchains::CudaToolChain::getAuxTriple(), clang::driver::toolchains::HIPAMDToolChain::getAuxTriple(), clang::driver::toolchains::HIPSPVToolChain::getAuxTriple(), getCompilerRT(), clang::driver::toolchains::OHOS::getCompilerRT(), clang::driver::toolchains::HexagonToolChain::GetCXXStdlibType(), clang::driver::toolchains::Linux::GetDefaultCXXStdlibType(), clang::driver::toolchains::AMDGPUToolChain::getDefaultDenormalModeForType(), clang::driver::toolchains::Linux::GetDefaultDwarfVersion(), clang::driver::toolchains::Linux::getDefaultLinker(), clang::driver::toolchains::Linux::GetDefaultRuntimeLibType(), clang::driver::toolchains::Fuchsia::getDefaultSanitizers(), getDefaultUniversalArchName(), clang::driver::toolchains::MSVCToolChain::getDefaultUnwindTableLevel(), clang::driver::toolchains::AMDGPUOpenMPToolChain::getDeviceLibs(), clang::driver::toolchains::HIPAMDToolChain::getDeviceLibs(), clang::driver::toolchains::HIPSPVToolChain::getDeviceLibs(), clang::driver::tools::getDwarfVersion(), clang::driver::toolchains::Linux::getDynamicLinker(), clang::driver::toolchains::OHOS::getDynamicLinker(), clang::driver::toolchains::Darwin::GetExceptionModel(), clang::driver::toolchains::NetBSD::GetExceptionModel(), clang::driver::toolchains::AMDGPUToolChain::getGPUArch(), getLibGccType(), clang::driver::toolchains::MachO::getMachOArchName(), clang::driver::Driver::GetNamedOutputPath(), clang::driver::Driver::getOffloadArchs(), clang::driver::toolchains::AMDGPUToolChain::getParsedTargetID(), clang::driver::toolchains::OHOS::getRuntimePaths(), getSupportedSanitizers(), clang::driver::toolchains::BareMetal::getSupportedSanitizers(), clang::driver::toolchains::Darwin::getSupportedSanitizers(), clang::driver::toolchains::FreeBSD::getSupportedSanitizers(), clang::driver::toolchains::Linux::getSupportedSanitizers(), clang::driver::toolchains::NetBSD::getSupportedSanitizers(), clang::driver::toolchains::Solaris::getSupportedSanitizers(), getTargetSubDirPath(), GetTriplePlusArchString(), GetUnwindLibType(), clang::driver::toolchains::HIPAMDToolChain::HIPAMDToolChain(), clang::driver::toolchains::Linux::IsAArch64OutlineAtomicsDefault(), clang::driver::toolchains::Generic_GCC::IsIntegratedAssemblerDefault(), clang::driver::toolchains::Linux::IsMathErrnoDefault(), clang::driver::toolchains::Generic_GCC::isPICDefault(), clang::driver::toolchains::Generic_GCC::isPICDefaultForced(), clang::driver::toolchains::Linux::isPIEDefault(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::OHOS::OHOS(), ProcessVSRuntimeLibrary(), processVSRuntimeLibrary(), renderDebugOptions(), clang::driver::SanitizerArgs::SanitizerArgs(), SelectTool(), SetRISCVSmallDataLimit(), ShouldEnableAutolink(), shouldSkipSanitizeOption(), clang::driver::toolchains::MachO::SupportsProfiling(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), and clang::driver::XRayArgs::XRayArgs().
|
inline |
Definition at line 277 of file ToolChain.h.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::Driver::BuildCompilation(), checkDebugInfoOption(), ComputeLLVMTriple(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::Driver::PrintVersion(), renderDebugOptions(), and TranslateOpenMPTargetArgs().
|
virtual |
Reimplemented in clang::driver::toolchains::CSKYToolChain, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::OHOS, and clang::driver::toolchains::RISCVToolChain.
Definition at line 1128 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), GetDefaultUnwindLibType(), getDriver(), GetRuntimeLibType(), getTriple(), RLT_CompilerRT, RLT_Libgcc, UNW_CompilerRT, UNW_Libgcc, and UNW_None.
Referenced by clang::driver::toolchains::HexagonToolChain::AddCXXStdlibLibArgs(), AddUnwindLibrary(), constructHexagonLinkArgs(), and clang::driver::toolchains::OHOS::GetUnwindLibType().
llvm::vfs::FileSystem & ToolChain::getVFS | ( | ) | const |
Definition at line 151 of file ToolChain.cpp.
References getDriver(), and clang::driver::Driver::getVFS().
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::OHOS::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Generic_GCC::addLibStdCXXIncludePaths(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), clang::driver::toolchains::Linux::computeSysRoot(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), detectLibcxxVersion(), FindVisualStudioExecutable(), clang::driver::toolchains::Fuchsia::Fuchsia(), getCompilerRT(), clang::driver::toolchains::OpenBSD::getCompilerRT(), clang::driver::toolchains::Linux::getDynamicLinker(), clang::driver::Driver::GetStdModuleManifestPath(), getTargetSubDirPath(), clang::driver::toolchains::MSVCToolChain::getUniversalCRTLibraryPath(), clang::driver::toolchains::MSVCToolChain::getWindowsSDKLibraryPath(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::MSVCToolChain::MSVCToolChain(), clang::driver::toolchains::OHOS::OHOS(), ToolChain(), clang::driver::toolchains::ZOS::TryAddIncludeFromPath(), and clang::driver::toolchains::MSVCToolChain::useUniversalCRT().
const XRayArgs & ToolChain::getXRayArgs | ( | ) | const |
Definition at line 320 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and clang::driver::tools::Clang::ConstructJob().
|
inlinevirtual |
hasBlocksRuntime - Given that the user is compiling with -fblocks, does this tool chain guarantee the existence of a blocks runtime?
FIXME: this really belongs on some sort of DeploymentTarget abstraction
Reimplemented in clang::driver::toolchains::Darwin, clang::driver::toolchains::VEToolChain, and clang::driver::toolchains::XCoreToolChain.
Definition at line 662 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
inline |
Definition at line 287 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::getMultiarchTriple().
|
virtual |
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Reimplemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::AVRToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Haiku, clang::driver::toolchains::Hurd, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::PS4PS5Base.
Definition at line 979 of file ToolChain.cpp.
|
inlinevirtual |
Test whether this toolchain supports outline atomics by default.
Reimplemented in clang::driver::toolchains::Fuchsia, and clang::driver::toolchains::Linux.
Definition at line 550 of file ToolChain.h.
Referenced by clang::driver::tools::addOutlineAtomicsArgs().
|
inlinevirtual |
isBareMetal - Is this a bare metal target.
Reimplemented in clang::driver::toolchains::BareMetal.
Definition at line 628 of file ToolChain.h.
Referenced by getArchNameForCompilerRTLib(), and getCompilerRTPath().
|
inlinevirtual |
IsBlocksDefault - Does this tool chain enable -fblocks by default.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 430 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
virtual |
Returns true if the toolchain is targeting a non-native architecture.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::Darwin, clang::driver::toolchains::HIPSPVToolChain, and clang::driver::toolchains::SPIRVToolChain.
Definition at line 983 of file ToolChain.cpp.
References getArch().
Referenced by clang::driver::toolchains::MinGW::MinGW().
|
inlinevirtual |
IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature by default.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 463 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
virtual |
If a runtime library exists that sets global flags for unsafe floating point math, return true.
This checks for presence of the -Ofast, -ffast-math or -funsafe-math flags.
Definition at line 1329 of file ToolChain.cpp.
References clang::Default, GetFilePath(), clang::driver::isOptimizationLevelFast(), and Path.
Referenced by addFastMathRuntimeIfAvailable().
|
inlinevirtual |
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Reimplemented in clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::NaClToolChain, and clang::driver::toolchains::XCoreToolChain.
Definition at line 434 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob(), and useIntegratedAs().
|
inlinevirtual |
IsIntegratedBackendDefault - Does this tool chain enable -fintegrated-objemitter by default.
Reimplemented in clang::driver::toolchains::SPIRVToolChain.
Definition at line 438 of file ToolChain.h.
Referenced by useIntegratedBackend().
|
inlinevirtual |
IsIntegratedBackendSupported - Does this tool chain support -fintegrated-objemitter.
Definition at line 442 of file ToolChain.h.
Referenced by useIntegratedBackend().
|
inlinevirtual |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::DragonFly, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Haiku, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::SPIRVToolChain, and clang::driver::toolchains::TCEToolChain.
Definition at line 459 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::IsMathErrnoDefault(), and RenderFloatingPointOptions().
|
inlinevirtual |
IsNonIntegratedBackendSupported - Does this tool chain support -fno-integrated-objemitter.
Reimplemented in clang::driver::toolchains::SPIRVToolChain.
Definition at line 446 of file ToolChain.h.
Referenced by useIntegratedBackend().
|
inlinevirtual |
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Reimplemented in clang::driver::toolchains::MachO, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Haiku, clang::driver::toolchains::NetBSD, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::PS4PS5Base.
Definition at line 467 of file ToolChain.h.
|
pure virtual |
Test whether this toolchain defaults to PIC.
Implemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::Haiku, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::HLSLToolChain, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::PS4PS5Base, clang::driver::toolchains::SPIRVToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
|
pure virtual |
Tests whether this toolchain forces its default for PIC, PIE or non-PIC.
If this returns true, any PIC related flags should be ignored and instead the results of isPICDefault()
and isPIEDefault(const
llvm::opt::ArgList &Args)
are used exclusively.
Implemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::HLSLToolChain, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::SPIRVToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
|
pure virtual |
Test whether this toolchain defaults to PIE.
Implemented in clang::driver::toolchains::AIX, clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Fuchsia, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::HLSLToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::MinGW, clang::driver::toolchains::MSP430ToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::OHOS, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::SPIRVToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::VEToolChain, clang::driver::toolchains::XCoreToolChain, and clang::driver::toolchains::ZOS.
Referenced by clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), and getPIE().
|
virtual |
isThreadModelSupported() - Does this target support a thread model?
Definition at line 1009 of file ToolChain.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::Driver::PrintVersion().
|
virtual |
LookupTypeForExtension - Return the default language type to use for the given extension.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 967 of file ToolChain.cpp.
References clang::driver::Driver::IsFlangMode(), and clang::driver::types::lookupTypeForExtension().
Referenced by clang::driver::Driver::BuildInputs(), and clang::driver::toolchains::MachO::LookupTypeForExtension().
|
static |
Returns true if gcov instrumentation (-fprofile-arcs or –coverage) is on.
Definition at line 864 of file ToolChain.cpp.
Referenced by addPGOAndCoverageFlags(), addProfileRTLibs(), and clang::driver::toolchains::Darwin::addProfileRTLibs().
|
static |
needsProfileRT - returns true if instrumentation profile is on.
Definition at line 850 of file ToolChain.cpp.
Referenced by addProfileRTLibs(), clang::driver::toolchains::AIX::addProfileRTLibs(), clang::driver::toolchains::Darwin::addProfileRTLibs(), clang::driver::toolchains::Linux::addProfileRTLibs(), and clang::driver::toolchains::OHOS::addProfileRTLibs().
|
inlinevirtual |
Check if the toolchain should use AsmParser to parse inlineAsm when integrated assembler is not default.
Reimplemented in clang::driver::toolchains::AIX.
Definition at line 456 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
inlinevirtual |
Dispatch to the specific toolchain for verbose printing.
This is used when handling the verbose option to print detailed, toolchain-specific information useful for understanding the behavior of the driver on a specific platform.
Reimplemented in clang::driver::toolchains::Darwin, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::MinGW, and clang::driver::toolchains::MSVCToolChain.
Definition at line 413 of file ToolChain.h.
Referenced by clang::driver::Driver::HandleImmediateArgs().
Choose a tool to use to handle the action JA
.
This can be overridden when a particular ToolChain needs to use a compiler other than Clang.
Reimplemented in clang::driver::toolchains::SPIRVToolChain.
Definition at line 870 of file ToolChain.cpp.
References clang::driver::Action::AssembleJobClass, getDriver(), clang::driver::Action::getKind(), getTool(), getTriple(), clang::driver::Driver::IsFlangMode(), and useIntegratedAs().
|
protected |
Definition at line 143 of file ToolChain.cpp.
References Env.
bool ToolChain::ShouldLinkCXXStdlib | ( | const llvm::opt::ArgList & | Args | ) | const |
Returns if the C++ standard library should be linked in.
Note that e.g. -lm should still be linked even if this returns false.
Definition at line 1292 of file ToolChain.cpp.
References clang::driver::Driver::CCCIsCXX(), and getDriver().
Referenced by constructHexagonLinkArgs(), clang::driver::tools::CSKY::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::solaris::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), and clang::driver::tools::zos::Linker::ConstructJob().
|
inlinevirtual |
Does this toolchain supports given debug info option or not.
Reimplemented in clang::driver::toolchains::NVPTXToolChain.
Definition at line 605 of file ToolChain.h.
Referenced by checkDebugInfoOption().
|
inlinevirtual |
SupportsEmbeddedBitcode - Does this tool chain support embedded bitcode.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 619 of file ToolChain.h.
|
inlinevirtual |
SupportsProfiling - Does this tool chain support -pg.
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::BareMetal, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::HIPSPVToolChain, clang::driver::toolchains::SPIRVToolChain, clang::driver::toolchains::VEToolChain, and clang::driver::toolchains::XCoreToolChain.
Definition at line 567 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
inlinevirtual |
TranslateArgs - Create a new derived argument list for any argument translations this ToolChain may wish to perform, or 0 if no tool chain specific translations are needed.
If DeviceOffloadKind
is specified the translation specific for that offload kind is performed.
BoundArch | - The bound architecture name, or 0. |
DeviceOffloadKind | - The device offload kind used for the translation. |
Reimplemented in clang::driver::toolchains::AMDGPUToolChain, clang::driver::toolchains::AMDGPUOpenMPToolChain, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::CudaToolChain, clang::driver::toolchains::MachO, clang::driver::toolchains::Darwin, clang::driver::toolchains::Generic_GCC, clang::driver::toolchains::HIPAMDToolChain, clang::driver::toolchains::HLSLToolChain, and clang::driver::toolchains::MSVCToolChain.
Definition at line 358 of file ToolChain.h.
Referenced by clang::driver::Compilation::getArgsForToolChain(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), clang::driver::toolchains::AMDGPUOpenMPToolChain::TranslateArgs(), clang::driver::toolchains::NVPTXToolChain::TranslateArgs(), clang::driver::toolchains::CudaToolChain::TranslateArgs(), and clang::driver::toolchains::HIPAMDToolChain::TranslateArgs().
|
virtual |
TranslateOpenMPTargetArgs - Create a new derived argument list for that contains the OpenMP target specific flags passed via -Xopenmp-target -opt=val OR -Xopenmp-target=<triple> -opt=val.
Definition at line 1475 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), getDriver(), getOpenMPTriple(), clang::driver::Driver::getOpts(), and getTripleString().
Referenced by clang::driver::Compilation::getArgsForToolChain().
|
virtual |
Append the argument following A
to DAL
assuming A
is an Xarch argument.
If AllocatedArgs
is null pointer, synthesized arguments are added to DAL
, otherwise they are appended to AllocatedArgs
.
Definition at line 1550 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::driver::Driver::getDiags(), getDriver(), clang::driver::Driver::getOpts(), and clang::driver::options::NoXarchOption.
Referenced by clang::driver::Compilation::getArgsForToolChain(), clang::driver::toolchains::MachO::TranslateArgs(), and TranslateXarchArgs().
|
virtual |
Translate -Xarch_ arguments.
If there are no such arguments, return a null pointer, otherwise return a DerivedArgList containing the translated arguments.
Definition at line 1592 of file ToolChain.cpp.
References clang::driver::Action::OFK_Host, clang::driver::Action::OFK_None, and TranslateXarchArgs().
|
inlinevirtual |
UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 579 of file ToolChain.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
|
virtual |
Check if the toolchain should use the integrated assembler.
Reimplemented in clang::driver::toolchains::BareMetal, clang::driver::toolchains::NVPTXToolChain, clang::driver::toolchains::HIPSPVToolChain, and clang::driver::toolchains::SPIRVToolChain.
Definition at line 155 of file ToolChain.cpp.
References IsIntegratedAssemblerDefault().
Referenced by clang::driver::tools::Clang::ConstructJob(), renderDebugOptions(), SelectTool(), and ShouldEnableAutolink().
|
virtual |
Check if the toolchain should use the integrated backend.
Definition at line 161 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), IsIntegratedBackendDefault(), IsIntegratedBackendSupported(), and IsNonIntegratedBackendSupported().
|
inlinevirtual |
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used?
Reimplemented in clang::driver::toolchains::MachO, and clang::driver::toolchains::Darwin.
Definition at line 471 of file ToolChain.h.
Referenced by RenderObjCOptions().
|
virtual |
Check whether to enable x86 relax relocations by default.
Definition at line 189 of file ToolChain.cpp.
|
friend |
Definition at line 138 of file ToolChain.h.
|
protected |
Definition at line 200 of file ToolChain.h.
Referenced by clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::Generic_GCC::AddMultilibIncludeArgs(), clang::driver::toolchains::Generic_GCC::AddMultilibPaths(), clang::driver::toolchains::CSKYToolChain::CSKYToolChain(), clang::driver::toolchains::BareMetal::findMultilibs(), clang::driver::toolchains::Fuchsia::Fuchsia(), getMultilibs(), clang::driver::toolchains::Hurd::Hurd(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::MipsLLVMToolChain::MipsLLVMToolChain(), clang::driver::toolchains::OHOS::OHOS(), and clang::driver::toolchains::RISCVToolChain::RISCVToolChain().
|
protected |
Definition at line 201 of file ToolChain.h.
Referenced by clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::Generic_GCC::AddMultilibPaths(), clang::driver::toolchains::MipsLLVMToolChain::computeSysRoot(), clang::driver::toolchains::CSKYToolChain::CSKYToolChain(), clang::driver::toolchains::BareMetal::findMultilibs(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::toolchains::MipsLLVMToolChain::getCompilerRT(), getCompilerRTPath(), getSelectedMultilibs(), clang::driver::toolchains::Hurd::Hurd(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::MipsLLVMToolChain::MipsLLVMToolChain(), clang::driver::toolchains::OHOS::OHOS(), and clang::driver::toolchains::RISCVToolChain::RISCVToolChain().