Skip to content

Commit 54ecf7a

Browse files
committed
---
yaml --- r: 5645 b: refs/heads/master c: 821dd6c h: refs/heads/master i: 5643: 7fc1726 v: v3
1 parent 42cb9f8 commit 54ecf7a

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e71d17ffa67627042d665771f7fa9dd2f3a7a662
2+
refs/heads/master: 821dd6c02cf7d2430903f74f9e445975fcaccc55

trunk/Makefile.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ define SREQ
166166
# Destinations of artifacts for target architectures
167167
TARGET_ROOT$(1)$(2) = stage$(1)/lib/rustc/$(2)
168168
TARGET_BIN$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/bin
169+
# FIXME: Transitional
170+
ifeq ($(1),0)
169171
TARGET_LIB$(1)$(2) = $$(TARGET_ROOT$(1)$(2))
172+
else
173+
TARGET_LIB$(1)$(2) = $$(TARGET_ROOT$(1)$(2))/lib
174+
endif
170175

171176
# Destinations of artifacts for the host compiler
172177
HOST_ROOT$(1) = stage$(1)

trunk/configure

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,17 +390,17 @@ for t in $CFG_TARGET_TRIPLES
390390
do
391391
for i in 0 1 2 3
392392
do
393-
# old-style "bin" dir
394-
make_dir stage$i
395-
396-
# new-style bin dir, not yet used
393+
# host bin dir
397394
make_dir stage$i/bin
398395

399-
# old-style non-arch libs
396+
# host lib dir
400397
make_dir stage$i/lib
401398

402-
# new-style arch-prefixed libs, not yet used
403-
make_dir stage$i/lib/rustc/$t
399+
# target bin dir
400+
make_dir stage$i/lib/rustc/$t/bin
401+
402+
# target lib dir
403+
make_dir stage$i/lib/rustc/$t/lib
404404
done
405405
done
406406

trunk/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ test/rustctest.stage$(2)$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
151151
$$(HOST_LIB$(2))/$$(CFG_RUSTLLVM) \
152152
$$(SREQ$(1)$$(CFG_HOST_TRIPLE))
153153
@$$(call E, compile_and_link: $$@)
154-
$$(STAGE$(1)) -o $$@ $$< --test
154+
$$(STAGE$(1)) -L $$(HOST_LIB$(2)) -o $$@ $$< --test
155155

156156
test/rustctest.stage$(2).out.tmp: test/rustctest.stage$(2)$$(X)
157157
@$$(call E, run: $$<)

trunk/src/comp/back/link.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,23 @@ fn llvm_err(sess: session::session, msg: str) {
3939
} else { sess.fatal(msg + ": " + str::str_from_cstr(buf)); }
4040
}
4141

42-
fn get_target_lib_path(sess: session::session) -> fs::path {
42+
fn make_target_lib_path(sysroot: fs::path, target_triple: str) -> fs::path {
4343
let path = [
44-
sess.get_opts().sysroot,
44+
sysroot,
4545
"lib/rustc",
46-
sess.get_opts().target_triple];
46+
target_triple,
47+
"lib"
48+
];
4749
check vec::is_not_empty(path);
4850
let path = fs::connect_many(path);
4951
ret path;
5052
}
5153

54+
fn get_target_lib_path(sess: session::session) -> fs::path {
55+
make_target_lib_path(sess.get_opts().sysroot,
56+
sess.get_opts().target_triple)
57+
}
58+
5259
fn get_target_lib_file_path(sess: session::session,
5360
file: fs::path) -> fs::path {
5461
fs::connect(get_target_lib_path(sess), file)

trunk/src/comp/driver/rustc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,7 @@ fn build_session_options(binary: str, match: getopts::match)
378378
some(s) { s }
379379
};
380380

381-
let library_search_paths = [
382-
fs::connect(sysroot, "lib/rustc/" + target )];
381+
let library_search_paths = [link::make_target_lib_path(sysroot, target)];
383382
let lsp_vec = getopts::opt_strs(match, "L");
384383
// FIXME: These should probably go in front of the defaults
385384
for lsp: str in lsp_vec { library_search_paths += [lsp]; }

0 commit comments

Comments
 (0)