Module bootstrap::utils::shared_helpers

source ·
Expand description

This module serves two purposes: 1. It is part of the utils module and used in other parts of bootstrap. 2. It is embedded inside bootstrap shims to avoid a dependency on the bootstrap library. Therefore, this module should never use any other bootstrap module. This reduces binary size and improves compilation time by minimizing linking time.

Functions§

  • Parses the dylib_path_var() environment variable, returning a list of paths that are members of this lookup path.
  • Returns the environment variable which the dynamic library lookup path resides in for this platform.
  • Given an executable called name, return the filename for the executable for a particular target.
  • Writes the command invocation to a file if DUMP_BOOTSTRAP_SHIMS is set during bootstrap.
  • Parses the value of the “RUSTC_STAGE” environment variable and returns it as a String.
  • Parses the value of the “RUSTC_VERBOSE” environment variable and returns it as a usize. If it was not defined, returns 0 by default.
  • Finds key and returns its value from the given list of arguments args.