[clang-tidy][NFC]remove deps of clang in clang tidy test (#116588)
[llvm-project.git] / lld / MinGW / Driver.cpp
blob72d612ceed2259f9437ca2f3aaa7717e023cc8c5
1 //===- MinGW/Driver.cpp ---------------------------------------------------===//
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 // MinGW is a GNU development environment for Windows. It consists of GNU
10 // tools such as GCC and GNU ld. Unlike Cygwin, there's no POSIX-compatible
11 // layer, as it aims to be a native development toolchain.
13 // lld/MinGW is a drop-in replacement for GNU ld/MinGW.
15 // Being a native development tool, a MinGW linker is not very different from
16 // Microsoft link.exe, so a MinGW linker can be implemented as a thin wrapper
17 // for lld/COFF. This driver takes Unix-ish command line options, translates
18 // them to Windows-ish ones, and then passes them to lld/COFF.
20 // When this driver calls the lld/COFF driver, it passes a hidden option
21 // "-lldmingw" along with other user-supplied options, to run the lld/COFF
22 // linker in "MinGW mode".
24 // There are subtle differences between MS link.exe and GNU ld/MinGW, and GNU
25 // ld/MinGW implements a few GNU-specific features. Such features are directly
26 // implemented in lld/COFF and enabled only when the linker is running in MinGW
27 // mode.
29 //===----------------------------------------------------------------------===//
31 #include "lld/Common/Driver.h"
32 #include "lld/Common/CommonLinkerContext.h"
33 #include "lld/Common/ErrorHandler.h"
34 #include "lld/Common/Memory.h"
35 #include "lld/Common/Version.h"
36 #include "llvm/ADT/ArrayRef.h"
37 #include "llvm/ADT/StringExtras.h"
38 #include "llvm/ADT/StringRef.h"
39 #include "llvm/Option/Arg.h"
40 #include "llvm/Option/ArgList.h"
41 #include "llvm/Option/Option.h"
42 #include "llvm/Support/CommandLine.h"
43 #include "llvm/Support/FileSystem.h"
44 #include "llvm/Support/Path.h"
45 #include "llvm/TargetParser/Host.h"
46 #include "llvm/TargetParser/Triple.h"
47 #include <optional>
49 using namespace lld;
50 using namespace llvm::opt;
51 using namespace llvm;
53 // Create OptTable
54 enum {
55 OPT_INVALID = 0,
56 #define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__),
57 #include "Options.inc"
58 #undef OPTION
61 // Create prefix string literals used in Options.td
62 #define PREFIX(NAME, VALUE) \
63 static constexpr llvm::StringLiteral NAME##_init[] = VALUE; \
64 static constexpr llvm::ArrayRef<llvm::StringLiteral> NAME( \
65 NAME##_init, std::size(NAME##_init) - 1);
66 #include "Options.inc"
67 #undef PREFIX
69 // Create table mapping all options defined in Options.td
70 static constexpr opt::OptTable::Info infoTable[] = {
71 #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, \
72 VISIBILITY, PARAM, HELPTEXT, HELPTEXTSFORVARIANTS, METAVAR, \
73 VALUES) \
74 {PREFIX, \
75 NAME, \
76 HELPTEXT, \
77 HELPTEXTSFORVARIANTS, \
78 METAVAR, \
79 OPT_##ID, \
80 opt::Option::KIND##Class, \
81 PARAM, \
82 FLAGS, \
83 VISIBILITY, \
84 OPT_##GROUP, \
85 OPT_##ALIAS, \
86 ALIASARGS, \
87 VALUES},
88 #include "Options.inc"
89 #undef OPTION
92 namespace {
93 class MinGWOptTable : public opt::GenericOptTable {
94 public:
95 MinGWOptTable() : opt::GenericOptTable(infoTable, false) {}
96 opt::InputArgList parse(ArrayRef<const char *> argv);
98 } // namespace
100 static void printHelp(CommonLinkerContext &ctx, const char *argv0) {
101 auto &outs = ctx.e.outs();
102 MinGWOptTable().printHelp(
103 outs, (std::string(argv0) + " [options] file...").c_str(), "lld",
104 /*ShowHidden=*/false, /*ShowAllAliases=*/true);
105 outs << '\n';
108 static cl::TokenizerCallback getQuotingStyle() {
109 if (Triple(sys::getProcessTriple()).getOS() == Triple::Win32)
110 return cl::TokenizeWindowsCommandLine;
111 return cl::TokenizeGNUCommandLine;
114 opt::InputArgList MinGWOptTable::parse(ArrayRef<const char *> argv) {
115 unsigned missingIndex;
116 unsigned missingCount;
118 SmallVector<const char *, 256> vec(argv.data(), argv.data() + argv.size());
119 cl::ExpandResponseFiles(saver(), getQuotingStyle(), vec);
120 opt::InputArgList args = this->ParseArgs(vec, missingIndex, missingCount);
122 if (missingCount)
123 error(StringRef(args.getArgString(missingIndex)) + ": missing argument");
124 for (auto *arg : args.filtered(OPT_UNKNOWN))
125 error("unknown argument: " + arg->getAsString(args));
126 return args;
129 // Find a file by concatenating given paths.
130 static std::optional<std::string> findFile(StringRef path1,
131 const Twine &path2) {
132 SmallString<128> s;
133 sys::path::append(s, path1, path2);
134 if (sys::fs::exists(s))
135 return std::string(s);
136 return std::nullopt;
139 // This is for -lfoo. We'll look for libfoo.dll.a or libfoo.a from search paths.
140 static std::string
141 searchLibrary(StringRef name, ArrayRef<StringRef> searchPaths, bool bStatic) {
142 if (name.starts_with(":")) {
143 for (StringRef dir : searchPaths)
144 if (std::optional<std::string> s = findFile(dir, name.substr(1)))
145 return *s;
146 error("unable to find library -l" + name);
147 return "";
150 for (StringRef dir : searchPaths) {
151 if (!bStatic) {
152 if (std::optional<std::string> s = findFile(dir, "lib" + name + ".dll.a"))
153 return *s;
154 if (std::optional<std::string> s = findFile(dir, name + ".dll.a"))
155 return *s;
157 if (std::optional<std::string> s = findFile(dir, "lib" + name + ".a"))
158 return *s;
159 if (std::optional<std::string> s = findFile(dir, name + ".lib"))
160 return *s;
161 if (!bStatic) {
162 if (std::optional<std::string> s = findFile(dir, "lib" + name + ".dll"))
163 return *s;
164 if (std::optional<std::string> s = findFile(dir, name + ".dll"))
165 return *s;
168 error("unable to find library -l" + name);
169 return "";
172 namespace lld {
173 namespace coff {
174 bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
175 llvm::raw_ostream &stderrOS, bool exitEarly, bool disableOutput);
178 namespace mingw {
179 // Convert Unix-ish command line arguments to Windows-ish ones and
180 // then call coff::link.
181 bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
182 llvm::raw_ostream &stderrOS, bool exitEarly, bool disableOutput) {
183 auto *ctx = new CommonLinkerContext;
184 ctx->e.initialize(stdoutOS, stderrOS, exitEarly, disableOutput);
186 MinGWOptTable parser;
187 opt::InputArgList args = parser.parse(argsArr.slice(1));
189 if (errorCount())
190 return false;
192 if (args.hasArg(OPT_help)) {
193 printHelp(*ctx, argsArr[0]);
194 return true;
197 // A note about "compatible with GNU linkers" message: this is a hack for
198 // scripts generated by GNU Libtool 2.4.6 (released in February 2014 and
199 // still the newest version in March 2017) or earlier to recognize LLD as
200 // a GNU compatible linker. As long as an output for the -v option
201 // contains "GNU" or "with BFD", they recognize us as GNU-compatible.
202 if (args.hasArg(OPT_v) || args.hasArg(OPT_version))
203 message(getLLDVersion() + " (compatible with GNU linkers)");
205 // The behavior of -v or --version is a bit strange, but this is
206 // needed for compatibility with GNU linkers.
207 if (args.hasArg(OPT_v) && !args.hasArg(OPT_INPUT) && !args.hasArg(OPT_l))
208 return true;
209 if (args.hasArg(OPT_version))
210 return true;
212 if (!args.hasArg(OPT_INPUT) && !args.hasArg(OPT_l)) {
213 error("no input files");
214 return false;
217 std::vector<std::string> linkArgs;
218 auto add = [&](const Twine &s) { linkArgs.push_back(s.str()); };
220 add("lld-link");
221 add("-lldmingw");
223 if (auto *a = args.getLastArg(OPT_entry)) {
224 StringRef s = a->getValue();
225 if (args.getLastArgValue(OPT_m) == "i386pe" && s.starts_with("_"))
226 add("-entry:" + s.substr(1));
227 else if (!s.empty())
228 add("-entry:" + s);
229 else
230 add("-noentry");
233 if (args.hasArg(OPT_major_os_version, OPT_minor_os_version,
234 OPT_major_subsystem_version, OPT_minor_subsystem_version)) {
235 StringRef majOSVer = args.getLastArgValue(OPT_major_os_version, "6");
236 StringRef minOSVer = args.getLastArgValue(OPT_minor_os_version, "0");
237 StringRef majSubSysVer = "6";
238 StringRef minSubSysVer = "0";
239 StringRef subSysName = "default";
240 StringRef subSysVer;
241 // Iterate over --{major,minor}-subsystem-version and --subsystem, and pick
242 // the version number components from the last one of them that specifies
243 // a version.
244 for (auto *a : args.filtered(OPT_major_subsystem_version,
245 OPT_minor_subsystem_version, OPT_subs)) {
246 switch (a->getOption().getID()) {
247 case OPT_major_subsystem_version:
248 majSubSysVer = a->getValue();
249 break;
250 case OPT_minor_subsystem_version:
251 minSubSysVer = a->getValue();
252 break;
253 case OPT_subs:
254 std::tie(subSysName, subSysVer) = StringRef(a->getValue()).split(':');
255 if (!subSysVer.empty()) {
256 if (subSysVer.contains('.'))
257 std::tie(majSubSysVer, minSubSysVer) = subSysVer.split('.');
258 else
259 majSubSysVer = subSysVer;
261 break;
264 add("-osversion:" + majOSVer + "." + minOSVer);
265 add("-subsystem:" + subSysName + "," + majSubSysVer + "." + minSubSysVer);
266 } else if (args.hasArg(OPT_subs)) {
267 StringRef subSys = args.getLastArgValue(OPT_subs, "default");
268 StringRef subSysName, subSysVer;
269 std::tie(subSysName, subSysVer) = subSys.split(':');
270 StringRef sep = subSysVer.empty() ? "" : ",";
271 add("-subsystem:" + subSysName + sep + subSysVer);
274 if (auto *a = args.getLastArg(OPT_out_implib))
275 add("-implib:" + StringRef(a->getValue()));
276 if (auto *a = args.getLastArg(OPT_stack))
277 add("-stack:" + StringRef(a->getValue()));
278 if (auto *a = args.getLastArg(OPT_output_def))
279 add("-output-def:" + StringRef(a->getValue()));
280 if (auto *a = args.getLastArg(OPT_image_base))
281 add("-base:" + StringRef(a->getValue()));
282 if (auto *a = args.getLastArg(OPT_map))
283 add("-lldmap:" + StringRef(a->getValue()));
284 if (auto *a = args.getLastArg(OPT_reproduce))
285 add("-reproduce:" + StringRef(a->getValue()));
286 if (auto *a = args.getLastArg(OPT_file_alignment))
287 add("-filealign:" + StringRef(a->getValue()));
288 if (auto *a = args.getLastArg(OPT_section_alignment))
289 add("-align:" + StringRef(a->getValue()));
290 if (auto *a = args.getLastArg(OPT_heap))
291 add("-heap:" + StringRef(a->getValue()));
292 if (auto *a = args.getLastArg(OPT_threads))
293 add("-threads:" + StringRef(a->getValue()));
295 if (auto *a = args.getLastArg(OPT_o))
296 add("-out:" + StringRef(a->getValue()));
297 else if (args.hasArg(OPT_shared))
298 add("-out:a.dll");
299 else
300 add("-out:a.exe");
302 if (auto *a = args.getLastArg(OPT_pdb)) {
303 add("-debug");
304 StringRef v = a->getValue();
305 if (!v.empty())
306 add("-pdb:" + v);
307 if (args.hasArg(OPT_strip_all)) {
308 add("-debug:nodwarf,nosymtab");
309 } else if (args.hasArg(OPT_strip_debug)) {
310 add("-debug:nodwarf,symtab");
312 } else if (args.hasArg(OPT_strip_debug)) {
313 add("-debug:symtab");
314 } else if (!args.hasArg(OPT_strip_all)) {
315 add("-debug:dwarf");
317 if (auto *a = args.getLastArg(OPT_build_id)) {
318 StringRef v = a->getValue();
319 if (v == "none")
320 add("-build-id:no");
321 else {
322 if (!v.empty())
323 warn("unsupported build id hashing: " + v + ", using default hashing.");
324 add("-build-id");
326 } else {
327 if (args.hasArg(OPT_strip_debug) || args.hasArg(OPT_strip_all))
328 add("-build-id:no");
329 else
330 add("-build-id");
333 if (auto *a = args.getLastArg(OPT_functionpadmin)) {
334 StringRef v = a->getValue();
335 if (v.empty())
336 add("-functionpadmin");
337 else
338 add("-functionpadmin:" + v);
341 if (args.hasFlag(OPT_fatal_warnings, OPT_no_fatal_warnings, false))
342 add("-WX");
343 else
344 add("-WX:no");
346 if (args.hasFlag(OPT_enable_stdcall_fixup, OPT_disable_stdcall_fixup, false))
347 add("-stdcall-fixup");
348 else if (args.hasArg(OPT_disable_stdcall_fixup))
349 add("-stdcall-fixup:no");
351 if (args.hasArg(OPT_shared))
352 add("-dll");
353 if (args.hasArg(OPT_verbose))
354 add("-verbose");
355 if (args.hasArg(OPT_exclude_all_symbols))
356 add("-exclude-all-symbols");
357 if (args.hasArg(OPT_export_all_symbols))
358 add("-export-all-symbols");
359 if (args.hasArg(OPT_large_address_aware))
360 add("-largeaddressaware");
361 if (args.hasArg(OPT_kill_at))
362 add("-kill-at");
363 if (args.hasArg(OPT_appcontainer))
364 add("-appcontainer");
365 if (args.hasFlag(OPT_no_seh, OPT_disable_no_seh, false))
366 add("-noseh");
368 if (args.getLastArgValue(OPT_m) != "thumb2pe" &&
369 args.getLastArgValue(OPT_m) != "arm64pe" &&
370 args.getLastArgValue(OPT_m) != "arm64ecpe" &&
371 args.hasFlag(OPT_disable_dynamicbase, OPT_dynamicbase, false))
372 add("-dynamicbase:no");
373 if (args.hasFlag(OPT_disable_high_entropy_va, OPT_high_entropy_va, false))
374 add("-highentropyva:no");
375 if (args.hasFlag(OPT_disable_nxcompat, OPT_nxcompat, false))
376 add("-nxcompat:no");
377 if (args.hasFlag(OPT_disable_tsaware, OPT_tsaware, false))
378 add("-tsaware:no");
380 if (args.hasFlag(OPT_disable_reloc_section, OPT_enable_reloc_section, false))
381 add("-fixed");
383 if (args.hasFlag(OPT_no_insert_timestamp, OPT_insert_timestamp, false))
384 add("-timestamp:0");
386 if (args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false))
387 add("-opt:ref");
388 else
389 add("-opt:noref");
391 if (args.hasFlag(OPT_demangle, OPT_no_demangle, true))
392 add("-demangle");
393 else
394 add("-demangle:no");
396 if (args.hasFlag(OPT_enable_auto_import, OPT_disable_auto_import, true))
397 add("-auto-import");
398 else
399 add("-auto-import:no");
400 if (args.hasFlag(OPT_enable_runtime_pseudo_reloc,
401 OPT_disable_runtime_pseudo_reloc, true))
402 add("-runtime-pseudo-reloc");
403 else
404 add("-runtime-pseudo-reloc:no");
406 if (args.hasFlag(OPT_allow_multiple_definition,
407 OPT_no_allow_multiple_definition, false))
408 add("-force:multiple");
410 if (auto *a = args.getLastArg(OPT_icf)) {
411 StringRef s = a->getValue();
412 if (s == "all")
413 add("-opt:icf");
414 else if (s == "safe")
415 add("-opt:safeicf");
416 else if (s == "none")
417 add("-opt:noicf");
418 else
419 error("unknown parameter: --icf=" + s);
420 } else {
421 add("-opt:noicf");
424 if (auto *a = args.getLastArg(OPT_m)) {
425 StringRef s = a->getValue();
426 if (s == "i386pe")
427 add("-machine:x86");
428 else if (s == "i386pep")
429 add("-machine:x64");
430 else if (s == "thumb2pe")
431 add("-machine:arm");
432 else if (s == "arm64pe")
433 add("-machine:arm64");
434 else if (s == "arm64ecpe")
435 add("-machine:arm64ec");
436 else
437 error("unknown parameter: -m" + s);
440 if (args.hasFlag(OPT_guard_cf, OPT_no_guard_cf, false)) {
441 if (args.hasFlag(OPT_guard_longjmp, OPT_no_guard_longjmp, true))
442 add("-guard:cf,longjmp");
443 else
444 add("-guard:cf,nolongjmp");
445 } else if (args.hasFlag(OPT_guard_longjmp, OPT_no_guard_longjmp, false)) {
446 auto *a = args.getLastArg(OPT_guard_longjmp);
447 warn("parameter " + a->getSpelling() +
448 " only takes effect when used with --guard-cf");
451 if (auto *a = args.getLastArg(OPT_error_limit)) {
452 int n;
453 StringRef s = a->getValue();
454 if (s.getAsInteger(10, n))
455 error(a->getSpelling() + ": number expected, but got " + s);
456 else
457 add("-errorlimit:" + s);
460 if (auto *a = args.getLastArg(OPT_rpath))
461 warn("parameter " + a->getSpelling() + " has no effect on PE/COFF targets");
463 for (auto *a : args.filtered(OPT_mllvm))
464 add("-mllvm:" + StringRef(a->getValue()));
466 if (auto *arg = args.getLastArg(OPT_plugin_opt_mcpu_eq))
467 add("-mllvm:-mcpu=" + StringRef(arg->getValue()));
468 if (auto *arg = args.getLastArg(OPT_lto_O))
469 add("-opt:lldlto=" + StringRef(arg->getValue()));
470 if (auto *arg = args.getLastArg(OPT_lto_CGO))
471 add("-opt:lldltocgo=" + StringRef(arg->getValue()));
472 if (auto *arg = args.getLastArg(OPT_plugin_opt_dwo_dir_eq))
473 add("-dwodir:" + StringRef(arg->getValue()));
474 if (args.hasArg(OPT_lto_cs_profile_generate))
475 add("-lto-cs-profile-generate");
476 if (auto *arg = args.getLastArg(OPT_lto_cs_profile_file))
477 add("-lto-cs-profile-file:" + StringRef(arg->getValue()));
478 if (args.hasArg(OPT_plugin_opt_emit_llvm))
479 add("-lldemit:llvm");
480 if (args.hasArg(OPT_lto_emit_asm))
481 add("-lldemit:asm");
482 if (auto *arg = args.getLastArg(OPT_lto_sample_profile))
483 add("-lto-sample-profile:" + StringRef(arg->getValue()));
485 if (auto *a = args.getLastArg(OPT_thinlto_cache_dir))
486 add("-lldltocache:" + StringRef(a->getValue()));
487 if (auto *a = args.getLastArg(OPT_thinlto_cache_policy))
488 add("-lldltocachepolicy:" + StringRef(a->getValue()));
489 if (args.hasArg(OPT_thinlto_emit_imports_files))
490 add("-thinlto-emit-imports-files");
491 if (args.hasArg(OPT_thinlto_index_only))
492 add("-thinlto-index-only");
493 if (auto *arg = args.getLastArg(OPT_thinlto_index_only_eq))
494 add("-thinlto-index-only:" + StringRef(arg->getValue()));
495 if (auto *arg = args.getLastArg(OPT_thinlto_jobs_eq))
496 add("-opt:lldltojobs=" + StringRef(arg->getValue()));
497 if (auto *arg = args.getLastArg(OPT_thinlto_object_suffix_replace_eq))
498 add("-thinlto-object-suffix-replace:" + StringRef(arg->getValue()));
499 if (auto *arg = args.getLastArg(OPT_thinlto_prefix_replace_eq))
500 add("-thinlto-prefix-replace:" + StringRef(arg->getValue()));
502 for (auto *a : args.filtered(OPT_plugin_opt_eq_minus))
503 add("-mllvm:-" + StringRef(a->getValue()));
505 // GCC collect2 passes -plugin-opt=path/to/lto-wrapper with an absolute or
506 // relative path. Just ignore. If not ended with "lto-wrapper" (or
507 // "lto-wrapper.exe" for GCC cross-compiled for Windows), consider it an
508 // unsupported LLVMgold.so option and error.
509 for (opt::Arg *arg : args.filtered(OPT_plugin_opt_eq)) {
510 StringRef v(arg->getValue());
511 if (!v.ends_with("lto-wrapper") && !v.ends_with("lto-wrapper.exe"))
512 error(arg->getSpelling() + ": unknown plugin option '" + arg->getValue() +
513 "'");
516 for (auto *a : args.filtered(OPT_Xlink))
517 add(a->getValue());
519 if (args.getLastArgValue(OPT_m) == "i386pe")
520 add("-alternatename:__image_base__=___ImageBase");
521 else
522 add("-alternatename:__image_base__=__ImageBase");
524 for (auto *a : args.filtered(OPT_require_defined))
525 add("-include:" + StringRef(a->getValue()));
526 for (auto *a : args.filtered(OPT_undefined_glob))
527 add("-includeglob:" + StringRef(a->getValue()));
528 for (auto *a : args.filtered(OPT_undefined))
529 add("-includeoptional:" + StringRef(a->getValue()));
530 for (auto *a : args.filtered(OPT_delayload))
531 add("-delayload:" + StringRef(a->getValue()));
532 for (auto *a : args.filtered(OPT_wrap))
533 add("-wrap:" + StringRef(a->getValue()));
534 for (auto *a : args.filtered(OPT_exclude_symbols))
535 add("-exclude-symbols:" + StringRef(a->getValue()));
537 std::vector<StringRef> searchPaths;
538 for (auto *a : args.filtered(OPT_L)) {
539 searchPaths.push_back(a->getValue());
540 add("-libpath:" + StringRef(a->getValue()));
543 StringRef prefix = "";
544 bool isStatic = false;
545 for (auto *a : args) {
546 switch (a->getOption().getID()) {
547 case OPT_INPUT:
548 if (StringRef(a->getValue()).ends_with_insensitive(".def"))
549 add("-def:" + StringRef(a->getValue()));
550 else
551 add(prefix + StringRef(a->getValue()));
552 break;
553 case OPT_l:
554 add(prefix + searchLibrary(a->getValue(), searchPaths, isStatic));
555 break;
556 case OPT_whole_archive:
557 prefix = "-wholearchive:";
558 break;
559 case OPT_no_whole_archive:
560 prefix = "";
561 break;
562 case OPT_Bstatic:
563 isStatic = true;
564 break;
565 case OPT_Bdynamic:
566 isStatic = false;
567 break;
571 if (errorCount())
572 return false;
574 if (args.hasArg(OPT_verbose) || args.hasArg(OPT__HASH_HASH_HASH))
575 ctx->e.errs() << llvm::join(linkArgs, " ") << "\n";
577 if (args.hasArg(OPT__HASH_HASH_HASH))
578 return true;
580 // Repack vector of strings to vector of const char pointers for coff::link.
581 std::vector<const char *> vec;
582 for (const std::string &s : linkArgs)
583 vec.push_back(s.c_str());
584 // Pass the actual binary name, to make error messages be printed with
585 // the right prefix.
586 vec[0] = argsArr[0];
588 // The context will be re-created in the COFF driver.
589 lld::CommonLinkerContext::destroy();
591 return coff::link(vec, stdoutOS, stderrOS, exitEarly, disableOutput);
593 } // namespace mingw
594 } // namespace lld