Module 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§

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