class Darwin

Declaration

class Darwin : public MachO { /* full declaration omitted */ };

Description

Darwin - The base Darwin tool chain.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:288

Inherits from: MachO

Member Variables

public bool TargetInitialized
Whether the information on the target has been initialized.
public clang::driver::toolchains::Darwin:: DarwinPlatformKind TargetPlatform
public clang::driver::toolchains::Darwin:: DarwinEnvironmentKind TargetEnvironment
public llvm::VersionTuple TargetVersion
The native OS version we are targeting.
public llvm::VersionTuple OSTargetVersion
The OS version we are targeting as specified in the triple.
public Optional<clang::DarwinSDKInfo> SDKInfo
The information about the darwin SDK that was used.
public Optional<llvm::Triple> TargetVariantTriple
The target variant triple that was specified (if any).
public clang::driver::CudaInstallationDetector CudaInstallation
public clang::driver::RocmInstallationDetector RocmInstallation

Inherited from ToolChain:

protected Multilibs
protected SelectedMultilib

Method Overview

Inherited from MachO:

Inherited from ToolChain:

Methods

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/Darwin.h:537

Parameters

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

void AddDeploymentTarget(
    llvm::opt::DerivedArgList& Args) const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:329

Parameters

llvm::opt::DerivedArgList& Args

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

Description

Add arguments to use system-specific HIP includes.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:539

Parameters

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

void CheckObjCARC() const

Description

Complain if this tool chain doesn't support Objective-C ARC.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:563

std::string ComputeEffectiveClangTriple(
    const llvm::opt::ArgList& Args,
    types::ID InputType) const

Description

ComputeEffectiveClangTriple - Return the Clang triple to use for this target, which may take into account the command line arguments. For example, on Darwin the -mmacosx-version-min= command line argument (which sets the deployment target) determines the version in the triple passed to Clang.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:336

Parameters

const llvm::opt::ArgList& Args
types::ID InputType

Darwin(const clang::driver::Driver& D,
       const llvm::Triple& Triple,
       const llvm::opt::ArgList& Args)

Declared at: clang/lib/Driver/ToolChains/Darwin.h:332

Parameters

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

clang::driver::ToolChain::CXXStdlibType
GetDefaultCXXStdlibType() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:533

LangOptions::StackProtectorMode
GetDefaultStackProtectorLevel(
    bool KernelOrKext) const

Description

GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:550

Parameters

bool KernelOrKext

llvm::ExceptionHandling GetExceptionModel(
    const llvm::opt::ArgList& Args) const

Description

GetExceptionModel - Return the tool chain exception model.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:565

Parameters

const llvm::opt::ArgList& Args

bool SupportsEmbeddedBitcode() const

Description

SupportsEmbeddedBitcode - Does this tool chain support embedded bitcode.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:568

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/Darwin.h:530

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.

bool UseObjCMixedDispatch() const

Description

UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used?

Declared at: clang/lib/Driver/ToolChains/Darwin.h:542

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/Darwin.h:510

Parameters

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

void addMinVersionArgs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs) const

Description

{

Declared at: clang/lib/Driver/ToolChains/Darwin.h:342

Parameters

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

void addPlatformVersionArgs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs) const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:345

Parameters

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

void addProfileRTLibs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs) const

Description

Add any profiling runtime libraries that are needed. This is essentially a MachO specific version of addProfileRT in Tools.cpp.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:356

Parameters

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

void addStartObjectFileArgs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs) const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:348

Parameters

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

clang::ObjCRuntime getDefaultObjCRuntime(
    bool isNonFragile) const

Description

getDefaultObjCRuntime - Return the default Objective-C runtime for this platform. FIXME: this really belongs on some sort of DeploymentTarget abstraction

Declared at: clang/lib/Driver/ToolChains/Darwin.h:534

Parameters

bool isNonFragile

llvm::StringRef getOSLibraryNameSuffix(
    bool IgnoreSim = false) const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:515

