Lines Matching defs:Darwin

1 //===--- Darwin.cpp - Darwin Tool and ToolChain Implementations -*- C++ -*-===//
9 #include "Darwin.h"
44 // archs which Darwin doesn't use.
52 // This code must be kept in sync with Clang's Darwin specific argument
931 /// Darwin - Darwin tool chain for i386 and x86_64.
932 Darwin::Darwin(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
939 // Darwin always preprocesses assembly files (unless -x is used explicitly).
948 ToolChain::CXXStdlibType Darwin::GetDefaultCXXStdlibType() const {
953 /// Darwin provides an ARC runtime starting in MacOS X 10.7 and iOS 5.0.
954 ObjCRuntime Darwin::getDefaultObjCRuntime(bool isNonFragile) const {
971 /// Darwin provides a blocks runtime starting in MacOS X 10.6 and iOS 3.2.
972 bool Darwin::hasBlocksRuntime() const {
983 void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs,
988 void Darwin::AddHIPIncludeArgs(const ArgList &DriverArgs,
1082 Darwin::~Darwin() {}
1086 std::string Darwin::ComputeEffectiveClangTriple(const ArgList &Args,
1090 // If the target isn't initialized (e.g., an unknown Darwin platform, return
1145 : Darwin(D, Triple, Args) {}
1324 std::string Darwin::getCompilerRT(const ArgList &, StringRef Component,
1330 // On Darwin, the builtins component is not in the library name
1343 StringRef Darwin::getPlatformFamily() const {
1363 StringRef Darwin::getSDKName(StringRef isysroot) {
1375 StringRef Darwin::getOSLibraryNameSuffix(bool IgnoreSim) const {
1421 /// expected page size for Darwin.
1433 void Darwin::addProfileRTLibs(const ArgList &Args,
1498 // Darwin doesn't support real static executables, don't link any runtime
1624 /// The Darwin OS that was selected or inferred from arguments / environment.
1641 using DarwinPlatformKind = Darwin::DarwinPlatformKind;
1642 using DarwinEnvironmentKind = Darwin::DarwinEnvironmentKind;
1727 llvm_unreachable("Unsupported Darwin Source Kind");
1841 case llvm::Triple::Darwin:
1855 llvm_unreachable("Unable to infer Darwin variant");
1892 return DarwinPlatform::createOSVersionArg(Darwin::MacOS, macOSVersion,
1901 Darwin::IPhoneOS, iOSVersion,
1911 Darwin::TvOS, TvOSVersion,
1916 Darwin::WatchOS, WatchOSVersion,
1927 std::string Targets[Darwin::LastDarwinPlatform + 1];
1936 static_assert(std::size(EnvVars) == Darwin::LastDarwinPlatform + 1,
1945 if (!Targets[Darwin::MacOS].empty() &&
1946 (!Targets[Darwin::IPhoneOS].empty() ||
1947 !Targets[Darwin::WatchOS].empty() || !Targets[Darwin::TvOS].empty() ||
1948 !Targets[Darwin::XROS].empty())) {
1952 Targets[Darwin::MacOS] = "";
1954 Targets[Darwin::IPhoneOS] = Targets[Darwin::WatchOS] =
1955 Targets[Darwin::TvOS] = Targets[Darwin::XROS] = "";
1973 (Darwin::DarwinPlatformKind)Target.index(), EnvVars[Target.index()],
1998 StringRef SDK = Darwin::getSDKName(isysroot);
2021 Darwin::IPhoneOS, Version,
2024 return DarwinPlatform::createFromSDK(Darwin::MacOS,
2028 Darwin::WatchOS, Version,
2033 Darwin::TvOS, Version,
2037 Darwin::XROS, Version,
2040 return DarwinPlatform::createFromSDK(Darwin::DriverKit, Version);
2054 case llvm::Triple::Darwin:
2099 inferDeploymentTargetFromArch(DerivedArgList &Args, const Darwin &Toolchain,
2126 if (Triple.getOS() == llvm::Triple::Darwin ||
2209 void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
2322 assert(OSTarget && "Unable to infer Darwin variant");
2397 llvm_unreachable("unknown kind of Darwin platform");
2548 // On Darwin, libc++ can be installed in one of the following places:
2647 // it was previously found in the gcc lib dir. However, for all the Darwin
2683 // For Darwin platforms, use the compiler-rt-based support library
2899 bool Darwin::isAlignedAllocationUnavailable() const {
2927 const Darwin::DarwinPlatformKind &TargetPlatform,
2928 const Darwin::DarwinEnvironmentKind &TargetEnvironment,
2930 if (TargetEnvironment == Darwin::NativeEnvironment ||
2931 TargetEnvironment == Darwin::Simulator ||
2932 TargetEnvironment == Darwin::MacCatalyst) {
2933 // Standard xnu/Mach/Darwin based environments
2953 case Darwin::MacOS:
2955 case Darwin::IPhoneOS:
2957 case Darwin::MacCatalyst:
2965 case Darwin::TvOS:
2967 case Darwin::WatchOS:
2969 case Darwin::XROS:
2983 case llvm::Triple::Darwin:
2996 bool Darwin::isSizedDeallocationUnavailable() const {
3023 void Darwin::addClangTargetOptions(
3054 // all together in the Darwin module. That leads to module cycles with
3057 // darwin headers are in the Darwin module, there's a module cycle Darwin ->
3058 // _Builtin_stdint -> Darwin (i.e. inttypes.h (darwin) -> stdint.h (builtin) ->
3061 // i.e. when the builtin stdint.h is in the Darwin module too, the cycle
3072 void Darwin::addClangCC1ASTargetOptions(
3128 Darwin::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch,
3130 // First get the generic Apple args, before moving onto Darwin-specific ones.
3202 llvm::ExceptionHandling Darwin::GetExceptionModel(const ArgList &Args) const {
3203 // Darwin uses SjLj exceptions on ARM.
3216 bool Darwin::SupportsEmbeddedBitcode() const {
3237 void Darwin::addMinVersionArgs(const ArgList &Args,
3289 static const char *getPlatformName(Darwin::DarwinPlatformKind Platform,
3290 Darwin::DarwinEnvironmentKind Environment) {
3292 case Darwin::MacOS:
3294 case Darwin::IPhoneOS:
3295 if (Environment == Darwin::MacCatalyst)
3298 case Darwin::TvOS:
3300 case Darwin::WatchOS:
3302 case Darwin::XROS:
3304 case Darwin::DriverKit:
3310 void Darwin::addPlatformVersionArgs(const llvm::opt::ArgList &Args,
3313 [&](const VersionTuple &TV, Darwin::DarwinPlatformKind TargetPlatform,
3314 Darwin::DarwinEnvironmentKind TargetEnvironment,
3321 if (TargetEnvironment == Darwin::Simulator)
3325 if ((TargetPlatform == Darwin::IPhoneOS ||
3326 TargetPlatform == Darwin::TvOS) &&
3379 Darwin::DarwinPlatformKind Platform;
3380 Darwin::DarwinEnvironmentKind Environment;
3384 Platform = Darwin::MacOS;
3385 Environment = Darwin::NativeEnvironment;
3391 Platform = Darwin::IPhoneOS;
3392 Environment = Darwin::MacCatalyst;
3399 static void addDynamicLibLinkArgs(const Darwin &D, const ArgList &Args,
3417 static void addBundleLinkArgs(const Darwin &D, const ArgList &Args,
3428 static void addPgProfilingLinkArgs(const Darwin &D, const ArgList &Args,
3452 static void addDefaultCRTLinkArgs(const Darwin &D, const ArgList &Args,
3476 void Darwin::addStartObjectFileArgs(const ArgList &Args,
3499 void Darwin::CheckObjCARC() const {
3506 SanitizerMask Darwin::getSupportedSanitizers() const {
3537 void Darwin::printVerboseInfo(raw_ostream &OS) const {