clang  8.0.0svn
Darwin.h
Go to the documentation of this file.
1 //===--- Darwin.h - Darwin ToolChain Implementations ------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H
12 
13 #include "Cuda.h"
14 #include "clang/Driver/XRayArgs.h"
15 #include "clang/Driver/Tool.h"
16 #include "clang/Driver/ToolChain.h"
17 
18 namespace clang {
19 namespace driver {
20 
21 namespace toolchains {
22 class MachO;
23 } // end namespace toolchains
24 
25 namespace tools {
26 
27 namespace darwin {
28 llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str);
29 void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str);
30 
31 class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool {
32  virtual void anchor();
33 
34 protected:
35  void AddMachOArch(const llvm::opt::ArgList &Args,
36  llvm::opt::ArgStringList &CmdArgs) const;
37 
39  return reinterpret_cast<const toolchains::MachO &>(getToolChain());
40  }
41 
42 public:
44  const char *Name, const char *ShortName, const ToolChain &TC,
45  ResponseFileSupport ResponseSupport = RF_None,
46  llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8,
47  const char *ResponseFlag = "@")
48  : Tool(Name, ShortName, TC, ResponseSupport, ResponseEncoding,
49  ResponseFlag) {}
50 };
51 
52 class LLVM_LIBRARY_VISIBILITY Assembler : public MachOTool {
53 public:
54  Assembler(const ToolChain &TC)
55  : MachOTool("darwin::Assembler", "assembler", TC) {}
56 
57  bool hasIntegratedCPP() const override { return false; }
58 
59  void ConstructJob(Compilation &C, const JobAction &JA,
60  const InputInfo &Output, const InputInfoList &Inputs,
61  const llvm::opt::ArgList &TCArgs,
62  const char *LinkingOutput) const override;
63 };
64 
65 class LLVM_LIBRARY_VISIBILITY Linker : public MachOTool {
66  bool NeedsTempPath(const InputInfoList &Inputs) const;
67  void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args,
68  llvm::opt::ArgStringList &CmdArgs,
69  const InputInfoList &Inputs) const;
70 
71 public:
72  Linker(const ToolChain &TC)
73  : MachOTool("darwin::Linker", "linker", TC, RF_FileList,
74  llvm::sys::WEM_UTF8, "-filelist") {}
75 
76  bool hasIntegratedCPP() const override { return false; }
77  bool isLinkJob() const override { return true; }
78 
79  void ConstructJob(Compilation &C, const JobAction &JA,
80  const InputInfo &Output, const InputInfoList &Inputs,
81  const llvm::opt::ArgList &TCArgs,
82  const char *LinkingOutput) const override;
83 };
84 
85 class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool {
86 public:
87  Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {}
88 
89  bool hasIntegratedCPP() const override { return false; }
90 
91  void ConstructJob(Compilation &C, const JobAction &JA,
92  const InputInfo &Output, const InputInfoList &Inputs,
93  const llvm::opt::ArgList &TCArgs,
94  const char *LinkingOutput) const override;
95 };
96 
97 class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool {
98 public:
99  Dsymutil(const ToolChain &TC)
100  : MachOTool("darwin::Dsymutil", "dsymutil", TC) {}
101 
102  bool hasIntegratedCPP() const override { return false; }
103  bool isDsymutilJob() const override { return true; }
104 
105  void ConstructJob(Compilation &C, const JobAction &JA,
106  const InputInfo &Output, const InputInfoList &Inputs,
107  const llvm::opt::ArgList &TCArgs,
108  const char *LinkingOutput) const override;
109 };
110 
111 class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool {
112 public:
114  : MachOTool("darwin::VerifyDebug", "dwarfdump", TC) {}
115 
116  bool hasIntegratedCPP() const override { return false; }
117 
118  void ConstructJob(Compilation &C, const JobAction &JA,
119  const InputInfo &Output, const InputInfoList &Inputs,
120  const llvm::opt::ArgList &TCArgs,
121  const char *LinkingOutput) const override;
122 };
123 } // end namespace darwin
124 } // end namespace tools
125 
126 namespace toolchains {
127 
128 class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
129 protected:
130  Tool *buildAssembler() const override;
131  Tool *buildLinker() const override;
132  Tool *getTool(Action::ActionClass AC) const override;
133 
134 private:
135  mutable std::unique_ptr<tools::darwin::Lipo> Lipo;
136  mutable std::unique_ptr<tools::darwin::Dsymutil> Dsymutil;
137  mutable std::unique_ptr<tools::darwin::VerifyDebug> VerifyDebug;
138 
139 public:
140  MachO(const Driver &D, const llvm::Triple &Triple,
141  const llvm::opt::ArgList &Args);
142  ~MachO() override;
143 
144  /// @name MachO specific toolchain API
145  /// {
146 
147  /// Get the "MachO" arch name for a particular compiler invocation. For
148  /// example, Apple treats different ARM variations as distinct architectures.
149  StringRef getMachOArchName(const llvm::opt::ArgList &Args) const;
150 
151  /// Add the linker arguments to link the ARC runtime library.
152  virtual void AddLinkARCArgs(const llvm::opt::ArgList &Args,
153  llvm::opt::ArgStringList &CmdArgs) const {}
154 
155  /// Add the linker arguments to link the compiler runtime library.
156  ///
157  /// FIXME: This API is intended for use with embedded libraries only, and is
158  /// misleadingly named.
159  virtual void AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args,
160  llvm::opt::ArgStringList &CmdArgs) const;
161 
162  virtual void addStartObjectFileArgs(const llvm::opt::ArgList &Args,
163  llvm::opt::ArgStringList &CmdArgs) const {
164  }
165 
166  virtual void addMinVersionArgs(const llvm::opt::ArgList &Args,
167  llvm::opt::ArgStringList &CmdArgs) const {}
168 
169  /// On some iOS platforms, kernel and kernel modules were built statically. Is
170  /// this such a target?
171  virtual bool isKernelStatic() const { return false; }
172 
173  /// Is the target either iOS or an iOS simulator?
174  bool isTargetIOSBased() const { return false; }
175 
176  /// Options to control how a runtime library is linked.
177  enum RuntimeLinkOptions : unsigned {
178  /// Link the library in even if it can't be found in the VFS.
179  RLO_AlwaysLink = 1 << 0,
180 
181  /// Use the embedded runtime from the macho_embedded directory.
182  RLO_IsEmbedded = 1 << 1,
183 
184  /// Emit rpaths for @executable_path as well as the resource directory.
185  RLO_AddRPath = 1 << 2,
186 
187  /// Link the library in before any others.
188  RLO_FirstLink = 1 << 3,
189  };
190 
191  /// Add a runtime library to the list of items to link.
192  void AddLinkRuntimeLib(const llvm::opt::ArgList &Args,
193  llvm::opt::ArgStringList &CmdArgs, StringRef Component,
195  bool IsShared = false) const;
196 
197  /// Add any profiling runtime libraries that are needed. This is essentially a
198  /// MachO specific version of addProfileRT in Tools.cpp.
199  void addProfileRTLibs(const llvm::opt::ArgList &Args,
200  llvm::opt::ArgStringList &CmdArgs) const override {
201  // There aren't any profiling libs for embedded targets currently.
202  }
203 
204  /// }
205  /// @name ToolChain Implementation
206  /// {
207 
208  types::ID LookupTypeForExtension(StringRef Ext) const override;
209 
210  bool HasNativeLLVMSupport() const override;
211 
212  llvm::opt::DerivedArgList *
213  TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
214  Action::OffloadKind DeviceOffloadKind) const override;
215 
216  bool IsBlocksDefault() const override {
217  // Always allow blocks on Apple; users interested in versioning are
218  // expected to use /usr/include/Block.h.
219  return true;
220  }
221  bool IsIntegratedAssemblerDefault() const override {
222  // Default integrated assembler to on for Apple's MachO targets.
223  return true;
224  }
225 
226  bool IsMathErrnoDefault() const override { return false; }
227 
228  bool IsEncodeExtendedBlockSignatureDefault() const override { return true; }
229 
230  bool IsObjCNonFragileABIDefault() const override {
231  // Non-fragile ABI is default for everything but i386.
232  return getTriple().getArch() != llvm::Triple::x86;
233  }
234 
235  bool UseObjCMixedDispatch() const override { return true; }
236 
237  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
238 
241  }
242 
243  bool isPICDefault() const override;
244  bool isPIEDefault() const override;
245  bool isPICDefaultForced() const override;
246 
247  bool SupportsProfiling() const override;
248 
249  bool UseDwarfDebugFlags() const override;
250 
251  llvm::ExceptionHandling
252  GetExceptionModel(const llvm::opt::ArgList &Args) const override {
253  return llvm::ExceptionHandling::None;
254  }
255 
256  virtual StringRef getOSLibraryNameSuffix(bool IgnoreSim = false) const {
257  return "";
258  }
259 
260  /// }
261 };
262 
263 /// Darwin - The base Darwin tool chain.
264 class LLVM_LIBRARY_VISIBILITY Darwin : public MachO {
265 public:
266  /// Whether the information on the target has been initialized.
267  //
268  // FIXME: This should be eliminated. What we want to do is make this part of
269  // the "default target for arguments" selection process, once we get out of
270  // the argument translation business.
271  mutable bool TargetInitialized;
272 
278  LastDarwinPlatform = WatchOS
279  };
283  };
284 
287 
288  /// The OS version we are targeting.
289  mutable VersionTuple TargetVersion;
290 
292 
293 private:
294  void AddDeploymentTarget(llvm::opt::DerivedArgList &Args) const;
295 
296 public:
297  Darwin(const Driver &D, const llvm::Triple &Triple,
298  const llvm::opt::ArgList &Args);
299  ~Darwin() override;
300 
301  std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args,
302  types::ID InputType) const override;
303 
304  /// @name Apple Specific Toolchain Implementation
305  /// {
306 
307  void addMinVersionArgs(const llvm::opt::ArgList &Args,
308  llvm::opt::ArgStringList &CmdArgs) const override;
309 
310  void addStartObjectFileArgs(const llvm::opt::ArgList &Args,
311  llvm::opt::ArgStringList &CmdArgs) const override;
312 
313  bool isKernelStatic() const override {
314  return (!(isTargetIPhoneOS() && !isIPhoneOSVersionLT(6, 0)) &&
315  !isTargetWatchOS());
316  }
317 
318  void addProfileRTLibs(const llvm::opt::ArgList &Args,
319  llvm::opt::ArgStringList &CmdArgs) const override;
320 
321 protected:
322  /// }
323  /// @name Darwin specific Toolchain functions
324  /// {
325 
326  // FIXME: Eliminate these ...Target functions and derive separate tool chains
327  // for these targets and put version in constructor.
329  unsigned Major, unsigned Minor, unsigned Micro) const {
330  // FIXME: For now, allow reinitialization as long as values don't
331  // change. This will go away when we move away from argument translation.
332  if (TargetInitialized && TargetPlatform == Platform &&
333  TargetEnvironment == Environment &&
334  TargetVersion == VersionTuple(Major, Minor, Micro))
335  return;
336 
337  assert(!TargetInitialized && "Target already initialized!");
338  TargetInitialized = true;
339  TargetPlatform = Platform;
340  TargetEnvironment = Environment;
341  TargetVersion = VersionTuple(Major, Minor, Micro);
342  if (Environment == Simulator)
343  const_cast<Darwin *>(this)->setTripleEnvironment(llvm::Triple::Simulator);
344  }
345 
346  bool isTargetIPhoneOS() const {
347  assert(TargetInitialized && "Target not initialized!");
348  return (TargetPlatform == IPhoneOS || TargetPlatform == TvOS) &&
349  TargetEnvironment == NativeEnvironment;
350  }
351 
352  bool isTargetIOSSimulator() const {
353  assert(TargetInitialized && "Target not initialized!");
354  return (TargetPlatform == IPhoneOS || TargetPlatform == TvOS) &&
355  TargetEnvironment == Simulator;
356  }
357 
358  bool isTargetIOSBased() const {
359  assert(TargetInitialized && "Target not initialized!");
360  return isTargetIPhoneOS() || isTargetIOSSimulator();
361  }
362 
363  bool isTargetTvOS() const {
364  assert(TargetInitialized && "Target not initialized!");
365  return TargetPlatform == TvOS && TargetEnvironment == NativeEnvironment;
366  }
367 
368  bool isTargetTvOSSimulator() const {
369  assert(TargetInitialized && "Target not initialized!");
370  return TargetPlatform == TvOS && TargetEnvironment == Simulator;
371  }
372 
373  bool isTargetTvOSBased() const {
374  assert(TargetInitialized && "Target not initialized!");
375  return TargetPlatform == TvOS;
376  }
377 
378  bool isTargetWatchOS() const {
379  assert(TargetInitialized && "Target not initialized!");
380  return TargetPlatform == WatchOS && TargetEnvironment == NativeEnvironment;
381  }
382 
384  assert(TargetInitialized && "Target not initialized!");
385  return TargetPlatform == WatchOS && TargetEnvironment == Simulator;
386  }
387 
388  bool isTargetWatchOSBased() const {
389  assert(TargetInitialized && "Target not initialized!");
390  return TargetPlatform == WatchOS;
391  }
392 
393  bool isTargetMacOS() const {
394  assert(TargetInitialized && "Target not initialized!");
395  return TargetPlatform == MacOS;
396  }
397 
398  bool isTargetInitialized() const { return TargetInitialized; }
399 
400  VersionTuple getTargetVersion() const {
401  assert(TargetInitialized && "Target not initialized!");
402  return TargetVersion;
403  }
404 
405  bool isIPhoneOSVersionLT(unsigned V0, unsigned V1 = 0,
406  unsigned V2 = 0) const {
407  assert(isTargetIOSBased() && "Unexpected call for non iOS target!");
408  return TargetVersion < VersionTuple(V0, V1, V2);
409  }
410 
411  bool isMacosxVersionLT(unsigned V0, unsigned V1 = 0, unsigned V2 = 0) const {
412  assert(isTargetMacOS() && "Unexpected call for non OS X target!");
413  return TargetVersion < VersionTuple(V0, V1, V2);
414  }
415 
416  /// Return true if c++17 aligned allocation/deallocation functions are not
417  /// implemented in the c++ standard library of the deployment target we are
418  /// targeting.
419  bool isAlignedAllocationUnavailable() const;
420 
421  void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
422  llvm::opt::ArgStringList &CC1Args,
423  Action::OffloadKind DeviceOffloadKind) const override;
424 
425  StringRef getPlatformFamily() const;
426  StringRef getOSLibraryNameSuffix(bool IgnoreSim = false) const override;
427 
428 public:
429  static StringRef getSDKName(StringRef isysroot);
430 
431  /// }
432  /// @name ToolChain Implementation
433  /// {
434 
435  // Darwin tools support multiple architecture (e.g., i386 and x86_64) and
436  // most development is done against SDKs, so compiling for a different
437  // architecture should not get any special treatment.
438  bool isCrossCompiling() const override { return false; }
439 
440  llvm::opt::DerivedArgList *
441  TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
442  Action::OffloadKind DeviceOffloadKind) const override;
443 
444  CXXStdlibType GetDefaultCXXStdlibType() const override;
445  ObjCRuntime getDefaultObjCRuntime(bool isNonFragile) const override;
446  bool hasBlocksRuntime() const override;
447 
448  void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
449  llvm::opt::ArgStringList &CC1Args) const override;
450 
451  bool UseObjCMixedDispatch() const override {
452  // This is only used with the non-fragile ABI and non-legacy dispatch.
453 
454  // Mixed dispatch is used everywhere except OS X before 10.6.
455  return !(isTargetMacOS() && isMacosxVersionLT(10, 6));
456  }
457 
458  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
459  // Stack protectors default to on for user code on 10.5,
460  // and for everything in 10.6 and beyond
461  if (isTargetIOSBased() || isTargetWatchOSBased())
462  return 1;
463  else if (isTargetMacOS() && !isMacosxVersionLT(10, 6))
464  return 1;
465  else if (isTargetMacOS() && !isMacosxVersionLT(10, 5) && !KernelOrKext)
466  return 1;
467 
468  return 0;
469  }
470 
471  void CheckObjCARC() const override;
472 
473  llvm::ExceptionHandling GetExceptionModel(
474  const llvm::opt::ArgList &Args) const override;
475 
476  bool SupportsEmbeddedBitcode() const override;
477 
478  SanitizerMask getSupportedSanitizers() const override;
479 
480  void printVerboseInfo(raw_ostream &OS) const override;
481 };
482 
483 /// DarwinClang - The Darwin toolchain used by Clang.
484 class LLVM_LIBRARY_VISIBILITY DarwinClang : public Darwin {
485 public:
486  DarwinClang(const Driver &D, const llvm::Triple &Triple,
487  const llvm::opt::ArgList &Args);
488 
489  /// @name Apple ToolChain Implementation
490  /// {
491 
492  RuntimeLibType GetRuntimeLibType(const llvm::opt::ArgList &Args) const override;
493 
494  void AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args,
495  llvm::opt::ArgStringList &CmdArgs) const override;
496 
497  void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
498  llvm::opt::ArgStringList &CmdArgs) const override;
499 
500  void AddCCKextLibArgs(const llvm::opt::ArgList &Args,
501  llvm::opt::ArgStringList &CmdArgs) const override;
502 
503  void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const override;
504 
505  void AddLinkARCArgs(const llvm::opt::ArgList &Args,
506  llvm::opt::ArgStringList &CmdArgs) const override;
507 
508  unsigned GetDefaultDwarfVersion() const override;
509  // Until dtrace (via CTF) and LLDB can deal with distributed debug info,
510  // Darwin defaults to standalone/full debug info.
511  bool GetDefaultStandaloneDebug() const override { return true; }
512  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
513  return llvm::DebuggerKind::LLDB;
514  }
515 
516  /// }
517 
518 private:
519  void AddLinkSanitizerLibArgs(const llvm::opt::ArgList &Args,
520  llvm::opt::ArgStringList &CmdArgs,
521  StringRef Sanitizer,
522  bool shared = true) const;
523 };
524 
525 } // end namespace toolchains
526 } // end namespace driver
527 } // end namespace clang
528 
529 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H
bool hasIntegratedCPP() const override
Definition: Darwin.h:57
bool IsEncodeExtendedBlockSignatureDefault() const override
IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature...
Definition: Darwin.h:228
bool isMacosxVersionLT(unsigned V0, unsigned V1=0, unsigned V2=0) const
Definition: Darwin.h:411
DarwinClang - The Darwin toolchain used by Clang.
Definition: Darwin.h:484
unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain (0=off...
Definition: Darwin.h:458
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
Definition: Dominators.h:30
virtual void AddLinkARCArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
Add the linker arguments to link the ARC runtime library.
Definition: Darwin.h:152
bool isLinkJob() const override
Definition: Darwin.h:77
RuntimeLibType GetDefaultRuntimeLibType() const override
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Definition: Darwin.h:239
bool isDsymutilJob() const override
Definition: Darwin.h:103
MachOTool(const char *Name, const char *ShortName, const ToolChain &TC, ResponseFileSupport ResponseSupport=RF_None, llvm::sys::WindowsEncodingMethod ResponseEncoding=llvm::sys::WEM_UTF8, const char *ResponseFlag="@")
Definition: Darwin.h:43
bool isCrossCompiling() const override
Returns true if the toolchain is targeting a non-native architecture.
Definition: Darwin.h:438
llvm::ExceptionHandling GetExceptionModel(const llvm::opt::ArgList &Args) const override
GetExceptionModel - Return the tool chain exception model.
Definition: Darwin.h:252
bool IsBlocksDefault() const override
IsBlocksDefault - Does this tool chain enable -fblocks by default.
Definition: Darwin.h:216
DarwinEnvironmentKind TargetEnvironment
Definition: Darwin.h:286
Lipo(const ToolChain &TC)
Definition: Darwin.h:87
CudaInstallationDetector CudaInstallation
Definition: Darwin.h:291
bool TargetInitialized
Whether the information on the target has been initialized.
Definition: Darwin.h:271
A class to find a viable CUDA installation.
Definition: Cuda.h:29
void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override
Add any profiling runtime libraries that are needed.
Definition: Darwin.h:199
bool hasIntegratedCPP() const override
Definition: Darwin.h:89
Darwin - The base Darwin tool chain.
Definition: Darwin.h:264
virtual StringRef getOSLibraryNameSuffix(bool IgnoreSim=false) const
Definition: Darwin.h:256
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: Darwin.h:226
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:58
bool isTargetInitialized() const
Definition: Darwin.h:398
llvm::DebuggerKind getDefaultDebuggerTuning() const override
Definition: Darwin.h:512
bool isTargetWatchOSBased() const
Definition: Darwin.h:388
VersionTuple TargetVersion
The OS version we are targeting.
Definition: Darwin.h:289
bool hasIntegratedCPP() const override
Definition: Darwin.h:76
bool hasIntegratedCPP() const override
Definition: Darwin.h:102
Dsymutil(const ToolChain &TC)
Definition: Darwin.h:99
bool isTargetIOSSimulator() const
Definition: Darwin.h:352
llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str)
Definition: Darwin.cpp:34
bool hasIntegratedCPP() const override
Definition: Darwin.h:116
bool UseObjCMixedDispatch() const override
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be use...
Definition: Darwin.h:451
virtual void addMinVersionArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
Definition: Darwin.h:166
const toolchains::MachO & getMachOToolChain() const
Definition: Darwin.h:38
bool isKernelStatic() const override
On some iOS platforms, kernel and kernel modules were built statically.
Definition: Darwin.h:313
VersionTuple getTargetVersion() const
Definition: Darwin.h:400
bool isTargetIOSBased() const
Is the target either iOS or an iOS simulator?
Definition: Darwin.h:174
DarwinPlatformKind TargetPlatform
Definition: Darwin.h:285
virtual bool isKernelStatic() const
On some iOS platforms, kernel and kernel modules were built statically.
Definition: Darwin.h:171
Dataflow Directional Tag Classes.
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition: Darwin.h:230
The basic abstraction for the target Objective-C runtime.
Definition: ObjCRuntime.h:28
Assembler(const ToolChain &TC)
Definition: Darwin.h:54
bool GetDefaultStandaloneDebug() const override
Definition: Darwin.h:511
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str)
Definition: Darwin.cpp:69
Linker(const ToolChain &TC)
Definition: Darwin.h:72
bool IsIntegratedAssemblerDefault() const override
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Definition: Darwin.h:221
uint64_t SanitizerMask
Definition: Sanitizers.h:26
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:46
RuntimeLinkOptions
Options to control how a runtime library is linked.
Definition: Darwin.h:177
virtual void addStartObjectFileArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
Definition: Darwin.h:162
bool isTargetWatchOSSimulator() const
Definition: Darwin.h:383
bool isTargetTvOSSimulator() const
Definition: Darwin.h:368
bool isIPhoneOSVersionLT(unsigned V0, unsigned V1=0, unsigned V2=0) const
Definition: Darwin.h:405
VerifyDebug(const ToolChain &TC)
Definition: Darwin.h:113
void setTarget(DarwinPlatformKind Platform, DarwinEnvironmentKind Environment, unsigned Major, unsigned Minor, unsigned Micro) const
Definition: Darwin.h:328
bool UseObjCMixedDispatch() const override
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be use...
Definition: Darwin.h:235
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:87