Skip to content

Commit f2a1946

Browse files
committed
Adding new flags for target variant outputs
We need several new path flags for setting the location of where to send the target variant supplemental module output files. rdar://141582282
1 parent 2571e05 commit f2a1946

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def index_unit_output_path_filelist : Separate<["-"], "index-unit-output-path-fi
3636
def emit_module_doc_path
3737
: Separate<["-"], "emit-module-doc-path">, MetaVarName<"<path>">,
3838
HelpText<"Output module documentation file <path>">;
39+
def emit_variant_module_doc_path
40+
: Separate<["-"], "emit-variant-module-doc-path">, MetaVarName<"<path>">,
41+
Flags<[NewDriverOnlyOption]>,
42+
HelpText<"Output module documentation file for the target variant to <path>">;
43+
3944
def emit_dependencies_path
4045
: Separate<["-"], "emit-dependencies-path">, MetaVarName<"<path>">,
4146
HelpText<"Output basic Make-compatible dependencies file to <path>">;
@@ -49,6 +54,11 @@ def emit_fixits_path
4954
def emit_abi_descriptor_path
5055
: Separate<["-"], "emit-abi-descriptor-path">, MetaVarName<"<path>">,
5156
HelpText<"Output the ABI descriptor of current module to <path>">;
57+
def emit_variant_abi_descriptor_path
58+
: Separate<["-"], "emit-variant-abi-descriptor-path">, MetaVarName<"<path>">,
59+
Flags<[NewDriverOnlyOption]>,
60+
HelpText<"Output the ABI descriptor of current target variant module to <path>">;
61+
5262
def emit_module_semantic_info_path
5363
: Separate<["-"], "emit-module-semantic-info-path">, MetaVarName<"<path>">,
5464
HelpText<"Output semantic info of current module to <path>">;

include/swift/Option/Options.td

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
625625
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
626626
SupplementaryOutput, CacheInvariant]>,
627627
Alias<emit_module_path>;
628+
def emit_variant_module_path : Separate<["-"], "emit-variant-module-path">,
629+
Flags<[NoInteractiveOption, ArgumentIsPath, SupplementaryOutput,
630+
CacheInvariant, NewDriverOnlyOption]>,
631+
MetaVarName<"<path>">,
632+
HelpText<"Emit an importable module for the target variant at the specified path">;
628633

629634
def emit_module_summary :
630635
Flag<["-"], "emit-module-summary">,
@@ -645,18 +650,35 @@ def emit_module_interface_path :
645650
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
646651
SupplementaryOutput, CacheInvariant]>,
647652
MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
653+
def emit_variant_module_interface_path :
654+
Separate<["-"], "emit-variant-module-interface-path">,
655+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
656+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
657+
MetaVarName<"<path>">, HelpText<"Output module interface file for the target variant to <path>">;
648658

649659
def emit_private_module_interface_path :
650660
Separate<["-"], "emit-private-module-interface-path">,
651661
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
652662
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
653663
MetaVarName<"<path>">, HelpText<"Output private module interface file to <path>">;
664+
def emit_variant_private_module_interface_path :
665+
Separate<["-"], "emit-variant-private-module-interface-path">,
666+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
667+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
668+
MetaVarName<"<path>">,
669+
HelpText<"Output private module interface file for the target variant to <path>">;
654670

655671
def emit_package_module_interface_path :
656672
Separate<["-"], "emit-package-module-interface-path">,
657673
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
658674
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
659675
MetaVarName<"<path>">, HelpText<"Output package module interface file to <path>">;
676+
def emit_variant_package_module_interface_path :
677+
Separate<["-"], "emit-variant-package-module-interface-path">,
678+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
679+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
680+
MetaVarName<"<path>">,
681+
HelpText<"Output package module interface file for the target variant to <path>">;
660682

661683
def verify_emitted_module_interface :
662684
Flag<["-"], "verify-emitted-module-interface">,
@@ -678,6 +700,11 @@ def emit_module_source_info_path :
678700
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
679701
SupplementaryOutput]>,
680702
MetaVarName<"<path>">, HelpText<"Output module source info file to <path>">;
703+
def emit_variant_module_source_info_path :
704+
Separate<["-"], "emit-variant-module-source-info-path">,
705+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
706+
SupplementaryOutput, NewDriverOnlyOption]>,
707+
MetaVarName<"<path>">, HelpText<"Output module source info file for the target variant to <path>">;
681708

682709
def emit_parseable_module_interface :
683710
Flag<["-"], "emit-parseable-module-interface">,
@@ -708,6 +735,12 @@ def emit_api_descriptor_path :
708735
SupplementaryOutput, CacheInvariant]>,
709736
MetaVarName<"<path>">,
710737
HelpText<"Output a JSON file describing the module's API to <path>">;
738+
def emit_variant_api_descriptor_path :
739+
Separate<["-"], "emit-variant-api-descriptor-path">,
740+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
741+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
742+
MetaVarName<"<path>">,
743+
HelpText<"Output a JSON file describing the target variant module's API to <path>">;
711744

712745
def emit_objc_header : Flag<["-"], "emit-objc-header">,
713746
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>,

0 commit comments

Comments
 (0)