Rename add_lib_path to add_dylib_path

This commit is contained in:
Josh Stone 2020-03-18 13:49:53 -07:00
parent f509b26a77
commit 71f5aed385
3 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ use crate::install;
use crate::native;
use crate::test;
use crate::tool;
use crate::util::{self, add_lib_path, exe, libdir};
use crate::util::{self, add_dylib_path, exe, libdir};
use crate::{Build, DocTests, GitRepo, Mode};
pub use crate::Compiler;
@ -660,7 +660,7 @@ impl<'a> Builder<'a> {
return;
}
add_lib_path(vec![self.rustc_libdir(compiler)], &mut cmd.command);
add_dylib_path(vec![self.rustc_libdir(compiler)], &mut cmd.command);
}
/// Gets a path to the compiler specified.

View File

@ -12,7 +12,7 @@ use crate::channel;
use crate::channel::GitInfo;
use crate::compile;
use crate::toolstate::ToolState;
use crate::util::{add_lib_path, exe, CiEnv};
use crate::util::{add_dylib_path, exe, CiEnv};
use crate::Compiler;
use crate::Mode;
@ -388,7 +388,7 @@ pub struct ErrorIndex {
impl ErrorIndex {
pub fn command(builder: &Builder<'_>, compiler: Compiler) -> Command {
let mut cmd = Command::new(builder.ensure(ErrorIndex { compiler }));
add_lib_path(
add_dylib_path(
vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
&mut cmd,
);
@ -689,7 +689,7 @@ impl<'a> Builder<'a> {
}
}
add_lib_path(lib_paths, &mut cmd);
add_dylib_path(lib_paths, &mut cmd);
cmd
}
}

View File

@ -40,7 +40,7 @@ pub fn libdir(target: &str) -> &'static str {
}
/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
pub fn add_lib_path(path: Vec<PathBuf>, cmd: &mut Command) {
pub fn add_dylib_path(path: Vec<PathBuf>, cmd: &mut Command) {
let mut list = dylib_path();
for path in path {
list.insert(0, path);