Parameters

bool IgnoreSim = false

llvm::StringRef getPlatformFamily() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:514

static llvm::StringRef getSDKName(
    llvm::StringRef isysroot)

Declared at: clang/lib/Driver/ToolChains/Darwin.h:518

Parameters

llvm::StringRef isysroot

clang::SanitizerMask getSupportedSanitizers()
    const

Description

Return sanitizers which are available in this toolchain.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:570

Optional<llvm::Triple> getTargetVariantTriple()
    const

Description

Returns the darwin target variant triple, the variant of the deployment target for which the code is being compiled.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:500

llvm::VersionTuple getTripleTargetVersion() const

Description

The version of the OS that's used by the OS specified in the target triple. It might be different from the actual target OS on which the program will run, e.g. MacCatalyst code runs on a macOS target, but its target triple is iOS.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:469

bool hasBlocksRuntime() const

Description

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

Declared at: clang/lib/Driver/ToolChains/Darwin.h:535

bool isAlignedAllocationUnavailable() const

Description

Return true if c++17 aligned allocation/deallocation functions are not implemented in the c++ standard library of the deployment target we are targeting.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:508

bool isCrossCompiling() const

Description

} {

Declared at: clang/lib/Driver/ToolChains/Darwin.h:527

bool isIPhoneOSVersionLT(
    unsigned int V0,
    unsigned int V1 = 0,
    unsigned int V2 = 0) const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:474

Parameters

unsigned int V0
unsigned int V1 = 0
unsigned int V2 = 0

bool isKernelStatic() const

Description

On some iOS platforms, kernel and kernel modules were built statically. Is this such a target?

Declared at: clang/lib/Driver/ToolChains/Darwin.h:351

bool isMacosxVersionLT(unsigned int V0,
                       unsigned int V1 = 0,
                       unsigned int V2 = 0) const

Description

Returns true if the minimum supported macOS version for the slice that's being built is less than the specified version. If there's no minimum supported macOS version, the deployment target version is compared to the specifed version instead.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:484

Parameters

unsigned int V0
unsigned int V1 = 0
unsigned int V2 = 0

bool isTargetAppleSiliconMac() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:458

bool isTargetDriverKit() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:439

bool isTargetIOSBased() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:404

bool isTargetIOSSimulator() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:398

bool isTargetIPhoneOS() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:392

bool isTargetInitialized() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:463

bool isTargetMacCatalyst() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:444

bool isTargetMacOS() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:448

bool isTargetMacOSBased() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:453

bool isTargetTvOS() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:409

bool isTargetTvOSBased() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:419

bool isTargetTvOSSimulator() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:414

bool isTargetWatchOS() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:424

bool isTargetWatchOSBased() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:434

bool isTargetWatchOSSimulator() const

Declared at: clang/lib/Driver/ToolChains/Darwin.h:429

void printVerboseInfo(llvm::raw_ostream& OS) const

Description

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.

Declared at: clang/lib/Driver/ToolChains/Darwin.h:572

Parameters

llvm::raw_ostream& OS

void setTarget(
    clang::driver::toolchains::Darwin::
        DarwinPlatformKind Platform,
    clang::driver::toolchains::Darwin::
        DarwinEnvironmentKind Environment,
    unsigned int Major,
    unsigned int Minor,
    unsigned int Micro,
    llvm::VersionTuple NativeTargetVersion) const

Description

} {

Declared at: clang/lib/Driver/ToolChains/Darwin.h:366

Parameters

clang::driver::toolchains::Darwin:: DarwinPlatformKind Platform
clang::driver::toolchains::Darwin:: DarwinEnvironmentKind Environment
unsigned int Major
unsigned int Minor
unsigned int Micro
llvm::VersionTuple NativeTargetVersion

~Darwin()

Description

@ }

Declared at: clang/lib/Driver/ToolChains/Darwin.h:334