clang  6.0.0svn
Functions
Darwin.cpp File Reference
#include "Darwin.h"
#include "Arch/ARM.h"
#include "CommonArgs.h"
#include "clang/Basic/AlignedAllocation.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/VirtualFileSystem.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/TargetParser.h"
#include <cstdlib>
Include dependency graph for Darwin.cpp:

Go to the source code of this file.

Functions

static bool shouldLinkerNotDedup (bool IsLinkerOnlyAction, const ArgList &Args)
 Pass -no_deduplicate to ld64 under certain conditions: More...
 
static bool isObjCRuntimeLinked (const ArgList &Args)
 Determine whether we are linking the ObjC runtime. More...
 
static const char * ArmMachOArchName (StringRef Arch)
 
static const char * ArmMachOArchNameCPU (StringRef CPU)
 
static bool hasExportSymbolDirective (const ArgList &Args)
 Check if the link command contains a symbol export directive. More...
 
static void addExportedSymbol (ArgStringList &CmdArgs, const char *Symbol)
 Add an export directive for Symbol to the link command. More...
 
static std::string getSystemOrSDKMacOSVersion (StringRef MacOSSDKVersion)
 Returns the most appropriate macOS target version for the current process. More...
 

Function Documentation

◆ addExportedSymbol()

static void addExportedSymbol ( ArgStringList &  CmdArgs,
const char *  Symbol 
)
static

Add an export directive for Symbol to the link command.

Definition at line 994 of file Darwin.cpp.

Referenced by clang::driver::toolchains::Darwin::addProfileRTLibs().

◆ ArmMachOArchName()

static const char* ArmMachOArchName ( StringRef  Arch)
static

Definition at line 724 of file Darwin.cpp.

Referenced by clang::driver::toolchains::MachO::getMachOArchName().

◆ ArmMachOArchNameCPU()

static const char* ArmMachOArchNameCPU ( StringRef  CPU)
static

Definition at line 741 of file Darwin.cpp.

Referenced by clang::driver::toolchains::MachO::getMachOArchName().

◆ getSystemOrSDKMacOSVersion()

static std::string getSystemOrSDKMacOSVersion ( StringRef  MacOSSDKVersion)
static

Returns the most appropriate macOS target version for the current process.

If the macOS SDK version is the same or earlier than the system version, then the SDK version is returned. Otherwise the system version is returned.

Definition at line 1149 of file Darwin.cpp.

References clang::driver::Driver::Diag(), clang::getAsString(), clang::VersionTuple::getAsString(), clang::driver::ToolChain::getPlatform(), clang::driver::Driver::GetReleaseVersion(), clang::driver::toolchains::Darwin::IPhoneOS, clang::driver::toolchains::Darwin::LastDarwinPlatform, clang::driver::toolchains::Darwin::MacOS, clang::driver::toolchains::Darwin::TvOS, and clang::driver::toolchains::Darwin::WatchOS.

◆ hasExportSymbolDirective()

static bool hasExportSymbolDirective ( const ArgList &  Args)
static

Check if the link command contains a symbol export directive.

Definition at line 981 of file Darwin.cpp.

Referenced by clang::driver::toolchains::Darwin::addProfileRTLibs().

◆ isObjCRuntimeLinked()

static bool isObjCRuntimeLinked ( const ArgList &  Args)
static

Determine whether we are linking the ObjC runtime.

Definition at line 413 of file Darwin.cpp.

References clang::driver::tools::isObjCAutoRefCount().

Referenced by clang::driver::tools::darwin::Linker::ConstructJob().

◆ shouldLinkerNotDedup()

static bool shouldLinkerNotDedup ( bool  IsLinkerOnlyAction,
const ArgList &  Args 
)
static