class MachO

Declaration

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

Description

ToolChain - Access to tools for a single platform.

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

Inherits from: ToolChain

Member Variables

private std::unique_ptr<tools::darwin::Lipo> Lipo
private std::unique_ptr<tools::darwin::Dsymutil> Dsymutil
private std::unique_ptr<tools::darwin::VerifyDebug> VerifyDebug
private Optional<llvm::VersionTuple> LinkerVersion
The version of the linker known to be available in the tool chain.

Inherited from ToolChain:

protected Multilibs
protected SelectedMultilib

Method Overview

Inherited from ToolChain:

Methods

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

Description

Add the linker arguments to link the ARC runtime library.

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

Parameters

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

void AddLinkRuntimeLib(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs,
    llvm::StringRef Component,
    clang::driver::toolchains::MachO::
        RuntimeLinkOptions Opts =
            clang::driver::toolchains::MachO::
                RuntimeLinkOptions(),
    bool IsShared = false) const

Description

Add a runtime library to the list of items to link.

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

Parameters

const llvm::opt::ArgList& Args
llvm::opt::ArgStringList& CmdArgs
llvm::StringRef Component
clang::driver::toolchains::MachO:: RuntimeLinkOptions Opts = clang::driver::toolchains::MachO::RuntimeLinkOptions()
bool IsShared = false

virtual void AddLinkRuntimeLibArgs(
    const llvm::opt::ArgList& Args,
    llvm::opt::ArgStringList& CmdArgs,
    bool ForceLinkBuiltinRT = false) const

Description

Add the linker arguments to link the compiler runtime library. FIXME: This API is intended for use with embedded libraries only, and is misleadingly named.

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

Parameters

const llvm::opt::ArgList& Args
llvm::opt::ArgStringList& CmdArgs
bool ForceLinkBuiltinRT = false

clang::driver::ToolChain::RuntimeLibType
GetDefaultRuntimeLibType() const

Description

GetDefaultRuntimeLibType - Get the default runtime library variant to use.

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

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:273

Parameters

const llvm::opt::ArgList& Args

std::string GetGlobalDebugPathRemapping() const

Description

Add an additional -fdebug-prefix-map entry.

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

bool HasNativeLLVMSupport() const

Description

HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.

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

bool IsBlocksDefault() const

Description

IsBlocksDefault - Does this tool chain enable -fblocks by default.

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

bool IsEncodeExtendedBlockSignatureDefault() const

Description

IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature by default.

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

bool IsIntegratedAssemblerDefault() const

Description

IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.

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

bool IsMathErrnoDefault() const

Description

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

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

bool IsObjCNonFragileABIDefault() const

Description

IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.

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

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

Description

IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.

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

Parameters

const llvm::opt::ArgList& Args

types::ID LookupTypeForExtension(
    llvm::StringRef Ext) const

Description

} {

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

Parameters

llvm::StringRef Ext

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

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

Parameters

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

bool SupportsProfiling() const

Description

SupportsProfiling - Does this tool chain support -pg.

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

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:233

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 UseDwarfDebugFlags() const

Description

UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information.

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

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:255

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

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

Parameters

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

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

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

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:219

Parameters

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

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

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

Parameters

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

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

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

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

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

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

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

bool canSplitThinLTOUnit() const

Description

Returns true when it's possible to split LTO unit to use whole program devirtualization and CFI santiizers.

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

llvm::VersionTuple getLinkerVersion(
    const llvm::opt::ArgList& Args) const

Description

Get the version of the linker known to be available for a particular compiler invocation (via the `-mlinker-version=` arg).

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

Parameters

const llvm::opt::ArgList& Args

llvm::StringRef getMachOArchName(
    const llvm::opt::ArgList& Args) const

Description

Get the "MachO" arch name for a particular compiler invocation. For example, Apple treats different ARM variations as distinct architectures.

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

Parameters

const llvm::opt::ArgList& Args

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

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

Parameters

bool IgnoreSim = false

clang::driver::Tool* getTool(
    Action::ActionClass AC) const

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

Parameters

Action::ActionClass AC

virtual 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:194

bool isPICDefault() const

Description

Test whether this toolchain defaults to PIC.

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

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

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

Description

Test whether this toolchain defaults to PIE.

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

Parameters

const llvm::opt::ArgList& Args

bool isTargetIOSBased() const

Description

Is the target either iOS or an iOS simulator?

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

~MachO()

Description

@ }

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