Skip to content

Commit

Permalink
Use libdir() instead of hard coded string. Fixes #10903
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Dec 12, 2013
1 parent d441c54 commit 85d33a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/librustpkg/path_util.rs
Expand Up @@ -16,6 +16,7 @@ pub use package_id::PkgId;
pub use target::{OutputType, Main, Lib, Test, Bench, Target, Build, Install};
pub use version::{Version, NoVersion, split_version_general, try_parsing_version};
pub use rustc::metadata::filesearch::rust_path;
use rustc::metadata::filesearch::libdir;
use rustc::driver::driver::host_triple;

use std::libc;
Expand Down Expand Up @@ -113,7 +114,7 @@ pub fn target_build_dir(workspace: &Path) -> Path {
/// Return the target-specific lib subdirectory, pushed onto `base`;
/// doesn't check that it exists or create it
fn target_lib_dir(workspace: &Path) -> Path {
let mut dir = workspace.join("lib");
let mut dir = workspace.join(libdir());
dir.push(host_triple());
dir
}
Expand Down Expand Up @@ -184,7 +185,7 @@ pub fn installed_library_in_workspace(pkg_path: &Path, workspace: &Path) -> Opti
short_name,
Install,
workspace,
"lib",
libdir(),
&NoVersion)
}
}
Expand Down Expand Up @@ -212,7 +213,7 @@ pub fn library_in_workspace(path: &Path, short_name: &str, where: Target,

// rustc doesn't use target-specific subdirectories
pub fn system_library(sysroot: &Path, lib_name: &str) -> Option<Path> {
library_in(lib_name, &NoVersion, &sysroot.join("lib"))
library_in(lib_name, &NoVersion, &sysroot.join(libdir()))
}

fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Option<Path> {
Expand Down

9 comments on commit 85d33a0

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jhasse@85d33a0

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jhasse/rust/patch-rustpkg = 85d33a0 into auto

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 12, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jhasse/rust/patch-rustpkg = 85d33a0 merged ok, testing candidate = 9159e5ee

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 12, 2013

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jhasse@85d33a0

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jhasse/rust/patch-rustpkg = 85d33a0 into auto

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jhasse/rust/patch-rustpkg = 85d33a0 merged ok, testing candidate = 7eb50c2

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 85d33a0 Dec 14, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 7eb50c2

Please sign in to comment.