cargo: Use $sysroot/$libdir/cargo as work dir

On win32  environment, it's "$sysroot/bin/cargo".
On unix-y environment, it's "$sysroot/lib/cargo".
This commit is contained in:
Tycho Sci 2012-02-20 14:49:22 +09:00
parent 657ef8ef60
commit 2e63bc5d82
1 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,6 @@ fn mk_filesearch(maybe_sysroot: option<fs::path>,
result::ok(p) { [p] }
result::err(p) { [] }
}
+ [fs::connect(fs::connect(self.sysroot, ".cargo"),
libdir())]
}
fn get_target_lib_path() -> fs::path {
make_target_lib_path(self.sysroot, self.target_triple)
@ -113,7 +111,9 @@ fn get_sysroot(maybe_sysroot: option<fs::path>) -> fs::path {
}
fn get_cargo_sysroot() -> result::t<fs::path, str> {
result::ok(fs::connect(get_default_sysroot(), ".cargo"))
let path = [get_default_sysroot(), libdir(), "cargo"];
check vec::is_not_empty(path);
result::ok(fs::connect_many(path))
}
fn get_cargo_root() -> result::t<fs::path, str> {