class CudaToolChain

Declaration

class CudaToolChain : public ToolChain { /* full declaration omitted */ };

Description

ToolChain - Access to tools for a single platform.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:136

Inherits from: ToolChain

Member Variables

public const clang::driver::ToolChain& HostTC
public clang::driver::CudaInstallationDetector CudaInstallation
private const Action::OffloadKind OK

Inherited from ToolChain:

protected Multilibs
protected SelectedMultilib

Method Overview

Inherited from ToolChain:

Methods

void AddClangCXXStdlibIncludeArgs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CC1Args) const

Description

AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for the given C++ standard library type.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:182

Parameters

const llvm::opt::ArgList& Args
llvm::opt::ArgStringList& CC1Args

void AddClangSystemIncludeArgs(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args) const

Description

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.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:180

Parameters

const llvm::opt::ArgList& DriverArgs
llvm::opt::ArgStringList& CC1Args

void AddCudaIncludeArgs(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args) const

Description

Add arguments to use system-specific CUDA includes.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:174

Parameters

const llvm::opt::ArgList& DriverArgs
llvm::opt::ArgStringList& CC1Args

void AddIAMCUIncludeArgs(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args) const

Description

Add arguments to use MCU GCC toolchain includes.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:185

Parameters

const llvm::opt::ArgList& DriverArgs
llvm::opt::ArgStringList& CC1Args

CudaToolChain(
    const clang::driver::Driver& D,
    const llvm::Triple& Triple,
    const clang::driver::ToolChain& HostTC,
    const llvm::opt::ArgList& Args,
    const Action::OffloadKind OK)

Declared at: clang/lib/Driver/ToolChains/Cuda.h:138

Parameters

const clang::driver::Driver& D
const llvm::Triple& Triple
const clang::driver::ToolChain& HostTC
const llvm::opt::ArgList& Args
const Action::OffloadKind OK

clang::driver::ToolChain::CXXStdlibType
GetCXXStdlibType(
    const llvm::opt::ArgList& Args) const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:178

Parameters

const llvm::opt::ArgList& Args

unsigned int GetDefaultDwarfVersion() const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:194

bool IsMathErrnoDefault() const

Description

IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:172

bool SupportsProfiling() const

Description

SupportsProfiling - Does this tool chain support -pg.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:168

llvm::opt::DerivedArgList* TranslateArgs(
    const llvm::opt::DerivedArgList& Args,
    llvm::StringRef BoundArch,
    Action::OffloadKind DeviceOffloadKind) const

Description

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 \p DeviceOffloadKind is specified the translation specific for that offload kind is performed.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:149

Parameters

const llvm::opt::DerivedArgList& Args
llvm::StringRef BoundArch
- The bound architecture name, or 0.
Action::OffloadKind DeviceOffloadKind
- The device offload kind used for the translation.

void addClangTargetOptions(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args,
    Action::OffloadKind DeviceOffloadKind) const

Description

Add options that need to be passed to cc1 for this target.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:151

Parameters

const llvm::opt::ArgList& DriverArgs
llvm::opt::ArgStringList& CC1Args
Action::OffloadKind DeviceOffloadKind

void addClangWarningOptions(
    llvm::opt::ArgStringList& CC1Args) const

Description

Add warning options that need to be passed to cc1 for this target.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:177

Parameters

llvm::opt::ArgStringList& CC1Args

void adjustDebugInfoKind(
    codegenoptions::DebugInfoKind& DebugInfoKind,
    const llvm::opt::ArgList& Args) const

Description

Adjust debug information kind considering all passed options.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:170

Parameters

codegenoptions::DebugInfoKind& DebugInfoKind
const llvm::opt::ArgList& Args

clang::driver::Tool* buildAssembler() const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:202

clang::driver::Tool* buildLinker() const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:203

llvm::VersionTuple computeMSVCVersion(
    const clang::driver::Driver* D,
    const llvm::opt::ArgList& Args) const

Description

On Windows, returns the MSVC compatibility version.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:191

Parameters

const clang::driver::Driver* D
const llvm::opt::ArgList& Args

const llvm::Triple* getAuxTriple() const

Description

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.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:142

llvm::DenormalMode getDefaultDenormalModeForType(
    const llvm::opt::ArgList& DriverArgs,
    const clang::driver::JobAction& JA,
    const llvm::fltSemantics* FPType =
        nullptr) const

Description

Returns the output denormal handling type in the default floating point environment for the given \p FPType if given. Otherwise, the default assumed mode for any floating point type.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:155

Parameters

const llvm::opt::ArgList& DriverArgs
const clang::driver::JobAction& JA
const llvm::fltSemantics* FPType = nullptr

std::string getInputFilename(
    const clang::driver::InputInfo& Input) const

Description

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.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:146

Parameters

const clang::driver::InputInfo& Input

unsigned int getMaxDwarfVersion() const

Declared at: clang/lib/Driver/ToolChains/Cuda.h:196

clang::SanitizerMask getSupportedSanitizers()
    const

Description

Return sanitizers which are available in this toolchain.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:188

bool isCrossCompiling() const

Description

Returns true if the toolchain is targeting a non-native architecture.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:162

bool isPICDefault() const

Description

Test whether this toolchain defaults to PIC.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:163

bool isPICDefaultForced() const

Description

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 \c isPICDefault() and \c isPIEDefault(const llvm::opt::ArgList &Args ) are used exclusively.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:167

bool isPIEDefault(
    const llvm::opt::ArgList& Args) const

Description

Test whether this toolchain defaults to PIE.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:164

Parameters

const llvm::opt::ArgList& Args

bool supportsDebugInfoOption(
    const llvm::opt::Arg* A) const

Description

Does this toolchain supports given debug info option or not.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:169

Parameters

const llvm::opt::Arg* A

bool useIntegratedAs() const

Description

Check if the toolchain should use the integrated assembler.

Declared at: clang/lib/Driver/ToolChains/Cuda.h:161