fn build_work(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Job>
Expand description

Constructs the unit of work of running a build script.

The construction includes:

  • Set environment variables for the build script run.
  • Create the output dir (OUT_DIR) for the build script output.
  • Determine if the build script needs a re-run.
  • Run the build script and store its output.