]> git.lizzy.rs Git - rust.git/commitdiff
Change the directory for target libs
authorBrian Anderson <banderson@mozilla.com>
Fri, 30 Sep 2011 23:55:18 +0000 (16:55 -0700)
committerBrian Anderson <banderson@mozilla.com>
Sat, 1 Oct 2011 00:19:24 +0000 (17:19 -0700)
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir

Makefile.in
configure
mk/tests.mk
src/comp/back/link.rs
src/comp/driver/rustc.rs

index 93d7f7abaa7b5093d1f750f07e58c2c5f6f3d276..fb6ca8b07dc620022a673a35cf486d3515274601 100644 (file)
@@ -166,7 +166,12 @@ define SREQ
 # Destinations of artifacts for target architectures
 TARGET_ROOT$(1)$(2) = stage$(1)/lib/rustc/$(2)
 TARGET_BIN$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/bin
+# FIXME: Transitional
+ifeq ($(1),0)
 TARGET_LIB$(1)$(2) = $$(TARGET_ROOT$(1)$(2))
+else
+TARGET_LIB$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/lib
+endif
 
 # Destinations of artifacts for the host compiler
 HOST_ROOT$(1) = stage$(1)
index ec73a59f3fd0c4ea5a54b2af6e89360e748d48be..dcbe33e00ff49e4c510a3c36f89cfd3a0701d275 100755 (executable)
--- a/configure
+++ b/configure
@@ -390,17 +390,17 @@ for t in $CFG_TARGET_TRIPLES
 do
     for i in 0 1 2 3
     do
-        # old-style "bin" dir
-        make_dir stage$i
-
-        # new-style bin dir, not yet used
+        # host bin dir
         make_dir stage$i/bin
 
-        # old-style non-arch libs
+        # host lib dir
         make_dir stage$i/lib
 
-        # new-style arch-prefixed libs, not yet used
-        make_dir stage$i/lib/rustc/$t
+        # target bin dir
+        make_dir stage$i/lib/rustc/$t/bin
+
+        # target lib dir
+        make_dir stage$i/lib/rustc/$t/lib
     done
 done
 
index 77ff20e5a0143e1d80dd1ca2fdefbdb09fe3eb0b..7dae7e6d552f15f70f22c72681981151597185e8 100644 (file)
@@ -151,7 +151,7 @@ test/rustctest.stage$(2)$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
                            $$(HOST_LIB$(2))/$$(CFG_RUSTLLVM) \
                            $$(SREQ$(1)$$(CFG_HOST_TRIPLE))
        @$$(call E, compile_and_link: $$@)
-       $$(STAGE$(1)) -o $$@ $$< --test
+       $$(STAGE$(1)) -L $$(HOST_LIB$(2)) -o $$@ $$< --test
 
 test/rustctest.stage$(2).out.tmp: test/rustctest.stage$(2)$$(X)
        @$$(call E, run: $$<)
index c1d417afa16afd1c7bb18ef734a8e23293a1f94d..a0c6aac09fd5776cfa85a60f9ee18cecdd2d0dd9 100644 (file)
@@ -39,16 +39,23 @@ fn llvm_err(sess: session::session, msg: str) {
     } else { sess.fatal(msg + ": " + str::str_from_cstr(buf)); }
 }
 
-fn get_target_lib_path(sess: session::session) -> fs::path {
+fn make_target_lib_path(sysroot: fs::path, target_triple: str) -> fs::path {
     let path = [
-        sess.get_opts().sysroot,
+        sysroot,
         "lib/rustc",
-        sess.get_opts().target_triple];
+        target_triple,
+        "lib"
+    ];
     check vec::is_not_empty(path);
     let path = fs::connect_many(path);
     ret path;
 }
 
+fn get_target_lib_path(sess: session::session) -> fs::path {
+    make_target_lib_path(sess.get_opts().sysroot,
+                         sess.get_opts().target_triple)
+}
+
 fn get_target_lib_file_path(sess: session::session,
                             file: fs::path) -> fs::path {
     fs::connect(get_target_lib_path(sess), file)
index 3907f1c3500dbd0cc39c9760ce4ab614105b7a72..20dfe674fd1ef6293ab492733629a0dbb4dd6260 100644 (file)
@@ -378,8 +378,7 @@ fn build_session_options(binary: str, match: getopts::match)
             some(s) { s }
         };
 
-    let library_search_paths = [
-        fs::connect(sysroot, "lib/rustc/" + target )];
+    let library_search_paths = [link::make_target_lib_path(sysroot, target)];
     let lsp_vec = getopts::opt_strs(match, "L");
     // FIXME: These should probably go in front of the defaults
     for lsp: str in lsp_vec { library_search_paths += [lsp]; }