Coverage Report

Created: 2021-04-13 08:44

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Driver/ToolChains/NetBSD.cpp
Line
Count
Source (jump to first uncovered line)
1
//===--- NetBSD.cpp - NetBSD ToolChain Implementations ----------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "NetBSD.h"
10
#include "Arch/ARM.h"
11
#include "Arch/Mips.h"
12
#include "Arch/Sparc.h"
13
#include "CommonArgs.h"
14
#include "clang/Driver/Compilation.h"
15
#include "clang/Driver/Driver.h"
16
#include "clang/Driver/Options.h"
17
#include "clang/Driver/SanitizerArgs.h"
18
#include "llvm/Option/ArgList.h"
19
#include "llvm/Support/VirtualFileSystem.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
27
void netbsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
28
                                     const InputInfo &Output,
29
                                     const InputInfoList &Inputs,
30
                                     const ArgList &Args,
31
65
                                     const char *LinkingOutput) const {
32
65
  claimNoWarnArgs(Args);
33
65
  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
65
  switch (getToolChain().getArch()) {
38
0
  case llvm::Triple::x86:
39
0
    CmdArgs.push_back("--32");
40
0
    break;
41
3
  case llvm::Triple::arm:
42
7
  case llvm::Triple::armeb:
43
8
  case llvm::Triple::thumb:
44
9
  case llvm::Triple::thumbeb: {
45
9
    StringRef MArch, MCPU;
46
9
    arm::getARMArchCPUFromArgs(Args, MArch, MCPU, /*FromAs*/ true);
47
9
    std::string Arch =
48
9
        arm::getARMTargetCPU(MCPU, MArch, getToolChain().getTriple());
49
9
    CmdArgs.push_back(Args.MakeArgString("-mcpu=" + Arch));
50
9
    break;
51
8
  }
52
53
0
  case llvm::Triple::mips:
54
0
  case llvm::Triple::mipsel:
55
0
  case llvm::Triple::mips64:
56
0
  case llvm::Triple::mips64el: {
57
0
    StringRef CPUName;
58
0
    StringRef ABIName;
59
0
    mips::getMipsCPUAndABI(Args, getToolChain().getTriple(), CPUName, ABIName);
60
61
0
    CmdArgs.push_back("-march");
62
0
    CmdArgs.push_back(CPUName.data());
63
64
0
    CmdArgs.push_back("-mabi");
65
0
    CmdArgs.push_back(mips::getGnuCompatibleMipsABIName(ABIName).data());
66
67
0
    if (getToolChain().getTriple().isLittleEndian())
68
0
      CmdArgs.push_back("-EL");
69
0
    else
70
0
      CmdArgs.push_back("-EB");
71
72
0
    AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
73
0
    break;
74
0
  }
75
76
27
  case llvm::Triple::sparc:
77
27
  case llvm::Triple::sparcel: {
78
27
    CmdArgs.push_back("-32");
79
27
    std::string CPU = getCPUName(Args, getToolChain().getTriple());
80
27
    CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple()));
81
27
    AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
82
27
    break;
83
27
  }
84
85
28
  case llvm::Triple::sparcv9: {
86
28
    CmdArgs.push_back("-64");
87
28
    std::string CPU = getCPUName(Args, getToolChain().getTriple());
88
28
    CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple()));
89
28
    AddAssemblerKPIC(getToolChain(), Args, CmdArgs);
90
28
    break;
91
27
  }
92
93
1
  default:
94
1
    break;
95
65
  }
96
97
65
  Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
98
99
65
  CmdArgs.push_back("-o");
100
65
  CmdArgs.push_back(Output.getFilename());
101
102
65
  for (const auto &II : Inputs)
103
65
    CmdArgs.push_back(II.getFilename());
104
105
65
  const char *Exec = Args.MakeArgString((getToolChain().GetProgramPath("as")));
