Change the directory for target libs
This pushes them down from stageN/lib/rustc/$(target) to stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
This commit is contained in:
parent
e71d17ffa6
commit
821dd6c02c
5 changed files with 24 additions and 13 deletions
|
|
@ -39,16 +39,23 @@ fn llvm_err(sess: session::session, msg: str) {
|
|||
} else { sess.fatal(msg + ": " + str::str_from_cstr(buf)); }
|
||||
}
|
||||
|
||||
fn get_target_lib_path(sess: session::session) -> fs::path {
|
||||
fn make_target_lib_path(sysroot: fs::path, target_triple: str) -> fs::path {
|
||||
let path = [
|
||||
sess.get_opts().sysroot,
|
||||
sysroot,
|
||||
"lib/rustc",
|
||||
sess.get_opts().target_triple];
|
||||
target_triple,
|
||||
"lib"
|
||||
];
|
||||
check vec::is_not_empty(path);
|
||||
let path = fs::connect_many(path);
|
||||
ret path;
|
||||
}
|
||||
|
||||
fn get_target_lib_path(sess: session::session) -> fs::path {
|
||||
make_target_lib_path(sess.get_opts().sysroot,
|
||||
sess.get_opts().target_triple)
|
||||
}
|
||||
|
||||
fn get_target_lib_file_path(sess: session::session,
|
||||
file: fs::path) -> fs::path {
|
||||
fs::connect(get_target_lib_path(sess), file)
|
||||
|
|
|
|||
|
|
@ -378,8 +378,7 @@ fn build_session_options(binary: str, match: getopts::match)
|
|||
some(s) { s }
|
||||
};
|
||||
|
||||
let library_search_paths = [
|
||||
fs::connect(sysroot, "lib/rustc/" + target )];
|
||||
let library_search_paths = [link::make_target_lib_path(sysroot, target)];
|
||||
let lsp_vec = getopts::opt_strs(match, "L");
|
||||
// FIXME: These should probably go in front of the defaults
|
||||
for lsp: str in lsp_vec { library_search_paths += [lsp]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue