OS Manuals

/usr/bin/wasm-component-ld

WASI-enabled WebAssembly C/C++ toolchain

From wasi-sdk 33-r7 (os), captured 2026-11-05 by running wasm-component-ld --help (exit 0). permalink

A linker to create a Component from input object files and libraries.

This application is an equivalent of `wasm-ld` except that it produces a component instead of a core wasm module. This application behaves very similarly to `wasm-ld` in that it takes the same inputs and flags, and it will internally invoke `wasm-ld`. After `wasm-ld` has been invoked the core wasm module will be turned into a component using component tooling and embedded information in the core wasm module.

Usage: wasm-component-ld [OPTIONS] --output <OUTPUT> [objects]...

Arguments:
  [objects]...
          objects to pass to `wasm-ld`

Options:
      --wasi-adapter <command|reactor|proxy|none>
          Which default WASI adapter, if any, to use when creating the output component

      --wasm-ld-path <PATH>
          Location of where to find `wasm-ld`.

          If not specified this is automatically detected.

      --rsp-quoting <STYLE>
          Quoting syntax for response files

  -o, --output <OUTPUT>
          Where to place the component output

  -v, --verbose
          Print verbose output

      --validate-component <VALIDATE_COMPONENT>
          Whether or not the output component is validated.

          This defaults to `true`.

          [possible values: true, false]

      --merge-imports-based-on-semver <MERGE_IMPORTS_BASED_ON_SEMVER>
          Whether or not imports are deduplicated based on semver in the final component.

          This defaults to `true`.

          [possible values: true, false]

      --adapt <[NAME=]MODULE>
          Adapters to use when creating the final component

      --reject-legacy-names
          Whether or not "legacy" names are rejected during componentization.

          This option can be used to require the naming scheme outlined in <https://github.com/WebAssembly/component-model/pull/378> to be used and rejects all modules using the previous ad-hoc naming scheme.

          This defaults to `false`.

      --realloc-via-memory-grow
          Whether or not the `cabi_realloc` function used by the adapter is backed by `memory.grow`.

          By default the adapter will import `cabi_realloc` from the main module and use that, but this can be used to instead back memory allocation requests with `memory.grow` instead.

          This defaults to `false`.

      --component-type <WIT_FILE>
          WIT file representing additional component type information to use.

          May be specified more than once.

          See also the `--string-encoding` option.

      --string-encoding <STRING_ENCODING>
          String encoding to use when creating the final component.

          This may be either "utf8", "utf16", or "compact-utf16".  This value is only used when one or more `--component-type` options are specified.

          [default: utf8]

      --skip-wit-component
          Skip the `wit-component`-based process to generate a component

      --append-lld-flag <APPEND_LLD_FLAG>
          Raw flags to pass to the end of the `lld` invocation in case they're not already recognized by this wrapper executable

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Options forwarded to `wasm-ld`:
      --allow-multiple-definition
          forwarded to `wasm-ld`

      --allow-undefined-file <PATH>
          forwarded to `wasm-ld`

      --allow-undefined
          forwarded to `wasm-ld`

      --Bdynamic
          forwarded to `wasm-ld`

      --Bstatic
          forwarded to `wasm-ld`

      --Bsymbolic
          forwarded to `wasm-ld`

      --build-id[=<VAL>]
          forwarded to `wasm-ld`

      --call_shared
          forwarded to `wasm-ld`

      --check-features
          forwarded to `wasm-ld`

      --color-diagnostics[=<VALUE>]
          forwarded to `wasm-ld`

      --compress-relocations
          forwarded to `wasm-ld`

      --demangle
          forwarded to `wasm-ld`

      --dn
          forwarded to `wasm-ld`

      --dy
          forwarded to `wasm-ld`

      --emit-relocs
          forwarded to `wasm-ld`

      --end-lib
          forwarded to `wasm-ld`

      --entry <SYM>
          forwarded to `wasm-ld`

      --error-limit <N>
          forwarded to `wasm-ld`

      --error-unresolved-symbols
          forwarded to `wasm-ld`

      --experimental-pic
          forwarded to `wasm-ld`

      --export-all
          forwarded to `wasm-ld`

  -E, --export-dynamic
          forwarded to `wasm-ld`

      --export-if-defined <SYM>
          forwarded to `wasm-ld`

      --export-memory[=<NAME>]
          forwarded to `wasm-ld`

      --export-table
          forwarded to `wasm-ld`

      --export <SYM>
          forwarded to `wasm-ld`

      --extra-features <LIST>
          forwarded to `wasm-ld`

      --fatal-warnings
          forwarded to `wasm-ld`

      --features <LIST>
          forwarded to `wasm-ld`

      --gc-sections
          forwarded to `wasm-ld`

      --global-base <VALUE>
          forwarded to `wasm-ld`

      --growable-table
          forwarded to `wasm-ld`

      --import-memory[=<NAME>]
          forwarded to `wasm-ld`

      --import-table
          forwarded to `wasm-ld`

      --import-undefined
          forwarded to `wasm-ld`

      --initial-heap <SIZE>
          forwarded to `wasm-ld`

      --initial-memory <SIZE>
          forwarded to `wasm-ld`

      --keep-section <NAME>
          forwarded to `wasm-ld`

      --lto-CGO <LEVEL>
          forwarded to `wasm-ld`

      --lto-debug-pass-manager
          forwarded to `wasm-ld`

      --lto-O <LEVEL>
          forwarded to `wasm-ld`

      --lto-partitions <NUM>
          forwarded to `wasm-ld`

  -L <PATH>
          forwarded to `wasm-ld`

  -l <LIB>
          forwarded to `wasm-ld`

      --Map <FILE>
          forwarded to `wasm-ld`

      --max-memory <SIZE>
          forwarded to `wasm-ld`

      --merge-data-segments
          forwarded to `wasm-ld`

      --mllvm <FLAG>
          forwarded to `wasm-ld`

  -m <ARCH>
          forwarded to `wasm-ld`

      --no-allow-multiple-definition
          forwarded to `wasm-ld`

      --no-check-features
          forwarded to `wasm-ld`

      --no-color-diagnostics
          forwarded to `wasm-ld`

      --no-demangle
          forwarded to `wasm-ld`

      --no-entry
          forwarded to `wasm-ld`

      --no-export-dynamic
          forwarded to `wasm-ld`

      --no-fatal-warnings
          forwarded to `wasm-ld`

      --no-gc-sections
          forwarded to `wasm-ld`

      --no-growable-memory
          forwarded to `wasm-ld`

      --no-merge-data-segments
          forwarded to `wasm-ld`

      --no-pie
          forwarded to `wasm-ld`

      --no-print-gc-sections
          forwarded to `wasm-ld`

      --no-shlib-sigcheck
          forwarded to `wasm-ld`

      --no-whole-archive
          forwarded to `wasm-ld`

      --noinhibit-exec
          forwarded to `wasm-ld`

      --non_shared
          forwarded to `wasm-ld`

  -O <LEVEL>
          forwarded to `wasm-ld`

      --page-size <VALUE>
          forwarded to `wasm-ld`

      --pie
          forwarded to `wasm-ld`

      --print-gc-sections
          forwarded to `wasm-ld`

  -M, --print-map
          forwarded to `wasm-ld`

      --relocatable
          forwarded to `wasm-ld`

      --reproduce <VALUE>
          forwarded to `wasm-ld`

      --rpath <VALUE>
          forwarded to `wasm-ld`

      --save-temps
          forwarded to `wasm-ld`

      --shared-memory
          forwarded to `wasm-ld`

      --shared
          forwarded to `wasm-ld`

      --soname <VALUE>
          forwarded to `wasm-ld`

      --stack-first
          forwarded to `wasm-ld`

      --start-lib
          forwarded to `wasm-ld`

      --static
          forwarded to `wasm-ld`

  -s, --strip-all
          forwarded to `wasm-ld`

  -S, --strip-debug
          forwarded to `wasm-ld`

      --table-base <VALUE>
          forwarded to `wasm-ld`

      --thinlto-cache-dir <PATH>
          forwarded to `wasm-ld`

      --thinlto-cache-policy <VALUE>
          forwarded to `wasm-ld`

      --thinlto-jobs <N>
          forwarded to `wasm-ld`

      --threads <N>
          forwarded to `wasm-ld`

  -y, --trace-symbol <SYM>
          forwarded to `wasm-ld`

  -t, --trace
          forwarded to `wasm-ld`

      --undefined <SYM>
          forwarded to `wasm-ld`

      --unresolved-symbols <VALUE>
          forwarded to `wasm-ld`

      --warn-unresolved-symbols
          forwarded to `wasm-ld`

      --whole-archive
          forwarded to `wasm-ld`

      --why-extract <MEMBER>
          forwarded to `wasm-ld`

      --wrap <VALUE>
          forwarded to `wasm-ld`

  -z <OPT>
          forwarded to `wasm-ld`
