pub fn build_map(cx: &mut Context<'_, '_>) -> CargoResult<()>
Expand description

Computes several maps in Context:

  • build_scripts: A map that tracks which build scripts each package depends on.
  • build_explicit_deps: Dependency statements emitted by build scripts from a previous run.
  • build_script_outputs: Pre-populates this with any overridden build scripts.

The important one here is build_scripts, which for each (package, metadata) stores a BuildScripts object which contains a list of dependencies with build scripts that the unit should consider when linking. For example this lists all dependencies’ -L flags which need to be propagated transitively.

The given set of units to this function is the initial set of targets/profiles which are being built.