Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new flags for target variant outputs #78336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def index_unit_output_path_filelist : Separate<["-"], "index-unit-output-path-fi
def emit_module_doc_path
: Separate<["-"], "emit-module-doc-path">, MetaVarName<"<path>">,
HelpText<"Output module documentation file <path>">;
def emit_variant_module_doc_path
: Separate<["-"], "emit-variant-module-doc-path">, MetaVarName<"<path>">,
Flags<[NewDriverOnlyOption]>,
HelpText<"Output module documentation file for the target variant to <path>">;

def emit_dependencies_path
: Separate<["-"], "emit-dependencies-path">, MetaVarName<"<path>">,
HelpText<"Output basic Make-compatible dependencies file to <path>">;
Expand All @@ -49,6 +54,11 @@ def emit_fixits_path
def emit_abi_descriptor_path
: Separate<["-"], "emit-abi-descriptor-path">, MetaVarName<"<path>">,
HelpText<"Output the ABI descriptor of current module to <path>">;
def emit_variant_abi_descriptor_path
: Separate<["-"], "emit-variant-abi-descriptor-path">, MetaVarName<"<path>">,
Flags<[NewDriverOnlyOption]>,
HelpText<"Output the ABI descriptor of current target variant module to <path>">;

def emit_module_semantic_info_path
: Separate<["-"], "emit-module-semantic-info-path">, MetaVarName<"<path>">,
HelpText<"Output semantic info of current module to <path>">;
Expand Down
33 changes: 33 additions & 0 deletions include/swift/Option/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,11 @@ def emit_module_path_EQ : Joined<["-"], "emit-module-path=">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant]>,
Alias<emit_module_path>;
def emit_variant_module_path : Separate<["-"], "emit-variant-module-path">,
Flags<[NoInteractiveOption, ArgumentIsPath, SupplementaryOutput,
CacheInvariant, NewDriverOnlyOption]>,
MetaVarName<"<path>">,
HelpText<"Emit an importable module for the target variant at the specified path">;

def emit_module_summary :
Flag<["-"], "emit-module-summary">,
Expand All @@ -645,18 +650,35 @@ def emit_module_interface_path :
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant]>,
MetaVarName<"<path>">, HelpText<"Output module interface file to <path>">;
def emit_variant_module_interface_path :
Separate<["-"], "emit-variant-module-interface-path">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
MetaVarName<"<path>">, HelpText<"Output module interface file for the target variant to <path>">;

def emit_private_module_interface_path :
Separate<["-"], "emit-private-module-interface-path">,
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
MetaVarName<"<path>">, HelpText<"Output private module interface file to <path>">;
def emit_variant_private_module_interface_path :
Separate<["-"], "emit-variant-private-module-interface-path">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
MetaVarName<"<path>">,
HelpText<"Output private module interface file for the target variant to <path>">;

def emit_package_module_interface_path :
Separate<["-"], "emit-package-module-interface-path">,
Flags<[FrontendOption, NoInteractiveOption, HelpHidden,
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
MetaVarName<"<path>">, HelpText<"Output package module interface file to <path>">;
def emit_variant_package_module_interface_path :
Separate<["-"], "emit-variant-package-module-interface-path">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
MetaVarName<"<path>">,
HelpText<"Output package module interface file for the target variant to <path>">;

def verify_emitted_module_interface :
Flag<["-"], "verify-emitted-module-interface">,
Expand All @@ -678,6 +700,11 @@ def emit_module_source_info_path :
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput]>,
MetaVarName<"<path>">, HelpText<"Output module source info file to <path>">;
def emit_variant_module_source_info_path :
Separate<["-"], "emit-variant-module-source-info-path">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, NewDriverOnlyOption]>,
MetaVarName<"<path>">, HelpText<"Output module source info file for the target variant to <path>">;

def emit_parseable_module_interface :
Flag<["-"], "emit-parseable-module-interface">,
Expand Down Expand Up @@ -708,6 +735,12 @@ def emit_api_descriptor_path :
SupplementaryOutput, CacheInvariant]>,
MetaVarName<"<path>">,
HelpText<"Output a JSON file describing the module's API to <path>">;
def emit_variant_api_descriptor_path :
Separate<["-"], "emit-variant-api-descriptor-path">,
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
SupplementaryOutput, CacheInvariant, NewDriverOnlyOption]>,
MetaVarName<"<path>">,
HelpText<"Output a JSON file describing the target variant module's API to <path>">;

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