name: static_library
returns: lib
description: Builds a static library with the given sources.

posargs_inherit: _build_target_base
varargs_inherit: _build_target_base
kwargs_inherit: _build_target_base

kwargs:
  pic:
    type: bool
    since: 0.36.0
    description: |
      Builds the library as positional independent code
      (so it can be linked into a shared library). This
      option has no effect on Windows and OS X since it doesn't make
      sense on Windows and PIC cannot be disabled on OS X.

  prelink:
    type: bool
    since: 0.57.0
    description: |
      If `true` the object files in the target will be prelinked,
      meaning that it will contain only one prelinked
      object file rather than the individual object files.

  rust_abi:
    type: str
    since: 1.3.0
    description: |
      Set the specific ABI to compile (when compiling rust).
      - 'rust' (default): Create a "rlib" crate.
      - 'c': Create a "staticlib" crate.
