clang  8.0.0svn
NetBSD.cpp
Go to the documentation of this file.
1 //===--- NetBSD.cpp - NetBSD 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 #include "NetBSD.h"
11 #include "Arch/ARM.h"
12 #include "Arch/Mips.h"
13 #include "Arch/Sparc.h"
14 #include "CommonArgs.h"
16 #include "clang/Driver/Driver.h"
17 #include "clang/Driver/Options.h"
19 #include "llvm/Option/ArgList.h"
20 
21 using namespace clang::driver;
22 using namespace clang::driver::tools;
23 using namespace clang::driver::toolchains;
24 using namespace clang;
25 using namespace llvm::opt;
26 
28  const InputInfo &Output,
29  const InputInfoList &Inputs,
30  const ArgList &Args,
31  const char *LinkingOutput) const {
32  claimNoWarnArgs(Args);
33  ArgStringList CmdArgs;
34 
35  // GNU as needs different flags for creating the correct output format
36  // on architectures with different ABIs or optional feature sets.
37  switch (getToolChain().getArch()) {
38  case llvm::Triple::x86:
39  CmdArgs.push_back("--32");
40  break;
41  case llvm::Triple::arm:
42  case llvm::Triple::armeb:
43  case llvm::Triple::thumb:
44  case llvm::Triple::thumbeb: {
45  StringRef MArch, MCPU;
46  arm::getARMArchCPUFromArgs(Args, MArch, MCPU, /*FromAs*/ true);
47  std::string Arch =
48  arm::getARMTargetCPU(MCPU, MArch, getToolChain().getTriple());
49  CmdArgs.push_back(Args.MakeArgString("-mcpu=" + Arch));
50  break;
51  }
52 
53  case llvm::Triple::mips:
54  case llvm::Triple::mipsel:
55  case llvm::Triple::mips64:
56  case llvm::Triple::mips64el: {
57  StringRef CPUName;
58  StringRef ABIName;
59  mips::getMipsCPUAndABI(Args, getToolChain().getTriple(), CPUName, ABIName);
60 
61  CmdArgs.push_back("-march");
62  CmdArgs.push_back(CPUName.data());
63 
64  CmdArgs.push_back("-mabi");
65  CmdArgs.push_back(mips::getGnuCompatibleMipsABIName(ABIName).data());
66 
67  if (getToolChain().getTriple().isLittleEndian())
68  CmdArgs.push_back("-EL");
69  else
70  CmdArgs.push_back("-EB");
71 
72  AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
73  break;
74  }
75 
76  case llvm::Triple::sparc:
77  case llvm::Triple::sparcel: {
78  CmdArgs.push_back("-32");
79  std::string CPU = getCPUName(Args, getToolChain().getTriple());
80  CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple()));
81  AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
82  break;
83  }
84 
85  case llvm::Triple::sparcv9: {
86  CmdArgs.push_back("-64");
87  std::string CPU = getCPUName(Args, getToolChain().getTriple());
88  CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple()));
89  AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
90  break;
91  }
92 
93  default:
94  break;
95  }
96 
97  Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
98 
99  CmdArgs.push_back("-o");
100  CmdArgs.push_back(Output.getFilename());
101 
102  for (const auto &II : Inputs)
103  CmdArgs.push_back(II.getFilename());
104 
105  const char *Exec = Args.MakeArgString((getToolChain().GetProgramPath("as")));
106  C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
107 }
108 
110  const InputInfo &Output,
111  const InputInfoList &Inputs,
112  const ArgList &Args,
113  const char *LinkingOutput) const {
115  static_cast<const toolchains::NetBSD &>(getToolChain());
116  const Driver &D = ToolChain.getDriver();
117  ArgStringList CmdArgs;
118 
119  if (!D.SysRoot.empty())
120  CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
121 
122  CmdArgs.push_back("--eh-frame-hdr");
123  if (Args.hasArg(options::OPT_static)) {
124  CmdArgs.push_back("-Bstatic");
125  if (Args.hasArg(options::OPT_pie)) {
126  Args.AddAllArgs(CmdArgs, options::OPT_pie);
127  CmdArgs.push_back("--no-dynamic-linker");
128  }
129  } else {
130  if (Args.hasArg(options::OPT_rdynamic))
131  CmdArgs.push_back("-export-dynamic");
132  if (Args.hasArg(options::OPT_shared)) {
133  CmdArgs.push_back("-Bshareable");
134  } else {
135  Args.AddAllArgs(CmdArgs, options::OPT_pie);
136  CmdArgs.push_back("-dynamic-linker");
137  CmdArgs.push_back("/libexec/ld.elf_so");
138  }
139  }
140 
141  // Many NetBSD architectures support more than one ABI.
142  // Determine the correct emulation for ld.
143  switch (ToolChain.getArch()) {
144  case llvm::Triple::x86:
145  CmdArgs.push_back("-m");
146  CmdArgs.push_back("elf_i386");
147  break;
148  case llvm::Triple::arm:
149  case llvm::Triple::thumb:
150  CmdArgs.push_back("-m");
151  switch (ToolChain.getTriple().getEnvironment()) {
152  case llvm::Triple::EABI:
153  case llvm::Triple::GNUEABI:
154  CmdArgs.push_back("armelf_nbsd_eabi");
155  break;
156  case llvm::Triple::EABIHF:
157  case llvm::Triple::GNUEABIHF:
158  CmdArgs.push_back("armelf_nbsd_eabihf");
159  break;
160  default:
161  CmdArgs.push_back("armelf_nbsd");
162  break;
163  }
164  break;
165  case llvm::Triple::armeb:
166  case llvm::Triple::thumbeb:
167  arm::appendBE8LinkFlag(Args, CmdArgs, ToolChain.getEffectiveTriple());
168  CmdArgs.push_back("-m");
169  switch (ToolChain.getTriple().getEnvironment()) {
170  case llvm::Triple::EABI:
171  case llvm::Triple::GNUEABI:
172  CmdArgs.push_back("armelfb_nbsd_eabi");
173  break;
174  case llvm::Triple::EABIHF:
175  case llvm::Triple::GNUEABIHF:
176  CmdArgs.push_back("armelfb_nbsd_eabihf");
177  break;
178  default:
179  CmdArgs.push_back("armelfb_nbsd");
180  break;
181  }
182  break;
183  case llvm::Triple::mips64:
184  case llvm::Triple::mips64el:
185  if (mips::hasMipsAbiArg(Args, "32")) {
186  CmdArgs.push_back("-m");
187  if (ToolChain.getArch() == llvm::Triple::mips64)
188  CmdArgs.push_back("elf32btsmip");
189  else
190  CmdArgs.push_back("elf32ltsmip");
191  } else if (mips::hasMipsAbiArg(Args, "64")) {
192  CmdArgs.push_back("-m");
193  if (ToolChain.getArch() == llvm::Triple::mips64)
194  CmdArgs.push_back("elf64btsmip");
195  else
196  CmdArgs.push_back("elf64ltsmip");
197  }
198  break;
199  case llvm::Triple::ppc:
200  CmdArgs.push_back("-m");
201  CmdArgs.push_back("elf32ppc_nbsd");
202  break;
203 
204  case llvm::Triple::ppc64:
205  case llvm::Triple::ppc64le:
206  CmdArgs.push_back("-m");
207  CmdArgs.push_back("elf64ppc");
208  break;
209 
210  case llvm::Triple::sparc:
211  CmdArgs.push_back("-m");
212  CmdArgs.push_back("elf32_sparc");
213  break;
214 
215  case llvm::Triple::sparcv9:
216  CmdArgs.push_back("-m");
217  CmdArgs.push_back("elf64_sparc");
218  break;
219 
220  default:
221  break;
222  }
223 
224  if (Output.isFilename()) {
225  CmdArgs.push_back("-o");
226  CmdArgs.push_back(Output.getFilename());
227  } else {
228  assert(Output.isNothing() && "Invalid output.");
229  }
230 
231  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
232  if (!Args.hasArg(options::OPT_shared)) {
233  CmdArgs.push_back(
234  Args.MakeArgString(ToolChain.GetFilePath("crt0.o")));
235  }
236  CmdArgs.push_back(
237  Args.MakeArgString(ToolChain.GetFilePath("crti.o")));
238  if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) {
239  CmdArgs.push_back(
240  Args.MakeArgString(ToolChain.GetFilePath("crtbeginS.o")));
241  } else {
242  CmdArgs.push_back(
243  Args.MakeArgString(ToolChain.GetFilePath("crtbegin.o")));
244  }
245  }
246 
247  Args.AddAllArgs(CmdArgs, options::OPT_L);
248  Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
249  Args.AddAllArgs(CmdArgs, options::OPT_e);
250  Args.AddAllArgs(CmdArgs, options::OPT_s);
251  Args.AddAllArgs(CmdArgs, options::OPT_t);
252  Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
253  Args.AddAllArgs(CmdArgs, options::OPT_r);
254 
255  bool NeedsSanitizerDeps = addSanitizerRuntimes(getToolChain(), Args, CmdArgs);
256  bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);
257  AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
258 
259  unsigned Major, Minor, Micro;
260  ToolChain.getTriple().getOSVersion(Major, Minor, Micro);
261  bool useLibgcc = true;
262  if (Major >= 7 || Major == 0) {
263  switch (ToolChain.getArch()) {
264  case llvm::Triple::aarch64:
265  case llvm::Triple::aarch64_be:
266  case llvm::Triple::arm:
267  case llvm::Triple::armeb:
268  case llvm::Triple::thumb:
269  case llvm::Triple::thumbeb:
270  case llvm::Triple::ppc:
271  case llvm::Triple::ppc64:
272  case llvm::Triple::ppc64le:
273  case llvm::Triple::sparc:
274  case llvm::Triple::sparcv9:
275  case llvm::Triple::x86:
276  case llvm::Triple::x86_64:
277  useLibgcc = false;
278  break;
279  default:
280  break;
281  }
282  }
283 
284  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
285  addOpenMPRuntime(CmdArgs, getToolChain(), Args);
286  if (D.CCCIsCXX()) {
287  if (ToolChain.ShouldLinkCXXStdlib(Args))
288  ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
289  CmdArgs.push_back("-lm");
290  }
291  if (NeedsSanitizerDeps)
292  linkSanitizerRuntimeDeps(getToolChain(), CmdArgs);
293  if (NeedsXRayDeps)
294  linkXRayRuntimeDeps(ToolChain, CmdArgs);
295  if (Args.hasArg(options::OPT_pthread))
296  CmdArgs.push_back("-lpthread");
297  CmdArgs.push_back("-lc");
298 
299  if (useLibgcc) {
300  if (Args.hasArg(options::OPT_static)) {
301  // libgcc_eh depends on libc, so resolve as much as possible,
302  // pull in any new requirements from libc and then get the rest
303  // of libgcc.
304  CmdArgs.push_back("-lgcc_eh");
305  CmdArgs.push_back("-lc");
306  CmdArgs.push_back("-lgcc");
307  } else {
308  CmdArgs.push_back("-lgcc");
309  CmdArgs.push_back("--as-needed");
310  CmdArgs.push_back("-lgcc_s");
311  CmdArgs.push_back("--no-as-needed");
312  }
313  }
314  }
315 
316  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
317  if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie))
318  CmdArgs.push_back(
319  Args.MakeArgString(ToolChain.GetFilePath("crtendS.o")));
320  else
321  CmdArgs.push_back(
322  Args.MakeArgString(ToolChain.GetFilePath("crtend.o")));
323  CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o")));
324  }
325 
326  ToolChain.addProfileRTLibs(Args, CmdArgs);
327 
328  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
329  C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
330 }
331 
332 /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
333 
334 NetBSD::NetBSD(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
335  : Generic_ELF(D, Triple, Args) {
336  if (!Args.hasArg(options::OPT_nostdlib)) {
337  // When targeting a 32-bit platform, try the special directory used on
338  // 64-bit hosts, and only fall back to the main library directory if that
339  // doesn't work.
340  // FIXME: It'd be nicer to test if this directory exists, but I'm not sure
341  // what all logic is needed to emulate the '=' prefix here.
342  switch (Triple.getArch()) {
343  case llvm::Triple::x86:
344  getFilePaths().push_back("=/usr/lib/i386");
345  break;
346  case llvm::Triple::arm:
347  case llvm::Triple::armeb:
348  case llvm::Triple::thumb:
349  case llvm::Triple::thumbeb:
350  switch (Triple.getEnvironment()) {
351  case llvm::Triple::EABI:
352  case llvm::Triple::GNUEABI:
353  getFilePaths().push_back("=/usr/lib/eabi");
354  break;
355  case llvm::Triple::EABIHF:
356  case llvm::Triple::GNUEABIHF:
357  getFilePaths().push_back("=/usr/lib/eabihf");
358  break;
359  default:
360  getFilePaths().push_back("=/usr/lib/oabi");
361  break;
362  }
363  break;
364  case llvm::Triple::mips64:
365  case llvm::Triple::mips64el:
366  if (tools::mips::hasMipsAbiArg(Args, "o32"))
367  getFilePaths().push_back("=/usr/lib/o32");
368  else if (tools::mips::hasMipsAbiArg(Args, "64"))
369  getFilePaths().push_back("=/usr/lib/64");
370  break;
371  case llvm::Triple::ppc:
372  getFilePaths().push_back("=/usr/lib/powerpc");
373  break;
374  case llvm::Triple::sparc:
375  getFilePaths().push_back("=/usr/lib/sparc");
376  break;
377  default:
378  break;
379  }
380 
381  getFilePaths().push_back("=/usr/lib");
382  }
383 }
384 
386  return new tools::netbsd::Assembler(*this);
387 }
388 
389 Tool *NetBSD::buildLinker() const { return new tools::netbsd::Linker(*this); }
390 
392  unsigned Major, Minor, Micro;
393  getTriple().getOSVersion(Major, Minor, Micro);
394  if (Major >= 7 || Major == 0) {
395  switch (getArch()) {
396  case llvm::Triple::aarch64:
397  case llvm::Triple::aarch64_be:
398  case llvm::Triple::arm:
399  case llvm::Triple::armeb:
400  case llvm::Triple::thumb:
401  case llvm::Triple::thumbeb:
402  case llvm::Triple::ppc:
403  case llvm::Triple::ppc64:
404  case llvm::Triple::ppc64le:
405  case llvm::Triple::sparc:
406  case llvm::Triple::sparcv9:
407  case llvm::Triple::x86:
408  case llvm::Triple::x86_64:
409  return ToolChain::CST_Libcxx;
410  default:
411  break;
412  }
413  }
415 }
416 
417 void NetBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
418  llvm::opt::ArgStringList &CC1Args) const {
419  addSystemInclude(DriverArgs, CC1Args,
420  getDriver().SysRoot + "/usr/include/c++/");
421 }
422 
423 void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
424  llvm::opt::ArgStringList &CC1Args) const {
425  addLibStdCXXIncludePaths(getDriver().SysRoot, "/usr/include/g++", "", "", "",
426  "", DriverArgs, CC1Args);
427 }
428 
429 llvm::ExceptionHandling NetBSD::GetExceptionModel(const ArgList &Args) const {
430  // NetBSD uses Dwarf exceptions on ARM.
431  llvm::Triple::ArchType TArch = getTriple().getArch();
432  if (TArch == llvm::Triple::arm || TArch == llvm::Triple::armeb ||
433  TArch == llvm::Triple::thumb || TArch == llvm::Triple::thumbeb)
434  return llvm::ExceptionHandling::DwarfCFI;
436 }
437 
439  const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
440  const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
442  if (IsX86 || IsX86_64) {
443  Res |= SanitizerKind::Address;
444  Res |= SanitizerKind::Function;
445  Res |= SanitizerKind::Leak;
446  Res |= SanitizerKind::SafeStack;
447  Res |= SanitizerKind::Scudo;
448  Res |= SanitizerKind::Vptr;
449  }
450  if (IsX86_64) {
451  Res |= SanitizerKind::Efficiency;
452  Res |= SanitizerKind::Fuzzer;
453  Res |= SanitizerKind::FuzzerNoLink;
454  Res |= SanitizerKind::KernelAddress;
455  Res |= SanitizerKind::Memory;
456  Res |= SanitizerKind::Thread;
457  }
458  return Res;
459 }
bool addXRayRuntime(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
const char * getSparcAsmModeForCPU(llvm::StringRef Name, const llvm::Triple &Triple)
void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: NetBSD.cpp:417
virtual void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime ...
Definition: ToolChain.cpp:657
std::string GetLinkerPath() const
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name...
Definition: ToolChain.cpp:439
std::string getCPUName(const llvm::opt::ArgList &Args, const llvm::Triple &T, bool FromAs=false)
const char * getFilename() const
Definition: InputInfo.h:84
void linkSanitizerRuntimeDeps(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
Tool * buildAssembler() const override
Definition: NetBSD.cpp:385
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs...
Definition: NetBSD.cpp:27
bool addSanitizerRuntimes(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
std::string GetFilePath(const char *Name) const
Definition: ToolChain.cpp:431
path_list & getFilePaths()
Definition: ToolChain.h:223
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:58
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value)
CXXStdlibType GetDefaultCXXStdlibType() const override
Definition: NetBSD.cpp:391
bool addOpenMPRuntime(llvm::opt::ArgStringList &CmdArgs, const ToolChain &TC, const llvm::opt::ArgList &Args, bool IsOffloadingHost=false, bool GompNeedsRT=false)
Returns true, if an OpenMP runtime has been added.
Tool * buildLinker() const override
Definition: NetBSD.cpp:389
void linkXRayRuntimeDeps(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
SanitizerMask getSupportedSanitizers() const override
Return sanitizers which are available in this toolchain.
Definition: NetBSD.cpp:438
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs...
Definition: NetBSD.cpp:109
const llvm::Triple & getEffectiveTriple() const
Get the toolchain&#39;s effective clang triple.
Definition: ToolChain.h:215
void addCommand(std::unique_ptr< Command > C)
Definition: Compilation.h:206
void AddAssemblerKPIC(const ToolChain &ToolChain, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
llvm::Triple::ArchType getArch() const
Definition: ToolChain.h:201
const Driver & getDriver() const
Definition: ToolChain.h:185
bool CCCIsCXX() const
Whether the driver should follow g++ like behavior.
Definition: Driver.h:173
void addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: NetBSD.cpp:423
static void addSystemInclude(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path)
Utility function to add a system include directory to CC1 arguments.
Definition: ToolChain.cpp:702
constexpr XRayInstrMask None
Definition: XRayInstr.h:38
llvm::ExceptionHandling GetExceptionModel(const llvm::opt::ArgList &Args) const override
GetExceptionModel - Return the tool chain exception model.
Definition: NetBSD.cpp:429
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
bool ShouldLinkCXXStdlib(const llvm::opt::ArgList &Args) const
Returns if the C++ standard library should be linked in.
Definition: ToolChain.cpp:755
Dataflow Directional Tag Classes.
void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const JobAction &JA)
std::string SysRoot
sysroot, if present
Definition: Driver.h:148
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
void claimNoWarnArgs(const llvm::opt::ArgList &Args)
uint64_t SanitizerMask
Definition: Sanitizers.h:26
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:46
const llvm::Triple & getTriple() const
Definition: ToolChain.h:187
virtual SanitizerMask getSupportedSanitizers() const
Return sanitizers which are available in this toolchain.
Definition: ToolChain.cpp:818
void appendBE8LinkFlag(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const llvm::Triple &Triple)
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition: Mips.cpp:144
bool isNothing() const
Definition: InputInfo.h:75
bool isFilename() const
Definition: InputInfo.h:76
bool addLibStdCXXIncludePaths(Twine Base, Twine Suffix, StringRef GCCTriple, StringRef GCCMultiarchTriple, StringRef TargetMultiarchTriple, Twine IncludeSuffix, const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const
Helper to add the variant paths of a libstdc++ installation.
Definition: Gnu.cpp:2525
void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName)
virtual void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard libr...
Definition: ToolChain.cpp:761
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:88