Skip to content

Commit f772e31

Browse files
committed
rustc: Stop relying on CFG_LIBDIR_RELATIVE
This is not sufficient for finding the library directory for binary installs, but it does make the build more complex by requiring env vars be set to build rustc.
1 parent 6f9b30c commit f772e31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc/metadata/filesearch.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,14 @@ pub fn rust_path() -> Vec<Path> {
235235

236236
// The name of the directory rustc expects libraries to be located.
237237
// On Unix should be "lib", on windows "bin"
238+
#[cfg(unix)]
238239
pub fn libdir() -> ~str {
239-
(env!("CFG_LIBDIR_RELATIVE")).to_owned()
240+
~"lib"
241+
}
242+
243+
#[cfg(windows)]
244+
pub fn libdir() -> ~str {
245+
~"bin"
240246
}
241247

242248
// The name of rustc's own place to organize libraries.

0 commit comments

Comments
 (0)