Change the directory for target libs
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
This commit is contained in:
@@ -166,7 +166,12 @@ define SREQ
|
|||||||
# Destinations of artifacts for target architectures
|
# Destinations of artifacts for target architectures
|
||||||
TARGET_ROOT$(1)$(2) = stage$(1)/lib/rustc/$(2)
|
TARGET_ROOT$(1)$(2) = stage$(1)/lib/rustc/$(2)
|
||||||
TARGET_BIN$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/bin
|
TARGET_BIN$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/bin
|
||||||
|
# FIXME: Transitional
|
||||||
|
ifeq ($(1),0)
|
||||||
TARGET_LIB$(1)$(2) = $$(TARGET_ROOT$(1)$(2))
|
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
|
# Destinations of artifacts for the host compiler
|
||||||
HOST_ROOT$(1) = stage$(1)
|
HOST_ROOT$(1) = stage$(1)
|
||||||
|
|||||||
14
configure
vendored
14
configure
vendored
@@ -390,17 +390,17 @@ for t in $CFG_TARGET_TRIPLES
|
|||||||
do
|
do
|
||||||
for i in 0 1 2 3
|
for i in 0 1 2 3
|
||||||
do
|
do
|
||||||
# old-style "bin" dir
|
# host bin dir
|
||||||
make_dir stage$i
|
|
||||||
|
|
||||||
# new-style bin dir, not yet used
|
|
||||||
make_dir stage$i/bin
|
make_dir stage$i/bin
|
||||||
|
|
||||||
# old-style non-arch libs
|
# host lib dir
|
||||||
make_dir stage$i/lib
|
make_dir stage$i/lib
|
||||||
|
|
||||||
# new-style arch-prefixed libs, not yet used
|
# target bin dir
|
||||||
make_dir stage$i/lib/rustc/$t
|
make_dir stage$i/lib/rustc/$t/bin
|
||||||
|
|
||||||
|
# target lib dir
|
||||||
|
make_dir stage$i/lib/rustc/$t/lib
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ test/rustctest.stage$(2)$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
|
|||||||
$$(HOST_LIB$(2))/$$(CFG_RUSTLLVM) \
|
$$(HOST_LIB$(2))/$$(CFG_RUSTLLVM) \
|
||||||
$$(SREQ$(1)$$(CFG_HOST_TRIPLE))
|
$$(SREQ$(1)$$(CFG_HOST_TRIPLE))
|
||||||
@$$(call E, compile_and_link: $$@)
|
@$$(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)
|
test/rustctest.stage$(2).out.tmp: test/rustctest.stage$(2)$$(X)
|
||||||
@$$(call E, run: $$<)
|
@$$(call E, run: $$<)
|
||||||
|
|||||||
@@ -39,16 +39,23 @@ fn llvm_err(sess: session::session, msg: str) {
|
|||||||
} else { sess.fatal(msg + ": " + str::str_from_cstr(buf)); }
|
} 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 = [
|
let path = [
|
||||||
sess.get_opts().sysroot,
|
sysroot,
|
||||||
"lib/rustc",
|
"lib/rustc",
|
||||||
sess.get_opts().target_triple];
|
target_triple,
|
||||||
|
"lib"
|
||||||
|
];
|
||||||
check vec::is_not_empty(path);
|
check vec::is_not_empty(path);
|
||||||
let path = fs::connect_many(path);
|
let path = fs::connect_many(path);
|
||||||
ret 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,
|
fn get_target_lib_file_path(sess: session::session,
|
||||||
file: fs::path) -> fs::path {
|
file: fs::path) -> fs::path {
|
||||||
fs::connect(get_target_lib_path(sess), file)
|
fs::connect(get_target_lib_path(sess), file)
|
||||||
|
|||||||
@@ -378,8 +378,7 @@ fn build_session_options(binary: str, match: getopts::match)
|
|||||||
some(s) { s }
|
some(s) { s }
|
||||||
};
|
};
|
||||||
|
|
||||||
let library_search_paths = [
|
let library_search_paths = [link::make_target_lib_path(sysroot, target)];
|
||||||
fs::connect(sysroot, "lib/rustc/" + target )];
|
|
||||||
let lsp_vec = getopts::opt_strs(match, "L");
|
let lsp_vec = getopts::opt_strs(match, "L");
|
||||||
// FIXME: These should probably go in front of the defaults
|
// FIXME: These should probably go in front of the defaults
|
||||||
for lsp: str in lsp_vec { library_search_paths += [lsp]; }
|
for lsp: str in lsp_vec { library_search_paths += [lsp]; }
|
||||||
|
|||||||
Reference in New Issue
Block a user