pub fn phase_6_link_output(sess: &Session,
                           trans: &trans::CrateTranslation,
                           outputs: &OutputFilenames) {
    let old_path = os::getenv("PATH").unwrap_or_else(||String::new());
    let mut new_path = sess.host_filesearch().get_tools_search_paths();
    new_path.extend(os::split_paths(old_path.as_slice()).into_iter());
    os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap());

    time(sess.time_passes(), "linking", (), |_|
         link::link_binary(sess,
                           trans,
                           outputs,
                           trans.link.crate_name.as_slice()));

    os::setenv("PATH", old_path);
}
/// Run the linker on any artifacts that resulted from the LLVM run.
/// This should produce either a finished executable or library.
Run the linker on any artifacts that resulted from the LLVM run.
This should produce either a finished executable or library.
Run the linker on any artifacts that resulted from the LLVM run . This should produce either a finished executable or library .
pub fn phase_6_link_output(sess: &Session,
                           trans: &trans::CrateTranslation,
                           outputs: &OutputFilenames) {
    let old_path = os::getenv("PATH").unwrap_or_else(||String::new());
    let mut new_path = sess.host_filesearch().get_tools_search_paths();
    new_path.extend(os::split_paths(old_path.as_slice()).into_iter());
    os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap());
    time(sess.time_passes(), "linking", (), |_|
         link::link_binary(sess,
                           trans,
                           outputs,
                           trans.link.crate_name.as_slice()));
    os::setenv("PATH", old_path);
}
pub fn phase_6_link_output ( sess : & Session , trans : & trans :: CrateTranslation , outputs : & OutputFilenames ) { let old_path = os :: getenv ( " " ) . unwrap_or_else ( | | String :: new ( ) ) ; let mut new_path = sess . host_filesearch ( ) . get_tools_search_paths ( ) ; new_path . extend ( os :: split_paths ( old_path . as_slice ( ) ) . into_iter ( ) ) ; os :: setenv ( " " , os :: join_paths ( new_path . as_slice ( ) ) . unwrap ( ) ) ; time ( sess . time_passes ( ) , " " , ( ) , | _ | link :: link_binary ( sess , trans , outputs , trans . link . crate_name . as_slice ( ) ) ) ; os :: setenv ( " " , old_path ) ; }
Run the linker on any artifacts that resulted from the LLVM run.
Run the linker on any artifacts that resulted from the LLVM run .
sess
&Session
trans
&trans::CrateTranslation
outputs
&OutputFilenames