OS Manuals

/usr/bin/swift-frontend

Swift is a high-performance system programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory-safe by default.

From swift-bootstrap-5-10-1 5.10.1-r7 (enterprise-packages), captured 2026-11-08 by running swift-frontend --help (exit 0). permalink

OVERVIEW: Swift frontend

USAGE: swift-frontend -frontend

MODES:
  -dump-ast              Parse and type-check input file(s) and dump AST(s)
  -dump-parse            Parse input file(s) and dump AST(s)
  -dump-pcm              Dump debugging information about a precompiled Clang module
  -dump-scope-maps <expanded-or-list-of-line:column>
                         Parse and type-check input file(s) and dump the scope map(s)
  -dump-type-info        Output YAML dump of fixed-size types from all imported modules
  -dump-type-refinement-contexts
                         Type-check input file(s) and dump type refinement contexts(s)
  -emit-assembly         Emit assembly file(s) (-S)
  -emit-bc               Emit LLVM BC file(s)
  -emit-imported-modules Emit a list of the imported modules
  -emit-irgen            Emit LLVM IR file(s) before LLVM optimizations
  -emit-ir               Emit LLVM IR file(s) after LLVM optimizations
  -emit-object           Emit object file(s) (-c)
  -emit-pcm              Emit a precompiled Clang module from a module map
  -emit-sibgen           Emit serialized AST + raw SIL file(s)
  -emit-sib              Emit serialized AST + canonical SIL file(s)
  -emit-silgen           Emit raw SIL file(s)
  -emit-sil              Emit canonical SIL file(s)
  -emit-supported-features
                         Emit a JSON file including all supported compiler features
  -merge-modules         Merge the input modules without otherwise processing them
  -parse                 Parse input file(s)
  -print-ast-decl        Parse and type-check input file(s) and pretty print declarations from AST(s)
  -print-ast             Parse and type-check input file(s) and pretty print AST(s)
  -resolve-imports       Parse and resolve imports in input file(s)
  -scan-dependencies     Scan dependencies of the given Swift sources
  -typecheck             Parse and type-check input file(s)

