From f772e31d6484f090b9bc50f8e14f426c9c6dfaff Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 25 Mar 2014 19:17:02 -0700 Subject: [PATCH] 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. --- src/librustc/metadata/filesearch.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs index 31252ab4f82..df5aa1fe414 100644 --- a/src/librustc/metadata/filesearch.rs +++ b/src/librustc/metadata/filesearch.rs @@ -235,8 +235,14 @@ pub fn rust_path() -> Vec { // The name of the directory rustc expects libraries to be located. // On Unix should be "lib", on windows "bin" +#[cfg(unix)] pub fn libdir() -> ~str { - (env!("CFG_LIBDIR_RELATIVE")).to_owned() + ~"lib" +} + +#[cfg(windows)] +pub fn libdir() -> ~str { + ~"bin" } // The name of rustc's own place to organize libraries.