OS Manuals

/usr/bin/swift-symbolgraph-extract

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 6.4.2-r0 (enterprise-packages), captured 2026-11-08 by running swift-symbolgraph-extract --help (exit 1). permalink

OVERVIEW: Swift Symbol Graph Extractor

USAGE: swift-frontend

OPTIONS:
  -active-platform-availability-only
                        Only emit availability metadata for platforms that are active according to the target
  -allow-availability-platforms <platforms>
                        Restrict availability metadata to the given platforms, e.g. 'macOS,Swift'
  -block-availability-platforms <platforms>
                        Remove the given platforms from symbol graph availability metadata, e.g. 'macOS,Swift'
  -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
  -cxx-interoperability-mode=<value>
                        Enables C++ interoperability; pass 'default' to enable or 'off' to disable
  -disable-safe-interop-wrappers
                        Disable safe interop wrapper generation and bounds attribute parsing
  -emit-extension-block-symbols
                        Emit 'swift.extension' symbols for extensions to external types instead of directly associating members and conformances with the extended nominal when generating symbol graphs
  -experimental-allowed-reexported-modules=<value>
                        Allow reexporting symbols from the provided modules if they are themselves exported from the main module. This is a comma separated list of module names.
  -external-plugin-path <path>#<plugin-server-path>
                        Add directory to the plugin search path with a plugin server executable
  -Fsystem <value>      Add directory to system framework search path
  -F <value>            Add directory to framework search path
  -help                 Display available options
  -include-spi-symbols  Add symbols with SPI information to the symbol graph
  -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
  -libc <value>         libc runtime library to use
  -L <value>            Add directory to library link search path
  -minimum-access-level <level>
                        Include symbols with this access level or more
  -module-cache-path <value>
                        Specifies the module cache path
  -module-name <value>  Name of the module to build
  -omit-extension-block-symbols
                        Directly associate members and conformances with the extended nominal when generating symbol graphs instead of emitting 'swift.extension' symbols for extensions to external types
  -output-dir <dir>     Output directory
  -plugin-path <value>  Add directory to the plugin search path
  -pretty-print         Pretty-print the output JSON
  -project-name <value> Name of the project this module to build belongs to
  -resource-dir </usr/lib/swift>
                        The directory that holds the compiler resource files
  -sdk <sdk>            Compile against <sdk>
  -skip-inherited-docs  Skip emitting doc comments for members inherited through classes or default implementations
  -skip-protocol-implementations
                        Skip emitting symbols that are implementations of protocol requirements or inherited from protocol extensions
  -skip-synthesized-members
                        Skip members inherited through classes or default implementations
  -swift-version <vers> Interpret input according to a specific Swift language version number
  -symbol-graph-shorten-output-names
                        Shorten the symbol graph output file names by hashing the module name; outputs an additional JSON file with the map of hash to original name
  -sysroot <sysroot>    Native Platform sysroot
  -target <triple>      Generate code for the given target <triple>, such as x86_64-apple-macos10.9
  -visualc-tools-root <root>
                        VisualC++ Tools Root
  -visualc-tools-version <version>
                        VisualC++ ToolSet Version
  -v                    Show commands to run and use verbose output
  -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 (38)
OptionDescriptionSource
-active-platform-availability-onlyOnly emit availability metadata for platforms that are active according to the targethelp
-allow-availability-platforms platformsRestrict availability metadata to the given platforms, e.g. 'macOS,Swift'help
-block-availability-platforms platformsRemove the given platforms from symbol graph availability metadata, e.g. 'macOS,Swift'help
-clang-target-variant valueSeparately set the target we should use for internal Clang instance for the 'zippered' code for macCatalysthelp
-cxx-interoperability-mode valueEnables C++ interoperability;help
-disable-safe-interop-wrappersDisable safe interop wrapper generation and bounds attribute parsinghelp
-emit-extension-block-symbolsEmit 'swift.extension' symbols for extensions to external types instead of directly associating members and conformances with the extended nominal when generating symbol graphshelp
-experimental-allowed-reexported-modules valueAllow reexporting symbols from the provided modules if they are themselves exported from the main module.help
-external-plugin-path path>#<plugin-server-pathAdd directory to the plugin search path with a plugin server executablehelp
-Fsystem valueAdd directory to system framework search pathhelp
-F valueAdd directory to framework search pathhelp
-helpDisplay available optionshelp
-include-spi-symbolsAdd symbols with SPI information to the symbol graphhelp
-Isystem valueAdd directory to the system import search pathhelp
-I valueAdd directory to the import search pathhelp
-libc valuelibc runtime library to usehelp
-L valueAdd directory to library link search pathhelp
-minimum-access-level levelInclude symbols with this access level or morehelp
-module-cache-path valueSpecifies the module cache pathhelp
-module-name valueName of the module to buildhelp
-omit-extension-block-symbolsDirectly associate members and conformances with the extended nominal when generating symbol graphs instead of emitting 'swift.extension' symbols for extensions to external typeshelp
-output-dir dirOutput directoryhelp
-plugin-path valueAdd directory to the plugin search pathhelp
-pretty-printPretty-print the output JSONhelp
-resource-dir /usr/lib/swiftThe directory that holds the compiler resource fileshelp
-sdk sdkCompile against <sdk>help
-skip-inherited-docsSkip emitting doc comments for members inherited through classes or default implementationshelp
-skip-protocol-implementationsSkip emitting symbols that are implementations of protocol requirements or inherited from protocol extensionshelp
-skip-synthesized-membersSkip members inherited through classes or default implementationshelp
-symbol-graph-shorten-output-namesShorten the symbol graph output file names by hashing the module name;help
-sysroot sysrootNative Platform sysroothelp
-target tripleGenerate code for the given target <triple>, such as x86_64-apple-macos10.9help
-visualc-tools-root rootVisualC++ Tools Roothelp
-visualc-tools-version versionVisualC++ ToolSet Versionhelp
-vShow commands to run and use verbose outputhelp
-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.