Skip to content

[Option][Caching] Clean up option caching exclusion list #68164

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

Merged
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
116 changes: 61 additions & 55 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,97 @@
//
//===----------------------------------------------------------------------===//

let Flags = [FrontendOption, NoDriverOption] in {

def triple : Separate<["-"], "triple">, Alias<target>;

def primary_file : Separate<["-"], "primary-file">,
HelpText<"Produce output for this file, not the whole module">;
let Flags = [FrontendOption, NoDriverOption, ArgumentIsFileList] in {

def filelist : Separate<["-"], "filelist">,
HelpText<"Specify source inputs in a file rather than on the command line">;
def primary_filelist : Separate<["-"], "primary-filelist">,
HelpText<"Specify primary inputs in a file rather than on the command line">;

} // end let Flags = [FrontendOption, NoDriverOption, ArgumentIsFileList]


let Flags = [FrontendOption, NoDriverOption, CacheInvariant] in {

def output_filelist : Separate<["-"], "output-filelist">,
HelpText<"Specify outputs in a file rather than on the command line">;
def supplementary_output_file_map : Separate<["-"], "supplementary-output-file-map">,
HelpText<"Specify supplementary outputs in a file rather than on the command line">;
def index_unit_output_path_filelist : Separate<["-"], "index-unit-output-path-filelist">,
HelpText<"Specify index unit output paths in a file rather than on the command line">;

def frontend_parseable_output : Flag<["-"], "frontend-parseable-output">,
HelpText<"Emit textual output in a parseable format">;

def emit_module_doc : Flag<["-"], "emit-module-doc">,
HelpText<"Emit a module documentation file based on documentation "
"comments">;
def emit_module_doc_path
: Separate<["-"], "emit-module-doc-path">, MetaVarName<"<path>">,
HelpText<"Output module documentation file <path>">;

def emit_module_source_info : Flag<["-"], "emit-module-source-info">,
HelpText<"Output module source info file">;

def ignore_module_source_info : Flag<["-"], "ignore-module-source-info">,
HelpText<"Avoid getting source location from .swiftsourceinfo files">;

def merge_modules
: Flag<["-"], "merge-modules">, ModeOpt,
HelpText<"Merge the input modules without otherwise processing them">;

def emit_dependencies_path
: Separate<["-"], "emit-dependencies-path">, MetaVarName<"<path>">,
HelpText<"Output basic Make-compatible dependencies file to <path>">;

def emit_reference_dependencies : Flag<["-"], "emit-reference-dependencies">,
HelpText<"Emit a Swift-style dependencies file">;
def emit_reference_dependencies_path
: Separate<["-"], "emit-reference-dependencies-path">, MetaVarName<"<path>">,
HelpText<"Output Swift-style dependencies file to <path>">;

def emit_fixits_path
: Separate<["-"], "emit-fixits-path">, MetaVarName<"<path>">,
HelpText<"Output compiler fixits as source edits to <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_module_semantic_info_path
: Separate<["-"], "emit-module-semantic-info-path">, MetaVarName<"<path>">,
HelpText<"Output semantic info of current module to <path>">;

def diagnostic_documentation_path
: Separate<["-"], "diagnostic-documentation-path">, MetaVarName<"<path>">,
HelpText<"Path to diagnostic documentation resources">;

def dump_api_path : Separate<["-"], "dump-api-path">,
HelpText<"The path to output swift interface files for the compiled source files">;

def group_info_path : Separate<["-"], "group-info-path">,
HelpText<"The path to collect the group information of the compiled module">;

def prebuilt_module_cache_path :
Separate<["-"], "prebuilt-module-cache-path">,
HelpText<"Directory of prebuilt modules for loading module interfaces">;
def prebuilt_module_cache_path_EQ :
Joined<["-"], "prebuilt-module-cache-path=">,
Alias<prebuilt_module_cache_path>;

def backup_module_interface_path :
Separate<["-"], "backup-module-interface-path">,
HelpText<"Directory of module interfaces as backups to those from SDKs">;
def backup_module_interface_path_EQ :
Joined<["-"], "backup-module-interface-path=">,
Alias<backup_module_interface_path>;

} // end let Flags = [FrontendOption, NoDriverOption, CacheInvariant]


let Flags = [FrontendOption, NoDriverOption] in {

def triple : Separate<["-"], "triple">, Alias<target>;

def primary_file : Separate<["-"], "primary-file">,
HelpText<"Produce output for this file, not the whole module">;

def frontend_parseable_output : Flag<["-"], "frontend-parseable-output">,
HelpText<"Emit textual output in a parseable format">;

def emit_module_doc : Flag<["-"], "emit-module-doc">,
HelpText<"Emit a module documentation file based on documentation "
"comments">;

def emit_module_source_info : Flag<["-"], "emit-module-source-info">,
HelpText<"Output module source info file">;
def ignore_module_source_info : Flag<["-"], "ignore-module-source-info">,
HelpText<"Avoid getting source location from .swiftsourceinfo files">;

def merge_modules
: Flag<["-"], "merge-modules">, ModeOpt,
HelpText<"Merge the input modules without otherwise processing them">;
def emit_reference_dependencies : Flag<["-"], "emit-reference-dependencies">,
HelpText<"Emit a Swift-style dependencies file">;

def serialize_module_interface_dependency_hashes
: Flag<["-"], "serialize-module-interface-dependency-hashes">,
Flags<[HelpHidden]>;
Expand Down Expand Up @@ -127,10 +160,6 @@ def enable_cross_import_overlays : Flag<["-"], "enable-cross-import-overlays">,
def disable_cross_import_overlays : Flag<["-"], "disable-cross-import-overlays">,
HelpText<"Do not automatically import declared cross-import overlays.">;

def diagnostic_documentation_path
: Separate<["-"], "diagnostic-documentation-path">, MetaVarName<"<path>">,
HelpText<"Path to diagnostic documentation resources">;

def enable_testable_attr_requires_testable_module :
Flag<["-"], "enable-testable-attr-requires-testable-module">,
HelpText<"Enable checking of @testable">;
Expand Down Expand Up @@ -895,9 +924,6 @@ def index_ignore_stdlib :
Flag<["-"], "index-ignore-stdlib">,
HelpText<"Avoid emitting index data for the standard library.">;

def index_unit_output_path_filelist : Separate<["-"], "index-unit-output-path-filelist">,
HelpText<"Specify index unit output paths in a file rather than on the command line">;

def dump_interface_hash : Flag<["-"], "dump-interface-hash">,
HelpText<"Parse input file(s) and dump interface token hash(es)">,
ModeOpt;
Expand Down Expand Up @@ -960,29 +986,9 @@ def experimental_one_way_closure_params :
Flag<["-"], "experimental-one-way-closure-params">,
HelpText<"Enable experimental support for one-way closure parameters">;

def prebuilt_module_cache_path :
Separate<["-"], "prebuilt-module-cache-path">,
HelpText<"Directory of prebuilt modules for loading module interfaces">;
def prebuilt_module_cache_path_EQ :
Joined<["-"], "prebuilt-module-cache-path=">,
Alias<prebuilt_module_cache_path>;

def backup_module_interface_path :
Separate<["-"], "backup-module-interface-path">,
HelpText<"Directory of module interfaces as backups to those from SDKs">;
def backup_module_interface_path_EQ :
Joined<["-"], "backup-module-interface-path=">,
Alias<backup_module_interface_path>;

def force_public_linkage : Flag<["-"], "force-public-linkage">,
HelpText<"Force public linkage for private symbols. Used by LLDB.">;

def dump_api_path : Separate<["-"], "dump-api-path">,
HelpText<"The path to output swift interface files for the compiled source files">;

def group_info_path : Separate<["-"], "group-info-path">,
HelpText<"The path to collect the group information of the compiled module">;

def diagnostics_editor_mode : Flag<["-"], "diagnostics-editor-mode">,
HelpText<"Diagnostics will be used in editor">;

Expand Down
2 changes: 2 additions & 0 deletions include/swift/Option/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ namespace options {
NewDriverOnlyOption = (1 << 18),
ModuleInterfaceOptionIgnorable = (1 << 19),
ModuleInterfaceOptionIgnorablePrivate = (1 << 20),
ArgumentIsFileList = (1 << 21),
CacheInvariant = (1 << 22),
};

enum ID {
Expand Down
Loading