clang 20.0.0git
Flang.cpp
Go to the documentation of this file.
1//===-- Flang.cpp - Flang+LLVM 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 "Flang.h"
10#include "Arch/RISCV.h"
11#include "CommonArgs.h"
12
15#include "llvm/Frontend/Debug/Options.h"
16#include "llvm/Support/FileSystem.h"
17#include "llvm/Support/Path.h"
18#include "llvm/TargetParser/Host.h"
19#include "llvm/TargetParser/RISCVISAInfo.h"
20#include "llvm/TargetParser/RISCVTargetParser.h"
21
22#include <cassert>
23
24using namespace clang::driver;
25using namespace clang::driver::tools;
26using namespace clang;
27using namespace llvm::opt;
28
29/// Add -x lang to \p CmdArgs for \p Input.
30static void addDashXForInput(const ArgList &Args, const InputInfo &Input,
31 ArgStringList &CmdArgs) {
32 CmdArgs.push_back("-x");
33 // Map the driver type to the frontend type.
34 CmdArgs.push_back(types::getTypeName(Input.getType()));
35}
36
37void Flang::addFortranDialectOptions(const ArgList &Args,
38 ArgStringList &CmdArgs) const {
39 Args.addAllArgs(CmdArgs, {options::OPT_ffixed_form,
40 options::OPT_ffree_form,
41 options::OPT_ffixed_line_length_EQ,
42 options::OPT_fopenacc,
43 options::OPT_finput_charset_EQ,
44 options::OPT_fimplicit_none,
45 options::OPT_fno_implicit_none,
46 options::OPT_fbackslash,
47 options::OPT_fno_backslash,
48 options::OPT_flogical_abbreviations,
49 options::OPT_fno_logical_abbreviations,
50 options::OPT_fxor_operator,
51 options::OPT_fno_xor_operator,
52 options::OPT_falternative_parameter_statement,
53 options::OPT_fdefault_real_8,
54 options::OPT_fdefault_integer_8,
55 options::OPT_fdefault_double_8,
56 options::OPT_flarge_sizes,
57 options::OPT_fno_automatic,
58 options::OPT_fhermetic_module_files,
59 options::OPT_frealloc_lhs,
60 options::OPT_fno_realloc_lhs});
61}
62
63void Flang::addPreprocessingOptions(const ArgList &Args,
64 ArgStringList &CmdArgs) const {
65 Args.addAllArgs(CmdArgs,
66 {options::OPT_P, options::OPT_D, options::OPT_U,
67 options::OPT_I, options::OPT_cpp, options::OPT_nocpp});
68}
69
70/// @C shouldLoopVersion
71///
72/// Check if Loop Versioning should be enabled.
73/// We look for the last of one of the following:
74/// -Ofast, -O4, -O<number> and -f[no-]version-loops-for-stride.
75/// Loop versioning is disabled if the last option is
76/// -fno-version-loops-for-stride.
77/// Loop versioning is enabled if the last option is one of:
78/// -floop-versioning
79/// -Ofast
80/// -O4
81/// -O3
82/// For all other cases, loop versioning is is disabled.
83///
84/// The gfortran compiler automatically enables the option for -O3 or -Ofast.
85///
86/// @return true if loop-versioning should be enabled, otherwise false.
87static bool shouldLoopVersion(const ArgList &Args) {
88 const Arg *LoopVersioningArg = Args.getLastArg(
89 options::OPT_Ofast, options::OPT_O, options::OPT_O4,
90 options::OPT_floop_versioning, options::OPT_fno_loop_versioning);
91 if (!LoopVersioningArg)
92 return false;
93
94 if (LoopVersioningArg->getOption().matches(options::OPT_fno_loop_versioning))
95 return false;
96
97 if (LoopVersioningArg->getOption().matches(options::OPT_floop_versioning))
98 return true;
99
100 if (LoopVersioningArg->getOption().matches(options::OPT_Ofast) ||
101 LoopVersioningArg->getOption().matches(options::OPT_O4))
102 return true;
103
104 if (LoopVersioningArg->getOption().matches(options::OPT_O)) {
105 StringRef S(LoopVersioningArg->getValue());
106 unsigned OptLevel = 0;
107 // Note -Os or Oz woould "fail" here, so return false. Which is the
108 // desiered behavior.
109 if (S.getAsInteger(10, OptLevel))
110 return false;
111
112 return OptLevel > 2;
113 }
114
115 llvm_unreachable("We should not end up here");
116 return false;
117}
118
119void Flang::addOtherOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
120 Args.addAllArgs(CmdArgs,
121 {options::OPT_module_dir, options::OPT_fdebug_module_writer,
122 options::OPT_fintrinsic_modules_path, options::OPT_pedantic,
123 options::OPT_std_EQ, options::OPT_W_Joined,
124 options::OPT_fconvert_EQ, options::OPT_fpass_plugin_EQ,
125 options::OPT_funderscoring, options::OPT_fno_underscoring,
126 options::OPT_funsigned, options::OPT_fno_unsigned});
127
128 llvm::codegenoptions::DebugInfoKind DebugInfoKind;
129 if (Args.hasArg(options::OPT_gN_Group)) {
130 Arg *gNArg = Args.getLastArg(options::OPT_gN_Group);
131 DebugInfoKind = debugLevelToInfoKind(*gNArg);
132 } else if (Args.hasArg(options::OPT_g_Flag)) {
133 DebugInfoKind = llvm::codegenoptions::FullDebugInfo;
134 } else {
135 DebugInfoKind = llvm::codegenoptions::NoDebugInfo;
136 }
137 addDebugInfoKind(CmdArgs, DebugInfoKind);
138}
139
140void Flang::addCodegenOptions(const ArgList &Args,
141 ArgStringList &CmdArgs) const {
142 Arg *stackArrays =
143 Args.getLastArg(options::OPT_Ofast, options::OPT_fstack_arrays,
144 options::OPT_fno_stack_arrays);
145 if (stackArrays &&
146 !stackArrays->getOption().matches(options::OPT_fno_stack_arrays))
147 CmdArgs.push_back("-fstack-arrays");
148
149 if (shouldLoopVersion(Args))
150 CmdArgs.push_back("-fversion-loops-for-stride");
151
152 Args.addAllArgs(CmdArgs, {options::OPT_flang_experimental_hlfir,
153 options::OPT_flang_deprecated_no_hlfir,
154 options::OPT_fno_ppc_native_vec_elem_order,
155 options::OPT_fppc_native_vec_elem_order});
156}
157
158void Flang::addPicOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
159 // ParsePICArgs parses -fPIC/-fPIE and their variants and returns a tuple of
160 // (RelocationModel, PICLevel, IsPIE).
161 llvm::Reloc::Model RelocationModel;
162 unsigned PICLevel;
163 bool IsPIE;
164 std::tie(RelocationModel, PICLevel, IsPIE) =
165 ParsePICArgs(getToolChain(), Args);
166
167 if (auto *RMName = RelocationModelName(RelocationModel)) {
168 CmdArgs.push_back("-mrelocation-model");
169 CmdArgs.push_back(RMName);
170 }
171 if (PICLevel > 0) {
172 CmdArgs.push_back("-pic-level");
173 CmdArgs.push_back(PICLevel == 1 ? "1" : "2");
174 if (IsPIE)
175 CmdArgs.push_back("-pic-is-pie");
176 }
177}
178
179void Flang::AddAArch64TargetArgs(const ArgList &Args,
180 ArgStringList &CmdArgs) const {
181 // Handle -msve_vector_bits=<bits>
182 if (Arg *A = Args.getLastArg(options::OPT_msve_vector_bits_EQ)) {
183 StringRef Val = A->getValue();
184 const Driver &D = getToolChain().getDriver();
185 if (Val == "128" || Val == "256" || Val == "512" || Val == "1024" ||
186 Val == "2048" || Val == "128+" || Val == "256+" || Val == "512+" ||
187 Val == "1024+" || Val == "2048+") {
188 unsigned Bits = 0;
189 if (!Val.consume_back("+")) {
190 [[maybe_unused]] bool Invalid = Val.getAsInteger(10, Bits);
191 assert(!Invalid && "Failed to parse value");
192 CmdArgs.push_back(
193 Args.MakeArgString("-mvscale-max=" + llvm::Twine(Bits / 128)));
194 }
195
196 [[maybe_unused]] bool Invalid = Val.getAsInteger(10, Bits);
197 assert(!Invalid && "Failed to parse value");
198 CmdArgs.push_back(
199 Args.MakeArgString("-mvscale-min=" + llvm::Twine(Bits / 128)));
200 // Silently drop requests for vector-length agnostic code as it's implied.
201 } else if (Val != "scalable")
202 // Handle the unsupported values passed to msve-vector-bits.
203 D.Diag(diag::err_drv_unsupported_option_argument)
204 << A->getSpelling() << Val;
205 }
206}
207
208void Flang::AddLoongArch64TargetArgs(const ArgList &Args,
209 ArgStringList &CmdArgs) const {
210 const Driver &D = getToolChain().getDriver();
211 // Currently, flang only support `-mabi=lp64d` in LoongArch64.
212 if (const Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) {
213 StringRef V = A->getValue();
214 if (V != "lp64d") {
215 D.Diag(diag::err_drv_argument_not_allowed_with) << "-mabi" << V;
216 }
217 }
218
219 if (const Arg *A = Args.getLastArg(options::OPT_mannotate_tablejump,
220 options::OPT_mno_annotate_tablejump)) {
221 if (A->getOption().matches(options::OPT_mannotate_tablejump)) {
222 CmdArgs.push_back("-mllvm");
223 CmdArgs.push_back("-loongarch-annotate-tablejump");
224 }
225 }
226}
227
228void Flang::AddPPCTargetArgs(const ArgList &Args,
229 ArgStringList &CmdArgs) const {
230 const Driver &D = getToolChain().getDriver();
231 bool VecExtabi = false;
232
233 if (const Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) {
234 StringRef V = A->getValue();
235 if (V == "vec-extabi")
236 VecExtabi = true;
237 else if (V == "vec-default")
238 VecExtabi = false;
239 else
240 D.Diag(diag::err_drv_unsupported_option_argument)
241 << A->getSpelling() << V;
242 }
243
244 const llvm::Triple &T = getToolChain().getTriple();
245 if (VecExtabi) {
246 if (!T.isOSAIX()) {
247 D.Diag(diag::err_drv_unsupported_opt_for_target)
248 << "-mabi=vec-extabi" << T.str();
249 }
250 CmdArgs.push_back("-mabi=vec-extabi");
251 }
252}
253
254void Flang::AddRISCVTargetArgs(const ArgList &Args,
255 ArgStringList &CmdArgs) const {
256 const llvm::Triple &Triple = getToolChain().getTriple();
257 // Handle -mrvv-vector-bits=<bits>
258 if (Arg *A = Args.getLastArg(options::OPT_mrvv_vector_bits_EQ)) {
259 StringRef Val = A->getValue();
260 const Driver &D = getToolChain().getDriver();
261
262 // Get minimum VLen from march.
263 unsigned MinVLen = 0;
264 std::string Arch = riscv::getRISCVArch(Args, Triple);
265 auto ISAInfo = llvm::RISCVISAInfo::parseArchString(
266 Arch, /*EnableExperimentalExtensions*/ true);
267 // Ignore parsing error.
268 if (!errorToBool(ISAInfo.takeError()))
269 MinVLen = (*ISAInfo)->getMinVLen();
270
271 // If the value is "zvl", use MinVLen from march. Otherwise, try to parse
272 // as integer as long as we have a MinVLen.
273 unsigned Bits = 0;
274 if (Val == "zvl" && MinVLen >= llvm::RISCV::RVVBitsPerBlock) {
275 Bits = MinVLen;
276 } else if (!Val.getAsInteger(10, Bits)) {
277 // Only accept power of 2 values beteen RVVBitsPerBlock and 65536 that
278 // at least MinVLen.
279 if (Bits < MinVLen || Bits < llvm::RISCV::RVVBitsPerBlock ||
280 Bits > 65536 || !llvm::isPowerOf2_32(Bits))
281 Bits = 0;
282 }
283
284 // If we got a valid value try to use it.
285 if (Bits != 0) {
286 unsigned VScaleMin = Bits / llvm::RISCV::RVVBitsPerBlock;
287 CmdArgs.push_back(
288 Args.MakeArgString("-mvscale-max=" + llvm::Twine(VScaleMin)));
289 CmdArgs.push_back(
290 Args.MakeArgString("-mvscale-min=" + llvm::Twine(VScaleMin)));
291 } else if (Val != "scalable") {
292 // Handle the unsupported values passed to mrvv-vector-bits.
293 D.Diag(diag::err_drv_unsupported_option_argument)
294 << A->getSpelling() << Val;
295 }
296 }
297}
298
299void Flang::AddX86_64TargetArgs(const ArgList &Args,
300 ArgStringList &CmdArgs) const {
301 if (Arg *A = Args.getLastArg(options::OPT_masm_EQ)) {
302 StringRef Value = A->getValue();
303 if (Value == "intel" || Value == "att") {
304 CmdArgs.push_back(Args.MakeArgString("-mllvm"));
305 CmdArgs.push_back(Args.MakeArgString("-x86-asm-syntax=" + Value));
306 } else {
307 getToolChain().getDriver().Diag(diag::err_drv_unsupported_option_argument)
308 << A->getSpelling() << Value;
309 }
310 }
311}
312
313static void addVSDefines(const ToolChain &TC, const ArgList &Args,
314 ArgStringList &CmdArgs) {
315
316 unsigned ver = 0;
317 const VersionTuple vt = TC.computeMSVCVersion(nullptr, Args);
318 ver = vt.getMajor() * 10000000 + vt.getMinor().value_or(0) * 100000 +
319 vt.getSubminor().value_or(0);
320 CmdArgs.push_back(Args.MakeArgString("-D_MSC_VER=" + Twine(ver / 100000)));
321 CmdArgs.push_back(Args.MakeArgString("-D_MSC_FULL_VER=" + Twine(ver)));
322 CmdArgs.push_back(Args.MakeArgString("-D_WIN32"));
323
324 const llvm::Triple &triple = TC.getTriple();
325 if (triple.isAArch64()) {
326 CmdArgs.push_back("-D_M_ARM64=1");
327 } else if (triple.isX86() && triple.isArch32Bit()) {
328 CmdArgs.push_back("-D_M_IX86=600");
329 } else if (triple.isX86() && triple.isArch64Bit()) {
330 CmdArgs.push_back("-D_M_X64=100");
331 } else {
332 llvm_unreachable(
333 "Flang on Windows only supports X86_32, X86_64 and AArch64");
334 }
335}
336
337static void processVSRuntimeLibrary(const ToolChain &TC, const ArgList &Args,
338 ArgStringList &CmdArgs) {
339 assert(TC.getTriple().isKnownWindowsMSVCEnvironment() &&
340 "can only add VS runtime library on Windows!");
341 // if -fno-fortran-main has been passed, skip linking Fortran_main.a
342 if (TC.getTriple().isKnownWindowsMSVCEnvironment()) {
343 CmdArgs.push_back(Args.MakeArgString(
344 "--dependent-lib=" + TC.getCompilerRTBasename(Args, "builtins")));
345 }
346 unsigned RTOptionID = options::OPT__SLASH_MT;
347 if (auto *rtl = Args.getLastArg(options::OPT_fms_runtime_lib_EQ)) {
348 RTOptionID = llvm::StringSwitch<unsigned>(rtl->getValue())
349 .Case("static", options::OPT__SLASH_MT)
350 .Case("static_dbg", options::OPT__SLASH_MTd)
351 .Case("dll", options::OPT__SLASH_MD)
352 .Case("dll_dbg", options::OPT__SLASH_MDd)
353 .Default(options::OPT__SLASH_MT);
354 }
355 switch (RTOptionID) {
356 case options::OPT__SLASH_MT:
357 CmdArgs.push_back("-D_MT");
358 CmdArgs.push_back("--dependent-lib=libcmt");
359 CmdArgs.push_back("--dependent-lib=FortranRuntime.static.lib");
360 CmdArgs.push_back("--dependent-lib=FortranDecimal.static.lib");
361 break;
362 case options::OPT__SLASH_MTd:
363 CmdArgs.push_back("-D_MT");
364 CmdArgs.push_back("-D_DEBUG");
365 CmdArgs.push_back("--dependent-lib=libcmtd");
366 CmdArgs.push_back("--dependent-lib=FortranRuntime.static_dbg.lib");
367 CmdArgs.push_back("--dependent-lib=FortranDecimal.static_dbg.lib");
368 break;
369 case options::OPT__SLASH_MD:
370 CmdArgs.push_back("-D_MT");
371 CmdArgs.push_back("-D_DLL");
372 CmdArgs.push_back("--dependent-lib=msvcrt");
373 CmdArgs.push_back("--dependent-lib=FortranRuntime.dynamic.lib");
374 CmdArgs.push_back("--dependent-lib=FortranDecimal.dynamic.lib");
375 break;
376 case options::OPT__SLASH_MDd:
377 CmdArgs.push_back("-D_MT");
378 CmdArgs.push_back("-D_DEBUG");
379 CmdArgs.push_back("-D_DLL");
380 CmdArgs.push_back("--dependent-lib=msvcrtd");
381 CmdArgs.push_back("--dependent-lib=FortranRuntime.dynamic_dbg.lib");
382 CmdArgs.push_back("--dependent-lib=FortranDecimal.dynamic_dbg.lib");
383 break;
384 }
385}
386
387void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
388 ArgStringList &CmdArgs) const {
389 if (Arg *A = Args.getLastArg(options::OPT_mcode_object_version_EQ)) {
390 StringRef Val = A->getValue();
391 CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val));
392 }
393
394 const ToolChain &TC = getToolChain();
396}
397
398void Flang::addTargetOptions(const ArgList &Args,
399 ArgStringList &CmdArgs) const {
400 const ToolChain &TC = getToolChain();
401 const llvm::Triple &Triple = TC.getEffectiveTriple();
402 const Driver &D = TC.getDriver();
403
404 std::string CPU = getCPUName(D, Args, Triple);
405 if (!CPU.empty()) {
406 CmdArgs.push_back("-target-cpu");
407 CmdArgs.push_back(Args.MakeArgString(CPU));
408 }
409
410 addOutlineAtomicsArgs(D, getToolChain(), Args, CmdArgs, Triple);
411
412 // Add the target features.
413 switch (TC.getArch()) {
414 default:
415 break;
416 case llvm::Triple::aarch64:
417 getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false);
418 AddAArch64TargetArgs(Args, CmdArgs);
419 break;
420
421 case llvm::Triple::r600:
422 case llvm::Triple::amdgcn:
423 getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false);
424 AddAMDGPUTargetArgs(Args, CmdArgs);
425 break;
426 case llvm::Triple::riscv64:
427 getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false);
428 AddRISCVTargetArgs(Args, CmdArgs);
429 break;
430 case llvm::Triple::x86_64:
431 getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false);
432 AddX86_64TargetArgs(Args, CmdArgs);
433 break;
434 case llvm::Triple::ppc:
435 case llvm::Triple::ppc64:
436 case llvm::Triple::ppc64le:
437 AddPPCTargetArgs(Args, CmdArgs);
438 break;
439 case llvm::Triple::loongarch64:
440 getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false);
441 AddLoongArch64TargetArgs(Args, CmdArgs);
442 break;
443 }
444
445 if (Arg *A = Args.getLastArg(options::OPT_fveclib)) {
446 StringRef Name = A->getValue();
447 if (Name == "SVML") {
448 if (Triple.getArch() != llvm::Triple::x86 &&
449 Triple.getArch() != llvm::Triple::x86_64)
450 D.Diag(diag::err_drv_unsupported_opt_for_target)
451 << Name << Triple.getArchName();
452 } else if (Name == "LIBMVEC-X86") {
453 if (Triple.getArch() != llvm::Triple::x86 &&
454 Triple.getArch() != llvm::Triple::x86_64)
455 D.Diag(diag::err_drv_unsupported_opt_for_target)
456 << Name << Triple.getArchName();
457 } else if (Name == "SLEEF" || Name == "ArmPL") {
458 if (Triple.getArch() != llvm::Triple::aarch64 &&
459 Triple.getArch() != llvm::Triple::aarch64_be)
460 D.Diag(diag::err_drv_unsupported_opt_for_target)
461 << Name << Triple.getArchName();
462 }
463
464 if (Triple.isOSDarwin()) {
465 // flang doesn't currently suport nostdlib, nodefaultlibs. Adding these
466 // here incase they are added someday
467 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
468 if (A->getValue() == StringRef{"Accelerate"}) {
469 CmdArgs.push_back("-framework");
470 CmdArgs.push_back("Accelerate");
471 }
472 }
473 }
474 A->render(Args, CmdArgs);
475 }
476
477 if (Triple.isKnownWindowsMSVCEnvironment()) {
478 processVSRuntimeLibrary(TC, Args, CmdArgs);
479 addVSDefines(TC, Args, CmdArgs);
480 }
481
482 // TODO: Add target specific flags, ABI, mtune option etc.
483 if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) {
484 CmdArgs.push_back("-tune-cpu");
485 if (A->getValue() == StringRef{"native"})
486 CmdArgs.push_back(Args.MakeArgString(llvm::sys::getHostCPUName()));
487 else
488 CmdArgs.push_back(A->getValue());
489 }
490}
491
492void Flang::addOffloadOptions(Compilation &C, const InputInfoList &Inputs,
493 const JobAction &JA, const ArgList &Args,
494 ArgStringList &CmdArgs) const {
495 bool IsOpenMPDevice = JA.isDeviceOffloading(Action::OFK_OpenMP);
496 bool IsHostOffloadingAction = JA.isHostOffloading(Action::OFK_OpenMP) ||
497 JA.isHostOffloading(C.getActiveOffloadKinds());
498
499 // Skips the primary input file, which is the input file that the compilation
500 // proccess will be executed upon (e.g. the host bitcode file) and
501 // adds other secondary input (e.g. device bitcode files for embedding to the
502 // -fembed-offload-object argument or the host IR file for proccessing
503 // during device compilation to the fopenmp-host-ir-file-path argument via
504 // OpenMPDeviceInput). This is condensed logic from the ConstructJob
505 // function inside of the Clang driver for pushing on further input arguments
506 // needed for offloading during various phases of compilation.
507 for (size_t i = 1; i < Inputs.size(); ++i) {
508 if (Inputs[i].getType() == types::TY_Nothing) {
509 // contains nothing, so it's skippable
510 } else if (IsHostOffloadingAction) {
511 CmdArgs.push_back(
512 Args.MakeArgString("-fembed-offload-object=" +
513 getToolChain().getInputFilename(Inputs[i])));
514 } else if (IsOpenMPDevice) {
515 if (Inputs[i].getFilename()) {
516 CmdArgs.push_back("-fopenmp-host-ir-file-path");
517 CmdArgs.push_back(Args.MakeArgString(Inputs[i].getFilename()));
518 } else {
519 llvm_unreachable("missing openmp host-ir file for device offloading");
520 }
521 } else {
522 llvm_unreachable(
523 "unexpectedly given multiple inputs or given unknown input");
524 }
525 }
526
527 if (IsOpenMPDevice) {
528 // -fopenmp-is-target-device is passed along to tell the frontend that it is
529 // generating code for a device, so that only the relevant code is emitted.
530 CmdArgs.push_back("-fopenmp-is-target-device");
531
532 // When in OpenMP offloading mode, enable debugging on the device.
533 Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_target_debug_EQ);
534 if (Args.hasFlag(options::OPT_fopenmp_target_debug,
535 options::OPT_fno_openmp_target_debug, /*Default=*/false))
536 CmdArgs.push_back("-fopenmp-target-debug");
537
538 // When in OpenMP offloading mode, forward assumptions information about
539 // thread and team counts in the device.
540 if (Args.hasFlag(options::OPT_fopenmp_assume_teams_oversubscription,
541 options::OPT_fno_openmp_assume_teams_oversubscription,
542 /*Default=*/false))
543 CmdArgs.push_back("-fopenmp-assume-teams-oversubscription");
544 if (Args.hasFlag(options::OPT_fopenmp_assume_threads_oversubscription,
545 options::OPT_fno_openmp_assume_threads_oversubscription,
546 /*Default=*/false))
547 CmdArgs.push_back("-fopenmp-assume-threads-oversubscription");
548 if (Args.hasArg(options::OPT_fopenmp_assume_no_thread_state))
549 CmdArgs.push_back("-fopenmp-assume-no-thread-state");
550 if (Args.hasArg(options::OPT_fopenmp_assume_no_nested_parallelism))
551 CmdArgs.push_back("-fopenmp-assume-no-nested-parallelism");
552 if (Args.hasArg(options::OPT_nogpulib))
553 CmdArgs.push_back("-nogpulib");
554 }
555
556 addOpenMPHostOffloadingArgs(C, JA, Args, CmdArgs);
557}
558
559static void addFloatingPointOptions(const Driver &D, const ArgList &Args,
560 ArgStringList &CmdArgs) {
561 StringRef FPContract;
562 bool HonorINFs = true;
563 bool HonorNaNs = true;
564 bool ApproxFunc = false;
565 bool SignedZeros = true;
566 bool AssociativeMath = false;
567 bool ReciprocalMath = false;
568
569 if (const Arg *A = Args.getLastArg(options::OPT_ffp_contract)) {
570 const StringRef Val = A->getValue();
571 if (Val == "fast" || Val == "off") {
572 FPContract = Val;
573 } else if (Val == "on") {
574 // Warn instead of error because users might have makefiles written for
575 // gfortran (which accepts -ffp-contract=on)
576 D.Diag(diag::warn_drv_unsupported_option_for_flang)
577 << Val << A->getOption().getName() << "off";
578 FPContract = "off";
579 } else
580 // Clang's "fast-honor-pragmas" option is not supported because it is
581 // non-standard
582 D.Diag(diag::err_drv_unsupported_option_argument)
583 << A->getSpelling() << Val;
584 }
585
586 for (const Arg *A : Args) {
587 auto optId = A->getOption().getID();
588 switch (optId) {
589 // if this isn't an FP option, skip the claim below
590 default:
591 continue;
592
593 case options::OPT_fhonor_infinities:
594 HonorINFs = true;
595 break;
596 case options::OPT_fno_honor_infinities:
597 HonorINFs = false;
598 break;
599 case options::OPT_fhonor_nans:
600 HonorNaNs = true;
601 break;
602 case options::OPT_fno_honor_nans:
603 HonorNaNs = false;
604 break;
605 case options::OPT_fapprox_func:
606 ApproxFunc = true;
607 break;
608 case options::OPT_fno_approx_func:
609 ApproxFunc = false;
610 break;
611 case options::OPT_fsigned_zeros:
612 SignedZeros = true;
613 break;
614 case options::OPT_fno_signed_zeros:
615 SignedZeros = false;
616 break;
617 case options::OPT_fassociative_math:
618 AssociativeMath = true;
619 break;
620 case options::OPT_fno_associative_math:
621 AssociativeMath = false;
622 break;
623 case options::OPT_freciprocal_math:
624 ReciprocalMath = true;
625 break;
626 case options::OPT_fno_reciprocal_math:
627 ReciprocalMath = false;
628 break;
629 case options::OPT_Ofast:
630 [[fallthrough]];
631 case options::OPT_ffast_math:
632 HonorINFs = false;
633 HonorNaNs = false;
634 AssociativeMath = true;
635 ReciprocalMath = true;
636 ApproxFunc = true;
637 SignedZeros = false;
638 FPContract = "fast";
639 break;
640 case options::OPT_fno_fast_math:
641 HonorINFs = true;
642 HonorNaNs = true;
643 AssociativeMath = false;
644 ReciprocalMath = false;
645 ApproxFunc = false;
646 SignedZeros = true;
647 // -fno-fast-math should undo -ffast-math so I return FPContract to the
648 // default. It is important to check it is "fast" (the default) so that
649 // --ffp-contract=off -fno-fast-math --> -ffp-contract=off
650 if (FPContract == "fast")
651 FPContract = "";
652 break;
653 }
654
655 // If we handled this option claim it
656 A->claim();
657 }
658
659 if (!HonorINFs && !HonorNaNs && AssociativeMath && ReciprocalMath &&
660 ApproxFunc && !SignedZeros &&
661 (FPContract == "fast" || FPContract.empty())) {
662 CmdArgs.push_back("-ffast-math");
663 return;
664 }
665
666 if (!FPContract.empty())
667 CmdArgs.push_back(Args.MakeArgString("-ffp-contract=" + FPContract));
668
669 if (!HonorINFs)
670 CmdArgs.push_back("-menable-no-infs");
671
672 if (!HonorNaNs)
673 CmdArgs.push_back("-menable-no-nans");
674
675 if (ApproxFunc)
676 CmdArgs.push_back("-fapprox-func");
677
678 if (!SignedZeros)
679 CmdArgs.push_back("-fno-signed-zeros");
680
681 if (AssociativeMath && !SignedZeros)
682 CmdArgs.push_back("-mreassociate");
683
684 if (ReciprocalMath)
685 CmdArgs.push_back("-freciprocal-math");
686}
687
688static void renderRemarksOptions(const ArgList &Args, ArgStringList &CmdArgs,
689 const InputInfo &Input) {
690 StringRef Format = "yaml";
691 if (const Arg *A = Args.getLastArg(options::OPT_fsave_optimization_record_EQ))
692 Format = A->getValue();
693
694 CmdArgs.push_back("-opt-record-file");
695
696 const Arg *A = Args.getLastArg(options::OPT_foptimization_record_file_EQ);
697 if (A) {
698 CmdArgs.push_back(A->getValue());
699 } else {
701
702 if (Args.hasArg(options::OPT_c) || Args.hasArg(options::OPT_S)) {
703 if (Arg *FinalOutput = Args.getLastArg(options::OPT_o))
704 F = FinalOutput->getValue();
705 }
706
707 if (F.empty()) {
708 // Use the input filename.
709 F = llvm::sys::path::stem(Input.getBaseInput());
710 }
711
712 SmallString<32> Extension;
713 Extension += "opt.";
714 Extension += Format;
715
716 llvm::sys::path::replace_extension(F, Extension);
717 CmdArgs.push_back(Args.MakeArgString(F));
718 }
719
720 if (const Arg *A =
721 Args.getLastArg(options::OPT_foptimization_record_passes_EQ)) {
722 CmdArgs.push_back("-opt-record-passes");
723 CmdArgs.push_back(A->getValue());
724 }
725
726 if (!Format.empty()) {
727 CmdArgs.push_back("-opt-record-format");
728 CmdArgs.push_back(Format.data());
729 }
730}
731
733 const InputInfo &Output, const InputInfoList &Inputs,
734 const ArgList &Args, const char *LinkingOutput) const {
735 const auto &TC = getToolChain();
736 const llvm::Triple &Triple = TC.getEffectiveTriple();
737 const std::string &TripleStr = Triple.getTriple();
738
739 const Driver &D = TC.getDriver();
740 ArgStringList CmdArgs;
741 DiagnosticsEngine &Diags = D.getDiags();
742
743 // Invoke ourselves in -fc1 mode.
744 CmdArgs.push_back("-fc1");
745
746 // Add the "effective" target triple.
747 CmdArgs.push_back("-triple");
748 CmdArgs.push_back(Args.MakeArgString(TripleStr));
749
750 if (isa<PreprocessJobAction>(JA)) {
751 CmdArgs.push_back("-E");
752 if (Args.getLastArg(options::OPT_dM)) {
753 CmdArgs.push_back("-dM");
754 }
755 } else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) {
756 if (JA.getType() == types::TY_Nothing) {
757 CmdArgs.push_back("-fsyntax-only");
758 } else if (JA.getType() == types::TY_AST) {
759 CmdArgs.push_back("-emit-ast");
760 } else if (JA.getType() == types::TY_LLVM_IR ||
761 JA.getType() == types::TY_LTO_IR) {
762 CmdArgs.push_back("-emit-llvm");
763 } else if (JA.getType() == types::TY_LLVM_BC ||
764 JA.getType() == types::TY_LTO_BC) {
765 CmdArgs.push_back("-emit-llvm-bc");
766 } else if (JA.getType() == types::TY_PP_Asm) {
767 CmdArgs.push_back("-S");
768 } else {
769 assert(false && "Unexpected output type!");
770 }
771 } else if (isa<AssembleJobAction>(JA)) {
772 CmdArgs.push_back("-emit-obj");
773 } else if (isa<PrecompileJobAction>(JA)) {
774 // The precompile job action is only needed for options such as -mcpu=help.
775 // Those will already have been handled by the fc1 driver.
776 } else {
777 assert(false && "Unexpected action class for Flang tool.");
778 }
779
780 const InputInfo &Input = Inputs[0];
781 types::ID InputType = Input.getType();
782
783 // Add preprocessing options like -I, -D, etc. if we are using the
784 // preprocessor (i.e. skip when dealing with e.g. binary files).
786 addPreprocessingOptions(Args, CmdArgs);
787
788 addFortranDialectOptions(Args, CmdArgs);
789
790 // 'flang -E' always produces output that is suitable for use as fixed form
791 // Fortran. However it is only valid free form source if the original is also
792 // free form.
793 if (InputType == types::TY_PP_Fortran &&
794 !Args.getLastArg(options::OPT_ffixed_form, options::OPT_ffree_form))
795 CmdArgs.push_back("-ffixed-form");
796
797 handleColorDiagnosticsArgs(D, Args, CmdArgs);
798
799 // LTO mode is parsed by the Clang driver library.
800 LTOKind LTOMode = D.getLTOMode();
801 assert(LTOMode != LTOK_Unknown && "Unknown LTO mode.");
802 if (LTOMode == LTOK_Full)
803 CmdArgs.push_back("-flto=full");
804 else if (LTOMode == LTOK_Thin) {
805 Diags.Report(
807 "the option '-flto=thin' is a work in progress"));
808 CmdArgs.push_back("-flto=thin");
809 }
810
811 // -fPIC and related options.
812 addPicOptions(Args, CmdArgs);
813
814 // Floating point related options
815 addFloatingPointOptions(D, Args, CmdArgs);
816
817 // Add target args, features, etc.
818 addTargetOptions(Args, CmdArgs);
819
820 llvm::Reloc::Model RelocationModel =
821 std::get<0>(ParsePICArgs(getToolChain(), Args));
822 // Add MCModel information
823 addMCModel(D, Args, Triple, RelocationModel, CmdArgs);
824
825 // Add Codegen options
826 addCodegenOptions(Args, CmdArgs);
827
828 // Add R Group options
829 Args.AddAllArgs(CmdArgs, options::OPT_R_Group);
830
831 // Remarks can be enabled with any of the `-f.*optimization-record.*` flags.
832 if (willEmitRemarks(Args))
833 renderRemarksOptions(Args, CmdArgs, Input);
834
835 // Add other compile options
836 addOtherOptions(Args, CmdArgs);
837
838 // Disable all warnings
839 // TODO: Handle interactions between -w, -pedantic, -Wall, -WOption
840 Args.AddLastArg(CmdArgs, options::OPT_w);
841
842 // Forward flags for OpenMP. We don't do this if the current action is an
843 // device offloading action other than OpenMP.
844 if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
845 options::OPT_fno_openmp, false) &&
848 switch (D.getOpenMPRuntime(Args)) {
851 // Clang can generate useful OpenMP code for these two runtime libraries.
852 CmdArgs.push_back("-fopenmp");
853 Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_version_EQ);
854
855 if (Args.hasArg(options::OPT_fopenmp_force_usm))
856 CmdArgs.push_back("-fopenmp-force-usm");
857 // TODO: OpenMP support isn't "done" yet, so for now we warn that it
858 // is experimental.
859 D.Diag(diag::warn_openmp_experimental);
860
861 // FIXME: Clang supports a whole bunch more flags here.
862 break;
863 default:
864 // By default, if Clang doesn't know how to generate useful OpenMP code
865 // for a specific runtime library, we just don't pass the '-fopenmp' flag
866 // down to the actual compilation.
867 // FIXME: It would be better to have a mode which *only* omits IR
868 // generation based on the OpenMP support so that we get consistent
869 // semantic analysis, etc.
870 const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ);
871 D.Diag(diag::warn_drv_unsupported_openmp_library)
872 << A->getSpelling() << A->getValue();
873 break;
874 }
875 }
876
877 // Pass the path to compiler resource files.
878 CmdArgs.push_back("-resource-dir");
879 CmdArgs.push_back(D.ResourceDir.c_str());
880
881 // Offloading related options
882 addOffloadOptions(C, Inputs, JA, Args, CmdArgs);
883
884 // Forward -Xflang arguments to -fc1
885 Args.AddAllArgValues(CmdArgs, options::OPT_Xflang);
886
888 getFramePointerKind(Args, Triple);
889
890 const char *FPKeepKindStr = nullptr;
891 switch (FPKeepKind) {
893 FPKeepKindStr = "-mframe-pointer=none";
894 break;
896 FPKeepKindStr = "-mframe-pointer=reserved";
897 break;
899 FPKeepKindStr = "-mframe-pointer=non-leaf";
900 break;
902 FPKeepKindStr = "-mframe-pointer=all";
903 break;
904 }
905 assert(FPKeepKindStr && "unknown FramePointerKind");
906 CmdArgs.push_back(FPKeepKindStr);
907
908 // Forward -mllvm options to the LLVM option parser. In practice, this means
909 // forwarding to `-fc1` as that's where the LLVM parser is run.
910 for (const Arg *A : Args.filtered(options::OPT_mllvm)) {
911 A->claim();
912 A->render(Args, CmdArgs);
913 }
914
915 for (const Arg *A : Args.filtered(options::OPT_mmlir)) {
916 A->claim();
917 A->render(Args, CmdArgs);
918 }
919
920 // Remove any unsupported gfortran diagnostic options
921 for (const Arg *A : Args.filtered(options::OPT_flang_ignored_w_Group)) {
922 A->claim();
923 D.Diag(diag::warn_drv_unsupported_diag_option_for_flang)
924 << A->getOption().getName();
925 }
926
927 // Optimization level for CodeGen.
928 if (const Arg *A = Args.getLastArg(options::OPT_O_Group)) {
929 if (A->getOption().matches(options::OPT_O4)) {
930 CmdArgs.push_back("-O3");
931 D.Diag(diag::warn_O4_is_O3);
932 } else if (A->getOption().matches(options::OPT_Ofast)) {
933 CmdArgs.push_back("-O3");
934 } else {
935 A->render(Args, CmdArgs);
936 }
937 }
938
940
941 assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");
942 if (Output.isFilename()) {
943 CmdArgs.push_back("-o");
944 CmdArgs.push_back(Output.getFilename());
945 }
946
947 if (Args.getLastArg(options::OPT_save_temps_EQ))
948 Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ);
949
950 addDashXForInput(Args, Input, CmdArgs);
951
952 bool FRecordCmdLine = false;
953 bool GRecordCmdLine = false;
954 if (shouldRecordCommandLine(TC, Args, FRecordCmdLine, GRecordCmdLine)) {
955 const char *CmdLine = renderEscapedCommandLine(TC, Args);
956 if (FRecordCmdLine) {
957 CmdArgs.push_back("-record-command-line");
958 CmdArgs.push_back(CmdLine);
959 }
960 if (TC.UseDwarfDebugFlags() || GRecordCmdLine) {
961 CmdArgs.push_back("-dwarf-debug-flags");
962 CmdArgs.push_back(CmdLine);
963 }
964 }
965
966 // The input could be Ty_Nothing when "querying" options such as -mcpu=help
967 // are used.
968 ArrayRef<InputInfo> FrontendInputs = Input;
969 if (Input.isNothing())
970 FrontendInputs = {};
971
972 for (const InputInfo &Input : FrontendInputs) {
973 if (Input.isFilename())
974 CmdArgs.push_back(Input.getFilename());
975 else
976 Input.getInputArg().renderAsInput(Args, CmdArgs);
977 }
978
979 const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
980 C.addCommand(std::make_unique<Command>(JA, *this,
982 Exec, CmdArgs, Inputs, Output));
983}
984
985Flang::Flang(const ToolChain &TC) : Tool("flang", "flang frontend", TC) {}
986
#define V(N, I)
Definition: ASTContext.h:3443
const Decl * D
static void addDashXForInput(const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs)
Add -x lang to CmdArgs for Input.
Definition: Clang.cpp:540
static void renderRemarksOptions(const ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple, const InputInfo &Input, const InputInfo &Output, const JobAction &JA)
Definition: Clang.cpp:1383
clang::CodeGenOptions::FramePointerKind getFramePointerKind(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
Definition: CommonArgs.cpp:216
static void processVSRuntimeLibrary(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
Definition: Flang.cpp:337
static void addVSDefines(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
Definition: Flang.cpp:313
static bool shouldLoopVersion(const ArgList &Args)
@C shouldLoopVersion
Definition: Flang.cpp:87
static void addDashXForInput(const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs)
Add -x lang to CmdArgs for Input.
Definition: Flang.cpp:30
static void addFloatingPointOptions(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
Definition: Flang.cpp:559
int64_t getID() const
Definition: DeclBase.cpp:1175
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:231
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
Definition: Diagnostic.h:1493
unsigned getCustomDiagID(Level L, const char(&FormatString)[N])
Return an ID for a diagnostic with the specified format string and level.
Definition: Diagnostic.h:896
types::ID getType() const
Definition: Action.h:148
bool isHostOffloading(unsigned int OKind) const
Check if this action have any offload kinds.
Definition: Action.h:218
bool isDeviceOffloading(OffloadKind OKind) const
Definition: Action.h:221
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:77
DiagnosticBuilder Diag(unsigned DiagID) const
Definition: Driver.h:144
@ OMPRT_IOMP5
The legacy name for the LLVM OpenMP runtime from when it was the Intel OpenMP runtime.
Definition: Driver.h:140
@ OMPRT_OMP
The LLVM OpenMP runtime.
Definition: Driver.h:130
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
const char * getBaseInput() const
Definition: InputInfo.h:78
const llvm::opt::Arg & getInputArg() const
Definition: InputInfo.h:87
const char * getFilename() const
Definition: InputInfo.h:83
bool isNothing() const
Definition: InputInfo.h:74
bool isFilename() const
Definition: InputInfo.h:75
types::ID getType() const
Definition: InputInfo.h:77
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:92
llvm::Triple::ArchType getArch() const
Definition: ToolChain.h:268
const Driver & getDriver() const
Definition: ToolChain.h:252
const llvm::Triple & getEffectiveTriple() const
Get the toolchain's effective clang triple.
Definition: ToolChain.h:282
const llvm::Triple & getTriple() const
Definition: ToolChain.h:254
virtual bool UseDwarfDebugFlags() const
UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information.
Definition: ToolChain.h:579
virtual VersionTuple computeMSVCVersion(const Driver *D, const llvm::opt::ArgList &Args) const
On Windows, returns the MSVC compatibility version.
Definition: ToolChain.cpp:1510
virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadKind) const
Add options that need to be passed to cc1 for this target.
Definition: ToolChain.cpp:1160
std::string getCompilerRTBasename(const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const
Definition: ToolChain.cpp:713
Tool - Information on a specific compilation tool.
Definition: Tool.h:32
const ToolChain & getToolChain() const
Definition: Tool.h:52
Flang(const ToolChain &TC)
Definition: Flang.cpp:985
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: Flang.cpp:732
std::string getRISCVArch(const llvm::opt::ArgList &Args, const llvm::Triple &Triple)
Definition: RISCV.cpp:249
void addMCModel(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &Triple, const llvm::Reloc::Model &RelocationModel, llvm::opt::ArgStringList &CmdArgs)
void addOutlineAtomicsArgs(const Driver &D, const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const llvm::Triple &Triple)
void getTargetFeatures(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, bool ForAS, bool IsAux=false)
void handleColorDiagnosticsArgs(const Driver &D, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
Handle the -f{no}-color-diagnostics and -f{no}-diagnostics-colors options.
std::string getCPUName(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &T, bool FromAs=false)
bool shouldRecordCommandLine(const ToolChain &TC, const llvm::opt::ArgList &Args, bool &FRecordCommandLine, bool &GRecordCommandLine)
Check if the command line should be recorded in the object file.
void addDebugInfoKind(llvm::opt::ArgStringList &CmdArgs, llvm::codegenoptions::DebugInfoKind DebugInfoKind)
llvm::codegenoptions::DebugInfoKind debugLevelToInfoKind(const llvm::opt::Arg &A)
const char * renderEscapedCommandLine(const ToolChain &TC, const llvm::opt::ArgList &Args)
Join the args in the given ArgList, escape spaces and backslashes and return the joined string.
void renderCommonIntegerOverflowOptions(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
std::tuple< llvm::Reloc::Model, unsigned, bool > ParsePICArgs(const ToolChain &ToolChain, const llvm::opt::ArgList &Args)
const char * RelocationModelName(llvm::Reloc::Model Model)
void addOpenMPHostOffloadingArgs(const Compilation &C, const JobAction &JA, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
Adds offloading options for OpenMP host compilation to CmdArgs.
ID getPreprocessedType(ID Id)
getPreprocessedType - Get the ID of the type for this input when it has been preprocessed,...
Definition: Types.cpp:53
const char * getTypeName(ID Id)
getTypeName - Return the name of the type for Id.
Definition: Types.cpp:49
LTOKind
Describes the kind of LTO mode selected via -f(no-)?lto(=.*)? options.
Definition: Driver.h:58
@ LTOK_Unknown
Definition: Driver.h:62
bool willEmitRemarks(const llvm::opt::ArgList &Args)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
static constexpr ResponseFileSupport AtFileUTF8()
Definition: Job.h:85