]> git.lizzy.rs Git - rust.git/commitdiff
Revert "build: Build libraries in the bin directory on win32"
authorBrian Anderson <banderson@mozilla.com>
Fri, 13 Jan 2012 04:06:45 +0000 (20:06 -0800)
committerBrian Anderson <banderson@mozilla.com>
Fri, 13 Jan 2012 04:06:45 +0000 (20:06 -0800)
This reverts commit 23e0d16b5fd259dc252b220777f164f1e2eb9c30.

Makefile.in
configure
mk/platform.mk
src/comp/back/rpath.rs
src/comp/util/filesearch.rs
src/etc/snapshot.py

index 2b0d23cfe31ff71bb405bb2366bf8c679ca67f8a..b62f6abe86c7d34a50275d0aa052b8413741ce4a 100644 (file)
@@ -262,7 +262,6 @@ export CFG_HOST_TRIPLE
 export CFG_LLVM_ROOT
 export CFG_ENABLE_MINGW_CROSS
 export CFG_PREFIX
-export CFG_LIBDIR
 
 ######################################################################
 # Subprograms
@@ -280,21 +279,12 @@ define SREQ
 # Destinations of artifacts for the host compiler
 HROOT$(1)_H_$(3) = $(3)/stage$(1)
 HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
-# FIXME: Temporary hack for moving win32 libs to the bin directory
-ifeq ($(1),0)
 HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
-else
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR)
-endif
 
 # Destinations of artifacts for target architectures
 TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2)
 TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
-ifeq ($(1),0)
 TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
-else
-TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR)
-endif
 
 # The name of the core and standard libraries used by rustc
 ifdef CFG_DISABLE_SHAREDSTD
index fb6bbf06219f5fb8180c5b0867df9e16b4a6490b..71dac58feeabf1b65456d901dbb92b1dd2791763 100755 (executable)
--- a/configure
+++ b/configure
@@ -397,14 +397,6 @@ do
   done
 done
 
-# On windows we just store the libraries in the bin directory because
-# there's no rpath
-CFG_LIBDIR=lib
-if [ "$CFG_OSTYPE" = "pc-mingw32" ]
-then
-    CFG_LIBDIR=bin
-fi
-
 for h in $CFG_TARGET_TRIPLES
 do
     for t in $CFG_TARGET_TRIPLES
@@ -415,19 +407,13 @@ do
             make_dir $h/stage$i/bin
 
             # host lib dir
-            make_dir $h/stage$i/$CFG_LIBDIR
-           # FIXME: Transitional. remove
-           make_dir $h/stage$i/lib
+            make_dir $h/stage$i/lib
 
             # target bin dir
-            make_dir $h/stage$i/$CFG_LIBDIR/rustc/$t/bin
-           # FIXME: Transitional. remove
-           make_dir $h/stage$i/lib/rustc/$t/bin
+            make_dir $h/stage$i/lib/rustc/$t/bin
 
             # target lib dir
-            make_dir $h/stage$i/$CFG_LIBDIR/rustc/$t/$CFG_LIBDIR
-           # FIXME: Transitional. remove
-           make_dir $h/stage$i/lib/rustc/$t/lib
+            make_dir $h/stage$i/lib/rustc/$t/lib
         done
     done
 
@@ -596,7 +582,6 @@ putvar CFG_HOST_TRIPLE
 putvar CFG_TARGET_TRIPLES
 putvar CFG_C_COMPILER
 putvar CFG_PREFIX
-putvar CFG_LIBDIR
 
 # Setting this again because it may have been changed
 if [ $CFG_DISABLE_MANAGE_SUBMODULES ]
index 3d070724abcb63f3a0b25fa5d1b62e37b6041dbd..40a3dd8ebc6b959d257f4f0e8f6c6a50f1cbb587 100644 (file)
@@ -108,14 +108,14 @@ endif
 
 CFG_TESTLIB=$(CFG_BUILD_DIR)/$(2)/$(strip \
  $(if $(findstring stage0,$(1)), \
-       stage0/$(CFG_LIBDIR), \
+       stage0/lib, \
       $(if $(findstring stage1,$(1)), \
-           stage1/$(CFG_LIBDIR), \
+           stage1/lib, \
           $(if $(findstring stage2,$(1)), \
-               stage2/$(CFG_LIBDIR), \
+               stage2/lib, \
                $(if $(findstring stage3,$(1)), \
-                    stage3/$(CFG_LIBDIR), \
-               )))))/rustc/$(CFG_HOST_TRIPLE)/$(CFG_LIBDIR)
+                    stage3/lib, \
+               )))))/rustc/$(CFG_HOST_TRIPLE)/lib
 
 ifdef CFG_UNIXY
   CFG_INFO := $(info cfg: unix-y environment)
index 417d553c36afaa145073ace33618333055411bcc..16b0c62bf0506101877b373bbbd589fa04307a8b 100644 (file)
@@ -191,6 +191,7 @@ fn minimize_rpaths(rpaths: [str]) -> [str] {
 #[cfg(target_os = "linux")]
 #[cfg(target_os = "macos")]
 #[cfg(target_os = "freebsd")]
+#[cfg(test)]
 mod test {
     #[test]
     fn test_rpaths_to_flags() {
index d2dd2fc502c904b852f5fbffdb1cbb9769aaab6f..e030ddeed40e7128c63780aba0461d556de5c9b2 100644 (file)
@@ -16,7 +16,6 @@
 export search;
 export relative_target_lib_path;
 export get_cargo_root;
-export libdir;
 
 type pick<T> = block(path: fs::path) -> option::t<T>;
 
@@ -81,7 +80,7 @@ fn search<T: copy>(filesearch: filesearch, pick: pick<T>) -> option::t<T> {
 }
 
 fn relative_target_lib_path(target_triple: str) -> [fs::path] {
-    [libdir(), "rustc", target_triple, libdir()]
+    ["lib", "rustc", target_triple, "lib"]
 }
 
 fn make_target_lib_path(sysroot: fs::path,
@@ -122,16 +121,6 @@ fn get_cargo_root() -> result::t<fs::path, str> {
 
 fn get_cargo_lib_path() -> result::t<fs::path, str> {
     result::chain(get_cargo_root()) { |p|
-        result::ok(fs::connect(p, libdir()))
+        result::ok(fs::connect(p, "lib"))
     }
-}
-
-// The name of the directory rustc expects libraries to be located.
-// On Unix should be "lib", on windows "bin"
-fn libdir() -> str {
-   let libdir = #env("CFG_LIBDIR");
-   if str::is_empty(libdir) {
-      fail "rustc compiled without CFG_LIBDIR environment variable";
-   }
-   libdir
-}
+}
\ No newline at end of file
index 48e5e0bfd02c23d12b25c10f20da7873fa1f7a93..673facfe70a7f104f15d93e73ab4c6180aab0724 100644 (file)
@@ -29,11 +29,11 @@ snapshot_files = {
               "lib/librustrt.dylib",
               "lib/librustllvm.dylib"],
     "winnt": ["bin/rustc.exe",
-              "bin/core-*.dll",
-              "bin/std-*.dll",
-              "bin/rustc-*.dll",
-              "bin/rustrt.dll",
-              "bin/rustllvm.dll"],
+              "lib/core-*.dll",
+              "lib/std-*.dll",
+              "lib/rustc-*.dll",
+              "lib/rustrt.dll",
+              "lib/rustllvm.dll"],
     "freebsd": ["bin/rustc",
                 "lib/libcore-*.so",
                 "lib/libstd-*.so",