106
65
  C.addCommand(std::make_unique<Command>(JA, *this,
107
65
                                         ResponseFileSupport::AtFileCurCP(),
108
65
                                         Exec, CmdArgs, Inputs, Output));
109
65
}
110
111
void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
112
                                  const InputInfo &Output,
113
                                  const InputInfoList &Inputs,
114
                                  const ArgList &Args,
115
157
                                  const char *LinkingOutput) const {
116
157
  const toolchains::NetBSD &ToolChain =
117
157
    static_cast<const toolchains::NetBSD &>(getToolChain());
118
157
  const Driver &D = ToolChain.getDriver();
119
157
  ArgStringList CmdArgs;
120
121
157
  if (!D.SysRoot.empty())
122
101
    CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
123
124
157
  CmdArgs.push_back("--eh-frame-hdr");
125
157
  if (Args.hasArg(options::OPT_static)) {
126
36
    CmdArgs.push_back("-Bstatic");
127
36
    if (Args.hasArg(options::OPT_pie)) {
128
1
      Args.AddAllArgs(CmdArgs, options::OPT_pie);
129
1
      CmdArgs.push_back("--no-dynamic-linker");
130
1
    }
131
121
  } else {
132
121
    if (Args.hasArg(options::OPT_rdynamic))
133
0
      CmdArgs.push_back("-export-dynamic");
134
121
    if (Args.hasArg(options::OPT_shared)) {
135
1
      CmdArgs.push_back("-Bshareable");
136
120
    } else {
137
120
      Args.AddAllArgs(CmdArgs, options::OPT_pie);
138
120
      CmdArgs.push_back("-dynamic-linker");
139
120
      CmdArgs.push_back("/libexec/ld.elf_so");
140
120
    }
141
121
  }
142
143
  // Many NetBSD architectures support more than one ABI.
144
  // Determine the correct emulation for ld.
145
157
  switch (ToolChain.getArch()) {
146
10
  case llvm::Triple::x86:
147
10
    CmdArgs.push_back("-m");
148
10
    CmdArgs.push_back("elf_i386");
149
10
    break;
150
18
  case llvm::Triple::arm:
151
20
  case llvm::Triple::thumb:
152
20
    CmdArgs.push_back("-m");
153
20
    switch (ToolChain.getTriple().getEnvironment()) {
154
15
    case llvm::Triple::EABI:
155
15
    case llvm::Triple::GNUEABI:
156
15
      CmdArgs.push_back("armelf_nbsd_eabi");
157
15
      break;
158
3
    case llvm::Triple::EABIHF:
159
3
    case llvm::Triple::GNUEABIHF:
160
3
      CmdArgs.push_back("armelf_nbsd_eabihf");
161
3
      break;
162
2
    default:
163
2
      CmdArgs.push_back("armelf_nbsd");
164
2
      break;
165
20
    }
166
20
    break;
167
20
  case llvm::Triple::armeb:
168
6
  case llvm::Triple::thumbeb:
169
6
    arm::appendBE8LinkFlag(Args, CmdArgs, ToolChain.getEffectiveTriple());
170
6
    CmdArgs.push_back("-m");
171
6
    switch (ToolChain.getTriple().getEnvironment()) {
172
6
    case llvm::Triple::EABI:
173
6
    case llvm::Triple::GNUEABI:
174
6
      CmdArgs.push_back("armelfb_nbsd_eabi");
175
6
      break;
176
0
    case llvm::Triple::EABIHF:
177
0
    case llvm::Triple::GNUEABIHF:
178
0
      CmdArgs.push_back("armelfb_nbsd_eabihf");
179
0
      break;
180
0
    default:
181
0
      CmdArgs.push_back("armelfb_nbsd");
182
0
      break;
183
6
    }
184
6
    break;
185
6
  case llvm::Triple::mips64:
186
2
  case llvm::Triple::mips64el:
187
2
    if (mips::hasMipsAbiArg(Args, "32")) {
188
0
      CmdArgs.push_back("-m");
189
0
      if (ToolChain.getArch() == llvm::Triple::mips64)
190
0
        CmdArgs.push_back("elf32btsmip");
191
0
      else
192
0
        CmdArgs.push_back("elf32ltsmip");
193
2
    } else if (mips::hasMipsAbiArg(Args, "64")) {
194
0
      CmdArgs.push_back("-m");
195
0
      if (ToolChain.getArch() == llvm::Triple::mips64)
196
0
        CmdArgs.push_back("elf64btsmip");
197
0
      else
198
0
        CmdArgs.push_back("elf64ltsmip");
199
0
    }
200
2
    break;
201
4
  case llvm::Triple::ppc:
202
4
    CmdArgs.push_back("-m");
203
4
    CmdArgs.push_back("elf32ppc_nbsd");
204
4
    break;
205
206
4
  case llvm::Triple::ppc64:
207
4
  case llvm::Triple::ppc64le:
208
4
    CmdArgs.push_back("-m");
209
4
    CmdArgs.push_back("elf64ppc");
210
4
    break;
211
212
27
  case llvm::Triple::sparc:
213
27
    CmdArgs.push_back("-m");
214
27
    CmdArgs.push_back("elf32_sparc");
215
27
    break;
216
217
20
  case llvm::Triple::sparcv9:
218
20
    CmdArgs.push_back("-m");
219
20
    CmdArgs.push_back("elf64_sparc");
220
20
    break;
221
222
64
  default:
223
64
    break;
224
157
  }
225
226
157
  if (Output.isFilename()) {
227
157
    CmdArgs.push_back("-o");
228
157
    CmdArgs.push_back(Output.getFilename());
229
157
  } else {
230
0
    assert(Output.isNothing() && "Invalid output.");
231
0
  }
232
233
157
  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
234
154
    if (!Args.hasArg(options::OPT_shared)) {
235
153
      CmdArgs.push_back(
236
153
          Args.MakeArgString(ToolChain.GetFilePath("crt0.o")));
237
153
    }
238
154
    CmdArgs.push_back(
239
154
        Args.MakeArgString(ToolChain.GetFilePath("crti.o")));
240
154
    if (Args.hasArg(options::OPT_shared) || 
Args.hasArg(options::OPT_pie)153
) {
241
3
      CmdArgs.push_back(
242
3
          Args.MakeArgString(ToolChain.GetFilePath("crtbeginS.o")));
243
151
    } else {
244
151
      CmdArgs.push_back(
245
151
          Args.MakeArgString(ToolChain.GetFilePath("crtbegin.o")));
246
151
    }
247
154
  }
