@@ -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]>,
@@ -410,32 +422,34 @@ def autolink_force_load : Flag<["-"], "autolink-force-load">,
410
422
HelpText<"Force ld to link against this module even if no symbols are used">;
411
423
412
424
def emit_module : Flag<["-"], "emit-module">,
413
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
425
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
426
+ SupplementaryOutput]>,
414
427
HelpText<"Emit an importable module">;
415
428
def emit_module_path : Separate<["-"], "emit-module-path">,
416
429
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
417
- ArgumentIsPath]>,
430
+ ArgumentIsPath, SupplementaryOutput ]>,
418
431
HelpText<"Emit an importable module to <path>">,
419
432
MetaVarName<"<path>">;
420
433
def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
421
434
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
422
- ArgumentIsPath]>,
435
+ ArgumentIsPath, SupplementaryOutput ]>,
423
436
Alias<emit_module_path>;
424
437
425
438
def emit_module_interface :
426
439
Flag<["-"], "emit-module-interface">,
427
- Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
440
+ Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild,
441
+ SupplementaryOutput]>,
428
442
HelpText<"Output module interface file">;
429
443
def emit_module_interface_path :
430
444
Separate<["-"], "emit-module-interface-path">,
431
445
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
432
- ArgumentIsPath]>,
446
+ ArgumentIsPath, SupplementaryOutput ]>,
433
447
MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
434
448
435
449
def emit_private_module_interface_path :
436
450
Separate<["-"], "emit-private-module-interface-path">,
437
451
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
438
- DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
452
+ DoesNotAffectIncrementalBuild, ArgumentIsPath, SupplementaryOutput ]>,
439
453
MetaVarName<"<path>">, HelpText<"Output private module interface file to <path>">;
440
454
441
455
def avoid_emit_module_source_info :
@@ -446,25 +460,27 @@ def avoid_emit_module_source_info :
446
460
def emit_module_source_info_path :
447
461
Separate<["-"], "emit-module-source-info-path">,
448
462
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
449
- ArgumentIsPath]>,
463
+ ArgumentIsPath, SupplementaryOutput ]>,
450
464
MetaVarName<"<path>">, HelpText<"Output module source info file to <path>">;
451
465
452
466
def emit_parseable_module_interface :
453
467
Flag<["-"], "emit-parseable-module-interface">,
454
468
Alias<emit_module_interface>,
455
- Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild]>;
469
+ Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild,
470
+ SupplementaryOutput]>;
456
471
def emit_parseable_module_interface_path :
457
472
Separate<["-"], "emit-parseable-module-interface-path">,
458
473
Alias<emit_module_interface_path>,
459
474
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
460
- HelpHidden, ArgumentIsPath]>;
475
+ HelpHidden, ArgumentIsPath, SupplementaryOutput ]>;
461
476
462
477
def emit_objc_header : Flag<["-"], "emit-objc-header">,
463
- Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
478
+ Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
479
+ SupplementaryOutput]>,
464
480
HelpText<"Emit an Objective-C header file">;
465
481
def emit_objc_header_path : Separate<["-"], "emit-objc-header-path">,
466
482
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
467
- ArgumentIsPath]>,
483
+ ArgumentIsPath, SupplementaryOutput ]>,
468
484
MetaVarName<"<path>">, HelpText<"Emit an Objective-C header file to <path>">;
469
485
470
486
def static : Flag<["-"], "static">,
0 commit comments