@@ -51,6 +51,10 @@ def ArgumentIsPath : OptionFlag;
51
51
// and read/parsed from there when reconstituting a .swiftmodule from it.
52
52
def ModuleInterfaceOption : OptionFlag;
53
53
54
+ // The option causes the output of a supplementary output, or is the path option
55
+ // for a supplementary output. E.g., `-emit-module` and `-emit-module-path`.
56
+ def SupplementaryOutput : OptionFlag;
57
+
54
58
/////////
55
59
// Options
56
60
@@ -314,49 +318,57 @@ def profile_stats_entities: Flag<["-"], "profile-stats-entities">,
314
318
HelpText<"Profile changes to stats in -stats-output-dir, subdivided by source entity">;
315
319
316
320
def emit_dependencies : Flag<["-"], "emit-dependencies">,
317
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
321
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
322
+ SupplementaryOutput]>,
318
323
HelpText<"Emit basic Make-compatible dependencies files">;
319
324
def track_system_dependencies : Flag<["-"], "track-system-dependencies">,
320
325
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
321
326
HelpText<"Track system dependencies while emitting Make-style dependencies">;
322
327
323
328
def emit_loaded_module_trace : Flag<["-"], "emit-loaded-module-trace">,
324
- Flags<[FrontendOption, NoInteractiveOption]>,
329
+ Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput ]>,
325
330
HelpText<"Emit a JSON file containing information about what modules were loaded">;
326
331
def emit_loaded_module_trace_path : Separate<["-"], "emit-loaded-module-trace-path">,
327
- Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
332
+ Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
333
+ SupplementaryOutput]>,
328
334
HelpText<"Emit the loaded module trace JSON to <path>">,
329
335
MetaVarName<"<path>">;
330
336
def emit_loaded_module_trace_path_EQ : Joined<["-"], "emit-loaded-module-trace-path=">,
331
- Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
337
+ Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
338
+ SupplementaryOutput]>,
332
339
Alias<emit_loaded_module_trace_path>;
333
340
def emit_cross_import_remarks : Flag<["-"], "Rcross-import">,
334
341
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
335
342
HelpText<"Emit a remark if a cross-import of a module is triggered.">;
336
343
337
344
def emit_tbd : Flag<["-"], "emit-tbd">,
338
345
HelpText<"Emit a TBD file">,
339
- Flags<[FrontendOption, NoInteractiveOption]>;
346
+ Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput ]>;
340
347
def emit_tbd_path : Separate<["-"], "emit-tbd-path">,
341
- Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
348
+ Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
349
+ SupplementaryOutput]>,
342
350
HelpText<"Emit the TBD file to <path>">,
343
351
MetaVarName<"<path>">;
344
352
def emit_tbd_path_EQ : Joined<["-"], "emit-tbd-path=">,
345
- Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
353
+ Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
354
+ SupplementaryOutput]>,
346
355
Alias<emit_tbd_path>;
347
356
def embed_tbd_for_module : Separate<["-"], "embed-tbd-for-module">,
348
357
Flags<[FrontendOption]>,
349
358
HelpText<"Embed symbols from the module in the emitted tbd file">;
350
359
351
360
def serialize_diagnostics : Flag<["-"], "serialize-diagnostics">,
352
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
361
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
362
+ SupplementaryOutput]>,
353
363
HelpText<"Serialize diagnostics in a binary format">;
354
364
def serialize_diagnostics_path : Separate<["-"], "serialize-diagnostics-path">,
355
- Flags<[FrontendOption, NoBatchOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
365
+ Flags<[FrontendOption, NoBatchOption, DoesNotAffectIncrementalBuild,
366
+ ArgumentIsPath, SupplementaryOutput]>,
356
367
HelpText<"Emit a serialized diagnostics file to <path>">,
357
368
MetaVarName<"<path>">;
358
369
def serialize_diagnostics_path_EQ: Joined<["-"], "serialize-diagnostics-path=">,
359
- Flags<[FrontendOption, NoBatchOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
370
+ Flags<[FrontendOption, NoBatchOption, DoesNotAffectIncrementalBuild,
371
+ ArgumentIsPath, SupplementaryOutput]>,
360
372
Alias<serialize_diagnostics_path>;
361
373
def color_diagnostics : Flag<["-"], "color-diagnostics">,
362
374
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
@@ -403,32 +415,34 @@ def autolink_force_load : Flag<["-"], "autolink-force-load">,
403
415
HelpText<"Force ld to link against this module even if no symbols are used">;
404
416
405
417
def emit_module : Flag<["-"], "emit-module">,
406
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
418
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
419
+ SupplementaryOutput]>,
407
420
HelpText<"Emit an importable module">;
408
421
def emit_module_path : Separate<["-"], "emit-module-path">,
409
422
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
410
- ArgumentIsPath]>,
423
+ ArgumentIsPath, SupplementaryOutput ]>,
411
424
HelpText<"Emit an importable module to <path>">,
412
425
MetaVarName<"<path>">;
413
426
def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
414
427
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
415
- ArgumentIsPath]>,
428
+ ArgumentIsPath, SupplementaryOutput ]>,
416
429
Alias<emit_module_path>;
417
430
418
431
def emit_module_interface :
419
432
Flag<["-"], "emit-module-interface">,
420
- Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
433
+ Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild,
434
+ SupplementaryOutput]>,
421
435
HelpText<"Output module interface file">;
422
436
def emit_module_interface_path :
423
437
Separate<["-"], "emit-module-interface-path">,
424
438
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
425
- ArgumentIsPath]>,
439
+ ArgumentIsPath, SupplementaryOutput ]>,
426
440
MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
427
441
428
442
def emit_private_module_interface_path :
429
443
Separate<["-"], "emit-private-module-interface-path">,
430
444
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
431
- DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
445
+ DoesNotAffectIncrementalBuild, ArgumentIsPath, SupplementaryOutput ]>,
432
446
MetaVarName<"<path>">, HelpText<"Output private module interface file to <path>">;
433
447
434
448
def avoid_emit_module_source_info :
@@ -439,25 +453,27 @@ def avoid_emit_module_source_info :
439
453
def emit_module_source_info_path :
440
454
Separate<["-"], "emit-module-source-info-path">,
441
455
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
442
- ArgumentIsPath]>,
456
+ ArgumentIsPath, SupplementaryOutput ]>,
443
457
MetaVarName<"<path>">, HelpText<"Output module source info file to <path>">;
444
458
445
459
def emit_parseable_module_interface :
446
460
Flag<["-"], "emit-parseable-module-interface">,
447
461
Alias<emit_module_interface>,
448
- Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild]>;
462
+ Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild,
463
+ SupplementaryOutput]>;
449
464
def emit_parseable_module_interface_path :
450
465
Separate<["-"], "emit-parseable-module-interface-path">,
451
466
Alias<emit_module_interface_path>,
452
467
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
453
- HelpHidden, ArgumentIsPath]>;
468
+ HelpHidden, ArgumentIsPath, SupplementaryOutput ]>;
454
469
455
470
def emit_objc_header : Flag<["-"], "emit-objc-header">,
456
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
471
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
472
+ SupplementaryOutput]>,
457
473
HelpText<"Emit an Objective-C header file">;
458
474
def emit_objc_header_path : Separate<["-"], "emit-objc-header-path">,
459
475
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
460
- ArgumentIsPath]>,
476
+ ArgumentIsPath, SupplementaryOutput ]>,
461
477
MetaVarName<"<path>">, HelpText<"Emit an Objective-C header file to <path>">;
462
478
463
479
def static : Flag<["-"], "static">,
0 commit comments