OPTIONS:
  -access-notes-path <value>
                          Specify YAML file to override attributes on Swift declarations in this module
  -allowable-client <vers>
                          Module names that are allowed to import this module
  -api-diff-data-dir <path>
                          Load platform and version specific API migration data files from <path>. Ignored if -api-diff-data-file is specified.
  -api-diff-data-file <path>
                          API migration data is from <path>
  -application-extension-library
                          Restrict code to those available for App Extension Libraries
  -application-extension  Restrict code to those available for App Extensions
  -assert-config <value>  Specify the assert_configuration replacement. Possible values are Debug, Release, Unchecked, DisableReplacement.
  -autolink-library <value>
                          Add dependent library
  -backup-module-interface-path <value>
                          Directory of module interfaces as backups to those from SDKs
  -batch-scan-input-file <path>
                          Specify a JSON file containing modules to perform batch dependencies scanning
  -blocklist-file <path>  The path to a blocklist configuration file
  -cache-compile-job      Enable compiler caching
  -cache-disable-replay   Skip loading the compilation result from cache
  -cas-path <path>        Path to CAS
  -cas-plugin-option <name>=<option>
                          Option pass to CAS Plugin
  -cas-plugin-path <path> Path to CAS Plugin
  -clang-build-session-file <value>
                          Use the last modification time of <file> as the underlying Clang build session timestamp
  -clang-scanner-module-cache-path <value>
                          Specifies the Clang dependency scanner module cache path
  -clang-target <value>   Separately set the target we should use for internal Clang instance
  -color-diagnostics      Print diagnostics in color
  -const-gather-protocols-file <path>
                          Specify a list of protocols for extraction of conformances' const values'
  -continue-building-after-errors
                          Continue building, even after errors are encountered
  -coverage-prefix-map <prefix=replacement>
                          Remap source paths in coverage info
  -crosscheck-unqualified-lookup
                          Compare legacy DeclContext- to ASTScope-based unqualified name lookup (for debugging)
  -cxx-interoperability-mode=<value>
                          Enables C++ interoperability; pass 'default' to enable or 'off' to disable
  -debug-info-format=<value>
                          Specify the debug info format type to either 'dwarf' or 'codeview'
  -debug-info-store-invocation
                          Emit the compiler invocation in the debug info.
  -debug-prefix-map <prefix=replacement>
                          Remap source paths in debug info
  -define-availability <macro>
                          Define an availability macro in the format 'macroName : iOS 13.0, macOS 10.15'
  -dependency-scan-cache-path <value>
                          The path to output the dependency scanner's internal state.
  -diagnostic-documentation-path <path>
                          Path to diagnostic documentation resources
  -diagnostic-style <style>
                          The formatting style used when printing diagnostics ('swift' or 'llvm')
  -disable-actor-data-race-checks
                          Disable runtime checks for actor data races
  -disable-autolinking-runtime-compatibility-concurrency
                          Do not use autolinking for the concurrency runtime compatibility library
  -disable-autolinking-runtime-compatibility-dynamic-replacements
                          Do not use autolinking for the dynamic replacement runtime compatibility library
  -disable-autolinking-runtime-compatibility
                          Do not use autolinking for runtime compatibility libraries
  -disable-clang-spi      Don't import Clang SPIs as Swift SPIs
  -disable-cross-import-overlays
                          Do not automatically import declared cross-import overlays.
  -disable-implicit-swift-modules
                          Disable building Swift modules implicitly by the compiler
  -disable-incremental-imports
                          Disable cross-module incremental build metadata and driver scheduling for Swift modules
  -disable-infer-public-sendable
                          Disable inference of Sendable conformances for public structs and enums
  -disable-migrator-fixits
                          Disable the Migrator phase which automatically applies fix-its
  -disable-sandbox        Disable using the sandbox when executing subprocesses
  -disable-target-os-checking
                          Disable checking the target OS of serialized modules
  -disable-testable-attr-requires-testable-module
                          Disable checking of @testable
  -disable-typo-correction
                          Disable typo correction
  -dump-api-path <value>  The path to output swift interface files for the compiled source files
  -dump-migration-states-dir <path>
                          Dump the input text, output text, and states for migration to <path>
  -dump-usr               Dump USR for each declaration reference
  -D <value>              Marks a conditional compilation flag as true
  -embed-bitcode-marker   Embed placeholder LLVM IR data as a marker
  -embed-bitcode          Embed LLVM IR bitcode as data
  -embed-tbd-for-module <value>
                          Embed symbols from the module in the emitted tbd file
  -emit-abi-descriptor-path <path>
                          Output the ABI descriptor of current module to <path>
  -emit-clang-header-nonmodular-includes
                          Augment emitted Objective-C header with textual imports for every included modular import
  -emit-clang-header-path <value>
                          Emit an Objective-C and C++ header file to <path>
  -emit-const-values-path <path>
                          Emit the extracted compile-time known values to <path>
  -emit-dependencies-path <path>
                          Output basic Make-compatible dependencies file to <path>
  -emit-dependencies      Emit basic Make-compatible dependencies files
  -emit-fixits-path <path>
                          Output compiler fixits as source edits to <path>
  -emit-loaded-module-trace-path <path>
                          Emit the loaded module trace JSON to <path>
  -emit-loaded-module-trace
                          Emit a JSON file containing information about what modules were loaded
  -emit-migrated-file-path <path>
                          Emit the migrated source file to <path>
  -emit-module-doc-path <path>
                          Output module documentation file <path>
  -emit-module-doc        Emit a module documentation file based on documentation comments
  -emit-module-interface-path <path>
                          Output module interface file to <path>
  -emit-module-path <path>
                          Emit an importable module to <path>
  -emit-module-semantic-info-path <path>
                          Output semantic info of current module to <path>
  -emit-module-source-info-path <path>
                          Output module source info file to <path>
  -emit-module-source-info
                          Output module source info file
  -emit-module-summary-path <path>
                          Output module summary file to <path>
  -emit-module            Emit an importable module
  -emit-objc-header-path <path>
                          Emit an Objective-C header file to <path>
  -emit-objc-header       Emit an Objective-C header file
  -emit-reference-dependencies-path <path>
                          Output Swift-style dependencies file to <path>
  -emit-reference-dependencies
                          Emit a Swift-style dependencies file
  -emit-remap-file-path <path>
                          Emit the replacement map describing Swift Migrator changes to <path>
  -emit-tbd-path <path>   Emit the TBD file to <path>
  -emit-tbd               Emit a TBD file
  -empty-abi-descriptor   Avoid printing actual module content into ABI descriptor file
  -enable-actor-data-race-checks
                          Emit runtime checks for actor data races
  -enable-autolinking-runtime-compatibility-bytecode-layouts
                          Enable autolinking for the bytecode layouts runtime compatibility library
  -enable-bare-slash-regex
                          Enable the use of forward slash regular-expression literal syntax
  -enable-builtin-module  Enables the explicit import of the Builtin module
  -enable-copy-propagation=true|requested-passes-only|false
                          Whether to enable copy propagation
  -enable-copy-propagation
                          Run SIL copy propagation with lexical lifetimes to shorten object lifetimes while preserving variable lifetimes.
  -enable-cross-import-overlays
                          Automatically import declared cross-import overlays.
  -enable-experimental-additive-arithmetic-derivation
                          Enable experimental 'AdditiveArithmetic' derived conformances
  -enable-experimental-concise-pound-file
                          Enable experimental concise '#file' identifier
  -enable-experimental-feature <value>
                          Enable an experimental feature
  -enable-experimental-forward-mode-differentiation
                          Enable experimental forward mode differentiation
  -enable-incremental-imports
                          Enable cross-module incremental build metadata and driver scheduling for Swift modules
  -enable-infer-public-sendable
                          Enable inference of Sendable conformances for public structs and enums
  -enable-library-evolution
                          Build the module to allow binary-compatible library evolution
  -enable-target-os-checking
                          Enable checking the target OS of serialized modules
  -enable-testable-attr-requires-testable-module
                          Enable checking of @testable
  -enable-upcoming-feature <value>
                          Enable a feature that will be introduced in an upcoming language version
  -enforce-exclusivity=<enforcement>
                          Enforce law of exclusivity
  -experimental-serialize-external-decls-only
                          Only serialize decls that should be exposed to clients
  -explicit-swift-module-map-file <path>
                          Specify a JSON file containing information of explicit Swift modules
  -export-as <value>      Module name to use when referenced in clients module interfaces
  -external-plugin-path <path>#<plugin-server-path>
                          Add directory to the plugin search path with a plugin server executable
  -file-compilation-dir <path>
                          The compilation directory to embed in the debug info. Coverage mapping is not supported yet.
  -file-prefix-map <prefix=replacement>
                          Remap source paths in debug, coverage, and index info
  -filelist <value>       Specify source inputs in a file rather than on the command line
  -fixit-all              Apply all fixits from diagnostics without any filtering
  -framework <value>      Specifies a framework which should be linked against
  -frontend-parseable-output
                          Emit textual output in a parseable format
  -Fsystem <value>        Add directory to system framework search path
  -F <value>              Add directory to framework search path
  -gdwarf-types           Emit full DWARF type info.
  -gline-tables-only      Emit minimal debug info for backtraces only
  -gnone                  Don't emit debug info
  -group-info-path <value>
                          The path to collect the group information of the compiled module
  -g                      Emit debug info. This is the preferred setting for debugging with LLDB.
  -help                   Display available options
  -ignore-module-source-info
                          Avoid getting source location from .swiftsourceinfo files
  -import-prescan         When performing a dependency scan, only identify all imports of the main Swift module sources
  -import-underlying-module
                          Implicitly imports the Objective-C half of a module
  -index-ignore-clang-modules
                          Avoid indexing clang modules (pcms)
  -index-include-locals   Include local definitions/references in the produced index data.
  -index-store-path <path>
                          Store indexing data to <path>
  -index-unit-output-path-filelist <value>
                          Specify index unit output paths in a file rather than on the command line
  -index-unit-output-path <path>
                          Use <path> as the output path in the produced index data.
  -I <value>              Add directory to the import search path
  -load-dependency-scan-cache
                          After performing a dependency scan, serialize the scanner's internal state.
  -load-plugin-executable <path>#<module-names>
                          Path to a compiler plugin executable and a comma-separated list of module names where the macro types are declared
  -load-plugin-library <path>
                          Path to a dynamic library containing compiler plugins such as macros
  -locale <locale-code>   Choose a language for diagnostic messages
  -localization-path <path>
                          Path to localized diagnostic messages directory
  -lto-library <lto-library>
                          Perform LTO with <lto-library>
  -lto=<value>            Specify the LTO type to either 'llvm-thin' or 'llvm-full'
  -L <value>              Add directory to library link search path
  -l <value>              Specifies a library which should be linked against
  -migrate-keep-objc-visibility
                          When migrating, add '@objc' to declarations that would've been implicitly visible in Swift 3
  -migrator-update-sdk    Does nothing. Temporary compatibility flag for Xcode.
  -migrator-update-swift  Does nothing. Temporary compatibility flag for Xcode.
  -module-abi-name <value>
                          ABI name to use for the contents of this module
  -module-alias <alias_name=real_name>
                          If a source file imports or references module <alias_name>, the <real_name> is used for the contents of the file
  -module-cache-path <value>
                          Specifies the module cache path
  -module-link-name <value>
                          Library to link against when using this module
  -module-name <value>    Name of the module to build
  -no-color-diagnostics   Do not print diagnostics in color
  -no-serialize-debugging-options
                          Never serialize options for debugging (default: only for apps)
  -no-warnings-as-errors  Don't treat warnings as errors
  -no-whole-module-optimization
                          Disable optimizing input files together instead of individually
  -nostdimport            Don't search the standard library import path for modules
  -num-threads <n>        Enable multi-threading and specify number of threads
  -Onone                  Compile without any optimization
  -Osize                  Compile with optimizations and target small code size
  -Ounchecked             Compile with optimizations and remove runtime safety checks
  -output-filelist <value>
                          Specify outputs in a file rather than on the command line
  -O                      Compile with optimizations
  -o <file>               Write output to <file>
  -package-name <value>   Name of the package the module belongs to
  -parallel-scan          Perform dependency scanning in-parallel.
  -parse-as-library       Parse the input file(s) as libraries, not scripts
  -parse-sil              Parse the input file as SIL code, not Swift source
  -placeholder-dependency-module-map-file <path>
                          Specify a JSON file containing information of external Swift module dependencies
  -plugin-path <value>    Add directory to the plugin search path
  -prebuilt-module-cache-path <value>
                          Directory of prebuilt modules for loading module interfaces
  -prefix-serialized-debugging-options
                          Apply debug prefix mappings to serialized debug info in Swiftmodule files
  -primary-filelist <value>
                          Specify primary inputs in a file rather than on the command line
  -primary-file <value>   Produce output for this file, not the whole module
  -print-clang-stats      Print Clang importer statistics
  -print-educational-notes
                          Include educational notes in printed diagnostic output, if available
  -print-target-info      Print target information for the given target <triple>, such as x86_64-apple-macos10.9
  -profile-coverage-mapping
                          Generate coverage data for use with profiled execution counts
  -profile-generate       Generate instrumented code to collect execution counts
  -profile-use=<profdata> Supply a profdata file to enable profile-guided optimization
  -public-autolink-library <value>
                          Add public dependent library
  -Raccess-note none|failures|all|all-validate
                          Control access note remarks (default: all)
  -Rcache-compile-job     Show remarks for compiler caching
  -Rcross-import          Emit a remark if a cross-import of a module is triggered.
  -Rdependency-scan-cache Emit remarks indicating use of the serialized module dependency scanning cache.
  -remove-runtime-asserts Remove runtime safety checks.
  -require-explicit-availability-target <target>
                          Suggest fix-its adding @available(<target>, *) to public declarations without availability
  -require-explicit-availability=<error,warn,ignore>
                          Set diagnostic level to report public declarations without an availability attribute
  -require-explicit-availability
                          Warn on public declarations without an availability attribute
  -require-explicit-sendable
                          Require explicit Sendable annotations on public declarations
  -Rindexing-system-module
                          Emit a remark when indexing a system module
  -Rmacro-loading         Emit remarks about loaded macro implementations
  -Rmodule-loading        Emit remarks about loaded module
  -Rmodule-recovery       Emit remarks about contextual inconsistencies in loaded modules
  -Rpass-missed=<value>   Report missed transformations by optimization passes whose name matches the given POSIX regular expression
  -Rpass=<value>          Report performed transformations by optimization passes whose name matches the given POSIX regular expression
  -Rskip-explicit-interface-build
                          Emit a remark if an explicit module interface invocation has an early exit because the expected output is up-to-date
  -runtime-compatibility-version <value>
                          Link compatibility library for Swift runtime version, or 'none'
  -sanitize-coverage=<type>
                          Specify the type of coverage instrumentation for Sanitizers and additional options separated by commas
  -sanitize-recover=<check>
                          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.
  -sanitize=<check>       Turn on runtime checks for erroneous behavior.
  -save-optimization-record-passes <regex>
                          Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)
  -save-optimization-record-path <value>
                          Specify the file name of any generated optimization record
  -save-optimization-record=<format>
                          Generate an optimization record file in a specific format (default: YAML)
  -save-optimization-record
                          Generate a YAML optimization record file
  -sdk <sdk>              Compile against <sdk>
  -serialize-debugging-options
                          Always serialize options for debugging (default: only for apps)
  -serialize-dependency-scan-cache
                          After performing a dependency scan, serialize the scanner's internal state.
  -serialize-diagnostics-path <path>
                          Emit a serialized diagnostics file to <path>
  -serialize-diagnostics  Serialize diagnostics in a binary format
  -serialized-path-obfuscate <prefix=replacement>
                          Remap source paths in debug info
  -show-diagnostics-after-fatal
                          Keep emitting subsequent diagnostics after a fatal error
  -static                 Make this module statically linkable and make the output of -emit-library a static library.
  -strict-concurrency=<value>
                          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)
  -supplementary-output-file-map <value>
                          Specify supplementary outputs in a file rather than on the command line
  -suppress-remarks       Suppress all remarks
  -suppress-warnings      Suppress all warnings
  -swift-module-file=<name>=<path>
                          Specify Swift module input explicitly built from textual interface
  -swift-version <vers>   Interpret input according to a specific Swift language version number
  -target-cpu <value>     Generate code for a particular CPU variant
  -target-min-inlining-version <value>
                          Require inlinable code with no '@available' attribute to back-deploy to this version of the '-target' OS
  -target-variant <value> Generate 'zippered' code for macCatalyst that can run on the specified variant target triple in addition to the main -target triple
  -target <triple>        Generate code for the given target <triple>, such as x86_64-apple-macos10.9
  -tbd-compatibility-version <version>
                          The compatibility_version to use in an emitted TBD file
  -tbd-current-version <version>
                          The current_version to use in an emitted TBD file
  -tbd-install_name <path>
                          The install_name to use in an emitted TBD file
  -tbd-is-installapi      If the TBD file should indicate it's being generated during InstallAPI
  -tools-directory <directory>
                          Look for external executables (ld, clang, binutils) in <directory>
  -track-system-dependencies
                          Track system dependencies while emitting Make-style dependencies
  -unavailable-decl-optimization=<complete,none>
                          Specify the optimization mode for unavailable declarations. The value may be 'none' (no optimization) or 'complete' (code is not generated at all unavailable declarations)
  -use-clang-function-types
                          Use stored Clang function types for computing canonical types.
  -user-module-version <vers>
                          Module version specified from Swift module authors
  -validate-clang-modules-once
                          Don't verify input files for Clang modules if the module has been successfully validated or loaded during this build session
  -verify-additional-file <value>
                          Verify diagnostics in this file in addition to source files
  -verify-additional-prefix <value>
                          Check for diagnostics with the prefix expected-<PREFIX> as well as expected-
  -verify-apply-fixes     Like -verify, but updates the original source file
  -verify-generic-signatures <module-name>
                          Verify the generic signatures in the given module
  -verify-ignore-unknown  Allow diagnostics for '<unknown>' location in verify mode
  -verify                 Verify diagnostics against expected-{error|warning|note} annotations
  -version                Print version information and exit
  -vfsoverlay <value>     Add directory to VFS overlay file
  -visualc-tools-root <root>
                          VisualC++ Tools Root
  -visualc-tools-version <version>
                          VisualC++ ToolSet Version
  -warn-concurrency       Warn about code that is unsafe according to the Swift Concurrency model and will become ill-formed in a future language version
  -warn-implicit-overrides
                          Warn about implicit overrides of protocol members
  -warn-swift3-objc-inference-complete
                          Warn about deprecated @objc inference in Swift 3 for every declaration that will no longer be inferred as @objc in Swift 4
  -warn-swift3-objc-inference-minimal
                          Warn about deprecated @objc inference in Swift 3 based on direct uses of the Objective-C entrypoint
  -warnings-as-errors     Treat warnings as errors
  -whole-module-optimization
                          Optimize input files together instead of individually
  -windows-sdk-root <root>
                          Windows SDK Root
  -windows-sdk-version <version>
                          Windows SDK Version
  -Xcc <arg>              Pass <arg> to the C/C++/Objective-C compiler
