OS Manuals

/usr/bin/spirv-link

Collection of tools, libraries, and tests for Vulkan shader compilation

From shaderc 2026.4-r0 (os), captured 2026-11-05 by running spirv-link --help (exit 0). permalink

/usr/bin/spirv-link - Link SPIR-V binary files together.

USAGE: /usr/bin/spirv-link [options] [-o <output>] <input>...

The SPIR-V binaries are read from the different <input>(s).
The SPIR-V resulting linked binary module is written to the file "out.spv"
unless the -o option is used; if <output> is "-", it is written to the standard
output.

NOTE: The linker is a work in progress.

Options (in lexicographical order):
  --allow-partial-linkage
               Allow partial linkage by accepting imported symbols to be
               unresolved.
  --allow-pointer-mismatch
               Allow pointer function parameters to mismatch the target link
               target. This is useful to workaround lost correct parameter type
               information due to LLVM's opaque pointers.
  --create-library
               Link the binaries into a library, keeping all exported symbols.
  -h, --help
               Print this help.
  --target-env <env>
               Set the environment used for interpreting the inputs. Without
               this option the environment defaults to spv1.6. <env> must be
               one of {vulkan1.0|vulkan1.1spv1.4|vulkan1.1|vulkan1.2|vulkan1.3
                |vulkan1.4|spv1.0|spv1.1|spv1.2|spv1.3|spv1.4|spv1.5|spv1.6
                |opencl1.2embedded|opencl1.2|opencl2.0embedded|opencl2.0
                |opencl2.1embedded|opencl2.1|opencl2.2embedded|opencl2.2
                |opengl4.0|opengl4.1|opengl4.2|opengl4.3|opengl4.5}.
               NOTE: The SPIR-V version used by the linked binary module
               depends only on the version of the inputs, and is not affected
               by this option.
  --use-highest-version
               Upgrade the output SPIR-V version to the highest of the input
               files, instead of requiring all of them to have the same
               version.
               NOTE: If one of the older input files uses an instruction that
               is deprecated in the highest SPIR-V version, the output will
               be invalid.
  --verify-ids
               Verify that IDs in the resulting modules are truly unique.
  --fnvar-targets
               CSV file specifying OpSpecConditionalTarget parameters for each
               linked module.
  --fnvar-architectures
               CSV file specifying OpSpecConditionalArchitecture parameters for
               each linked module.
  --fnvar-capabilities
               For each function variant, include its required capabilities
               under OpSpecConditionalCapabilitiesINTEL.
  --version
               Display linker version information.
Options (11)
OptionDescriptionSource
--allow-partial-linkageAllow partial linkage by accepting imported symbols to be unresolved.help
--allow-pointer-mismatchAllow pointer function parameters to mismatch the target link target.help
--create-libraryLink the binaries into a library, keeping all exported symbols.help
-h, --helpPrint this help.help
--target-env envSet the environment used for interpreting the inputs.help
--use-highest-versionUpgrade the output SPIR-V version to the highest of the input files, instead of requiring all of them to have the same version.help
--verify-idsVerify that IDs in the resulting modules are truly unique.help
--fnvar-targetsCSV file specifying OpSpecConditionalTarget parameters for each linked module.help
--fnvar-architecturesCSV file specifying OpSpecConditionalArchitecture parameters for each linked module.help
--fnvar-capabilitiesFor each function variant, include its required capabilities under OpSpecConditionalCapabilitiesINTEL.help
--versionDisplay linker version information.help

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