248
249
157
  Args.AddAllArgs(CmdArgs, options::OPT_L);
250
157
  Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
251
157
  Args.AddAllArgs(CmdArgs, options::OPT_e);
252
157
  Args.AddAllArgs(CmdArgs, options::OPT_s);
253
157
  Args.AddAllArgs(CmdArgs, options::OPT_t);
254
157
  Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
255
157
  Args.AddAllArgs(CmdArgs, options::OPT_r);
256
257
157
  bool NeedsSanitizerDeps = addSanitizerRuntimes(getToolChain(), Args, CmdArgs);
258
157
  bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);
259
157
  AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
260
261
157
  const SanitizerArgs &SanArgs = ToolChain.getSanitizerArgs();
262
157
  if (SanArgs.needsSharedRt()) {
263
0
    CmdArgs.push_back("-rpath");
264
0
    CmdArgs.push_back(Args.MakeArgString(
265
0
        ToolChain.getCompilerRTPath().c_str()));
266
0
  }
267
268
157
  unsigned Major, Minor, Micro;
269
157
  ToolChain.getTriple().getOSVersion(Major, Minor, Micro);
270
157
  bool useLibgcc = true;
271
157
  if (Major >= 7 || 
Major == 0135
) {
272
143
    switch (ToolChain.getArch()) {
273
8
    case llvm::Triple::aarch64:
274
16
    case llvm::Triple::aarch64_be:
275
30
    case llvm::Triple::arm:
276
35
    case llvm::Triple::armeb:
277
37
    case llvm::Triple::thumb:
278
38
    case llvm::Triple::thumbeb:
279
42
    case llvm::Triple::ppc:
280
46
    case llvm::Triple::ppc64:
281
46
    case llvm::Triple::ppc64le:
282
70
    case llvm::Triple::sparc:
283
87
    case llvm::Triple::sparcv9:
284
97
    case llvm::Triple::x86:
285
138
    case llvm::Triple::x86_64:
286
138
      useLibgcc = false;
287
138
      break;
288
5
    default:
289
5
      break;
290
143
    }
291
143
  }
