mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This new option allows the Driver to pass the path to a compilation job's own binary swiftmodule artifact to the frontend. The compiler then stores this path in the debug info, to allow clients like LLDB to unambiguously know which binary Swift module belongs to which compile unit. rdar://163302154
2404 lines
111 KiB
TableGen
2404 lines
111 KiB
TableGen
//===--- Options.td - Options for swift driver ----------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the options accepted by the swift driver.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Include the common option parsing interfaces.
|
|
include "llvm/Option/OptParser.td"
|
|
|
|
/////////
|
|
// Flags
|
|
|
|
// The option should be accepted by swift -frontend.
|
|
def FrontendOption : OptionFlag;
|
|
|
|
// The option should be accepted by swift-autolink-extract
|
|
def AutolinkExtractOption : OptionFlag;
|
|
|
|
// The option should be accepted by swift -modulewrap
|
|
def ModuleWrapOption : OptionFlag;
|
|
|
|
// The option should not be accepted by the driver.
|
|
def NoDriverOption : OptionFlag;
|
|
|
|
// Some options should not be available depending on whether this is the
|
|
// interactive driver 'swift', or the aot compiler 'swiftc'.
|
|
def NoInteractiveOption : OptionFlag;
|
|
def NoBatchOption : OptionFlag;
|
|
|
|
// The option should not force a full rebuild if added, changed, or removed.
|
|
def DoesNotAffectIncrementalBuild : OptionFlag;
|
|
|
|
// The option's argument is a file-system path that may be affected by the
|
|
// current working directory.
|
|
def ArgumentIsPath : OptionFlag;
|
|
|
|
// The option should be written into a .swiftinterface module interface file,
|
|
// and read/parsed from there when reconstituting a .swiftmodule from it.
|
|
def ModuleInterfaceOption : OptionFlag;
|
|
|
|
// The option should be written into a .swiftinterface module interface file,
|
|
// and read/parsed from there when reconstituting a .swiftmodule from it.
|
|
// The option can be safely ignored by the older compiler.
|
|
def ModuleInterfaceOptionIgnorable : OptionFlag;
|
|
|
|
// The option causes the output of a supplementary output, or is the path option
|
|
// for a supplementary output. E.g., `-emit-module` and `-emit-module-path`.
|
|
def SupplementaryOutput : OptionFlag;
|
|
|
|
// The option should be accepted by swift-symbolgraph-extract.
|
|
def SwiftSymbolGraphExtractOption : OptionFlag;
|
|
|
|
// The option should be accepted by swift-synthesize-interface.
|
|
def SwiftSynthesizeInterfaceOption : OptionFlag;
|
|
|
|
// The option should be accepted by swift-api-digester.
|
|
def SwiftAPIDigesterOption : OptionFlag;
|
|
|
|
// The option only functions in the new driver.
|
|
def NewDriverOnlyOption : OptionFlag;
|
|
|
|
// The option's argument is a path to a file that contains a list of files.
|
|
def ArgumentIsFileList : OptionFlag;
|
|
|
|
// The option that is cache invariant. Change this option doesn't affect the
|
|
// content of any output file. The candidates are options like: `-o` which only
|
|
// affects the location of the output file, or `-emit-module` which defines
|
|
// which action is performed.
|
|
def CacheInvariant : OptionFlag;
|
|
|
|
/////////
|
|
// Options
|
|
|
|
// The internal option ID must be a valid C++ identifier and results in a
|
|
// swift::driver::options::OPT_XX enum constant for XX.
|
|
//
|
|
// We want to unambiguously be able to refer to options from the driver source
|
|
// code, for this reason the option name is mangled into an ID. This mangling
|
|
// isn't guaranteed to have an inverse, but for practical purposes it does.
|
|
//
|
|
// The mangling scheme is to ignore the leading '-', and perform the following
|
|
// substitutions:
|
|
// _ => __
|
|
// - => _
|
|
// / => _SLASH
|
|
// # => _HASH
|
|
// ? => _QUESTION
|
|
// , => _COMMA
|
|
// = => _EQ
|
|
// C++ => CXX
|
|
// . => _
|
|
|
|
def internal_Group : OptionGroup<"<swift internal options>">;
|
|
def internal_debug_Group :
|
|
OptionGroup<"<swift debug/development internal options>">,
|
|
Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
|
|
|
|
class InternalDebugOpt : Group<internal_debug_Group>,
|
|
Flags<[HelpHidden, DoesNotAffectIncrementalBuild]>;
|
|
|
|
def driver_print_actions : Flag<["-"], "driver-print-actions">,
|
|
InternalDebugOpt, HelpText<"Dump list of actions to perform">;
|
|
def driver_print_output_file_map : Flag<["-"], "driver-print-output-file-map">,
|
|
InternalDebugOpt, HelpText<"Dump the contents of the output file map">;
|
|
def driver_print_derived_output_file_map : Flag<["-"], "driver-print-derived-output-file-map">,
|
|
InternalDebugOpt, HelpText<"Dump the contents of the derived output file map">;
|
|
def driver_print_bindings : Flag<["-"], "driver-print-bindings">,
|
|
InternalDebugOpt, HelpText<"Dump list of job inputs and outputs">;
|
|
def driver_print_jobs : Flag<["-"], "driver-print-jobs">, InternalDebugOpt,
|
|
HelpText<"Dump list of jobs to execute">;
|
|
def _HASH_HASH_HASH : Flag<["-"], "###">, Alias<driver_print_jobs>;
|
|
def driver_skip_execution : Flag<["-"], "driver-skip-execution">,
|
|
InternalDebugOpt,
|
|
HelpText<"Skip execution of subtasks when performing compilation">;
|
|
def driver_use_frontend_path : Separate<["-"], "driver-use-frontend-path">,
|
|
InternalDebugOpt,
|
|
HelpText<"Use the given executable to perform compilations. Arguments can be passed as a ';' separated list">;
|
|
def driver_show_incremental : Flag<["-"], "driver-show-incremental">,
|
|
InternalDebugOpt,
|
|
HelpText<"With -v, dump information about why files are being rebuilt">;
|
|
def driver_show_job_lifecycle : Flag<["-"], "driver-show-job-lifecycle">,
|
|
InternalDebugOpt,
|
|
HelpText<"Show every step in the lifecycle of driver jobs">;
|
|
def driver_use_filelists : Flag<["-"], "driver-use-filelists">,
|
|
InternalDebugOpt, HelpText<"Pass input files as filelists whenever possible">;
|
|
def driver_filelist_threshold : Separate<["-"], "driver-filelist-threshold">,
|
|
InternalDebugOpt, HelpText<"Pass input or output file names as filelists if there are more than <n>">,
|
|
MetaVarName<"<n>">;
|
|
def driver_filelist_threshold_EQ : Joined<["-"], "driver-filelist-threshold=">,
|
|
Alias<driver_filelist_threshold>;
|
|
def driver_batch_seed : Separate<["-"], "driver-batch-seed">,
|
|
InternalDebugOpt,
|
|
HelpText<"Use the given seed value to randomize batch-mode partitions">;
|
|
def driver_batch_count : Separate<["-"], "driver-batch-count">,
|
|
InternalDebugOpt,
|
|
HelpText<"Use the given number of batch-mode partitions, rather than partitioning dynamically">;
|
|
def driver_batch_size_limit : Separate<["-"], "driver-batch-size-limit">,
|
|
InternalDebugOpt,
|
|
HelpText<"Use the given number as the upper limit on dynamic batch-mode partition size">;
|
|
|
|
def driver_force_response_files : Flag<["-"], "driver-force-response-files">,
|
|
InternalDebugOpt,
|
|
HelpText<"Force the use of response files for testing">;
|
|
|
|
def driver_always_rebuild_dependents :
|
|
Flag<["-"], "driver-always-rebuild-dependents">, InternalDebugOpt,
|
|
HelpText<"Always rebuild dependents of files that have been modified">;
|
|
|
|
def enable_only_one_dependency_file :
|
|
Flag<["-"], "enable-only-one-dependency-file">, Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Enables incremental build optimization that only produces one dependencies file">;
|
|
|
|
def disable_only_one_dependency_file :
|
|
Flag<["-"], "disable-only-one-dependency-file">, Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Disables incremental build optimization that only produces one dependencies file">;
|
|
|
|
def driver_verify_fine_grained_dependency_graph_after_every_import :
|
|
Flag<["-"], "driver-verify-fine-grained-dependency-graph-after-every-import">,
|
|
InternalDebugOpt,
|
|
HelpText<"Debug DriverGraph by verifying it after every import">;
|
|
|
|
def verify_incremental_dependencies :
|
|
Flag<["-"], "verify-incremental-dependencies">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Enable the dependency verifier for each frontend job">;
|
|
|
|
def strict_implicit_module_context :
|
|
Flag<["-"], "strict-implicit-module-context">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Enable the strict forwarding of compilation context to downstream implicit module dependencies">;
|
|
|
|
def no_strict_implicit_module_context :
|
|
Flag<["-"], "no-strict-implicit-module-context">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Disable the strict forwarding of compilation context to downstream implicit module dependencies">;
|
|
|
|
def compiler_assertions :
|
|
Flag<["-"], "compiler-assertions">,
|
|
Group<internal_debug_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, CacheInvariant]>,
|
|
HelpText<"Enable internal self-checks while compiling">;
|
|
|
|
def validate_clang_modules_once :
|
|
Flag<["-"], "validate-clang-modules-once">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Don't verify input files for Clang modules if the module has been successfully validated or loaded during this build session">;
|
|
|
|
def clang_build_session_file : Separate<["-"], "clang-build-session-file">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Use the last modification time of <file> as the underlying Clang build session timestamp">;
|
|
|
|
def disallow_forwarding_driver :
|
|
Flag<["-"], "disallow-use-new-driver">, Flags<[]>,
|
|
HelpText<"Disable using new swift-driver">;
|
|
|
|
def driver_emit_fine_grained_dependency_dot_file_after_every_import :
|
|
Flag<["-"], "driver-emit-fine-grained-dependency-dot-file-after-every-import">,
|
|
InternalDebugOpt,
|
|
HelpText<"Emit dot files every time driver imports an fine-grained swiftdeps file.">;
|
|
|
|
def emit_fine_grained_dependency_sourcefile_dot_files :
|
|
Flag<["-"], "emit-fine-grained-dependency-sourcefile-dot-files">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Emit dot files for every source file.">;
|
|
|
|
def driver_mode : Joined<["--"], "driver-mode=">, Flags<[HelpHidden]>,
|
|
HelpText<"Set the driver mode to either 'swift' or 'swiftc'">;
|
|
|
|
def help : Flag<["-", "--"], "help">,
|
|
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Display available options">;
|
|
def h : Flag<["-"], "h">, Alias<help>;
|
|
def help_hidden : Flag<["-", "--"], "help-hidden">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Display available options, including hidden options">;
|
|
|
|
def v : Flag<["-"], "v">,
|
|
Flags<[DoesNotAffectIncrementalBuild, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Show commands to run and use verbose output">;
|
|
def version : Flag<["-", "--"], "version">, Flags<[FrontendOption]>,
|
|
HelpText<"Print version information and exit">;
|
|
|
|
def parseable_output : Flag<["-"], "parseable-output">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit textual output in a parseable format">;
|
|
|
|
// Windows Options
|
|
|
|
def windows_sdk_root : Separate<["-"], "windows-sdk-root">,
|
|
Flags<[ArgumentIsPath, FrontendOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Windows SDK Root">, MetaVarName<"<root>">;
|
|
def windows_sdk_version : Separate<["-"], "windows-sdk-version">,
|
|
Flags<[FrontendOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Windows SDK Version">, MetaVarName<"<version>">;
|
|
def visualc_tools_root : Separate<["-"], "visualc-tools-root">,
|
|
Flags<[ArgumentIsPath, FrontendOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"VisualC++ Tools Root">, MetaVarName<"<root>">;
|
|
def visualc_tools_version : Separate<["-"], "visualc-tools-version">,
|
|
Flags<[FrontendOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"VisualC++ ToolSet Version">, MetaVarName<"<version>">;
|
|
|
|
// Android Options
|
|
|
|
def sysroot : Separate<["-"], "sysroot">,
|
|
Flags<[ArgumentIsPath, FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Native Platform sysroot">, MetaVarName<"<sysroot>">;
|
|
|
|
// Standard Options
|
|
def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
def o : JoinedOrSeparate<["-"], "o">,
|
|
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
|
|
NoInteractiveOption, ArgumentIsPath, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption, CacheInvariant]>,
|
|
HelpText<"Write output to <file>">, MetaVarName<"<file>">;
|
|
|
|
def j : JoinedOrSeparate<["-"], "j">, Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Number of commands to execute in parallel">, MetaVarName<"<n>">;
|
|
|
|
def sdk : Separate<["-"], "sdk">,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Compile against <sdk>">, MetaVarName<"<sdk>">;
|
|
|
|
def swift_version : Separate<["-"], "swift-version">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Interpret input according to a specific Swift language version number">,
|
|
MetaVarName<"<vers>">;
|
|
|
|
def language_mode : Separate<["-"], "language-mode">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Interpret input according to a specific Swift language mode">,
|
|
MetaVarName<"<mode>">,
|
|
Alias<swift_version>;
|
|
|
|
def min_swift_runtime_version
|
|
: Separate<["-"], "min-swift-runtime-version">,
|
|
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"The minimum Swift runtime version "
|
|
"that will be available at runtime">,
|
|
MetaVarName<"<vers>">;
|
|
|
|
def package_description_version: Separate<["-"], "package-description-version">,
|
|
Flags<[FrontendOption, HelpHidden, ModuleInterfaceOption]>,
|
|
HelpText<"The version number to be applied on the input for the PackageDescription availability kind">,
|
|
MetaVarName<"<vers>">;
|
|
|
|
def swiftinterface_compiler_version : Separate<["-"], "interface-compiler-version">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"The version of the Swift compiler used to generate a .swiftinterface file">,
|
|
MetaVarName<"<intcvers>">;
|
|
|
|
def tools_directory : Separate<["-"], "tools-directory">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
|
|
ArgumentIsPath]>,
|
|
HelpText<"Look for external executables (ld, clang, binutils) in <directory>">, MetaVarName<"<directory>">;
|
|
|
|
def D : JoinedOrSeparate<["-"], "D">, Flags<[FrontendOption]>,
|
|
HelpText<"Marks a conditional compilation flag as true">;
|
|
|
|
def e : Separate<["-"], "e">, Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Executes a line of code provided on the command line">;
|
|
|
|
def F : JoinedOrSeparate<["-"], "F">,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Add directory to framework search path">;
|
|
def F_EQ : Joined<["-"], "F=">, Flags<[FrontendOption, ArgumentIsPath]>,
|
|
Alias<F>;
|
|
|
|
def Fsystem : Separate<["-"], "Fsystem">,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Add directory to system framework search path">;
|
|
|
|
def I : JoinedOrSeparate<["-"], "I">,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Add directory to the import search path">;
|
|
def I_EQ : Joined<["-"], "I=">, Flags<[FrontendOption, ArgumentIsPath]>,
|
|
Alias<I>;
|
|
|
|
def Isystem : Separate<["-"], "Isystem">,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Add directory to the system import search path">;
|
|
|
|
def import_underlying_module : Flag<["-"], "import-underlying-module">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Implicitly imports the Objective-C half of a module">;
|
|
|
|
def import_bridging_header : Separate<["-"], "import-bridging-header">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Implicitly imports a C header file">;
|
|
def import_objc_header : Separate<["-"], "import-objc-header">,
|
|
Flags<[FrontendOption, HelpHidden, ArgumentIsPath]>,
|
|
Alias<import_bridging_header>;
|
|
|
|
def internal_import_bridging_header : Separate<["-"], "internal-import-bridging-header">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Implicitly imports a C header file as an internal import">;
|
|
|
|
def import_pch : Separate<["-"], "import-pch">,
|
|
Flags<[FrontendOption, HelpHidden, ArgumentIsPath]>,
|
|
HelpText<"Import bridging header PCH file">;
|
|
|
|
def internal_import_pch : Separate<["-"], "internal-import-pch">,
|
|
Flags<[FrontendOption, HelpHidden, ArgumentIsPath]>,
|
|
HelpText<"Import bridging header PCH file as internal">;
|
|
|
|
def pch_output_dir: Separate<["-"], "pch-output-dir">,
|
|
Flags<[FrontendOption, HelpHidden, ArgumentIsPath]>,
|
|
HelpText<"Directory to persist automatically created precompiled bridging headers">;
|
|
|
|
def auto_bridging_header_chaining: Flag<["-"], "auto-bridging-header-chaining">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Automatically chaining all the bridging headers">;
|
|
def no_auto_bridging_header_chaining: Flag<["-"], "no-auto-bridging-header-chaining">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Do not automatically chaining all the bridging headers">;
|
|
|
|
// FIXME: Unhide this once it doesn't depend on an output file map.
|
|
def incremental : Flag<["-"], "incremental">,
|
|
Flags<[NoInteractiveOption, HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Perform an incremental build if possible">;
|
|
|
|
def nostdimport : Flag<["-"], "nostdimport">, Flags<[FrontendOption]>,
|
|
HelpText<"Don't search the standard library or toolchain import paths for modules">;
|
|
def nostdlibimport : Flag<["-"], "nostdlibimport">, Flags<[FrontendOption]>,
|
|
HelpText<"Don't search the standard library import path for modules">;
|
|
|
|
def output_file_map : Separate<["-"], "output-file-map">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath]>,
|
|
HelpText<"A file which specifies the location of outputs">,
|
|
MetaVarName<"<path>">;
|
|
def output_file_map_EQ : Joined<["-"], "output-file-map=">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath]>,
|
|
Alias<output_file_map>;
|
|
|
|
def save_temps : Flag<["-"], "save-temps">,
|
|
Flags<[NoInteractiveOption,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Save intermediate compilation results">;
|
|
def driver_time_compilation : Flag<["-"], "driver-time-compilation">,
|
|
Flags<[NoInteractiveOption,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Prints the total time it took to execute all compilation tasks">;
|
|
def stats_output_dir: Separate<["-"], "stats-output-dir">,
|
|
Flags<[FrontendOption, HelpHidden, ArgumentIsPath]>,
|
|
HelpText<"Directory to write unified compilation-statistics files to">;
|
|
def print_zero_stats: Flag<["-"], "print-zero-stats">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Prints all stats even if they are zero">;
|
|
def fine_grained_timers: Flag<["-"], "fine-grained-timers">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Enable per-request timers">;
|
|
def trace_stats_events: Flag<["-"], "trace-stats-events">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Trace changes to stats in -stats-output-dir">;
|
|
def experimental_skip_non_inlinable_function_bodies:
|
|
Flag<["-"], "experimental-skip-non-inlinable-function-bodies">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Skip type-checking and SIL generation for non-inlinable function bodies">;
|
|
def experimental_skip_non_inlinable_function_bodies_without_types:
|
|
Flag<["-"], "experimental-skip-non-inlinable-function-bodies-without-types">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Skip work on non-inlinable function bodies that do not declare nested types">;
|
|
def profile_stats_events: Flag<["-"], "profile-stats-events">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Profile changes to stats in -stats-output-dir">;
|
|
def profile_stats_entities: Flag<["-"], "profile-stats-entities">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Profile changes to stats in -stats-output-dir, subdivided by source entity">;
|
|
|
|
def emit_dependencies : Flag<["-"], "emit-dependencies">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Emit basic Make-compatible dependencies files">;
|
|
def track_system_dependencies : Flag<["-"], "track-system-dependencies">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Track system dependencies while emitting Make-style dependencies">;
|
|
|
|
def emit_loaded_module_trace : Flag<["-"], "emit-loaded-module-trace">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Emit a JSON file containing information about what modules were loaded">;
|
|
def emit_loaded_module_trace_path : Separate<["-"], "emit-loaded-module-trace-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Emit the loaded module trace JSON to <path>">,
|
|
MetaVarName<"<path>">;
|
|
def emit_loaded_module_trace_path_EQ : Joined<["-"], "emit-loaded-module-trace-path=">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
Alias<emit_loaded_module_trace_path>;
|
|
def emit_cross_import_remarks : Flag<["-"], "Rcross-import">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit a remark if a cross-import of a module is triggered.">;
|
|
|
|
def remark_loading_module : Flag<["-"], "Rmodule-loading">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit remarks about loaded module">;
|
|
def remark_module_recovery : Flag<["-"], "Rmodule-recovery">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit remarks about contextual inconsistencies in loaded modules">;
|
|
def remark_module_api_import : Flag<["-"], "Rmodule-api-import">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit remarks about the import bridging in each element composing the API">;
|
|
|
|
def remark_macro_loading : Flag<["-"], "Rmacro-loading">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit remarks about loaded macro implementations">;
|
|
|
|
def remark_indexing_system_module : Flag<["-"], "Rindexing-system-module">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit a remark when indexing a system module">;
|
|
|
|
def remark_skip_explicit_interface_build : Flag<["-"], "Rskip-explicit-interface-build">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit a remark if an explicit module interface invocation has an early exit because the expected output is up-to-date">;
|
|
|
|
def remark_module_serialization : Flag<["-"], "Rmodule-serialization">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit remarks about module serialization">;
|
|
|
|
def emit_tbd : Flag<["-"], "emit-tbd">,
|
|
HelpText<"Emit a TBD file">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>;
|
|
def emit_tbd_path : Separate<["-"], "emit-tbd-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Emit the TBD file to <path>">,
|
|
MetaVarName<"<path>">;
|
|
def emit_tbd_path_EQ : Joined<["-"], "emit-tbd-path=">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
Alias<emit_tbd_path>;
|
|
def embed_tbd_for_module : Separate<["-"], "embed-tbd-for-module">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Embed symbols from the module in the emitted tbd file">;
|
|
|
|
def serialize_diagnostics : Flag<["-"], "serialize-diagnostics">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Serialize diagnostics in a binary format">;
|
|
def serialize_diagnostics_path : Separate<["-"], "serialize-diagnostics-path">,
|
|
Flags<[FrontendOption, SwiftAPIDigesterOption, NoBatchOption,
|
|
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Emit a serialized diagnostics file to <path>">,
|
|
MetaVarName<"<path>">;
|
|
def serialize_diagnostics_path_EQ: Joined<["-"], "serialize-diagnostics-path=">,
|
|
Flags<[FrontendOption, SwiftAPIDigesterOption, NoBatchOption,
|
|
ArgumentIsPath, SupplementaryOutput, CacheInvariant]>,
|
|
Alias<serialize_diagnostics_path>;
|
|
def color_diagnostics : Flag<["-"], "color-diagnostics">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Print diagnostics in color">;
|
|
def no_color_diagnostics : Flag<["-"], "no-color-diagnostics">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Do not print diagnostics in color">;
|
|
def debug_diagnostic_names : Flag<["-"], "debug-diagnostic-names">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, HelpHidden]>,
|
|
HelpText<"Include diagnostic names when printing">;
|
|
def print_diagnostic_groups : Flag<["-"], "print-diagnostic-groups">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, HelpHidden]>,
|
|
HelpText<"Include diagnostic groups in printed diagnostic output, if available">;
|
|
def print_educational_notes : Flag<["-"], "print-educational-notes">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Include educational notes in printed diagnostic output, if available">;
|
|
def diagnostic_style : Separate<["-"], "diagnostic-style">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
MetaVarName<"<style>">,
|
|
HelpText<"The formatting style used when printing diagnostics ('swift' or 'llvm')">;
|
|
def diagnostic_style_EQ : Joined<["-"], "diagnostic-style=">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
MetaVarName<"<style>">, Alias<diagnostic_style>;
|
|
def locale : Separate<["-"], "locale">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Choose a language for diagnostic messages">,
|
|
MetaVarName<"<locale-code>">;
|
|
def localization_path : Separate<["-"], "localization-path">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Path to localized diagnostic messages directory">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def module_cache_path : Separate<["-"], "module-cache-path">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Specifies the module cache path">;
|
|
|
|
def enable_library_evolution : Flag<["-"], "enable-library-evolution">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Build the module to allow binary-compatible library evolution">;
|
|
|
|
def require_explicit_availability : Flag<["-"], "require-explicit-availability">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Warn on public declarations without an availability attribute">;
|
|
|
|
def require_explicit_availability_EQ : Joined<["-"], "require-explicit-availability=">,
|
|
MetaVarName<"<error,warn,ignore>">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Set diagnostic level to report public declarations without an availability attribute">;
|
|
|
|
def require_explicit_availability_target : Separate<["-"], "require-explicit-availability-target">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Suggest fix-its adding @available(<target>, *) to public declarations without availability">,
|
|
MetaVarName<"<target>">;
|
|
|
|
def require_explicit_sendable : Flag<["-"], "require-explicit-sendable">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Require explicit Sendable annotations on public declarations">;
|
|
|
|
def define_availability : Separate<["-"], "define-availability">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Define an availability macro in the format 'macroName : iOS 13.0, macOS 10.15'">,
|
|
MetaVarName<"<macro>">;
|
|
|
|
def check_api_availability_only : Flag<["-"], "check-api-availability-only">,
|
|
Flags<[HelpHidden, FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Deprecated, has no effect">;
|
|
|
|
def unavailable_decl_optimization_EQ : Joined<["-"], "unavailable-decl-optimization=">,
|
|
MetaVarName<"<complete,none>">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Specify the optimization mode for unavailable declarations. The "
|
|
"value may be 'none' (no optimization) or 'complete' (code is not "
|
|
"generated at all unavailable declarations)">;
|
|
|
|
def define_enabled_availability_domain : Separate<["-"], "define-enabled-availability-domain">,
|
|
Flags<[HelpHidden, FrontendOption, NoInteractiveOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Defines a custom availability domain that is available at compile time">,
|
|
MetaVarName<"<domain>">;
|
|
|
|
def define_always_enabled_availability_domain
|
|
: Separate<["-"], "define-always-enabled-availability-domain">,
|
|
Flags<[HelpHidden, FrontendOption, NoInteractiveOption,
|
|
ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Defines a custom availability domain that is available for all "
|
|
"deployments">,
|
|
MetaVarName<"<domain>">;
|
|
|
|
def define_disabled_availability_domain : Separate<["-"], "define-disabled-availability-domain">,
|
|
Flags<[HelpHidden, FrontendOption, NoInteractiveOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Defines a custom availability domain that is unavailable at compile time">,
|
|
MetaVarName<"<domain>">;
|
|
|
|
def define_dynamic_availability_domain : Separate<["-"], "define-dynamic-availability-domain">,
|
|
Flags<[HelpHidden, FrontendOption, NoInteractiveOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Defines a custom availability domain that can be enabled or disabled at runtime">,
|
|
MetaVarName<"<domain>">;
|
|
|
|
def experimental_package_bypass_resilience : Flag<["-"], "experimental-package-bypass-resilience">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Deprecated; has no effect">;
|
|
|
|
def experimental_allow_non_resilient_access : Flag<["-"], "experimental-allow-non-resilient-access">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Deprecated; use -allow-non-resilient-access instead">;
|
|
|
|
def allow_non_resilient_access : Flag<["-"], "allow-non-resilient-access">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Ensures all contents are generated besides exportable decls in the binary module, so non-resilient access can be allowed">;
|
|
|
|
def library_level : Separate<["-"], "library-level">,
|
|
MetaVarName<"<level>">,
|
|
Flags<[HelpHidden, FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Library distribution level 'api', 'spi' or 'other' (the default)">;
|
|
def library_level_EQ : Joined<["-"], "library-level=">,
|
|
MetaVarName<"<level>">,
|
|
Flags<[HelpHidden, FrontendOption, ModuleInterfaceOption]>,
|
|
Alias<library_level>;
|
|
|
|
def module_name : Separate<["-"], "module-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption,
|
|
SwiftSymbolGraphExtractOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Name of the module to build">;
|
|
def project_name : Separate<["-"], "project-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable,
|
|
SwiftSymbolGraphExtractOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Name of the project this module to build belongs to">;
|
|
|
|
def module_name_EQ : Joined<["-"], "module-name=">, Flags<[FrontendOption]>,
|
|
Alias<module_name>;
|
|
|
|
def debug_module_path : Separate<["-"], "debug-module-path">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Path to this module's binary swiftmodule artifact (required by debug info)">;
|
|
def debug_module_path_EQ : Joined<["-"], "debug-module-path=">, Flags<[FrontendOption]>,
|
|
Alias<debug_module_path>;
|
|
|
|
def module_alias : Separate<["-"], "module-alias">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
MetaVarName<"<alias_name=real_name>">,
|
|
HelpText<"If a source file imports or references module <alias_name>, the <real_name> is used for the contents of the file">;
|
|
|
|
def module_link_name : Separate<["-"], "module-link-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Library to link against when using this module">;
|
|
def module_link_name_EQ : Joined<["-"], "module-link-name=">,
|
|
Flags<[FrontendOption]>, Alias<module_link_name>;
|
|
def autolink_force_load : Flag<["-"], "autolink-force-load">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, HelpHidden]>,
|
|
HelpText<"Force ld to link against this module even if no symbols are used">;
|
|
def module_abi_name : Separate<["-"], "module-abi-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"ABI name to use for the contents of this module">;
|
|
def package_name : Separate<["-"], "package-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Name of the package the module belongs to">;
|
|
def export_as : Separate<["-"], "export-as">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Module name to use when referenced in clients module interfaces">;
|
|
def public_module_name : Separate<["-"], "public-module-name">,
|
|
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Public facing module name to use in diagnostics and documentation">;
|
|
|
|
def emit_module : Flag<["-"], "emit-module">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Emit an importable module">;
|
|
def emit_module_path : Separate<["-"], "emit-module-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Emit an importable module to <path>">,
|
|
MetaVarName<"<path>">;
|
|
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">,
|
|
Flags<[NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Output module summary file">;
|
|
def emit_module_summary_path :
|
|
Separate<["-"], "emit-module-summary-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
MetaVarName<"<path>">, HelpText<"Output module summary file to <path>">;
|
|
|
|
def emit_module_interface :
|
|
Flag<["-"], "emit-module-interface">,
|
|
Flags<[NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Output module interface file">;
|
|
def emit_module_interface_path :
|
|
Separate<["-"], "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">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Check that module interfaces emitted during compilation typecheck">;
|
|
def no_verify_emitted_module_interface :
|
|
Flag<["-"], "no-verify-emitted-module-interface">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild,
|
|
FrontendOption, ModuleInterfaceOptionIgnorable]>,
|
|
HelpText<"Don't check that module interfaces emitted during compilation typecheck">;
|
|
|
|
def avoid_emit_module_source_info :
|
|
Flag<["-"], "avoid-emit-module-source-info">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"don't emit Swift source info file">;
|
|
|
|
def emit_module_source_info_path :
|
|
Separate<["-"], "emit-module-source-info-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
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, CacheInvariant]>,
|
|
MetaVarName<"<path>">, HelpText<"Output module source info file for the target variant to <path>">;
|
|
|
|
def emit_parseable_module_interface :
|
|
Flag<["-"], "emit-parseable-module-interface">,
|
|
Alias<emit_module_interface>,
|
|
Flags<[NoInteractiveOption, HelpHidden, SupplementaryOutput]>;
|
|
def emit_parseable_module_interface_path :
|
|
Separate<["-"], "emit-parseable-module-interface-path">,
|
|
Alias<emit_module_interface_path>,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>;
|
|
|
|
def emit_const_values :
|
|
Flag<["-"], "emit-const-values">,
|
|
Flags<[NoInteractiveOption, SupplementaryOutput]>;
|
|
def emit_const_values_path : Separate<["-"], "emit-const-values-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
MetaVarName<"<path>">,
|
|
HelpText<"Emit the extracted compile-time known values to <path>">;
|
|
|
|
def emit_api_descriptor :
|
|
Flag<["-"], "emit-api-descriptor">,
|
|
Flags<[NoInteractiveOption, SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Output a JSON file describing the module's API">;
|
|
def emit_api_descriptor_path :
|
|
Separate<["-"], "emit-api-descriptor-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
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]>,
|
|
HelpText<"Emit an Objective-C header file">;
|
|
def emit_objc_header_path : Separate<["-"], "emit-objc-header-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
MetaVarName<"<path>">, HelpText<"Emit an Objective-C header file to <path>">;
|
|
def emit_clang_header_nonmodular_includes : Flag<["-"], "emit-clang-header-nonmodular-includes">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput]>,
|
|
HelpText<"Augment emitted Objective-C header with textual imports for every included modular import">;
|
|
|
|
def emit_clang_header_path : Separate<["-"], "emit-clang-header-path">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, CacheInvariant]>,
|
|
HelpText<"Emit an Objective-C and C++ header file to <path>">,
|
|
Alias<emit_objc_header_path>;
|
|
|
|
def emit_clang_header_min_access : Separate<["-"], "emit-clang-header-min-access">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath, CacheInvariant]>,
|
|
MetaVarName<"<access-level>">,
|
|
HelpText<"The minimum access level of declarations to include in the emitted header.>">;
|
|
|
|
def static : Flag<["-"], "static">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, NoInteractiveOption]>,
|
|
HelpText<"Make this module statically linkable and make the output of -emit-library a static library.">;
|
|
|
|
def import_cf_types : Flag<["-"], "import-cf-types">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Recognize and import CF types as class types">;
|
|
|
|
def solver_shrink_unsolved_threshold : Separate<["-"], "solver-shrink-unsolved-threshold">,
|
|
Flags<[FrontendOption, HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Set The upper bound to number of sub-expressions unsolved before termination of the shrink phrase">;
|
|
|
|
def value_recursion_threshold : Separate<["-"], "value-recursion-threshold">,
|
|
Flags<[FrontendOption, HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Set the maximum depth for direct recursion in value types">;
|
|
|
|
def disable_swift_bridge_attr : Flag<["-"], "disable-swift-bridge-attr">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Disable using the swift bridge attribute">;
|
|
|
|
def enable_bridging_pch : Flag<["-"], "enable-bridging-pch">,
|
|
Flags<[HelpHidden]>,
|
|
HelpText<"Enable automatic generation of bridging PCH files">;
|
|
|
|
def disable_bridging_pch : Flag<["-"], "disable-bridging-pch">,
|
|
Flags<[HelpHidden]>,
|
|
HelpText<"Disable automatic generation of bridging PCH files">;
|
|
|
|
def lto : Joined<["-"], "lto=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Specify the LTO type to either 'llvm-thin' or 'llvm-full'">;
|
|
|
|
def lto_library : Separate<["-"], "lto-library">,
|
|
Flags<[FrontendOption, ArgumentIsPath, NoInteractiveOption]>,
|
|
HelpText<"Perform LTO with <lto-library>">, MetaVarName<"<lto-library>">;
|
|
|
|
def access_notes_path : Separate<["-"], "access-notes-path">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Specify YAML file to override attributes on Swift declarations in this module">;
|
|
def access_notes_path_EQ : Joined<["-"], "access-notes-path=">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
Alias<access_notes_path>;
|
|
|
|
// Experimental feature options
|
|
|
|
// Note: this flag will be removed when JVP/differential generation in the
|
|
// differentiation transform is robust.
|
|
def enable_experimental_forward_mode_differentiation :
|
|
Flag<["-"], "enable-experimental-forward-mode-differentiation">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Enable experimental forward mode differentiation">;
|
|
|
|
def enable_experimental_additive_arithmetic_derivation :
|
|
Flag<["-"], "enable-experimental-additive-arithmetic-derivation">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Enable experimental 'AdditiveArithmetic' derived conformances">;
|
|
|
|
def enable_experimental_concise_pound_file : Flag<["-"],
|
|
"enable-experimental-concise-pound-file">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Enable experimental concise '#file' identifier">;
|
|
|
|
def enable_experimental_cxx_interop :
|
|
Flag<["-"], "enable-experimental-cxx-interop">,
|
|
Flags<[NoDriverOption, FrontendOption, HelpHidden]>,
|
|
HelpText<"Enable experimental C++ interop code generation and config directives">;
|
|
|
|
def cxx_interoperability_mode :
|
|
Joined<["-"], "cxx-interoperability-mode=">,
|
|
Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Enables C++ interoperability; pass 'default' to enable or 'off' to disable">;
|
|
|
|
def experimental_c_foreign_reference_types :
|
|
Flag<["-"], "experimental-c-foreign-reference-types">,
|
|
Flags<[FrontendOption, HelpHidden, ModuleInterfaceOption]>,
|
|
HelpText<"Enable experimental C foreign references types. Deprecated, has no effect.">;
|
|
|
|
def experimental_hermetic_seal_at_link:
|
|
Flag<["-"], "experimental-hermetic-seal-at-link">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Library code can assume that all clients are visible at linktime, and aggressively strip unused code">;
|
|
|
|
def experimental_package_interface_load:
|
|
Flag<["-"], "experimental-package-interface-load">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Enables loading a package interface if in the same package specified with package-name">;
|
|
|
|
def experimental_serialize_debug_info:
|
|
Flag<["-"], "experimental-serialize-debug-info">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Enables serialization/deserialization of debug scopes">;
|
|
// Diagnostic control options
|
|
def suppress_warnings : Flag<["-"], "suppress-warnings">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Suppress all warnings">;
|
|
|
|
def warning_treating_Group : OptionGroup<"<options to control warning treating>">;
|
|
|
|
def warnings_as_errors : Flag<["-"], "warnings-as-errors">,
|
|
Group<warning_treating_Group>,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Treat warnings as errors">;
|
|
|
|
def Werror : Separate<["-"], "Werror">,
|
|
Group<warning_treating_Group>,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
MetaVarName<"<diagnostic_group>">,
|
|
HelpText<"Treat this warning group as error">;
|
|
|
|
def no_warnings_as_errors : Flag<["-"], "no-warnings-as-errors">,
|
|
Group<warning_treating_Group>,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Treat warnings as warnings">;
|
|
|
|
def Wwarning : Separate<["-"], "Wwarning">,
|
|
Group<warning_treating_Group>,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
MetaVarName<"<diagnostic_group>">,
|
|
HelpText<"Treat this warning group as warning">;
|
|
|
|
def suppress_notes : Flag<["-"], "suppress-notes">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Suppress all notes">;
|
|
|
|
def suppress_remarks : Flag<["-"], "suppress-remarks">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Suppress all remarks">;
|
|
|
|
def continue_building_after_errors : Flag<["-"], "continue-building-after-errors">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Continue building, even after errors are encountered">;
|
|
|
|
def warn_swift3_objc_inference_complete :
|
|
Flag<["-"], "warn-swift3-objc-inference-complete">,
|
|
Flags<[FrontendOption, HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Deprecated, has no effect">;
|
|
|
|
def warn_swift3_objc_inference_minimal :
|
|
Flag<["-"], "warn-swift3-objc-inference-minimal">,
|
|
Flags<[FrontendOption, HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Deprecated, has no effect">;
|
|
|
|
def enable_actor_data_race_checks :
|
|
Flag<["-"], "enable-actor-data-race-checks">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit runtime checks for actor data races">;
|
|
|
|
def disable_actor_data_race_checks :
|
|
Flag<["-"], "disable-actor-data-race-checks">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Disable runtime checks for actor data races">;
|
|
|
|
def disable_dynamic_actor_isolation :
|
|
Flag<["-"], "disable-dynamic-actor-isolation">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Disable dynamic actor isolation checks">;
|
|
|
|
def enable_bare_slash_regex : Flag<["-"], "enable-bare-slash-regex">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Enable the use of forward slash regular-expression literal syntax">;
|
|
|
|
def warn_implicit_overrides :
|
|
Flag<["-"], "warn-implicit-overrides">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Warn about implicit overrides of protocol members">;
|
|
|
|
def warn_soft_deprecated :
|
|
Flag<["-"], "warn-soft-deprecated">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, HelpHidden]>,
|
|
HelpText<"Warn when soft-deprecated declarations are referenced">;
|
|
|
|
def typo_correction_limit : Separate<["-"], "typo-correction-limit">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
MetaVarName<"<n>">,
|
|
HelpText<"Limit the number of times the compiler will attempt typo correction to <n>">;
|
|
|
|
def warn_swift3_objc_inference : Flag<["-"], "warn-swift3-objc-inference">,
|
|
Alias<warn_swift3_objc_inference_complete>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, HelpHidden]>;
|
|
|
|
def warn_concurrency : Flag<["-"], "warn-concurrency">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Warn about code that is unsafe according to the Swift Concurrency "
|
|
"model and will become ill-formed in a future language version">;
|
|
|
|
def strict_concurrency : Joined<["-"], "strict-concurrency=">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Specify the how strict concurrency checking will be. The value may "
|
|
"be 'minimal' (most 'Sendable' checking is disabled), "
|
|
"'targeted' ('Sendable' checking is enabled in code that uses the "
|
|
"concurrency model, or 'complete' ('Sendable' and other checking is "
|
|
"enabled for all code in the module)">;
|
|
|
|
def default_isolation : Separate<["-"], "default-isolation">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Specify the default actor isolation: MainActor or nonisolated. "
|
|
"Defaults to nonisolated.">,
|
|
MetaVarName<"MainActor|nonisolated">;
|
|
def default_isolation_EQ : Joined<["-"], "default-isolation=">,
|
|
Flags<[FrontendOption]>,
|
|
Alias<default_isolation>;
|
|
|
|
def enable_experimental_feature :
|
|
Separate<["-"], "enable-experimental-feature">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Enable an experimental feature">;
|
|
|
|
def disable_experimental_feature :
|
|
Separate<["-"], "disable-experimental-feature">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Disable an experimental feature">;
|
|
|
|
def enable_upcoming_feature : Separate<["-"], "enable-upcoming-feature">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Enable a feature that will be introduced in an upcoming language "
|
|
"version">;
|
|
|
|
def disable_upcoming_feature : Separate<["-"], "disable-upcoming-feature">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Disable a feature that will be introduced in an upcoming language "
|
|
"version">;
|
|
|
|
def strict_memory_safety : Flag<["-"], "strict-memory-safety">,
|
|
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Enable strict memory safety checking">;
|
|
def strict_memory_safety_migrate : Flag<["-"], "strict-memory-safety:migrate">,
|
|
Flags<[FrontendOption, ModuleInterfaceOptionIgnorable,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Enable migration to strict memory safety checking">;
|
|
|
|
def Rpass_EQ : Joined<["-"], "Rpass=">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Report performed transformations by optimization passes whose "
|
|
"name matches the given POSIX regular expression">;
|
|
|
|
def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Report missed transformations by optimization passes whose "
|
|
"name matches the given POSIX regular expression">;
|
|
|
|
def save_optimization_record : Flag<["-"], "save-optimization-record">,
|
|
Flags<[FrontendOption]>, HelpText<"Generate a YAML optimization record file">;
|
|
def save_optimization_record_EQ : Joined<["-"], "save-optimization-record=">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Generate an optimization record file in a specific format "
|
|
"(default: YAML)">, MetaVarName<"<format>">;
|
|
def save_optimization_record_path :
|
|
Separate<["-"], "save-optimization-record-path">,
|
|
Flags<[FrontendOption, ArgumentIsPath, CacheInvariant]>,
|
|
HelpText<"Specify the file name of any generated optimization record">;
|
|
def save_optimization_record_passes :
|
|
Separate<["-"], "save-optimization-record-passes">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Only include passes which match a specified regular expression in "
|
|
"the generated optimization record "
|
|
"(by default, include all passes)">, MetaVarName<"<regex>">;
|
|
|
|
def no_allocations : Flag<["-"], "no-allocations">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Diagnose any code that needs to heap allocate (classes, closures, etc.)">;
|
|
|
|
// Platform options.
|
|
def enable_app_extension : Flag<["-"], "application-extension">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Restrict code to those available for App Extensions">;
|
|
|
|
def enable_app_extension_library : Flag<["-"], "application-extension-library">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Restrict code to those available for App Extension Libraries">;
|
|
|
|
def libc : Separate<["-"], "libc">,
|
|
Flags<[SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"libc runtime library to use">;
|
|
|
|
// Linker options
|
|
|
|
def linker_option_Group : OptionGroup<"<linker-specific options>">;
|
|
|
|
def l : JoinedOrSeparate<["-"], "l">, Group<linker_option_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Specifies a library which should be linked against">;
|
|
def framework : Separate<["-"], "framework">, Group<linker_option_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Specifies a framework which should be linked against">;
|
|
|
|
def L : JoinedOrSeparate<["-"], "L">, Group<linker_option_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath,
|
|
SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Add directory to library link search path">;
|
|
def L_EQ : Joined<["-"], "L=">, Group<linker_option_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
Alias<L>;
|
|
|
|
// Accept but ignore these flags. They were once used to control
|
|
// linking of arclite, which is no longer used on Darwin.
|
|
def link_objc_runtime : Flag<["-"], "link-objc-runtime">,
|
|
Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Deprecated">;
|
|
def no_link_objc_runtime : Flag<["-"], "no-link-objc-runtime">,
|
|
Flags<[HelpHidden, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Deprecated">;
|
|
|
|
def static_stdlib: Flag<["-"], "static-stdlib">,
|
|
Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Statically link the Swift standard library">;
|
|
def no_static_stdlib: Flag<["-"], "no-static-stdlib">,
|
|
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Don't statically link the Swift standard library">;
|
|
def toolchain_stdlib_rpath: Flag<["-"], "toolchain-stdlib-rpath">,
|
|
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Add an rpath entry for the toolchain's standard library, rather than the OS's">;
|
|
def no_toolchain_stdlib_rpath: Flag<["-"], "no-toolchain-stdlib-rpath">,
|
|
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Do not add an rpath entry for the toolchain's standard library (default)">;
|
|
def no_stdlib_rpath: Flag<["-"], "no-stdlib-rpath">,
|
|
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Don't add any rpath entries.">;
|
|
|
|
def static_executable : Flag<["-"], "static-executable">,
|
|
HelpText<"Statically link the executable">;
|
|
def no_static_executable : Flag<["-"], "no-static-executable">,
|
|
Flags<[HelpHidden]>,
|
|
HelpText<"Don't statically link the executable">;
|
|
|
|
def use_ld : Joined<["-"], "use-ld=">,
|
|
Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Specifies the flavor of the linker to be used">;
|
|
|
|
def ld_path : Joined<["-"], "ld-path=">,
|
|
Flags<[HelpHidden, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Specifies the path to the linker to be used">;
|
|
|
|
def Xlinker : Separate<["-"], "Xlinker">,
|
|
Flags<[DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Specifies an option which should be passed to the linker">;
|
|
|
|
def build_id : JoinedOrSeparate<["-"], "build-id">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Specify the build ID argument passed to the linker">,
|
|
MetaVarName<"<build-id>">;
|
|
def build_id_EQ : Joined<["-"], "build-id=">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
Alias<build_id>;
|
|
|
|
// Optimization levels
|
|
|
|
def O_Group : OptionGroup<"<optimization level options>">;
|
|
|
|
def Onone : Flag<["-"], "Onone">, Group<O_Group>,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Compile without any optimization">;
|
|
def O : Flag<["-"], "O">, Group<O_Group>,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Compile with optimizations">;
|
|
def Osize : Flag<["-"], "Osize">, Group<O_Group>,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Compile with optimizations and target small code size">;
|
|
def Ounchecked : Flag<["-"], "Ounchecked">, Group<O_Group>,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Compile with optimizations and remove runtime safety checks">;
|
|
def Oplayground : Flag<["-"], "Oplayground">, Group<O_Group>,
|
|
Flags<[HelpHidden, FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Compile with optimizations appropriate for a playground">;
|
|
|
|
def ExperimentalPackageCMOAbortOnDeserializationFail : Flag<["-"], "experimental-package-cmo-abort-on-deserialization-fail">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Abort if a deserialization error is found while package optimization is enabled">;
|
|
|
|
def ExperimentalPackageCMO : Flag<["-"], "experimental-package-cmo">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Deprecated; use -package-cmo instead">;
|
|
|
|
def PackageCMO : Flag<["-"], "package-cmo">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Enable optimization to perform default CMO within a package boundary">;
|
|
|
|
def EnableDefaultCMO : Flag<["-"], "enable-default-cmo">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Perform conservative cross-module optimization">;
|
|
|
|
def EnableCMOEverything : Flag<["-"], "enable-cmo-everything">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Perform cross-module optimization on everything (all APIs). "
|
|
"This is the same level of serialization as Embedded Swift.">;
|
|
|
|
def CrossModuleOptimization : Flag<["-"], "cross-module-optimization">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Perform cross-module optimization">;
|
|
|
|
def disableCrossModuleOptimization : Flag<["-"], "disable-cmo">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Disable cross-module optimization">;
|
|
|
|
def ExperimentalPerformanceAnnotations : Flag<["-"], "experimental-performance-annotations">,
|
|
Flags<[HelpHidden, FrontendOption]>,
|
|
HelpText<"Deprecated, has no effect">;
|
|
|
|
def RemoveRuntimeAsserts : Flag<["-"], "remove-runtime-asserts">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Remove runtime safety checks.">;
|
|
def AssumeSingleThreaded : Flag<["-"], "assume-single-threaded">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
HelpText<"Assume that code will be executed in a single-threaded "
|
|
"environment">;
|
|
|
|
// Debug info options
|
|
|
|
def g_Group : OptionGroup<"<debug info options>">;
|
|
|
|
def g : Flag<["-"], "g">, Group<g_Group>, Flags<[FrontendOption]>,
|
|
HelpText<"Emit debug info. "
|
|
"This is the preferred setting for debugging with LLDB.">;
|
|
def gnone : Flag<["-"], "gnone">, Group<g_Group>, Flags<[FrontendOption]>,
|
|
HelpText<"Don't emit debug info">;
|
|
def gline_tables_only : Flag<["-"], "gline-tables-only">,
|
|
Group<g_Group>, Flags<[FrontendOption]>,
|
|
HelpText<"Emit minimal debug info for backtraces only">;
|
|
def gdwarf_types : Flag<["-"], "gdwarf-types">,
|
|
Group<g_Group>, Flags<[FrontendOption]>,
|
|
HelpText<"Emit full DWARF type info.">;
|
|
def debug_prefix_map : Separate<["-"], "debug-prefix-map">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Remap source paths in debug info">, MetaVarName<"<prefix=replacement>">;
|
|
def coverage_prefix_map : Separate<["-"], "coverage-prefix-map">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Remap source paths in coverage info">, MetaVarName<"<prefix=replacement>">;
|
|
def file_prefix_map : Separate<["-"], "file-prefix-map">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Remap source paths in debug, coverage, and index info">, MetaVarName<"<prefix=replacement>">;
|
|
|
|
def file_compilation_dir : Separate<["-"], "file-compilation-dir">,
|
|
Flags<[FrontendOption]>, MetaVarName<"<path>">,
|
|
HelpText<"The compilation directory to embed in the debug info. Coverage mapping is not supported yet.">;
|
|
|
|
def debug_info_format : Joined<["-"], "debug-info-format=">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Specify the debug info format type to either 'dwarf' or 'codeview'">;
|
|
def dwarf_version : Joined<["-"], "dwarf-version=">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"DWARF debug info version to produce if requested">,
|
|
MetaVarName<"<version>">;
|
|
|
|
def prefix_serialized_debugging_options : Flag<["-"], "prefix-serialized-debugging-options">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Apply debug prefix mappings to serialized debug info in Swiftmodule files">;
|
|
|
|
// Verify debug info
|
|
def verify_debug_info : Flag<["-"], "verify-debug-info">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Verify the binary representation of debug output.">;
|
|
|
|
def debug_info_store_invocation : Flag<["-"], "debug-info-store-invocation">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Emit the compiler invocation in the debug info.">;
|
|
|
|
// Assert configuration identifiers.
|
|
def AssertConfig : Separate<["-"], "assert-config">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Specify the assert_configuration replacement. "
|
|
"Possible values are Debug, Release, Unchecked, DisableReplacement.">;
|
|
|
|
// Code formatting options
|
|
|
|
def code_formatting_Group : OptionGroup<"<code formatting options>">;
|
|
|
|
def use_tabs : Flag<["-"], "use-tabs">, Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"Use tabs for indentation.">;
|
|
|
|
def indent_switch_case : Flag<["-"], "indent-switch-case">,
|
|
Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"Indent cases in switch statements.">;
|
|
|
|
def in_place : Flag<["-"], "in-place">, Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"Overwrite input file with formatted file.">;
|
|
|
|
def tab_width : Separate<["-"], "tab-width">, Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"Width of tab character.">, MetaVarName<"<n>">;
|
|
|
|
def indent_width : Separate<["-"], "indent-width">, Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"Number of characters to indent.">, MetaVarName<"<n>">;
|
|
|
|
def line_range : Separate<["-"], "line-range">, Group<code_formatting_Group>,
|
|
Flags<[NoInteractiveOption, NoBatchOption]>,
|
|
HelpText<"<start line>:<end line>. Formats a range of lines (1-based). "
|
|
"Can only be used with one input file.">, MetaVarName<"<n:n>">;
|
|
|
|
// Migrator Options
|
|
|
|
def update_code : Flag<["-"], "update-code">,
|
|
HelpText<"Update Swift code">,
|
|
Flags<[FrontendOption, HelpHidden, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
def migrate_keep_objc_visibility: Flag<["-"], "migrate-keep-objc-visibility">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"When migrating, add '@objc' to declarations that would've been implicitly visible in Swift 3">;
|
|
|
|
def disable_migrator_fixits: Flag<["-"], "disable-migrator-fixits">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Disable the Migrator phase which automatically applies fix-its">;
|
|
|
|
def emit_remap_file_path: Separate<["-"], "emit-remap-file-path">,
|
|
Flags<[FrontendOption, NoDriverOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit the replacement map describing Swift Migrator changes to <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def emit_migrated_file_path: Separate<["-"], "emit-migrated-file-path">,
|
|
Flags<[FrontendOption, NoDriverOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Emit the migrated source file to <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def dump_migration_states_dir: Separate<["-"], "dump-migration-states-dir">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
|
|
ArgumentIsPath]>,
|
|
HelpText<"Dump the input text, output text, and states for migration to <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def api_diff_data_file: Separate<["-"], "api-diff-data-file">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
|
|
ArgumentIsPath]>,
|
|
HelpText<"API migration data is from <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def api_diff_data_dir: Separate<["-"], "api-diff-data-dir">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild,
|
|
ArgumentIsPath]>,
|
|
HelpText<"Load platform and version specific API migration data files from <path>. "
|
|
"Ignored if -api-diff-data-file is specified.">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def dump_usr: Flag<["-"], "dump-usr">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Dump USR for each declaration reference">;
|
|
|
|
// FIXME: Remove these once Xcode stops appending these flags.
|
|
// rdar://problem/31844718
|
|
|
|
def migrator_update_sdk: Flag<["-"], "migrator-update-sdk">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Does nothing. Temporary compatibility flag for Xcode.">;
|
|
|
|
def migrator_update_swift: Flag<["-"], "migrator-update-swift">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Does nothing. Temporary compatibility flag for Xcode.">;
|
|
|
|
// File types
|
|
|
|
def parse_as_library : Flag<["-"], "parse-as-library">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Parse the input file(s) as libraries, not scripts">;
|
|
def parse_sil : Flag<["-"], "parse-sil">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Parse the input file as SIL code, not Swift source">;
|
|
def parse_stdlib : Flag<["-"], "parse-stdlib">,
|
|
Flags<[FrontendOption, HelpHidden, ModuleInterfaceOption]>,
|
|
HelpText<"Parse the input file(s) as the Swift standard library">;
|
|
|
|
def enable_builtin_module : Flag<["-"], "enable-builtin-module">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Enables the explicit import of the Builtin module">;
|
|
|
|
def modes_Group : OptionGroup<"<mode options>">, HelpText<"MODES">;
|
|
|
|
class ModeOpt : Group<modes_Group>;
|
|
|
|
// Output Modes
|
|
let Flags = [FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild] in {
|
|
|
|
def emit_object : Flag<["-"], "emit-object">,
|
|
HelpText<"Emit object file(s) (-c)">, ModeOpt;
|
|
def emit_assembly : Flag<["-"], "emit-assembly">,
|
|
HelpText<"Emit assembly file(s) (-S)">, ModeOpt;
|
|
def emit_bc : Flag<["-"], "emit-bc">,
|
|
HelpText<"Emit LLVM BC file(s)">, ModeOpt;
|
|
def emit_irgen : Flag<["-"], "emit-irgen">,
|
|
HelpText<"Emit LLVM IR file(s) before LLVM optimizations">, ModeOpt;
|
|
def emit_ir : Flag<["-"], "emit-ir">,
|
|
HelpText<"Emit LLVM IR file(s) after LLVM optimizations">, ModeOpt;
|
|
def emit_sil : Flag<["-"], "emit-sil">,
|
|
HelpText<"Emit canonical SIL file(s)">, ModeOpt;
|
|
def emit_silgen : Flag<["-"], "emit-silgen">,
|
|
HelpText<"Emit raw SIL file(s)">, ModeOpt;
|
|
def emit_lowered_sil : Flag<["-"], "emit-lowered-sil">,
|
|
HelpText<"Emit lowered SIL file(s)">, ModeOpt;
|
|
def emit_sib : Flag<["-"], "emit-sib">,
|
|
HelpText<"Emit serialized AST + canonical SIL file(s)">, ModeOpt;
|
|
def emit_sibgen : Flag<["-"], "emit-sibgen">,
|
|
HelpText<"Emit serialized AST + raw SIL file(s)">, ModeOpt;
|
|
def emit_imported_modules : Flag<["-"], "emit-imported-modules">,
|
|
HelpText<"Emit a list of the imported modules">, ModeOpt;
|
|
def emit_pcm : Flag<["-"], "emit-pcm">,
|
|
HelpText<"Emit a precompiled Clang module from a module map">, ModeOpt;
|
|
|
|
} // end let Flags = [FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]
|
|
|
|
def emit_executable : Flag<["-"], "emit-executable">,
|
|
HelpText<"Emit a linked executable">, ModeOpt,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def emit_library : Flag<["-"], "emit-library">,
|
|
HelpText<"Emit a linked library">, ModeOpt,
|
|
Flags<[NoInteractiveOption]>;
|
|
|
|
def c : Flag<["-"], "c">, Alias<emit_object>,
|
|
Flags<[FrontendOption, NoInteractiveOption]>, ModeOpt;
|
|
def S: Flag<["-"], "S">, Alias<emit_assembly>,
|
|
Flags<[FrontendOption, NoInteractiveOption]>, ModeOpt;
|
|
|
|
def fixit_all : Flag<["-"], "fixit-all">,
|
|
HelpText<"Apply all fixits from diagnostics without any filtering">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
// No Output Modes
|
|
def parse: Flag<["-"], "parse">,
|
|
HelpText<"Parse input file(s)">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def resolve_imports : Flag<["-"], "resolve-imports">,
|
|
HelpText<"Parse and resolve imports in input file(s)">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def typecheck : Flag<["-"], "typecheck">,
|
|
HelpText<"Parse and type-check input file(s)">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def dump_parse : Flag<["-"], "dump-parse">,
|
|
HelpText<"Parse input file(s) and dump AST(s)">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def emit_parse : Flag<["-"], "emit-parse">, Alias<dump_parse>,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def dump_ast : Flag<["-"], "dump-ast">,
|
|
HelpText<"Parse and type-check input file(s) and dump AST(s)">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def dump_ast_format : Separate<["-"], "dump-ast-format">,
|
|
HelpText<"Desired format for -dump-ast output "
|
|
"('default', 'json', or 'json-zlib'); no format is guaranteed "
|
|
"stable across different compiler versions">,
|
|
MetaVarName<"<format>">,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def emit_ast : Flag<["-"], "emit-ast">, Alias<dump_ast>,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def dump_scope_maps : Separate<["-"], "dump-scope-maps">,
|
|
HelpText<"Parse and type-check input file(s) and dump the scope map(s)">,
|
|
MetaVarName<"<expanded-or-list-of-line:column>">,
|
|
ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
def dump_type_info : Flag<["-"], "dump-type-info">,
|
|
HelpText<"Output YAML dump of fixed-size types from all imported modules">,
|
|
ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def print_ast : Flag<["-"], "print-ast">,
|
|
HelpText<"Parse and type-check input file(s) and pretty print AST(s)">,
|
|
ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def print_ast_decl : Flag<["-"], "print-ast-decl">,
|
|
HelpText<"Parse and type-check input file(s) and pretty print declarations from AST(s)">,
|
|
ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def dump_pcm : Flag<["-"], "dump-pcm">,
|
|
HelpText<"Dump debugging information about a precompiled Clang module">,
|
|
ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
// Other Modes
|
|
def repl : Flag<["-"], "repl">,
|
|
HelpText<"REPL mode (the default if there is no input file)">,
|
|
Flags<[FrontendOption, NoBatchOption, HelpHidden]>, ModeOpt;
|
|
def lldb_repl : Flag<["-"], "lldb-repl">, HelpText<"LLDB-enhanced REPL mode">,
|
|
Flags<[NoBatchOption, HelpHidden]>, ModeOpt;
|
|
def deprecated_integrated_repl : Flag<["-"], "deprecated-integrated-repl">,
|
|
Flags<[FrontendOption, NoBatchOption]>, ModeOpt;
|
|
def i : Flag<["-"], "i">, ModeOpt; // only used to provide diagnostics.
|
|
|
|
def whole_module_optimization : Flag<["-"], "whole-module-optimization">,
|
|
HelpText<"Optimize input files together instead of individually">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>;
|
|
|
|
def no_whole_module_optimization : Flag<["-"], "no-whole-module-optimization">,
|
|
HelpText<"Disable optimizing input files together instead of individually">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>;
|
|
|
|
def enable_batch_mode : Flag<["-"], "enable-batch-mode">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"Enable combining frontend jobs into batches">;
|
|
|
|
def disable_batch_mode : Flag<["-"], "disable-batch-mode">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"Disable combining frontend jobs into batches">;
|
|
|
|
def wmo : Flag<["-"], "wmo">, Alias<whole_module_optimization>,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>;
|
|
|
|
def force_single_frontend_invocation :
|
|
Flag<["-"], "force-single-frontend-invocation">,
|
|
Alias<whole_module_optimization>,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>;
|
|
|
|
def num_threads : Separate<["-"], "num-threads">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, CacheInvariant]>,
|
|
HelpText<"Enable multi-threading and specify number of threads">,
|
|
MetaVarName<"<n>">;
|
|
|
|
def Xfrontend : Separate<["-"], "Xfrontend">, Flags<[HelpHidden]>,
|
|
MetaVarName<"<arg>">, HelpText<"Pass <arg> to the Swift frontend">;
|
|
|
|
def Xcc : Separate<["-"], "Xcc">,
|
|
Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
MetaVarName<"<arg>">,
|
|
HelpText<"Pass <arg> to the C/C++/Objective-C compiler">;
|
|
|
|
def Xclang_linker : Separate<["-"], "Xclang-linker">, Flags<[HelpHidden]>,
|
|
MetaVarName<"<arg>">, HelpText<"Pass <arg> to Clang when it is used for linking.">;
|
|
|
|
def Xllvm : Separate<["-"], "Xllvm">,
|
|
Flags<[FrontendOption, HelpHidden]>,
|
|
MetaVarName<"<arg>">, HelpText<"Pass <arg> to LLVM.">;
|
|
|
|
def resource_dir : Separate<["-"], "resource-dir">,
|
|
Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption,
|
|
HelpHidden, ArgumentIsPath]>,
|
|
MetaVarName<"</usr/lib/swift>">,
|
|
HelpText<"The directory that holds the compiler resource files">;
|
|
|
|
def target : Separate<["-"], "target">,
|
|
Flags<[FrontendOption, ModuleWrapOption, ModuleInterfaceOption,
|
|
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Generate code for the given target <triple>, such as x86_64-apple-macos10.9">, MetaVarName<"<triple>">;
|
|
def target_legacy_spelling : Joined<["--"], "target=">,
|
|
Flags<[FrontendOption]>, Alias<target>;
|
|
def print_target_info : Flag<["-"], "print-target-info">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Print target information for the given target <triple>, such as x86_64-apple-macos10.9">, MetaVarName<"<triple>">;
|
|
def print_static_build_config : Flag<["-"], "print-static-build-config">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Print static build configuration that can be used to evaluate #ifs in Swift source code">;
|
|
|
|
def print_supported_features : Flag<["-"], "print-supported-features">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Print information about features supported by the compiler">;
|
|
|
|
def target_cpu : Separate<["-"], "target-cpu">, Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Generate code for a particular CPU variant">;
|
|
|
|
def target_variant : Separate<["-"], "target-variant">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Generate 'zippered' code for macCatalyst that can run on the specified"
|
|
" variant target triple in addition to the main -target triple">;
|
|
|
|
def clang_target : Separate<["-"], "clang-target">,
|
|
Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Separately set the target we should use for internal Clang instance">;
|
|
def clang_target_variant : Separate<["-"], "clang-target-variant">,
|
|
Flags<[FrontendOption, SwiftSymbolGraphExtractOption,
|
|
SwiftAPIDigesterOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Separately set the target we should use for internal Clang instance"
|
|
" for the 'zippered' code for macCatalyst">;
|
|
|
|
def disable_clang_target : Flag<["-"], "disable-clang-target">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Disable a separately specified target triple for Clang instance to use">;
|
|
|
|
def explain_module_dependency : Separate<["-"], "explain-module-dependency">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Emit remark describing why compilation may depend on a module with a given name.">;
|
|
|
|
def explain_module_dependency_detailed : Separate<["-"], "explain-module-dependency-detailed">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Emit remarks describing every possible dependency path that explains why compilation may depend on a module with a given name.">;
|
|
|
|
def explicit_auto_linking : Flag<["-"], "explicit-auto-linking">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Instead of linker-load directives, have the driver specify all link dependencies on the linker invocation. Requires '-explicit-module-build'.">;
|
|
|
|
def experimental_emit_variant_module : Flag<["-"], "experimental-emit-variant-module">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"When a target variant triple is specified, the same driver invocation will emit two Swift modules, one for the primary target and one for the variant.">;
|
|
|
|
def min_inlining_target_version : Separate<["-"], "target-min-inlining-version">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
HelpText<"Require inlinable code with no '@available' attribute to back-deploy "
|
|
"to this version of the '-target' OS">;
|
|
|
|
def min_runtime_version : Separate<["-"], "min-runtime-version">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"Specify the minimum runtime version to build force on non-Darwin "
|
|
"systems">;
|
|
|
|
def profile_generate : Flag<["-"], "profile-generate">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Generate instrumented code to collect execution counts">;
|
|
|
|
def debug_info_for_profiling : Flag<["-"], "debug-info-for-profiling">,
|
|
Flags<[FrontendOption, NoInteractiveOption, NewDriverOnlyOption]>,
|
|
HelpText<"Emit extra debug info (DWARF discriminators) to make sampling-based profiling more accurate">;
|
|
|
|
def profile_use : CommaJoined<["-"], "profile-use=">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
|
|
MetaVarName<"<profdata>">,
|
|
HelpText<"Supply a profdata file to enable profile-guided optimization">;
|
|
|
|
def profile_coverage_mapping : Flag<["-"], "profile-coverage-mapping">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Generate coverage data for use with profiled execution counts">;
|
|
|
|
def profile_sample_use : Joined<["-"], "profile-sample-use=">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath, NewDriverOnlyOption]>,
|
|
MetaVarName<"<profile data>">,
|
|
HelpText<"Supply sampling-based profiling data from llvm-profdata to enable profile-guided optimization">;
|
|
|
|
def cs_profile_generate : Flag<["-"], "cs-profile-generate">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
|
|
|
|
def cs_profile_generate_EQ : Joined<["-"], "cs-profile-generate=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
MetaVarName<"<directory>">,
|
|
HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
|
|
|
|
def ir_profile_generate: Flag<["-"], "ir-profile-generate">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
|
|
|
|
def ir_profile_generate_EQ : Joined<["-"], "ir-profile-generate=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
MetaVarName<"<directory>">,
|
|
HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
|
|
|
|
def ir_profile_use : CommaJoined<["-"], "ir-profile-use=">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
|
|
MetaVarName<"<profdata>">,
|
|
HelpText<"Supply an IR-level PGO profdata file to enable profile-guided optimization">;
|
|
|
|
def embed_bitcode : Flag<["-"], "embed-bitcode">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Embed LLVM IR bitcode as data">;
|
|
|
|
def embed_bitcode_marker : Flag<["-"], "embed-bitcode-marker">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Embed placeholder LLVM IR data as a marker">;
|
|
|
|
def enable_testing : Flag<["-"], "enable-testing">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"Allows this module's internal API to be accessed for testing">;
|
|
|
|
def enable_private_imports : Flag<["-"], "enable-private-imports">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"Allows this module's internal and private API to be accessed">;
|
|
|
|
def sanitize_EQ : CommaJoined<["-"], "sanitize=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>, MetaVarName<"<check>">,
|
|
HelpText<"Turn on runtime checks for erroneous behavior.">;
|
|
|
|
def sanitize_recover_EQ
|
|
: CommaJoined<["-"], "sanitize-recover=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
MetaVarName<"<check>">,
|
|
HelpText<"Specify which sanitizer runtime checks (see -sanitize=) will "
|
|
"generate instrumentation that allows error recovery. Listed "
|
|
"checks should be comma separated. Default behavior is to not "
|
|
"allow error recovery.">;
|
|
|
|
def sanitize_address_use_odr_indicator
|
|
: Flag<["-"], "sanitize-address-use-odr-indicator">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden]>,
|
|
HelpText<"When using AddressSanitizer enable ODR indicator globals to "
|
|
"avoid false ODR violation reports in partially sanitized "
|
|
"programs at the cost of an increase in binary size">;
|
|
|
|
def sanitize_coverage_EQ : CommaJoined<["-"], "sanitize-coverage=">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
MetaVarName<"<type>">,
|
|
HelpText<"Specify the type of coverage instrumentation for Sanitizers and"
|
|
" additional options separated by commas">;
|
|
|
|
def sanitize_stable_abi_EQ : Flag<["-"], "sanitize-stable-abi">,
|
|
Flags<[FrontendOption, NoInteractiveOption]>,
|
|
HelpText<"Link against the Sanitizers stable ABI.">;
|
|
|
|
def scan_dependencies : Flag<["-"], "scan-dependencies">,
|
|
HelpText<"Scan dependencies of the given Swift sources">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
|
|
def emit_supported_arguments : Flag<["-"], "emit-supported-arguments">,
|
|
HelpText<"Emit a JSON file including all supported compiler arguments">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def emit_supported_features : Flag<["-"], "emit-supported-features">,
|
|
HelpText<"This is a compatibility alias for '-emit-supported-arguments'">, ModeOpt,
|
|
Flags<[FrontendOption, NoInteractiveOption, DoesNotAffectIncrementalBuild, HelpHidden]>,
|
|
Alias<emit_supported_arguments>;
|
|
|
|
def enable_incremental_imports :
|
|
Flag<["-"], "enable-incremental-imports">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Enable cross-module incremental build metadata and "
|
|
"driver scheduling for Swift modules">;
|
|
|
|
def disable_incremental_imports :
|
|
Flag<["-"], "disable-incremental-imports">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Disable cross-module incremental build metadata and "
|
|
"driver scheduling for Swift modules">;
|
|
|
|
def enable_incremental_file_hashing :
|
|
Flag<["-"], "enable-incremental-file-hashing">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Enable hashing of input and dependency file data "
|
|
"that can prevent unnecessary invalidation">;
|
|
|
|
def disable_incremental_file_hashing :
|
|
Flag<["-"], "disable-incremental-file-hashing">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Disable hashing of input and dependency file data "
|
|
"that can prevent unnecessary invalidation">;
|
|
|
|
def index_file : Flag<["-"], "index-file">,
|
|
HelpText<"Produce index data for a source file">, ModeOpt,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild]>;
|
|
def index_file_path : Separate<["-"], "index-file-path">,
|
|
Flags<[NoInteractiveOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Produce index data for file <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def index_store_path : Separate<["-"], "index-store-path">,
|
|
Flags<[FrontendOption, ArgumentIsPath, CacheInvariant]>, MetaVarName<"<path>">,
|
|
HelpText<"Store indexing data to <path>">;
|
|
|
|
def index_store_compress : Flag<["-"], "index-store-compress">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Compress the unit and record files in the index store">;
|
|
|
|
def index_unit_output_path : Separate<["-"], "index-unit-output-path">,
|
|
Flags<[FrontendOption, ArgumentIsPath, CacheInvariant]>, MetaVarName<"<path>">,
|
|
HelpText<"Use <path> as the output path in the produced index data.">;
|
|
|
|
def index_ignore_clang_modules : Flag<["-"], "index-ignore-clang-modules">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Avoid indexing clang modules (pcms)">;
|
|
|
|
def index_include_locals : Flag<["-"], "index-include-locals">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Include local definitions/references in the produced index data.">;
|
|
|
|
def index_ignore_system_modules : Flag<["-"], "index-ignore-system-modules">,
|
|
Flags<[NoInteractiveOption]>,
|
|
HelpText<"Avoid indexing system modules">;
|
|
|
|
def enforce_exclusivity_EQ : Joined<["-"], "enforce-exclusivity=">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption]>,
|
|
MetaVarName<"<enforcement>">,
|
|
HelpText<"Enforce law of exclusivity">;
|
|
|
|
def working_directory : Separate<["-"], "working-directory">,
|
|
HelpText<"Resolve file paths relative to the specified directory">,
|
|
MetaVarName<"<path>">;
|
|
def working_directory_EQ : Joined<["-"], "working-directory=">,
|
|
Alias<working_directory>;
|
|
|
|
def user_module_version : Separate<["-"], "user-module-version">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
|
|
HelpText<"Module version specified from Swift module authors">,
|
|
MetaVarName<"<vers>">;
|
|
|
|
def allowable_client : Separate<["-"], "allowable-client">,
|
|
Flags<[FrontendOption, ModuleInterfaceOption, NewDriverOnlyOption]>,
|
|
HelpText<"Module names that are allowed to import this module">,
|
|
MetaVarName<"<vers>">;
|
|
// VFS
|
|
|
|
def vfsoverlay : JoinedOrSeparate<["-"], "vfsoverlay">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Add directory to VFS overlay file">;
|
|
def vfsoverlay_EQ : Joined<["-"], "vfsoverlay=">,
|
|
Alias<vfsoverlay>;
|
|
|
|
// Runtime compatibility version
|
|
def runtime_compatibility_version : Separate<["-"], "runtime-compatibility-version">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Link compatibility library for Swift runtime version, or 'none'">;
|
|
|
|
def disable_autolinking_runtime_compatibility : Flag<["-"], "disable-autolinking-runtime-compatibility">,
|
|
Flags<[FrontendOption]>,
|
|
HelpText<"Do not use autolinking for runtime compatibility libraries">;
|
|
|
|
def disable_autolinking_runtime_compatibility_dynamic_replacements
|
|
: Flag<[ "-" ], "disable-autolinking-runtime-compatibility-dynamic-replacements">,
|
|
Flags<[ FrontendOption ]>,
|
|
HelpText<"Do not use autolinking for the dynamic replacement runtime "
|
|
"compatibility library">;
|
|
|
|
def disable_autolinking_runtime_compatibility_concurrency
|
|
: Flag<[ "-" ], "disable-autolinking-runtime-compatibility-concurrency">,
|
|
Flags<[ FrontendOption ]>,
|
|
HelpText<"Do not use autolinking for the concurrency runtime "
|
|
"compatibility library">;
|
|
|
|
def enable_autolinking_runtime_compatibility_bytecode_layouts
|
|
: Flag<[ "-" ], "enable-autolinking-runtime-compatibility-bytecode-layouts">,
|
|
Flags<[ FrontendOption ]>,
|
|
HelpText<"Enable autolinking for the bytecode layouts runtime "
|
|
"compatibility library">;
|
|
|
|
def emit_symbol_graph: Flag<["-"], "emit-symbol-graph">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Emit a symbol graph">;
|
|
|
|
def emit_symbol_graph_dir : Separate<["-"], "emit-symbol-graph-dir">,
|
|
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
|
|
SupplementaryOutput, HelpHidden, CacheInvariant]>,
|
|
HelpText<"Emit a symbol graph to directory <dir>">,
|
|
MetaVarName<"<dir>">;
|
|
|
|
def symbol_graph_pretty_print: Flag<["-"], "symbol-graph-pretty-print">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden, SupplementaryOutput]>,
|
|
HelpText<"Pretty-print the output symbol graph JSON">;
|
|
|
|
def symbol_graph_skip_inherited_docs: Flag<["-"], "symbol-graph-skip-inherited-docs">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden, SupplementaryOutput]>,
|
|
HelpText<"Skip emitting doc comments for members inherited through classes or "
|
|
"default implementations">;
|
|
|
|
def symbol_graph_skip_synthesized_members: Flag<["-"], "symbol-graph-skip-synthesized-members">,
|
|
Flags<[FrontendOption, NoInteractiveOption, HelpHidden, SupplementaryOutput]>,
|
|
HelpText<"Skip members inherited through classes or default implementations">;
|
|
|
|
def symbol_graph_minimum_access_level: Separate<["-"], "symbol-graph-minimum-access-level">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Include symbols with this access level or more when emitting a symbol graph">,
|
|
MetaVarName<"<level>">;
|
|
|
|
def symbol_graph_allow_availability_platforms: Separate<["-"], "symbol-graph-allow-availability-platforms">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Restrict availability metadata to the given platforms, e.g. 'macOS,Swift'">,
|
|
MetaVarName<"<platforms>">;
|
|
|
|
def symbol_graph_block_availability_platforms: Separate<["-"], "symbol-graph-block-availability-platforms">,
|
|
Flags<[FrontendOption, NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Remove the given platforms from symbol graph availability metadata, e.g. 'macOS,Swift'">,
|
|
MetaVarName<"<platforms>">;
|
|
|
|
def pretty_print: Flag<["-"], "pretty-print">,
|
|
Flags<[SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Pretty-print the output JSON">;
|
|
|
|
def emit_extension_block_symbols: Flag<["-"], "emit-extension-block-symbols">,
|
|
Flags<[SwiftSymbolGraphExtractOption, FrontendOption,
|
|
NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Emit 'swift.extension' symbols for extensions to external types instead of directly associating members and conformances with the extended nominal when generating symbol graphs">;
|
|
|
|
def omit_extension_block_symbols: Flag<["-"], "omit-extension-block-symbols">,
|
|
Flags<[SwiftSymbolGraphExtractOption, FrontendOption,
|
|
NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Directly associate members and conformances with the extended nominal when generating symbol graphs instead of emitting 'swift.extension' symbols for extensions to external types">;
|
|
|
|
def allow_availability_platforms: Separate<["-"], "allow-availability-platforms">,
|
|
Flags<[SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Restrict availability metadata to the given platforms, e.g. 'macOS,Swift'">,
|
|
MetaVarName<"<platforms>">;
|
|
|
|
def block_availability_platforms: Separate<["-"], "block-availability-platforms">,
|
|
Flags<[SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Remove the given platforms from symbol graph availability metadata, e.g. 'macOS,Swift'">,
|
|
MetaVarName<"<platforms>">;
|
|
|
|
// swift-synthesize-interface-only options
|
|
def include_submodules : Flag<["-"], "include-submodules">,
|
|
Flags<[NoDriverOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Also print the declarations synthesized for any Clang submodules">;
|
|
|
|
def print_fully_qualified_types : Flag<["-"], "print-fully-qualified-types">,
|
|
Flags<[NoDriverOption, SwiftSynthesizeInterfaceOption]>,
|
|
HelpText<"Always print fully qualified type names">;
|
|
|
|
// swift-symbolgraph-extract-only options
|
|
def output_dir : Separate<["-"], "output-dir">,
|
|
Flags<[NoDriverOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption,
|
|
ArgumentIsPath]>,
|
|
HelpText<"Output directory">,
|
|
MetaVarName<"<dir>">;
|
|
|
|
def experimental_allowed_reexported_modules: CommaJoined<["-"], "experimental-allowed-reexported-modules=">,
|
|
Flags<[NoDriverOption, SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Allow reexporting symbols from the provided modules if they are themselves exported from the main module. This is a comma separated list of module names.">;
|
|
|
|
def skip_synthesized_members: Flag<[ "-" ], "skip-synthesized-members">,
|
|
Flags<[NoDriverOption, SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Skip members inherited through classes or default implementations">;
|
|
|
|
def minimum_access_level : Separate<["-"], "minimum-access-level">,
|
|
Flags<[NoDriverOption, SwiftSymbolGraphExtractOption]>,
|
|
HelpText<"Include symbols with this access level or more">,
|
|
MetaVarName<"<level>">;
|
|
|
|
def skip_inherited_docs : Flag<["-"], "skip-inherited-docs">,
|
|
Flags<[SwiftSymbolGraphExtractOption, FrontendOption,
|
|
NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Skip emitting doc comments for members inherited through classes or "
|
|
"default implementations">;
|
|
|
|
def include_spi_symbols : Flag<["-"], "include-spi-symbols">,
|
|
Flags<[SwiftSymbolGraphExtractOption, FrontendOption,
|
|
NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Add symbols with SPI information to the symbol graph">;
|
|
|
|
def skip_protocol_implementations : Flag<["-"], "skip-protocol-implementations">,
|
|
Flags<[SwiftSymbolGraphExtractOption, FrontendOption,
|
|
NoInteractiveOption, SupplementaryOutput, HelpHidden]>,
|
|
HelpText<"Skip emitting symbols that are implementations of protocol requirements or inherited from protocol extensions">;
|
|
|
|
// swift-api-digester-only options
|
|
def dump_sdk: Flag<["-", "--"], "dump-sdk">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Dump SDK content to JSON file">;
|
|
|
|
def generate_migration_script: Flag<["-", "--"], "generate-migration-script">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Compare SDK content in JSON file and generate migration script">;
|
|
|
|
def diagnose_sdk: Flag<["-", "--"], "diagnose-sdk">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Diagnose SDK content in JSON file">;
|
|
|
|
def deserialize_diff: Flag<["-", "--"], "deserialize-diff">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Deserialize diff items in a JSON file">;
|
|
|
|
def deserialize_sdk: Flag<["-", "--"], "deserialize-sdk">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Deserialize sdk digester in a JSON file">;
|
|
|
|
def find_usr: Flag<["-", "--"], "find-usr">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Find USR for decls by given condition">;
|
|
|
|
def generate_name_correction: Flag<["-", "--"], "generate-name-correction">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Generate name correction template">;
|
|
|
|
def generate_empty_baseline: Flag<["-", "--"], "generate-empty-baseline">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Generate an empty baseline">;
|
|
|
|
def empty_baseline: Flag<["-", "--"], "empty-baseline">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Use empty baseline for diagnostics">;
|
|
|
|
def ignored_usrs: Separate<["-", "--"], "ignored-usrs">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"the file containing USRs of removed decls that the digester should ignore">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def ignore_spi_groups : Separate<["-", "--"], "ignore-spi-group">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"SPI group name to not diagnose about">;
|
|
|
|
def protocol_requirement_allow_list: Separate<["-", "--"], "protocol-requirement-allow-list">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"File containing a new-line separated list of protocol names">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def input_paths: Separate<["-", "--"], "input-paths">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"The SDK contents under comparison">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def compiler_style_diags: Flag<["-", "--"], "compiler-style-diags">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Print compiler style diagnostics to stderr.">;
|
|
|
|
def error_on_abi_breakage: Flag<["-", "--"], "error-on-abi-breakage">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Always treat ABI checker issues as errors">;
|
|
|
|
def json: Flag<["-", "--"], "json">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Print output in JSON format.">;
|
|
|
|
def avoid_location: Flag<["-", "--"], "avoid-location">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Avoid serializing the file paths of SDK nodes.">;
|
|
|
|
def location: Separate<["-", "--"], "location">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Filter nodes with the given location.">,
|
|
MetaVarName<"<location>">;
|
|
|
|
def avoid_tool_args: Flag<["-", "--"], "avoid-tool-args">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Avoid serializing the arguments for invoking the tool.">;
|
|
|
|
def abi: Flag<["-", "--"], "abi">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Dumping ABI interface">;
|
|
|
|
def swift_only: Flag<["-", "--"], "swift-only">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Only include APIs defined from Swift source">;
|
|
|
|
def disable_os_checks: Flag<["-", "--"], "disable-os-checks">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Skip OS related diagnostics">;
|
|
|
|
def disable_remove_deprecated_check: Flag<["-", "--"], "disable-remove-deprecated-check">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Skip diagnosing removal of deprecated symbols">;
|
|
|
|
def enable_remove_deprecated_check: Flag<["-", "--"], "enable-remove-deprecated-check">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Diagnosing removal of deprecated symbols">;
|
|
|
|
def print_module: Flag<["-", "--"], "print-module">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Print module names in diagnostics">;
|
|
|
|
def migrator: Flag<["-", "--"], "migrator">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Dump Json suitable for generating migration script">;
|
|
|
|
def abort_on_module_fail: Flag<["-", "--"], "abort-on-module-fail">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Abort if a module failed to load">;
|
|
|
|
def disable_fail_on_error: Flag<["-", "--"], "disable-fail-on-error">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Don't exit with a nonzero status if errors are emitted">;
|
|
|
|
def debug_mapping: Flag<["-", "--"], "debug-mapping">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Dumping information for debug purposes">;
|
|
|
|
def BF : JoinedOrSeparate<["-"], "BF">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"add a directory to the baseline framework search path">;
|
|
def BF_EQ : Joined<["-"], "BF=">, Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
Alias<BF>;
|
|
|
|
def BI : JoinedOrSeparate<["-"], "BI">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"add a module for baseline input">;
|
|
def BI_EQ : Joined<["-"], "BI=">, Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
Alias<BI>;
|
|
|
|
def iframework : JoinedOrSeparate<["-"], "iframework">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"add a directory to the clang importer system framework search path">;
|
|
|
|
def baseline_path : JoinedOrSeparate<["-"], "baseline-path">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"The path to the Json file that we should use as the baseline">;
|
|
|
|
def baseline_dir : JoinedOrSeparate<["-"], "baseline-dir">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"The path to a directory containing baseline files: macos.json, iphoneos.json, appletvos.json, watchos.json, and iosmac.json">;
|
|
|
|
def breakage_allowlist_path : JoinedOrSeparate<["-"], "breakage-allowlist-path">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"An allowlist of breakages to not complain about">;
|
|
|
|
def bsdk : JoinedOrSeparate<["-"], "bsdk">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"path to the baseline SDK to import frameworks">;
|
|
|
|
def module_list_file : JoinedOrSeparate<["-"], "module-list-file">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption, ArgumentIsPath]>,
|
|
HelpText<"File containing a new-line separated list of modules">;
|
|
|
|
def module: Separate<["-", "--"], "module">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Names of modules">,
|
|
MetaVarName<"<name>">;
|
|
|
|
def use_interface_for_module: Separate<["-", "--"], "use-interface-for-module">,
|
|
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Prefer loading these modules via interface">,
|
|
MetaVarName<"<name>">;
|
|
|
|
def load_pass_plugin_EQ : Joined<["-"], "load-pass-plugin=">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Load LLVM pass plugin from a dynamic shared object file.">,
|
|
MetaVarName<"<path>">;
|
|
|
|
// ONLY SUPPORTED IN NEW DRIVER
|
|
|
|
// These flags only exist here so that the old driver doesn't fail with unknown
|
|
// arguments when they're given. The option definitions (and ie. their flags)
|
|
// matter since they are synced to the new swift-driver. The options themselves
|
|
// are completely unimplemented in the old driver, however.
|
|
|
|
def driver_print_graphviz:
|
|
Flag<["-"], "driver-print-graphviz">,
|
|
Flags<[HelpHidden, DoesNotAffectIncrementalBuild, NewDriverOnlyOption]>,
|
|
HelpText<"Write the job graph as a graphviz file">;
|
|
|
|
def driver_explicit_module_build:
|
|
Flag<["-"], "explicit-module-build">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Prebuild module dependencies to make them explicit">;
|
|
|
|
def incremental_dependency_scan:
|
|
Flag<["-"], "incremental-dependency-scan">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Re-use/validate prior build dependency scan artifacts">;
|
|
|
|
def driver_experimental_explicit_module_build:
|
|
Flag<["-"], "experimental-explicit-module-build">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
Alias<driver_explicit_module_build>,
|
|
HelpText<"Prebuild module dependencies to make them explicit">;
|
|
|
|
def driver_scan_dependencies_non_lib:
|
|
Flag<["-"], "nonlib-dependency-scanner">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Use calls to `swift-frontend -scan-dependencies` instead of "
|
|
"dedicated dependency scanning library">;
|
|
|
|
def always_rebuild_module_dependencies:
|
|
Flag<["-"], "always-rebuild-module-dependencies">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Always rebuild module dependencies">;
|
|
|
|
def driver_warn_unused_options:
|
|
Flag<["-"], "driver-warn-unused-options">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Emit warnings for any provided options which are unused by the "
|
|
"driver">;
|
|
|
|
def emit_module_separately:
|
|
Flag<["-"], "experimental-emit-module-separately">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Emit module files as a distinct job">;
|
|
|
|
def no_emit_module_separately:
|
|
Flag<["-"], "no-emit-module-separately">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Force using merge-module as the incremental build mode">;
|
|
|
|
def emit_module_separately_WMO:
|
|
Flag<["-"], "emit-module-separately-wmo">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Emit module files as a distinct job in wmo builds">;
|
|
|
|
def no_emit_module_separately_WMO:
|
|
Flag<["-"], "no-emit-module-separately-wmo">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Force emitting the swiftmodule in the same job in wmo builds">;
|
|
|
|
def emit_module_serialize_diagnostics_path:
|
|
Separate<["-"], "emit-module-serialize-diagnostics-path">,
|
|
Flags<[ArgumentIsPath, SupplementaryOutput, NewDriverOnlyOption]>,
|
|
HelpText<"Emit a serialized diagnostics file for the emit-module task to "
|
|
"<path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def dependency_scan_serialize_diagnostics_path:
|
|
Separate<["-"], "dependency-scan-serialize-diagnostics-path">,
|
|
Flags<[ArgumentIsPath, SupplementaryOutput, NewDriverOnlyOption]>,
|
|
HelpText<"Emit a serialized diagnostics file for the dependency scanning task to "
|
|
"<path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def emit_module_dependencies_path:
|
|
Separate<["-"], "emit-module-dependencies-path">,
|
|
Flags<[ArgumentIsPath, SupplementaryOutput, NewDriverOnlyOption]>,
|
|
HelpText<"Emit a discovered dependencies file for the emit-module task to "
|
|
"<path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def use_frontend_parseable_output:
|
|
Flag<["-"], "use-frontend-parseable-output">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Emit parseable-output from swift-frontend jobs instead of from "
|
|
"the driver">;
|
|
|
|
def print_explicit_dependency_graph:
|
|
Flag<["-"], "print-explicit-dependency-graph">,
|
|
Flags<[DoesNotAffectIncrementalBuild, HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Print the result of module dependency scanning after external "
|
|
"module resolution to output">;
|
|
|
|
def explicit_dependency_graph_format:
|
|
Joined<["-"], "explicit-dependency-graph-format=">,
|
|
Flags<[DoesNotAffectIncrementalBuild, HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Specify the explicit dependency graph output format to either 'json' or 'dot'">;
|
|
|
|
def print_preprocessed_explicit_dependency_graph:
|
|
Flag<["-"], "print-preprocessed-explicit-dependency-graph">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption]>,
|
|
HelpText<"Print the result of module dependency scanning to output">;
|
|
|
|
def emit_digester_baseline:
|
|
Flag<["-"], "emit-digester-baseline">,
|
|
Flags<[NoInteractiveOption, SupplementaryOutput, NewDriverOnlyOption]>,
|
|
HelpText<"Emit a baseline file for the module using the API digester">;
|
|
|
|
def emit_digester_baseline_path:
|
|
Separate<["-"], "emit-digester-baseline-path">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath, SupplementaryOutput,
|
|
NewDriverOnlyOption]>,
|
|
HelpText<"Emit a baseline file for the module to <path> using the API "
|
|
"digester">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def compare_to_baseline_path:
|
|
Separate<["-"], "compare-to-baseline-path">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath, NewDriverOnlyOption]>,
|
|
HelpText<"Compare the built module to the baseline at <path> and diagnose "
|
|
"breaking changes using the API digester">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def serialize_breaking_changes_path:
|
|
Separate<["-"], "serialize-breaking-changes-path">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath, NewDriverOnlyOption]>,
|
|
HelpText<"Serialize breaking changes found by the API digester to <path>">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def digester_breakage_allowlist_path:
|
|
Separate<["-"], "digester-breakage-allowlist-path">,
|
|
Flags<[NoInteractiveOption, ArgumentIsPath, NewDriverOnlyOption]>,
|
|
HelpText<"The path to a list of permitted breaking changes the API digester "
|
|
"should ignore">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def digester_mode:
|
|
Separate<["-"], "digester-mode">,
|
|
Flags<[NoInteractiveOption, NewDriverOnlyOption]>,
|
|
HelpText<"Whether the API digester should run in API or ABI mode (defaults "
|
|
"to API checking)">,
|
|
MetaVarName<"<api|abi>">;
|
|
|
|
def nostartfiles:
|
|
Flag<["-"], "nostartfiles">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, NoInteractiveOption,
|
|
HelpHidden]>,
|
|
HelpText<"Do not link in the Swift language startup routines">;
|
|
|
|
def gcc_toolchain: Separate<["-"], "gcc-toolchain">,
|
|
Flags<[HelpHidden, NewDriverOnlyOption, ArgumentIsPath]>,
|
|
MetaVarName<"<path>">,
|
|
HelpText<"Specify a directory where the clang importer and clang linker can find headers and libraries">;
|
|
|
|
def experimental_clang_importer_direct_cc1_scan:
|
|
Flag<["-"], "experimental-clang-importer-direct-cc1-scan">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, HelpHidden]>,
|
|
HelpText<"Enables swift driver to construct swift-frontend invocations using -direct-clang-cc1-module-build">;
|
|
|
|
def cache_compile_job: Flag<["-"], "cache-compile-job">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption]>,
|
|
HelpText<"Enable compiler caching">;
|
|
|
|
def cache_remarks: Flag<["-"], "Rcache-compile-job">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Show remarks for compiler caching">;
|
|
|
|
def cache_disable_replay: Flag<["-"], "cache-disable-replay">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Skip loading the compilation result from cache">;
|
|
|
|
def cas_path: Separate<["-"], "cas-path">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Path to CAS">, MetaVarName<"<path>">;
|
|
|
|
def cas_plugin_path: Separate<["-"], "cas-plugin-path">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Path to CAS Plugin">, MetaVarName<"<path>">;
|
|
|
|
def cas_plugin_option: Separate<["-"], "cas-plugin-option">,
|
|
Flags<[FrontendOption, NewDriverOnlyOption, CacheInvariant]>,
|
|
HelpText<"Option pass to CAS Plugin">, MetaVarName<"<name>=<option>">;
|
|
|
|
def clang_scanner_module_cache_path : Separate<["-"], "clang-scanner-module-cache-path">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Specifies the Clang dependency scanner module cache path">;
|
|
|
|
def sdk_module_cache_path : Separate<["-"], "sdk-module-cache-path">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Specifies the module cache path for explicitly-built SDK modules">;
|
|
|
|
def scanner_prefix_map_paths : MultiArg<["-"], "scanner-prefix-map-paths", 2>,
|
|
Flags<[FrontendOption, NewDriverOnlyOption]>,
|
|
HelpText<"Remap paths reported by dependency scanner">, MetaVarName<"<prefix> <replacement>">;
|
|
|
|
def scanner_prefix_map : Separate<["-"], "scanner-prefix-map">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Remap paths reported by dependency scanner">, MetaVarName<"<prefix=replacement>">;
|
|
|
|
def scanner_prefix_map_sdk : Separate<["-"], "scanner-prefix-map-sdk">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Remap paths within SDK reported by dependency scanner">, MetaVarName<"<path>">;
|
|
|
|
def scanner_prefix_map_toolchain : Separate<["-"], "scanner-prefix-map-toolchain">,
|
|
Flags<[NewDriverOnlyOption]>,
|
|
HelpText<"Remap paths within toolchain directory reported by dependency scanner">, MetaVarName<"<path>">;
|
|
|
|
def cache_replay_prefix_map: MultiArg<["-"], "cache-replay-prefix-map", 2>,
|
|
Flags<[FrontendOption, NoDriverOption, CacheInvariant]>,
|
|
HelpText<"Remap paths when replaying outputs from cache">, MetaVarName<"<prefix> <replacement>">;
|
|
|
|
// END ONLY SUPPORTED IN NEW DRIVER
|
|
|
|
|
|
def plugin_search_Group : OptionGroup<"<plugin search options>">;
|
|
|
|
def plugin_path : Separate<["-"], "plugin-path">, Group<plugin_search_Group>,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Add directory to the plugin search path">;
|
|
|
|
def external_plugin_path : Separate<["-"], "external-plugin-path">, Group<plugin_search_Group>,
|
|
Flags<[FrontendOption, ArgumentIsPath, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
|
|
HelpText<"Add directory to the plugin search path with a plugin server executable">,
|
|
MetaVarName<"<path>#<plugin-server-path>">;
|
|
|
|
def cas_backend: Flag<["-"], "cas-backend">,
|
|
Flags<[FrontendOption, NoDriverOption]>,
|
|
HelpText<"Enable using CASBackend for object file output">;
|
|
|
|
def debug_callsite_info: Flag<["-"], "debug-callsite-info">,
|
|
Flags<[FrontendOption, NoDriverOption]>,
|
|
HelpText<"Generate callsite information in debug info">;
|
|
|
|
def cas_backend_mode: Joined<["-"], "cas-backend-mode=">,
|
|
Flags<[FrontendOption, NoDriverOption]>,
|
|
HelpText<"CASBackendMode for output kind">,
|
|
MetaVarName<"native|casid|verify">;
|
|
|
|
def cas_emit_casid_file: Flag<["-"], "cas-emit-casid-file">,
|
|
Flags<[FrontendOption, NoDriverOption]>,
|
|
HelpText<"Emit .casid file next to object file when CAS Backend is enabled">;
|
|
|
|
def load_plugin_library:
|
|
Separate<["-"], "load-plugin-library">, Group<plugin_search_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Path to a dynamic library containing compiler plugins such as "
|
|
"macros">,
|
|
MetaVarName<"<path>">;
|
|
|
|
def load_plugin_executable:
|
|
Separate<["-"], "load-plugin-executable">, Group<plugin_search_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Path to a compiler plugin executable and a comma-separated list "
|
|
"of module names where the macro types are declared">,
|
|
MetaVarName<"<path>#<module-names>">;
|
|
|
|
def load_resolved_plugin:
|
|
Separate<["-"], "load-resolved-plugin">, Group<plugin_search_Group>,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>,
|
|
HelpText<"Path to resolved plugin configuration and a comma-separated list "
|
|
"of module names where the macro types are declared. Library path "
|
|
"and executable path can be empty if not used">,
|
|
MetaVarName<"<library-path>#<executable-path>#<module-names>">;
|
|
|
|
def resolved_plugin_verification : Flag<["-"], "resolved-plugin-verification">,
|
|
Flags<[FrontendOption, NoDriverOption]>,
|
|
HelpText<"verify resolved plugins">;
|
|
|
|
def in_process_plugin_server_path : Separate<["-"], "in-process-plugin-server-path">,
|
|
Flags<[FrontendOption, ArgumentIsPath]>,
|
|
HelpText<"Path to dynamic library plugin server">;
|
|
|
|
def disable_sandbox:
|
|
Flag<["-"], "disable-sandbox">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
|
|
HelpText<"Disable using the sandbox when executing subprocesses">;
|
|
|
|
def enable_deterministic_check :
|
|
Flag<["-"], "enable-deterministic-check">,
|
|
Flags<[FrontendOption, DoesNotAffectIncrementalBuild, CacheInvariant]>,
|
|
HelpText<"Check compiler output determinism by running it twice">;
|
|
|
|
include "FrontendOptions.td"
|