Skip to content

Commit 8d4c86d

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 bf0d753 commit 8d4c86d

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
@@ -632,6 +632,11 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
632632
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
633633
SupplementaryOutput, CacheInvariant]>,
634634
Alias<emit_module_path>;
635+
def emit_variant_module_path : Separate<["-"], "emit-variant-module-path">,
636+
Flags<[NoInteractiveOption, ArgumentIsPath, SupplementaryOutput,
637+
CacheInvariant, NewDriverOnlyOption]>,
638+
MetaVarName<"<path>">,
639+
HelpText<"Emit an importable module for the target variant at the specified path">;
635640

636641
def emit_module_summary :
637642
Flag<["-"], "emit-module-summary">,
@@ -652,18 +657,35 @@ def emit_module_interface_path :
652657
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
653658
SupplementaryOutput, CacheInvariant]>,
654659
MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
660+
def emit_variant_module_interface_path :
661+
Separate<["-"], "emit-variant-module-interface-path">,
662+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
663+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
664+
MetaVarName<"<path>">, HelpText<"Output module interface file for the target variant to <path>">;
655665

656666
def emit_private_module_interface_path :
657667
Separate<["-"], "emit-private-module-interface-path">,
658668
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
659669
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
660670
MetaVarName<"<path>">, HelpText<"Output private module interface file to <path>">;
671+
def emit_variant_private_module_interface_path :
672+
Separate<["-"], "emit-variant-private-module-interface-path">,
673+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
674+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
675+
MetaVarName<"<path>">,
676+
HelpText<"Output private module interface file for the target variant to <path>">;
661677

662678
def emit_package_module_interface_path :
663679
Separate<["-"], "emit-package-module-interface-path">,
664680
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
665681
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
666682
MetaVarName<"<path>">, HelpText<"Output package module interface file to <path>">;
683+
def emit_variant_package_module_interface_path :
684+
Separate<["-"], "emit-variant-package-module-interface-path">,
685+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
686+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
687+
MetaVarName<"<path>">,
688+
HelpText<"Output package module interface file for the target variant to <path>">;
667689

668690
def verify_emitted_module_interface :
669691
Flag<["-"], "verify-emitted-module-interface">,
@@ -685,6 +707,11 @@ def emit_module_source_info_path :
685707
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
686708
SupplementaryOutput]>,
687709
MetaVarName<"<path>">, HelpText<"Output module source info file to <path>">;
710+
def emit_variant_module_source_info_path :
711+
Separate<["-"], "emit-variant-module-source-info-path">,
712+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
713+
SupplementaryOutput, NewDriverOnlyOption]>,
714+
MetaVarName<"<path>">, HelpText<"Output module source info file for the target variant to <path>">;
688715

689716
def emit_parseable_module_interface :
690717
Flag<["-"], "emit-parseable-module-interface">,
@@ -715,6 +742,12 @@ def emit_api_descriptor_path :
715742
SupplementaryOutput, CacheInvariant]>,
716743
MetaVarName<"<path>">,
717744
HelpText<"Output a JSON file describing the module's API to <path>">;
745+
def emit_variant_api_descriptor_path :
746+
Separate<["-"], "emit-variant-api-descriptor-path">,
747+
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
748+
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
749+
MetaVarName<"<path>">,
750+
HelpText<"Output a JSON file describing the target variant module's API to <path>">;
718751

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

0 commit comments

Comments
 (0)