292
293
157
  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
294
    // Use the static OpenMP runtime with -static-openmp
295
154
    bool StaticOpenMP = Args.hasArg(options::OPT_static_openmp) &&
296
154
                        
!Args.hasArg(options::OPT_static)4
;
297
154
    addOpenMPRuntime(CmdArgs, getToolChain(), Args, StaticOpenMP);
298
299
154
    if (D.CCCIsCXX()) {
300
34
      if (ToolChain.ShouldLinkCXXStdlib(Args))
301
34
        ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
302
34
      CmdArgs.push_back("-lm");
303
34
    }
304
154
    if (NeedsSanitizerDeps)
305
18
      linkSanitizerRuntimeDeps(getToolChain(), CmdArgs);
306
154
    if (NeedsXRayDeps)
307
0
      linkXRayRuntimeDeps(ToolChain, CmdArgs);
308
154
    if (Args.hasArg(options::OPT_pthread))
309
0
      CmdArgs.push_back("-lpthread");
310
154
    CmdArgs.push_back("-lc");
311
312
154
    if (useLibgcc) {
313
19
      if (Args.hasArg(options::OPT_static)) {
314
        // libgcc_eh depends on libc, so resolve as much as possible,
315
        // pull in any new requirements from libc and then get the rest
316
        // of libgcc.
317
8
        CmdArgs.push_back("-lgcc_eh");
318
8
        CmdArgs.push_back("-lc");
319
8
        CmdArgs.push_back("-lgcc");
320
11
      } else {
321
11
        CmdArgs.push_back("-lgcc");
322
11
        CmdArgs.push_back("--as-needed");
323
11
        CmdArgs.push_back("-lgcc_s");
324
11
        CmdArgs.push_back("--no-as-needed");
325
11
      }
326
19
    }
327
154
  }
328
329
157
  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
330
154
    if (Args.hasArg(options::OPT_shared) || 
Args.hasArg(options::OPT_pie)153
)
331
3
      CmdArgs.push_back(
332
3
          Args.MakeArgString(ToolChain.GetFilePath("crtendS.o")));
333
151
    else
334
151
      CmdArgs.push_back(
335
151
          Args.MakeArgString(ToolChain.GetFilePath("crtend.o")));
336
154
    CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o")));
337
154
  }
338
339
157
  ToolChain.addProfileRTLibs(Args, CmdArgs);
340
341
157
  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
342
157
  C.addCommand(std::make_unique<Command>(JA, *this,
343
157
                                         ResponseFileSupport::AtFileCurCP(),
344
157
                                         Exec, CmdArgs, Inputs, Output));
