OVERVIEW: Swift frontend
USAGE: swift-frontend -frontend
DEBUG/DEVELOPMENT OPTIONS:
-compiler-assertions Enable internal self-checks while compiling
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
-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-lowered-sil Emit lowered SIL file(s)
-emit-object Emit object file(s) (-c)
-emit-pcm Emit a precompiled Clang module from a module map
-emit-polyglot-ast Parse the Objective-C input file and emit polyglot AST as JSON
-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-arguments
Emit a JSON file including all supported compiler arguments
-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
-allow-non-resilient-access
Ensures all contents are generated besides exportable decls in the binary module, so non-resilient access can be allowed
-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
-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
-cache-replay-prefix-map <prefix> <replacement>
Remap paths when replaying outputs from cache
-cas-backend-mode=native|casid|verify
CASBackendMode for output kind
-cas-backend Enable using CASBackend for object file output
-cas-emit-casid-file Emit .casid file next to object file when CAS Backend is enabled
-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-variant <value>
Separately set the target we should use for internal Clang instance for the 'zippered' code for macCatalyst
-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'
-const-gather-protocols-list <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)
-cs-profile-generate=<directory>
Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
-cs-profile-generate Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
-cxx-interoperability-mode=<value>
Enables C++ interoperability; pass 'default' to enable or 'off' to disable
-debug-callsite-info Generate callsite information in debug info
-debug-info-for-profiling
Emit extra debug info (DWARF discriminators) to make sampling-based profiling more accurate
-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-module-path <value>
Path or cache key to this module's binary swiftmodule artifact (required by debug info)
-debug-module-self-key Embeded the key of current job in debug info generation (required by debug info)
-debug-prefix-map <prefix=replacement>
Remap source paths in debug info
-default-isolation MainActor|nonisolated
Specify the default actor isolation: MainActor or nonisolated. Defaults to nonisolated.
-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-overlay-search
Disable searching for cross import overlay file
-disable-cross-import-overlays
Do not automatically import declared cross-import overlays.
-disable-dynamic-actor-isolation
Disable dynamic actor isolation checks
-disable-experimental-feature <value>
Disable an experimental feature
-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-module-selectors-in-module-interface
When emitting module interface files, do not use module selectors to avoid name collisions
-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
-disable-upcoming-feature <value>
Disable a feature that will be introduced in an upcoming language version
-dump-api-path <value> The path to output swift interface files for the compiled source files
-dump-ast-format <format>
Desired format for -dump-ast output ('default', 'json', or 'json-zlib'); no format is guaranteed stable across different compiler versions
-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
-dwarf-version=<version>
DWARF debug info version to produce if requested
-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-api-descriptor-path <path>
Output a JSON file describing the module's API to <path>
-emit-clang-header-min-access <access-level>
The minimum access level of declarations to include in the emitted header
-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
-emit-variant-abi-descriptor-path <path>
Output the ABI descriptor of current target variant module to <path>
-emit-variant-api-descriptor-path <path>
Output a JSON file describing the target variant module's API to <path>
-emit-variant-module-doc-path <path>
Output module documentation file for the target variant to <path>
-emit-variant-module-interface-path <path>
Output module interface file for the target variant to <path>
-emit-variant-module-source-info-path <path>
Output module source info file for the target variant to <path>
-emit-variant-package-module-interface-path <path>
Output package module interface file for the target variant to <path>
-emit-variant-private-module-interface-path <path>
Output private module interface file for the target variant to <path>
-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=always|optimizing|requested-passes-only|false
Whether to enable copy propagation
-enable-copy-propagation
Always 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-deterministic-check
Check compiler output determinism by running it twice
-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-library-evolution
Build the module to allow binary-compatible library evolution
-enable-module-selectors-in-module-interface
When emitting module interface files, use module selectors to avoid name collisions
-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-allow-non-resilient-access
Deprecated; use -allow-non-resilient-access instead
-experimental-package-bypass-resilience
Deprecated; has no effect
-experimental-package-cmo-abort-on-deserialization-fail
Abort if a deserialization error is found while package optimization is enabled
-experimental-package-cmo
Deprecated; use -package-cmo instead
-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-bridging-header <value>
Implicitly imports a C header file
-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
-in-process-plugin-server-path <value>
Path to dynamic library plugin server
-index-ignore-clang-modules
Avoid indexing clang modules (pcms)
-index-include-locals Include local definitions/references in the produced index data.
-index-store-compress Compress the unit and record files in the index store
-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.
-internal-import-bridging-header <value>
Implicitly imports a C header file as an internal import
-ir-output-path <path> Output LLVM IR to <path> as additional output during compilation
-ir-profile-generate=<directory>
Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)
-ir-profile-generate Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)
-ir-profile-use=<profdata>
Supply an IR-level PGO profdata file to enable profile-guided optimization
-Isystem <value> Add directory to the system import search path
-I <value> Add directory to the import search path
-language-mode <mode> Interpret input according to a specific Swift language mode
-load-dependency-scan-cache
For performing a dependency scan, deserialize the scanner's internal state from a prior scan.
-load-pass-plugin=<path>
Load LLVM pass plugin from a dynamic shared object file.
-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
-load-resolved-plugin <library-path>#<executable-path>#<module-names>
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
-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.
-min-swift-runtime-version <vers>
The minimum Swift runtime version that will be available at runtime
-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-can-import-version <moduleName> <version> <underlyingVersion>
Specify canImport module and versions
-module-can-import <moduleName>
Specify canImport module name
-module-import-from-cas Import modules from CAS instead of file system
-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-parallel-scan Perform dependency scanning in a single-threaded fashion.
-no-serialize-debugging-options
Never serialize options for debugging (default: only for apps)
-no-verify-emitted-module-interface
Don't check that module interfaces emitted during compilation typecheck
-no-warnings-as-errors Treat warnings as warnings
-no-whole-module-optimization
Disable optimizing input files together instead of individually
-nostdimport Don't search the standard library or toolchain import paths for modules
-nostdlibimport 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-cmo Enable optimization to perform default CMO within a package boundary
-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
-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-static-build-config
Print static build configuration that can be used to evaluate #ifs in Swift source code
-print-supported-features
Print information about features supported by the compiler
-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-sample-use=<profile data>
Supply sampling-based profiling data from llvm-profdata to enable profile-guided optimization
-profile-use=<profdata> Supply a profdata file to enable profile-guided optimization
-project-name <value> Name of the project this module to build belongs to
-public-module-name <value>
Public facing module name to use in diagnostics and documentation
-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.
-Rdependency-scan Emit remarks for various steps taken by the dependency scanner.
-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
-resolved-plugin-verification
verify resolved plugins
-Rindexing-system-module
Emit a remark when indexing a system module
-Rmacro-expansions Show remarks for each line in macro expansions
-Rmacro-loading Emit remarks about loaded macro implementations
-Rmodule-api-import Emit remarks about the import bridging in each element composing the API
-Rmodule-loading Emit remarks about loaded module
-Rmodule-recovery Emit remarks about contextual inconsistencies in loaded modules
-Rmodule-serialization Emit remarks about module serialization
-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-stable-abi Link against the Sanitizers stable ABI.
-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
-scanner-prefix-map-paths <prefix> <replacement>
Remap paths reported by dependency scanner
-scanner-prefix-map <prefix=replacement>
Remap paths reported by dependency scanner
-sdk-module-cache-path <value>
Specifies the module cache path for explicitly-built SDK modules
-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
-sil-output-path <path> Output SIL to <path> as additional output during compilation
-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)
-strict-memory-safety:migrate
Enable migration to strict memory safety checking
-strict-memory-safety Enable strict memory safety checking
-supplementary-output-file-map <value>
Specify supplementary outputs in a file rather than on the command line
-suppress-notes Suppress all notes
-suppress-remarks Suppress all remarks
-suppress-warnings Suppress all warnings
-swift-diagnostics-assert-on-error
Trap when an error diagnostic is emitted. For compiler developers only.
-swift-diagnostics-assert-on-group <diagnostic_group>
Trap when any diagnostic in the given group is emitted. For compiler developers only.
-swift-diagnostics-assert-on-warning
Trap when a warning diagnostic is emitted. For compiler developers only.
-swift-module-cross-import <moduleName> <crossImport.swiftoverlay>
Specify the cross import module
-swift-module-file=<name>=<path>
Specify Swift module input explicitly built from textual interface
-sysroot <sysroot> Native Platform sysroot
-target-arch-variant <arch-variant>
Generate code for an additional arch/slice variant of the target architectureinto fat mach-o binaries
-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
-validate-prior-dependency-scan-cache
For performing a dependency scan with a prior scanner state, validate module dependencies.
-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-macro-note
Skip verifying notes about macro location
-verify-ignore-unknown Allow diagnostics for '<unknown>' location in verify mode
-verify-ignore-unrelated
Allow diagnostics in files outside those with expected diagnostics 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
-warnings-as-errors Treat warnings as errors
-weak-link-span-compatibility-lib
Weakly link the symbols that are back deployed by the Span compatibility library instead of strongly linking them, when the deployment target predates the OS release that introduced them
-whole-module-optimization
Optimize input files together instead of individually
-windows-sdk-root <root>
Windows SDK Root
-windows-sdk-version <version>
Windows SDK Version
-write-output-hash-xattr
When caching, write the output file's hash (as determined by the CAS hashing schema) as a file extended attribute.
-Xcc <arg> Pass <arg> to the C/C++/Objective-C compiler
Options (327)
| Option | Description | Source |
|---|---|---|
-dump-ast | Parse and type-check input file(s) and dump AST(s) | help |
-dump-parse | Parse input file(s) and dump AST(s) | help |
-dump-pcm | Dump debugging information about a precompiled Clang module | help |
-dump-scope-maps expanded-or-list-of-line:column | Parse and type-check input file(s) and dump the scope map(s) | help |
-dump-type-info | Output YAML dump of fixed-size types from all imported modules | help |
-emit-assembly | Emit assembly file(s) (-S) | help |
-emit-bc | Emit LLVM BC file(s) | help |
-emit-irgen | Emit LLVM IR file(s) before LLVM optimizations | help |
-emit-ir | Emit LLVM IR file(s) after LLVM optimizations | help |
-emit-lowered-sil | Emit lowered SIL file(s) | help |
-emit-object | Emit object file(s) (-c) | help |
-emit-pcm | Emit a precompiled Clang module from a module map | help |
-emit-polyglot-ast | Parse the Objective-C input file and emit polyglot AST as JSON | help |
-emit-sibgen | Emit serialized AST + raw SIL file(s) | help |
-emit-sib | Emit serialized AST + canonical SIL file(s) | help |
-emit-silgen | Emit raw SIL file(s) | help |
-emit-sil | Emit canonical SIL file(s) | help |
-emit-supported-arguments | Emit a JSON file including all supported compiler arguments | help |
-merge-modules | Merge the input modules without otherwise processing them | help |
-parse | Parse input file(s) | help |
-print-ast-decl | Parse and type-check input file(s) and pretty print declarations from AST(s) | help |
-print-ast | Parse and type-check input file(s) and pretty print AST(s) | help |
-resolve-imports | Parse and resolve imports in input file(s) | help |
-scan-dependencies | Scan dependencies of the given Swift sources | help |
-typecheck | Parse and type-check input file(s) | help |
-access-notes-path value | Specify YAML file to override attributes on Swift declarations in this module | help |
-allow-non-resilient-access | Ensures all contents are generated besides exportable decls in the binary module, so non-resilient access can be allowed | help |
-allowable-client vers | Module names that are allowed to import this module | help |
-api-diff-data-dir path | Load platform and version specific API migration data files from <path>. | help |
-api-diff-data-file path | API migration data is from <path> | help |
-application-extension-library | Restrict code to those available for App Extension Libraries | help |
-application-extension | Restrict code to those available for App Extensions | help |
-assert-config value | Specify the assert_configuration replacement. | help |
-autolink-library value | Add dependent library | help |
-backup-module-interface-path value | Directory of module interfaces as backups to those from SDKs | help |
-blocklist-file path | The path to a blocklist configuration file | help |
-cache-compile-job | Enable compiler caching | help |
-cache-disable-replay | Skip loading the compilation result from cache | help |
-cas-backend-mode native|casid|verify | CASBackendMode for output kind | help |
-cas-backend | Enable using CASBackend for object file output | help |
-cas-emit-casid-file | Emit .casid file next to object file when CAS Backend is enabled | help |
-cas-path path | Path to CAS | help |
-cas-plugin-option name>=<option | Option pass to CAS Plugin | help |
-clang-build-session-file value | Use the last modification time of <file> as the underlying Clang build session timestamp | help |
-clang-scanner-module-cache-path value | Specifies the Clang dependency scanner module cache path | help |
-clang-target-variant value | Separately set the target we should use for internal Clang instance for the 'zippered' code for macCatalyst | help |
-clang-target value | Separately set the target we should use for internal Clang instance | help |
-color-diagnostics | Print diagnostics in color | help |
-const-gather-protocols-file path | Specify a list of protocols for extraction of conformances 'const values' | help |
-const-gather-protocols-list path | Specify a list of protocols for extraction of conformances 'const values' | help |
-continue-building-after-errors | Continue building, even after errors are encountered | help |
-coverage-prefix-map prefix=replacement | Remap source paths in coverage info | help |
-crosscheck-unqualified-lookup | Compare legacy DeclContext- to ASTScope-based unqualified name lookup (for debugging) | help |
-cs-profile-generate directory | Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) | help |
-cxx-interoperability-mode value | Enables C++ interoperability; | help |
-debug-callsite-info | Generate callsite information in debug info | help |
-debug-info-for-profiling | Emit extra debug info (DWARF discriminators) to make sampling-based profiling more accurate | help |
-debug-info-format value | Specify the debug info format type to either 'dwarf' or 'codeview' | help |
-debug-info-store-invocation | Emit the compiler invocation in the debug info. | help |
-debug-module-path value | Path or cache key to this module's binary swiftmodule artifact (required by debug info) | help |
-debug-module-self-key | Embeded the key of current job in debug info generation (required by debug info) | help |
-debug-prefix-map prefix=replacement | Remap source paths in debug info | help |
-default-isolation MainActor|nonisolated | Specify the default actor isolation: MainActor or nonisolated. | help |
-define-availability macro | Define an availability macro in the format 'macroName : iOS 13.0, macOS 10.15' | help |
-dependency-scan-cache-path value | The path to output the dependency scanner's internal state. | help |
-diagnostic-documentation-path path | Path to diagnostic documentation resources | help |
-diagnostic-style style | The formatting style used when printing diagnostics ('swift' or 'llvm') | help |
-disable-actor-data-race-checks | Disable runtime checks for actor data races | help |
-disable-autolinking-runtime-compatibility-concurrency | Do not use autolinking for the concurrency runtime compatibility library | help |
-disable-autolinking-runtime-compatibility-dynamic-replacements | Do not use autolinking for the dynamic replacement runtime compatibility library | help |
-disable-autolinking-runtime-compatibility | Do not use autolinking for runtime compatibility libraries | help |
-disable-clang-spi | Don't import Clang SPIs as Swift SPIs | help |
-disable-cross-import-overlay-search | Disable searching for cross import overlay file | help |
-disable-cross-import-overlays | Do not automatically import declared cross-import overlays. | help |
-disable-dynamic-actor-isolation | Disable dynamic actor isolation checks | help |
-disable-experimental-feature value | Disable an experimental feature | help |
-disable-implicit-swift-modules | Disable building Swift modules implicitly by the compiler | help |
-disable-incremental-imports | Disable cross-module incremental build metadata and driver scheduling for Swift modules | help |
-disable-infer-public-sendable | Disable inference of Sendable conformances for public structs and enums | help |
-disable-migrator-fixits | Disable the Migrator phase which automatically applies fix-its | help |
-disable-module-selectors-in-module-interface | When emitting module interface files, do not use module selectors to avoid name collisions | help |
-disable-sandbox | Disable using the sandbox when executing subprocesses | help |
-disable-target-os-checking | Disable checking the target OS of serialized modules | help |
-disable-testable-attr-requires-testable-module | Disable checking of @testable | help |
-disable-typo-correction | Disable typo correction | help |
-disable-upcoming-feature value | Disable a feature that will be introduced in an upcoming language version | help |
-dump-api-path value | The path to output swift interface files for the compiled source files | help |
-dump-ast-format format | Desired format for -dump-ast output ('default', 'json', or 'json-zlib'); | help |
-dump-migration-states-dir path | Dump the input text, output text, and states for migration to <path> | help |
-dump-usr | Dump USR for each declaration reference | help |
-dwarf-version version | DWARF debug info version to produce if requested | help |
-D value | Marks a conditional compilation flag as true | help |
-embed-bitcode-marker | Embed placeholder LLVM IR data as a marker | help |
-embed-bitcode | Embed LLVM IR bitcode as data | help |
-embed-tbd-for-module value | Embed symbols from the module in the emitted tbd file | help |
-emit-abi-descriptor-path path | Output the ABI descriptor of current module to <path> | help |
-emit-api-descriptor-path path | Output a JSON file describing the module's API to <path> | help |
-emit-clang-header-min-access access-level | The minimum access level of declarations to include in the emitted header | help |
-emit-clang-header-nonmodular-includes | Augment emitted Objective-C header with textual imports for every included modular import | help |
-emit-clang-header-path value | Emit an Objective-C and C++ header file to <path> | help |
-emit-const-values-path path | Emit the extracted compile-time known values to <path> | help |
-emit-dependencies-path path | Output basic Make-compatible dependencies file to <path> | help |
-emit-dependencies | Emit basic Make-compatible dependencies files | help |
-emit-fixits-path path | Output compiler fixits as source edits to <path> | help |
-emit-loaded-module-trace-path path | Emit the loaded module trace JSON to <path> | help |
-emit-loaded-module-trace | Emit a JSON file containing information about what modules were loaded | help |
-emit-migrated-file-path path | Emit the migrated source file to <path> | help |
-emit-module-doc-path path | Output module documentation file <path> | help |
-emit-module-doc | Emit a module documentation file based on documentation comments | help |
-emit-module-interface-path path | Output module interface file to <path> | help |
-emit-module-path path | Emit an importable module to <path> | help |
-emit-module-semantic-info-path path | Output semantic info of current module to <path> | help |
-emit-module-source-info-path path | Output module source info file to <path> | help |
-emit-module-source-info | Output module source info file | help |
-emit-module-summary-path path | Output module summary file to <path> | help |
-emit-module | Emit an importable module | help |
-emit-objc-header-path path | Emit an Objective-C header file to <path> | help |
-emit-objc-header | Emit an Objective-C header file | help |
-emit-reference-dependencies-path path | Output Swift-style dependencies file to <path> | help |
-emit-reference-dependencies | Emit a Swift-style dependencies file | help |
-emit-remap-file-path path | Emit the replacement map describing Swift Migrator changes to <path> | help |
-emit-tbd-path path | Emit the TBD file to <path> | help |
-emit-tbd | Emit a TBD file | help |
-emit-variant-abi-descriptor-path path | Output the ABI descriptor of current target variant module to <path> | help |
-emit-variant-api-descriptor-path path | Output a JSON file describing the target variant module's API to <path> | help |
-emit-variant-module-doc-path path | Output module documentation file for the target variant to <path> | help |
-emit-variant-module-interface-path path | Output module interface file for the target variant to <path> | help |
-emit-variant-module-source-info-path path | Output module source info file for the target variant to <path> | help |
-emit-variant-package-module-interface-path path | Output package module interface file for the target variant to <path> | help |
-emit-variant-private-module-interface-path path | Output private module interface file for the target variant to <path> | help |
-empty-abi-descriptor | Avoid printing actual module content into ABI descriptor file | help |
-enable-actor-data-race-checks | Emit runtime checks for actor data races | help |
-enable-autolinking-runtime-compatibility-bytecode-layouts | Enable autolinking for the bytecode layouts runtime compatibility library | help |
-enable-bare-slash-regex | Enable the use of forward slash regular-expression literal syntax | help |
-enable-builtin-module | Enables the explicit import of the Builtin module | help |
-enable-copy-propagation | Whether to enable copy propagation | help |
-enable-cross-import-overlays | Automatically import declared cross-import overlays. | help |
-enable-deterministic-check | Check compiler output determinism by running it twice | help |
-enable-experimental-additive-arithmetic-derivation | Enable experimental 'AdditiveArithmetic' derived conformances | help |
-enable-experimental-concise-pound-file | Enable experimental concise '#file' identifier | help |
-enable-experimental-feature value | Enable an experimental feature | help |
-enable-experimental-forward-mode-differentiation | Enable experimental forward mode differentiation | help |
-enable-incremental-imports | Enable cross-module incremental build metadata and driver scheduling for Swift modules | help |
-enable-library-evolution | Build the module to allow binary-compatible library evolution | help |
-enable-module-selectors-in-module-interface | When emitting module interface files, use module selectors to avoid name collisions | help |
-enable-target-os-checking | Enable checking the target OS of serialized modules | help |
-enable-testable-attr-requires-testable-module | Enable checking of @testable | help |
-enable-upcoming-feature value | Enable a feature that will be introduced in an upcoming language version | help |
-enforce-exclusivity enforcement | Enforce law of exclusivity | help |
-experimental-allow-non-resilient-access | Deprecated; | help |
-experimental-package-bypass-resilience | Deprecated; | help |
-experimental-package-cmo-abort-on-deserialization-fail | Abort if a deserialization error is found while package optimization is enabled | help |
-experimental-package-cmo | Deprecated; | help |
-explicit-swift-module-map-file path | Specify a JSON file containing information of explicit Swift modules | help |
-export-as value | Module name to use when referenced in clients module interfaces | help |
-external-plugin-path path>#<plugin-server-path | Add directory to the plugin search path with a plugin server executable | help |
-file-compilation-dir path | The compilation directory to embed in the debug info. | help |
-file-prefix-map prefix=replacement | Remap source paths in debug, coverage, and index info | help |
-filelist value | Specify source inputs in a file rather than on the command line | help |
-fixit-all | Apply all fixits from diagnostics without any filtering | help |
-framework value | Specifies a framework which should be linked against | help |
-frontend-parseable-output | Emit textual output in a parseable format | help |
-Fsystem value | Add directory to system framework search path | help |
-F value | Add directory to framework search path | help |
-gdwarf-types | Emit full DWARF type info. | help |
-gline-tables-only | Emit minimal debug info for backtraces only | help |
-gnone | Don't emit debug info | help |
-group-info-path value | The path to collect the group information of the compiled module | help |
-g | Emit debug info. | help |
-help | Display available options | help |
-ignore-module-source-info | Avoid getting source location from .swiftsourceinfo files | help |
-import-bridging-header value | Implicitly imports a C header file | help |
-import-prescan | When performing a dependency scan, only identify all imports of the main Swift module sources | help |
-import-underlying-module | Implicitly imports the Objective-C half of a module | help |
-in-process-plugin-server-path value | Path to dynamic library plugin server | help |
-index-ignore-clang-modules | Avoid indexing clang modules (pcms) | help |
-index-include-locals | Include local definitions/references in the produced index data. | help |
-index-store-compress | Compress the unit and record files in the index store | help |
-index-store-path path | Store indexing data to <path> | help |
-index-unit-output-path-filelist value | Specify index unit output paths in a file rather than on the command line | help |
-index-unit-output-path path | Use <path> as the output path in the produced index data. | help |
-internal-import-bridging-header value | Implicitly imports a C header file as an internal import | help |
-ir-output-path path | Output LLVM IR to <path> as additional output during compilation | help |
-ir-profile-generate directory | Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var) | help |
-ir-profile-use profdata | Supply an IR-level PGO profdata file to enable profile-guided optimization | help |
-Isystem value | Add directory to the system import search path | help |
-I value | Add directory to the import search path | help |
-language-mode mode | Interpret input according to a specific Swift language mode | help |
-load-dependency-scan-cache | For performing a dependency scan, deserialize the scanner's internal state from a prior scan. | help |
-load-pass-plugin path | Load LLVM pass plugin from a dynamic shared object file. | help |
-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 | help |
-load-plugin-library path | Path to a dynamic library containing compiler plugins such as macros | help |
-load-resolved-plugin | Path to resolved plugin configuration and a comma-separated list of module names where the macro types are declared. | help |
-locale locale-code | Choose a language for diagnostic messages | help |
-localization-path path | Path to localized diagnostic messages directory | help |
-lto-library lto-library | Perform LTO with <lto-library> | help |
-lto value | Specify the LTO type to either 'llvm-thin' or 'llvm-full' | help |
-L value | Add directory to library link search path | help |
-l value | Specifies a library which should be linked against | help |
-migrate-keep-objc-visibility | When migrating, add '@objc' to declarations that would've been implicitly visible in Swift 3 | help |
-migrator-update-sdk | Does nothing. | help |
-migrator-update-swift | Does nothing. | help |
-min-swift-runtime-version vers | The minimum Swift runtime version that will be available at runtime | help |
-module-abi-name value | ABI name to use for the contents of this module | help |
-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 | help |
-module-cache-path value | Specifies the module cache path | help |
-module-can-import moduleName | Specify canImport module name | help |
-module-link-name value | Library to link against when using this module | help |
-module-name value | Name of the module to build | help |
-no-color-diagnostics | Do not print diagnostics in color | help |
-no-parallel-scan | Perform dependency scanning in a single-threaded fashion. | help |
-no-serialize-debugging-options | Never serialize options for debugging (default: only for apps) | help |
-no-verify-emitted-module-interface | Don't check that module interfaces emitted during compilation typecheck | help |
-no-warnings-as-errors | Treat warnings as warnings | help |
-no-whole-module-optimization | Disable optimizing input files together instead of individually | help |
-nostdimport | Don't search the standard library or toolchain import paths for modules | help |
-nostdlibimport | Don't search the standard library import path for modules | help |
-num-threads n | Enable multi-threading and specify number of threads | help |
-Onone | Compile without any optimization | help |
-Osize | Compile with optimizations and target small code size | help |
-Ounchecked | Compile with optimizations and remove runtime safety checks | help |
-output-filelist value | Specify outputs in a file rather than on the command line | help |
-O | Compile with optimizations | help |
-o file | Write output to <file> | help |
-package-cmo | Enable optimization to perform default CMO within a package boundary | help |
-package-name value | Name of the package the module belongs to | help |
-parallel-scan | Perform dependency scanning in-parallel. | help |
-parse-as-library | Parse the input file(s) as libraries, not scripts | help |
-parse-sil | Parse the input file as SIL code, not Swift source | help |
-plugin-path value | Add directory to the plugin search path | help |
-prebuilt-module-cache-path value | Directory of prebuilt modules for loading module interfaces | help |
-prefix-serialized-debugging-options | Apply debug prefix mappings to serialized debug info in Swiftmodule files | help |
-primary-filelist value | Specify primary inputs in a file rather than on the command line | help |
-primary-file value | Produce output for this file, not the whole module | help |
-print-clang-stats | Print Clang importer statistics | help |
-print-educational-notes | Include educational notes in printed diagnostic output, if available | help |
-print-static-build-config | Print static build configuration that can be used to evaluate #ifs in Swift source code | help |
-print-supported-features | Print information about features supported by the compiler | help |
-print-target-info | Print target information for the given target <triple>, such as x86_64-apple-macos10.9 | help |
-profile-coverage-mapping | Generate coverage data for use with profiled execution counts | help |
-profile-generate | Generate instrumented code to collect execution counts | help |
-profile-sample-use profile | Supply sampling-based profiling data from llvm-profdata to enable profile-guided optimization | help |
-project-name value | Name of the project this module to build belongs to | help |
-public-module-name value | Public facing module name to use in diagnostics and documentation | help |
-Raccess-note none|failures|all|all-validate | Control access note remarks (default: all) | help |
-Rcache-compile-job | Show remarks for compiler caching | help |
-Rcross-import | Emit a remark if a cross-import of a module is triggered. | help |
-Rdependency-scan | Emit remarks for various steps taken by the dependency scanner. | help |
-require-explicit-availability-target target | Suggest fix-its adding @available(<target>, *) to public declarations without availability | help |
-require-explicit-availability error | Set diagnostic level to report public declarations without an availability attribute | help |
-require-explicit-sendable | Require explicit Sendable annotations on public declarations | help |
-resolved-plugin-verification | verify resolved plugins | help |
-Rindexing-system-module | Emit a remark when indexing a system module | help |
-Rmacro-expansions | Show remarks for each line in macro expansions | help |
-Rmacro-loading | Emit remarks about loaded macro implementations | help |
-Rmodule-api-import | Emit remarks about the import bridging in each element composing the API | help |
-Rmodule-loading | Emit remarks about loaded module | help |
-Rmodule-recovery | Emit remarks about contextual inconsistencies in loaded modules | help |
-Rmodule-serialization | Emit remarks about module serialization | help |
-Rpass-missed value | Report missed transformations by optimization passes whose name matches the given POSIX regular expression | help |
-Rpass value | Report performed transformations by optimization passes whose name matches the given POSIX regular expression | help |
-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 | help |
-runtime-compatibility-version value | Link compatibility library for Swift runtime version, or 'none' | help |
-sanitize-coverage type | Specify the type of coverage instrumentation for Sanitizers and additional options separated by commas | help |
-sanitize-recover check | Specify which sanitizer runtime checks (see -sanitize=) will generate instrumentation that allows error recovery. | help |
-sanitize-stable-abi | Link against the Sanitizers stable ABI. | help |
-sanitize check | Turn on runtime checks for erroneous behavior. | help |
-save-optimization-record-passes regex | Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes) | help |
-save-optimization-record-path value | Specify the file name of any generated optimization record | help |
-save-optimization-record format | Generate an optimization record file in a specific format (default: YAML) | help |
-scanner-prefix-map prefix=replacement | Remap paths reported by dependency scanner | help |
-sdk-module-cache-path value | Specifies the module cache path for explicitly-built SDK modules | help |
-sdk sdk | Compile against <sdk> | help |
-serialize-debugging-options | Always serialize options for debugging (default: only for apps) | help |
-serialize-dependency-scan-cache | After performing a dependency scan, serialize the scanner's internal state. | help |
-serialize-diagnostics-path path | Emit a serialized diagnostics file to <path> | help |
-serialize-diagnostics | Serialize diagnostics in a binary format | help |
-serialized-path-obfuscate prefix=replacement | Remap source paths in debug info | help |
-show-diagnostics-after-fatal | Keep emitting subsequent diagnostics after a fatal error | help |
-static | Make this module statically linkable and make the output of -emit-library a static library. | help |
-strict-concurrency value | Specify the how strict concurrency checking will be. | help |
-strict-memory-safety | Enable strict memory safety checking | help |
-supplementary-output-file-map value | Specify supplementary outputs in a file rather than on the command line | help |
-suppress-notes | Suppress all notes | help |
-suppress-remarks | Suppress all remarks | help |
-suppress-warnings | Suppress all warnings | help |
-swift-diagnostics-assert-on-error | Trap when an error diagnostic is emitted. | help |
-swift-diagnostics-assert-on-group diagnostic_group | Trap when any diagnostic in the given group is emitted. | help |
-swift-diagnostics-assert-on-warning | Trap when a warning diagnostic is emitted. | help |
-swift-module-file name>=<path | Specify Swift module input explicitly built from textual interface | help |
-sysroot sysroot | Native Platform sysroot | help |
-target-arch-variant arch-variant | Generate code for an additional arch/slice variant of the target architectureinto fat mach-o binaries | help |
-target-cpu value | Generate code for a particular CPU variant | help |
-target-min-inlining-version value | Require inlinable code with no '@available' attribute to back-deploy to this version of the '-target' OS | help |
-target triple | Generate code for the given target <triple>, such as x86_64-apple-macos10.9 | help |
-tbd-compatibility-version version | The compatibility_version to use in an emitted TBD file | help |
-tbd-current-version version | The current_version to use in an emitted TBD file | help |
-tbd-install_name path | The install_name to use in an emitted TBD file | help |
-tbd-is-installapi | If the TBD file should indicate it's being generated during InstallAPI | help |
-tools-directory directory | Look for external executables (ld, clang, binutils) in <directory> | help |
-track-system-dependencies | Track system dependencies while emitting Make-style dependencies | help |
-unavailable-decl-optimization complete | Specify the optimization mode for unavailable declarations. | help |
-use-clang-function-types | Use stored Clang function types for computing canonical types. | help |
-user-module-version vers | Module version specified from Swift module authors | help |
-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 | help |
-validate-prior-dependency-scan-cache | For performing a dependency scan with a prior scanner state, validate module dependencies. | help |
-verify-additional-file value | Verify diagnostics in this file in addition to source files | help |
-verify-additional-prefix value | Check for diagnostics with the prefix expected-<PREFIX> as well as expected- | help |
-verify-apply-fixes | Like -verify, but updates the original source file | help |
-verify-generic-signatures module-name | Verify the generic signatures in the given module | help |
-verify-ignore-macro-note | Skip verifying notes about macro location | help |
-verify-ignore-unknown | Allow diagnostics for '<unknown>' location in verify mode | help |
-verify-ignore-unrelated | Allow diagnostics in files outside those with expected diagnostics in verify mode | help |
-verify | Verify diagnostics against expected-{error|warning|note} annotations | help |
-version | Print version information and exit | help |
-vfsoverlay value | Add directory to VFS overlay file | help |
-visualc-tools-root root | VisualC++ Tools Root | help |
-visualc-tools-version version | VisualC++ ToolSet Version | help |
-warn-concurrency | Warn about code that is unsafe according to the Swift Concurrency model and will become ill-formed in a future language version | help |
-warn-implicit-overrides | Warn about implicit overrides of protocol members | help |
-warnings-as-errors | Treat warnings as errors | help |
-weak-link-span-compatibility-lib | Weakly link the symbols that are back deployed by the Span compatibility library instead of strongly linking them, when the deployment target predates the OS release that introduced them | help |
-whole-module-optimization | Optimize input files together instead of individually | help |
-windows-sdk-root root | Windows SDK Root | help |
-windows-sdk-version version | Windows SDK Version | help |
-write-output-hash-xattr | When caching, write the output file's hash (as determined by the CAS hashing schema) as a file extended attribute. | help |
-Xcc arg | Pass <arg> to the C/C++/Objective-C compiler | help |