pub fn dep_run_custom_build(&self, unit: &Unit<'a>) -> Vec<Unit<'a>> {
        // If this build script's execution has been overridden then we don't
        // actually depend on anything, we've reached the end of the dependency
        // chain as we've got all the info we're gonna get.
        let key = (unit.pkg.package_id().clone(), unit.kind);
        if self.build_state.outputs.lock().unwrap().contains_key(&key) {
            return Vec::new()
        }

        // When not overridden, then the dependencies to run a build script are:
        //
        // 1. Compiling the build script itself
        // 2. For each immediate dependency of our package which has a `links`
        //    key, the execution of that build script.
        let not_custom_build = unit.pkg.targets().iter().find(|t| {
            !t.is_custom_build()
        }).unwrap();
        let tmp = Unit {
            target: not_custom_build,
            profile: &self.profiles.dev,
            ..*unit
        };
        self.dep_targets(&tmp).iter().filter_map(|unit| {
            if !unit.target.linkable() || unit.pkg.manifest().links().is_none() {
                return None
            }
            self.dep_build_script(unit)
        }).chain(Some(Unit {
            profile: self.build_script_profile(unit.pkg.package_id()),
            kind: Kind::Host, // build scripts always compiled for the host
            ..*unit
        })).collect()
    }
/// Returns the dependencies needed to run a build script.
///
/// The `unit` provided must represent an execution of a build script, and
/// the returned set of units must all be run before `unit` is run.
Returns the dependencies needed to run a build script.
The `unit` provided must represent an execution of a build script, and
the returned set of units must all be run before `unit` is run.
Returns the dependencies needed to run a build script . The ` unit ` provided must represent an execution of a build script and the returned set of units must all be run before ` unit ` is run .
pub fn dep_run_custom_build(&self, unit: &Unit<'a>) -> Vec<Unit<'a>> {
        // If this build script's execution has been overridden then we don't
        // actually depend on anything, we've reached the end of the dependency
        // chain as we've got all the info we're gonna get.
        let key = (unit.pkg.package_id().clone(), unit.kind);
        if self.build_state.outputs.lock().unwrap().contains_key(&key) {
            return Vec::new()
        }
        // When not overridden, then the dependencies to run a build script are:
        //
        // 1. Compiling the build script itself
        // 2. For each immediate dependency of our package which has a `links`
        //    key, the execution of that build script.
        let not_custom_build = unit.pkg.targets().iter().find(|t| {
            !t.is_custom_build()
        }).unwrap();
        let tmp = Unit {
            target: not_custom_build,
            profile: &self.profiles.dev,
            ..*unit
        };
        self.dep_targets(&tmp).iter().filter_map(|unit| {
            if !unit.target.linkable() || unit.pkg.manifest().links().is_none() {
                return None
            }
            self.dep_build_script(unit)
        }).chain(Some(Unit {
            profile: self.build_script_profile(unit.pkg.package_id()),
            kind: Kind::Host, // build scripts always compiled for the host
            ..*unit
        })).collect()
    }
pub fn dep_run_custom_build ( & self , unit : & Unit < ' a > ) -> Vec < Unit < ' a > > { // If this build script's execution has been overridden then we don't // actually depend on anything, we've reached the end of the dependency // chain as we've got all the info we're gonna get. let key = ( unit . pkg . package_id ( ) . clone ( ) , unit . kind ) ; if self . build_state . outputs . lock ( ) . unwrap ( ) . contains_key ( & key ) { return Vec :: new ( ) } // When not overridden, then the dependencies to run a build script are: // // 1. Compiling the build script itself // 2. For each immediate dependency of our package which has a `links` //    key, the execution of that build script. let not_custom_build = unit . pkg . targets ( ) . iter ( ) . find ( | t | { ! t . is_custom_build ( ) } ) . unwrap ( ) ; let tmp = Unit { target : not_custom_build , profile : & self . profiles . dev , .. * unit } ; self . dep_targets ( & tmp ) . iter ( ) . filter_map ( | unit | { if ! unit . target . linkable ( ) || unit . pkg . manifest ( ) . links ( ) . is_none ( ) { return None } self . dep_build_script ( unit ) } ) . chain ( Some ( Unit { profile : self . build_script_profile ( unit . pkg . package_id ( ) ) , kind : Kind :: Host , // build scripts always compiled for the host .. * unit } ) ) . collect ( ) }
Returns the dependencies needed to run a build script.
Returns the dependencies needed to run a build script .
&self
unit
&Unit<'a>
&self
unit
&Unit<'a>