Options (112)
OptionDescriptionSource
--wasi-adapter command|reactor|proxy|noneWhich default WASI adapter, if any, to use when creating the output componenthelp
--wasm-ld-path PATHLocation of where to find `wasm-ld`.help
--rsp-quoting STYLEQuoting syntax for response fileshelp
-o, --output OUTPUTWhere to place the component outputhelp
-v, --verbosePrint verbose outputhelp
--validate-component VALIDATE_COMPONENTWhether or not the output component is validated.help
--merge-imports-based-on-semver MERGE_IMPORTS_BASED_ON_SEMVERWhether or not imports are deduplicated based on semver in the final component.help
--adapt NAME=]MODULEAdapters to use when creating the final componenthelp
--reject-legacy-namesWhether or not "legacy" names are rejected during componentization.help
--realloc-via-memory-growWhether or not the `cabi_realloc` function used by the adapter is backed by `memory.grow`.help
--component-type WIT_FILEWIT file representing additional component type information to use.help
--string-encoding STRING_ENCODINGString encoding to use when creating the final component.help
--skip-wit-componentSkip the `wit-component`-based process to generate a componenthelp
--append-lld-flag APPEND_LLD_FLAGRaw flags to pass to the end of the `lld` invocation in case they're not already recognized by this wrapper executablehelp
-h, --helpPrint help (see a summary with '-h')help
-V, --versionPrint versionhelp
--allow-multiple-definitionforwarded to `wasm-ld`help
--allow-undefined-file PATHforwarded to `wasm-ld`help
--allow-undefinedforwarded to `wasm-ld`help
--Bdynamicforwarded to `wasm-ld`help
--Bstaticforwarded to `wasm-ld`help
--Bsymbolicforwarded to `wasm-ld`help
--build-id VALforwarded to `wasm-ld`help
--call_sharedforwarded to `wasm-ld`help
--check-featuresforwarded to `wasm-ld`help
--color-diagnostics VALUEforwarded to `wasm-ld`help
--compress-relocationsforwarded to `wasm-ld`help
--demangleforwarded to `wasm-ld`help
--dnforwarded to `wasm-ld`help
--dyforwarded to `wasm-ld`help
--emit-relocsforwarded to `wasm-ld`help
--end-libforwarded to `wasm-ld`help
--entry SYMforwarded to `wasm-ld`help
--error-limit Nforwarded to `wasm-ld`help
--error-unresolved-symbolsforwarded to `wasm-ld`help
--experimental-picforwarded to `wasm-ld`help
--export-allforwarded to `wasm-ld`help
-E, --export-dynamicforwarded to `wasm-ld`help
--export-if-defined SYMforwarded to `wasm-ld`help
--export-memory NAMEforwarded to `wasm-ld`help
--export-tableforwarded to `wasm-ld`help
--export SYMforwarded to `wasm-ld`help
--extra-features LISTforwarded to `wasm-ld`help
--fatal-warningsforwarded to `wasm-ld`help
--features LISTforwarded to `wasm-ld`help
--gc-sectionsforwarded to `wasm-ld`help
--global-base VALUEforwarded to `wasm-ld`help
--growable-tableforwarded to `wasm-ld`help
--import-memory NAMEforwarded to `wasm-ld`help
--import-tableforwarded to `wasm-ld`help
--import-undefinedforwarded to `wasm-ld`help
--initial-heap SIZEforwarded to `wasm-ld`help
--initial-memory SIZEforwarded to `wasm-ld`help
--keep-section NAMEforwarded to `wasm-ld`help
--lto-CGO LEVELforwarded to `wasm-ld`help
--lto-debug-pass-managerforwarded to `wasm-ld`help
--lto-O LEVELforwarded to `wasm-ld`help
--lto-partitions NUMforwarded to `wasm-ld`help
-L PATHforwarded to `wasm-ld`help
-l LIBforwarded to `wasm-ld`help
--Map FILEforwarded to `wasm-ld`help
--max-memory SIZEforwarded to `wasm-ld`help
--merge-data-segmentsforwarded to `wasm-ld`help
--mllvm FLAGforwarded to `wasm-ld`help
-m ARCHforwarded to `wasm-ld`help
--no-allow-multiple-definitionforwarded to `wasm-ld`help
--no-check-featuresforwarded to `wasm-ld`help
--no-color-diagnosticsforwarded to `wasm-ld`help
--no-demangleforwarded to `wasm-ld`help
--no-entryforwarded to `wasm-ld`help
--no-export-dynamicforwarded to `wasm-ld`help
--no-fatal-warningsforwarded to `wasm-ld`help
--no-gc-sectionsforwarded to `wasm-ld`help
--no-growable-memoryforwarded to `wasm-ld`help
--no-merge-data-segmentsforwarded to `wasm-ld`help
--no-pieforwarded to `wasm-ld`help
--no-print-gc-sectionsforwarded to `wasm-ld`help
--no-shlib-sigcheckforwarded to `wasm-ld`help
--no-whole-archiveforwarded to `wasm-ld`help
--noinhibit-execforwarded to `wasm-ld`help
--non_sharedforwarded to `wasm-ld`help
-O LEVELforwarded to `wasm-ld`help
--page-size VALUEforwarded to `wasm-ld`help
--pieforwarded to `wasm-ld`help
--print-gc-sectionsforwarded to `wasm-ld`help
-M, --print-mapforwarded to `wasm-ld`help
--relocatableforwarded to `wasm-ld`help
--reproduce VALUEforwarded to `wasm-ld`help
--rpath VALUEforwarded to `wasm-ld`help
--save-tempsforwarded to `wasm-ld`help
--shared-memoryforwarded to `wasm-ld`help
--sharedforwarded to `wasm-ld`help
--soname VALUEforwarded to `wasm-ld`help
--stack-firstforwarded to `wasm-ld`help
--start-libforwarded to `wasm-ld`help
--staticforwarded to `wasm-ld`help
-s, --strip-allforwarded to `wasm-ld`help
-S, --strip-debugforwarded to `wasm-ld`help
--table-base VALUEforwarded to `wasm-ld`help
--thinlto-cache-dir PATHforwarded to `wasm-ld`help
--thinlto-cache-policy VALUEforwarded to `wasm-ld`help
--thinlto-jobs Nforwarded to `wasm-ld`help
--threads Nforwarded to `wasm-ld`help
-y, --trace-symbol SYMforwarded to `wasm-ld`help
-t, --traceforwarded to `wasm-ld`help
--undefined SYMforwarded to `wasm-ld`help
--unresolved-symbols VALUEforwarded to `wasm-ld`help
--warn-unresolved-symbolsforwarded to `wasm-ld`help
--whole-archiveforwarded to `wasm-ld`help
--why-extract MEMBERforwarded to `wasm-ld`help
--wrap VALUEforwarded to `wasm-ld`help
-z OPTforwarded to `wasm-ld`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.