345
157
}
346
347
/// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
348
349
NetBSD::NetBSD(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
350
192
    : Generic_ELF(D, Triple, Args) {
351
192
  if (!Args.hasArg(options::OPT_nostdlib)) {
352
    // When targeting a 32-bit platform, try the special directory used on
353
    // 64-bit hosts, and only fall back to the main library directory if that
354
    // doesn't work.
355
    // FIXME: It'd be nicer to test if this directory exists, but I'm not sure
356
    // what all logic is needed to emulate the '=' prefix here.
357
189
    switch (Triple.getArch()) {
358
10
    case llvm::Triple::x86:
359
10
      getFilePaths().push_back("=/usr/lib/i386");
360
10
      break;
361
27
    case llvm::Triple::arm:
362
36
    case llvm::Triple::armeb:
363
38
    case llvm::Triple::thumb:
364
39
    case llvm::Triple::thumbeb:
365
39
      switch (Triple.getEnvironment()) {
366
23
      case llvm::Triple::EABI:
367
23
      case llvm::Triple::GNUEABI:
368
23
        getFilePaths().push_back("=/usr/lib/eabi");
369
23
        break;
370
4
      case llvm::Triple::EABIHF:
371
6
      case llvm::Triple::GNUEABIHF:
372
6
        getFilePaths().push_back("=/usr/lib/eabihf");
373
6
        break;
374
10
      default:
375
10
        getFilePaths().push_back("=/usr/lib/oabi");
376
10
        break;
377
39
      }
378
39
      break;
379
39
    case llvm::Triple::mips64:
380
2
    case llvm::Triple::mips64el:
381
2
      if (tools::mips::hasMipsAbiArg(Args, "o32"))
382
0
        getFilePaths().push_back("=/usr/lib/o32");
383
2
      else if (tools::mips::hasMipsAbiArg(Args, "64"))
384
0
        getFilePaths().push_back("=/usr/lib/64");
385
2
      break;
386
5
    case llvm::Triple::ppc:
387
5
      getFilePaths().push_back("=/usr/lib/powerpc");
388
5
      break;
389
27
    case llvm::Triple::sparc:
390
27
      getFilePaths().push_back("=/usr/lib/sparc");
391
27
      break;
392
106
    default:
393
106
      break;
394
189
    }
395
396
189
    getFilePaths().push_back("=/usr/lib");
397
189
  }
398
192
}
399
400
65
Tool *NetBSD::buildAssembler() const {
401
65
  return new tools::netbsd::Assembler(*this);
402
65
}
403
404
157
Tool *NetBSD::buildLinker() const { return new tools::netbsd::Linker(*this); }
405
406
34
ToolChain::CXXStdlibType NetBSD::GetDefaultCXXStdlibType() const {
407
34
  unsigned Major, Minor, Micro;
408
34
  getTriple().getOSVersion(Major, Minor, Micro);
409
34
  if (Major >= 7 || 
Major == 022
) {
410
26
    switch (getArch()) {
411
4
    case llvm::Triple::aarch64:
412
8
    case llvm::Triple::aarch64_be:
413
10
    case llvm::Triple::arm:
414
10
    case llvm::Triple::armeb:
415
10
    case llvm::Triple::thumb:
416
10
    case llvm::Triple::thumbeb:
417
12
    case llvm::Triple::ppc:
418
14
    case llvm::Triple::ppc64:
419
14
    case llvm::Triple::ppc64le:
420
18
    case llvm::Triple::sparc:
421
22
    case llvm::Triple::sparcv9:
422
22
    case llvm::Triple::x86:
423
26
    case llvm::Triple::x86_64:
424
26
      return ToolChain::CST_Libcxx;
425
0
    default:
426
0
      break;
427
26
    }
428
26
  }
429
8
  return ToolChain::CST_Libstdcxx;
430
34
}
431
432
void NetBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
433
26
                                   llvm::opt::ArgStringList &CC1Args) const {
434
26
  const std::string Candidates[] = {
435
    // directory relative to build tree
436
26
    getDriver().Dir + "/../include/c++/v1",
437
    // system install with full upstream path
438
26
    getDriver().SysRoot + "/usr/include/c++/v1",
439
    // system install from src
440
26
    getDriver().SysRoot + "/usr/include/c++",
441
26
  };
442
443
26
  for (const auto &IncludePath : Candidates) {
444
26
    if (!getVFS().exists(IncludePath + "/__config"))
445
0
      continue;
446
447
    // Use the first candidate that looks valid.
448
26
    addSystemInclude(DriverArgs, CC1Args, IncludePath);
449
26
    return;
450
26
  }
451
26
}
452
453
void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
454
8
                                      llvm::opt::ArgStringList &CC1Args) const {
455
8
  addLibStdCXXIncludePaths(getDriver().SysRoot + "/usr/include/g++", "", "",
456
8
                           DriverArgs, CC1Args);
457
8
}
458
459
192
llvm::ExceptionHandling NetBSD::GetExceptionModel(const ArgList &Args) const {
460
  // NetBSD uses Dwarf exceptions on ARM.
461
192
  llvm::Triple::ArchType TArch = getTriple().getArch();
462
192
  if (TArch == llvm::Triple::arm || 
TArch == llvm::Triple::armeb165
||
463
192
      
TArch == llvm::Triple::thumb156
||
TArch == llvm::Triple::thumbeb154
)
464
39
    return llvm::ExceptionHandling::DwarfCFI;
465
153
  return llvm::ExceptionHandling::None;
466
192
}
467
468
192
SanitizerMask NetBSD::getSupportedSanitizers() const {
469
192
  const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
470
192
  const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
471
192
  SanitizerMask Res = ToolChain::getSupportedSanitizers();
472
192
  if (IsX86 || 
IsX86_64182
) {
473
62
    Res |= SanitizerKind::Address;
474
62
    Res |= SanitizerKind::PointerCompare;
475
62
    Res |= SanitizerKind::PointerSubtract;
476
62
    Res |= SanitizerKind::Function;
477
62
    Res |= SanitizerKind::Leak;
478
62
    Res |= SanitizerKind::SafeStack;
479
62
    Res |= SanitizerKind::Scudo;
480
62
    Res |= SanitizerKind::Vptr;
481
62
  }
482
192
  if (IsX86_64) {
483
52
    Res |= SanitizerKind::DataFlow;
484
52
    Res |= SanitizerKind::Fuzzer;
485
52
    Res |= SanitizerKind::FuzzerNoLink;
486
52
    Res |= SanitizerKind::HWAddress;
487
52
    Res |= SanitizerKind::KernelAddress;
488
52
    Res |= SanitizerKind::KernelHWAddress;
489
52
    Res |= SanitizerKind::KernelMemory;
490
52
    Res |= SanitizerKind::Memory;
491
52
    Res |= SanitizerKind::Thread;
492
52
  }
493
192
  return Res;
494
192
}
495
496
void NetBSD::addClangTargetOptions(const ArgList &DriverArgs,
497
                                   ArgStringList &CC1Args,
498
192
                                   Action::OffloadKind) const {
499
192
  const SanitizerArgs &SanArgs = getSanitizerArgs();
500
192
  if (SanArgs.hasAnySanitizer())
501
24
    CC1Args.push_back("-D_REENTRANT");
502
503
192
  unsigned Major, Minor, Micro;
504
192
  getTriple().getOSVersion(Major, Minor, Micro);
505
192
  bool UseInitArrayDefault =
506
192
    Major >= 9 || Major == 0 ||
507
192
    
getTriple().getArch() == llvm::Triple::aarch6436
||
508
192
    
getTriple().getArch() == llvm::Triple::aarch64_be32
||
509
192
    
getTriple().getArch() == llvm::Triple::arm28
||
510
192
    
getTriple().getArch() == llvm::Triple::armeb20
;
511
512
192
  if (!DriverArgs.hasFlag(options::OPT_fuse_init_array,
513
192
                          options::OPT_fno_use_init_array, UseInitArrayDefault))
514
20
    CC1Args.push_back("-fno-use-init-array");
515
192
}