Options (258)
OptionDescriptionSource
-dump-astParse and type-check input file(s) and dump AST(s)help
-dump-parseParse input file(s) and dump AST(s)help
-dump-pcmDump debugging information about a precompiled Clang modulehelp
-dump-scope-maps expanded-or-list-of-line:columnParse and type-check input file(s) and dump the scope map(s)help
-dump-type-infoOutput YAML dump of fixed-size types from all imported moduleshelp
-dump-type-refinement-contextsType-check input file(s) and dump type refinement contexts(s)help
-emit-assemblyEmit assembly file(s) (-S)help
-emit-bcEmit LLVM BC file(s)help
-emit-irgenEmit LLVM IR file(s) before LLVM optimizationshelp
-emit-irEmit LLVM IR file(s) after LLVM optimizationshelp
-emit-objectEmit object file(s) (-c)help
-emit-pcmEmit a precompiled Clang module from a module maphelp
-emit-sibgenEmit serialized AST + raw SIL file(s)help
-emit-sibEmit serialized AST + canonical SIL file(s)help
-emit-silgenEmit raw SIL file(s)help
-emit-silEmit canonical SIL file(s)help
-emit-supported-featuresEmit a JSON file including all supported compiler featureshelp
-merge-modulesMerge the input modules without otherwise processing themhelp
-parseParse input file(s)help
-print-ast-declParse and type-check input file(s) and pretty print declarations from AST(s)help
-print-astParse and type-check input file(s) and pretty print AST(s)help
-resolve-importsParse and resolve imports in input file(s)help
-scan-dependenciesScan dependencies of the given Swift sourceshelp
-typecheckParse and type-check input file(s)help
-access-notes-path valueSpecify YAML file to override attributes on Swift declarations in this modulehelp
-allowable-client versModule names that are allowed to import this modulehelp
-api-diff-data-dir pathLoad platform and version specific API migration data files from <path>.help
-api-diff-data-file pathAPI migration data is from <path>help
-application-extension-libraryRestrict code to those available for App Extension Librarieshelp
-application-extensionRestrict code to those available for App Extensionshelp
-assert-config valueSpecify the assert_configuration replacement.help
-autolink-library valueAdd dependent libraryhelp
-backup-module-interface-path valueDirectory of module interfaces as backups to those from SDKshelp
-batch-scan-input-file pathSpecify a JSON file containing modules to perform batch dependencies scanninghelp
-blocklist-file pathThe path to a blocklist configuration filehelp
-cache-compile-jobEnable compiler cachinghelp
-cache-disable-replaySkip loading the compilation result from cachehelp
-cas-path pathPath to CAShelp
-cas-plugin-option name>=<optionOption pass to CAS Pluginhelp
-clang-build-session-file valueUse the last modification time of <file> as the underlying Clang build session timestamphelp
-clang-scanner-module-cache-path valueSpecifies the Clang dependency scanner module cache pathhelp
-clang-target valueSeparately set the target we should use for internal Clang instancehelp
-color-diagnosticsPrint diagnostics in colorhelp
-const-gather-protocols-file pathSpecify a list of protocols for extraction of conformances' const values'help
-continue-building-after-errorsContinue building, even after errors are encounteredhelp
-coverage-prefix-map prefix=replacementRemap source paths in coverage infohelp
-crosscheck-unqualified-lookupCompare legacy DeclContext- to ASTScope-based unqualified name lookup (for debugging)help
-cxx-interoperability-mode valueEnables C++ interoperability;help
-debug-info-format valueSpecify the debug info format type to either 'dwarf' or 'codeview'help
-debug-info-store-invocationEmit the compiler invocation in the debug info.help
-debug-prefix-map prefix=replacementRemap source paths in debug infohelp
-define-availability macroDefine an availability macro in the format 'macroName : iOS 13.0, macOS 10.15'help
-dependency-scan-cache-path valueThe path to output the dependency scanner's internal state.help
-diagnostic-documentation-path pathPath to diagnostic documentation resourceshelp
-diagnostic-style styleThe formatting style used when printing diagnostics ('swift' or 'llvm')help
-disable-actor-data-race-checksDisable runtime checks for actor data raceshelp
-disable-autolinking-runtime-compatibility-concurrencyDo not use autolinking for the concurrency runtime compatibility libraryhelp
-disable-autolinking-runtime-compatibility-dynamic-replacementsDo not use autolinking for the dynamic replacement runtime compatibility libraryhelp
-disable-autolinking-runtime-compatibilityDo not use autolinking for runtime compatibility librarieshelp
-disable-clang-spiDon't import Clang SPIs as Swift SPIshelp
-disable-cross-import-overlaysDo not automatically import declared cross-import overlays.help
-disable-implicit-swift-modulesDisable building Swift modules implicitly by the compilerhelp
-disable-incremental-importsDisable cross-module incremental build metadata and driver scheduling for Swift moduleshelp
-disable-infer-public-sendableDisable inference of Sendable conformances for public structs and enumshelp
-disable-migrator-fixitsDisable the Migrator phase which automatically applies fix-itshelp
-disable-sandboxDisable using the sandbox when executing subprocesseshelp
-disable-target-os-checkingDisable checking the target OS of serialized moduleshelp
-disable-testable-attr-requires-testable-moduleDisable checking of @testablehelp
-disable-typo-correctionDisable typo correctionhelp
-dump-api-path valueThe path to output swift interface files for the compiled source fileshelp
-dump-migration-states-dir pathDump the input text, output text, and states for migration to <path>help
-dump-usrDump USR for each declaration referencehelp
-D valueMarks a conditional compilation flag as truehelp
-embed-bitcode-markerEmbed placeholder LLVM IR data as a markerhelp
-embed-bitcodeEmbed LLVM IR bitcode as datahelp
-embed-tbd-for-module valueEmbed symbols from the module in the emitted tbd filehelp
-emit-abi-descriptor-path pathOutput the ABI descriptor of current module to <path>help
-emit-clang-header-nonmodular-includesAugment emitted Objective-C header with textual imports for every included modular importhelp
-emit-clang-header-path valueEmit an Objective-C and C++ header file to <path>help
-emit-const-values-path pathEmit the extracted compile-time known values to <path>help
-emit-dependencies-path pathOutput basic Make-compatible dependencies file to <path>help
-emit-dependenciesEmit basic Make-compatible dependencies fileshelp
-emit-fixits-path pathOutput compiler fixits as source edits to <path>help
-emit-loaded-module-trace-path pathEmit the loaded module trace JSON to <path>help
-emit-loaded-module-traceEmit a JSON file containing information about what modules were loadedhelp
-emit-migrated-file-path pathEmit the migrated source file to <path>help
-emit-module-doc-path pathOutput module documentation file <path>help
-emit-module-docEmit a module documentation file based on documentation commentshelp
-emit-module-interface-path pathOutput module interface file to <path>help
-emit-module-path pathEmit an importable module to <path>help
-emit-module-semantic-info-path pathOutput semantic info of current module to <path>help
-emit-module-source-info-path pathOutput module source info file to <path>help
-emit-module-source-infoOutput module source info filehelp
-emit-module-summary-path pathOutput module summary file to <path>help
-emit-moduleEmit an importable modulehelp
-emit-objc-header-path pathEmit an Objective-C header file to <path>help
-emit-objc-headerEmit an Objective-C header filehelp
-emit-reference-dependencies-path pathOutput Swift-style dependencies file to <path>help
-emit-reference-dependenciesEmit a Swift-style dependencies filehelp
-emit-remap-file-path pathEmit the replacement map describing Swift Migrator changes to <path>help
-emit-tbd-path pathEmit the TBD file to <path>help
-emit-tbdEmit a TBD filehelp
-empty-abi-descriptorAvoid printing actual module content into ABI descriptor filehelp
-enable-actor-data-race-checksEmit runtime checks for actor data raceshelp
-enable-autolinking-runtime-compatibility-bytecode-layoutsEnable autolinking for the bytecode layouts runtime compatibility libraryhelp
-enable-bare-slash-regexEnable the use of forward slash regular-expression literal syntaxhelp
-enable-builtin-moduleEnables the explicit import of the Builtin modulehelp
-enable-copy-propagation true|requested-passes-only|falseWhether to enable copy propagationhelp
-enable-cross-import-overlaysAutomatically import declared cross-import overlays.help
-enable-experimental-additive-arithmetic-derivationEnable experimental 'AdditiveArithmetic' derived conformanceshelp
-enable-experimental-concise-pound-fileEnable experimental concise '#file' identifierhelp
-enable-experimental-feature valueEnable an experimental featurehelp
-enable-experimental-forward-mode-differentiationEnable experimental forward mode differentiationhelp
-enable-incremental-importsEnable cross-module incremental build metadata and driver scheduling for Swift moduleshelp
-enable-infer-public-sendableEnable inference of Sendable conformances for public structs and enumshelp
-enable-library-evolutionBuild the module to allow binary-compatible library evolutionhelp
-enable-target-os-checkingEnable checking the target OS of serialized moduleshelp
-enable-testable-attr-requires-testable-moduleEnable checking of @testablehelp
-enable-upcoming-feature valueEnable a feature that will be introduced in an upcoming language versionhelp
-enforce-exclusivity enforcementEnforce law of exclusivityhelp
-experimental-serialize-external-decls-onlyOnly serialize decls that should be exposed to clientshelp
-explicit-swift-module-map-file pathSpecify a JSON file containing information of explicit Swift moduleshelp
-export-as valueModule name to use when referenced in clients module interfaceshelp
-external-plugin-path path>#<plugin-server-pathAdd directory to the plugin search path with a plugin server executablehelp
-file-compilation-dir pathThe compilation directory to embed in the debug info.help
-file-prefix-map prefix=replacementRemap source paths in debug, coverage, and index infohelp
-filelist valueSpecify source inputs in a file rather than on the command linehelp
-fixit-allApply all fixits from diagnostics without any filteringhelp
-framework valueSpecifies a framework which should be linked againsthelp
-frontend-parseable-outputEmit textual output in a parseable formathelp
-Fsystem valueAdd directory to system framework search pathhelp
-F valueAdd directory to framework search pathhelp
-gdwarf-typesEmit full DWARF type info.help
-gline-tables-onlyEmit minimal debug info for backtraces onlyhelp
-gnoneDon't emit debug infohelp
-group-info-path valueThe path to collect the group information of the compiled modulehelp
-gEmit debug info.help
-helpDisplay available optionshelp
-ignore-module-source-infoAvoid getting source location from .swiftsourceinfo fileshelp
-import-prescanWhen performing a dependency scan, only identify all imports of the main Swift module sourceshelp
-import-underlying-moduleImplicitly imports the Objective-C half of a modulehelp
-index-ignore-clang-modulesAvoid indexing clang modules (pcms)help
-index-include-localsInclude local definitions/references in the produced index data.help
-index-store-path pathStore indexing data to <path>help
-index-unit-output-path-filelist valueSpecify index unit output paths in a file rather than on the command linehelp
-index-unit-output-path pathUse <path> as the output path in the produced index data.help
-I valueAdd directory to the import search pathhelp
-load-dependency-scan-cacheAfter performing a dependency scan, serialize the scanner's internal state.help
-load-plugin-executable path>#<module-namesPath to a compiler plugin executable and a comma-separated list of module names where the macro types are declaredhelp
-load-plugin-library pathPath to a dynamic library containing compiler plugins such as macroshelp
-locale locale-codeChoose a language for diagnostic messageshelp
-localization-path pathPath to localized diagnostic messages directoryhelp
-lto-library lto-libraryPerform LTO with <lto-library>help
-lto valueSpecify the LTO type to either 'llvm-thin' or 'llvm-full'help
-L valueAdd directory to library link search pathhelp
-l valueSpecifies a library which should be linked againsthelp
-migrate-keep-objc-visibilityWhen migrating, add '@objc' to declarations that would've been implicitly visible in Swift 3help
-migrator-update-sdkDoes nothing.help
-migrator-update-swiftDoes nothing.help
-module-abi-name valueABI name to use for the contents of this modulehelp
-module-alias alias_name=real_nameIf a source file imports or references module <alias_name>, the <real_name> is used for the contents of the filehelp
-module-cache-path valueSpecifies the module cache pathhelp
-module-link-name valueLibrary to link against when using this modulehelp
-module-name valueName of the module to buildhelp
-no-color-diagnosticsDo not print diagnostics in colorhelp
-no-serialize-debugging-optionsNever serialize options for debugging (default: only for apps)help
-no-warnings-as-errorsDon't treat warnings as errorshelp
-no-whole-module-optimizationDisable optimizing input files together instead of individuallyhelp
-nostdimportDon't search the standard library import path for moduleshelp
-num-threads nEnable multi-threading and specify number of threadshelp
-OnoneCompile without any optimizationhelp
-OsizeCompile with optimizations and target small code sizehelp
-OuncheckedCompile with optimizations and remove runtime safety checkshelp
-output-filelist valueSpecify outputs in a file rather than on the command linehelp
-OCompile with optimizationshelp
-o fileWrite output to <file>help
-package-name valueName of the package the module belongs tohelp
-parallel-scanPerform dependency scanning in-parallel.help
-parse-as-libraryParse the input file(s) as libraries, not scriptshelp
-parse-silParse the input file as SIL code, not Swift sourcehelp
-placeholder-dependency-module-map-file pathSpecify a JSON file containing information of external Swift module dependencieshelp
-plugin-path valueAdd directory to the plugin search pathhelp
-prebuilt-module-cache-path valueDirectory of prebuilt modules for loading module interfaceshelp
-prefix-serialized-debugging-optionsApply debug prefix mappings to serialized debug info in Swiftmodule fileshelp
-primary-filelist valueSpecify primary inputs in a file rather than on the command linehelp
-primary-file valueProduce output for this file, not the whole modulehelp
-print-clang-statsPrint Clang importer statisticshelp
-print-educational-notesInclude educational notes in printed diagnostic output, if availablehelp
-print-target-infoPrint target information for the given target <triple>, such as x86_64-apple-macos10.9help
-profile-coverage-mappingGenerate coverage data for use with profiled execution countshelp
-profile-generateGenerate instrumented code to collect execution countshelp
-public-autolink-library valueAdd public dependent libraryhelp
-Raccess-note none|failures|all|all-validateControl access note remarks (default: all)help
-Rcache-compile-jobShow remarks for compiler cachinghelp
-Rcross-importEmit a remark if a cross-import of a module is triggered.help
-require-explicit-availability-target targetSuggest fix-its adding @available(<target>, *) to public declarations without availabilityhelp
-require-explicit-availability errorSet diagnostic level to report public declarations without an availability attributehelp
-require-explicit-sendableRequire explicit Sendable annotations on public declarationshelp
-Rindexing-system-moduleEmit a remark when indexing a system modulehelp
-Rmacro-loadingEmit remarks about loaded macro implementationshelp
-Rmodule-loadingEmit remarks about loaded modulehelp
-Rmodule-recoveryEmit remarks about contextual inconsistencies in loaded moduleshelp
-Rpass-missed valueReport missed transformations by optimization passes whose name matches the given POSIX regular expressionhelp
-Rpass valueReport performed transformations by optimization passes whose name matches the given POSIX regular expressionhelp
-Rskip-explicit-interface-buildEmit a remark if an explicit module interface invocation has an early exit because the expected output is up-to-datehelp
-runtime-compatibility-version valueLink compatibility library for Swift runtime version, or 'none'help
-sanitize-coverage typeSpecify the type of coverage instrumentation for Sanitizers and additional options separated by commashelp
-sanitize-recover checkSpecify which sanitizer runtime checks (see -sanitize=) will generate instrumentation that allows error recovery.help
-sanitize checkTurn on runtime checks for erroneous behavior.help
-save-optimization-record-passes regexOnly include passes which match a specified regular expression in the generated optimization record (by default, include all passes)help
-save-optimization-record-path valueSpecify the file name of any generated optimization recordhelp
-save-optimization-record formatGenerate an optimization record file in a specific format (default: YAML)help
-sdk sdkCompile against <sdk>help
-serialize-debugging-optionsAlways serialize options for debugging (default: only for apps)help
-serialize-dependency-scan-cacheAfter performing a dependency scan, serialize the scanner's internal state.help
-serialize-diagnostics-path pathEmit a serialized diagnostics file to <path>help
-serialize-diagnosticsSerialize diagnostics in a binary formathelp
-serialized-path-obfuscate prefix=replacementRemap source paths in debug infohelp
-show-diagnostics-after-fatalKeep emitting subsequent diagnostics after a fatal errorhelp
-staticMake this module statically linkable and make the output of -emit-library a static library.help
-strict-concurrency valueSpecify the how strict concurrency checking will be.help
-supplementary-output-file-map valueSpecify supplementary outputs in a file rather than on the command linehelp
-suppress-remarksSuppress all remarkshelp
-suppress-warningsSuppress all warningshelp
-swift-module-file name>=<pathSpecify Swift module input explicitly built from textual interfacehelp
-swift-version versInterpret input according to a specific Swift language version numberhelp
-target-cpu valueGenerate code for a particular CPU varianthelp
-target-min-inlining-version valueRequire inlinable code with no '@available' attribute to back-deploy to this version of the '-target' OShelp
-target tripleGenerate code for the given target <triple>, such as x86_64-apple-macos10.9help
-tbd-compatibility-version versionThe compatibility_version to use in an emitted TBD filehelp
-tbd-current-version versionThe current_version to use in an emitted TBD filehelp
-tbd-install_name pathThe install_name to use in an emitted TBD filehelp
-tbd-is-installapiIf the TBD file should indicate it's being generated during InstallAPIhelp
-tools-directory directoryLook for external executables (ld, clang, binutils) in <directory>help
-track-system-dependenciesTrack system dependencies while emitting Make-style dependencieshelp
-unavailable-decl-optimization completeSpecify the optimization mode for unavailable declarations.help
-use-clang-function-typesUse stored Clang function types for computing canonical types.help
-user-module-version versModule version specified from Swift module authorshelp
-validate-clang-modules-onceDon't verify input files for Clang modules if the module has been successfully validated or loaded during this build sessionhelp
-verify-additional-file valueVerify diagnostics in this file in addition to source fileshelp
-verify-additional-prefix valueCheck for diagnostics with the prefix expected-<PREFIX> as well as expected-help
-verify-apply-fixesLike -verify, but updates the original source filehelp
-verify-generic-signatures module-nameVerify the generic signatures in the given modulehelp
-verify-ignore-unknownAllow diagnostics for '<unknown>' location in verify modehelp
-verifyVerify diagnostics against expected-{error|warning|note} annotationshelp
-versionPrint version information and exithelp
-vfsoverlay valueAdd directory to VFS overlay filehelp
-visualc-tools-root rootVisualC++ Tools Roothelp
-visualc-tools-version versionVisualC++ ToolSet Versionhelp
-warn-concurrencyWarn about code that is unsafe according to the Swift Concurrency model and will become ill-formed in a future language versionhelp
-warn-implicit-overridesWarn about implicit overrides of protocol membershelp
-warn-swift3-objc-inference-completeWarn about deprecated @objc inference in Swift 3 for every declaration that will no longer be inferred as @objc in Swift 4help
-warn-swift3-objc-inference-minimalWarn about deprecated @objc inference in Swift 3 based on direct uses of the Objective-C entrypointhelp
-warnings-as-errorsTreat warnings as errorshelp
-whole-module-optimizationOptimize input files together instead of individuallyhelp
-windows-sdk-root rootWindows SDK Roothelp
-windows-sdk-version versionWindows SDK Versionhelp
-Xcc argPass <arg> to the C/C++/Objective-C compilerhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.