Skip to content

Commit 1e32671

Browse files
committed
---
yaml --- r: 3196 b: refs/heads/master c: 1dbc044 h: refs/heads/master v: v3
1 parent ebe5550 commit 1e32671

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
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: 982f51aa95442b314f8d9c4901707e3a26821526
2+
refs/heads/master: 1dbc0442cddb0317938a481b7afb7e4113658d78

trunk/Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ STAGE0 := $(Q)$(call CFG_RUN_TARG,stage0,\
109109
stage0/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage0)
110110
STAGE1 := $(Q)$(call CFG_RUN_TARG,stage0, \
111111
$(CFG_VALGRIND_COMPILE) stage1/rustc$(X) \
112-
$(CFG_RUSTC_FLAGS) -L stage1)
112+
$(CFG_RUSTC_FLAGS))
113113
STAGE2 := $(Q)$(call CFG_RUN_TARG,stage1, \
114114
$(CFG_VALGRIND_COMPILE) stage2/rustc$(X) \
115-
$(CFG_RUSTC_FLAGS) -L stage2)
115+
$(CFG_RUSTC_FLAGS))
116116
STAGE3 := $(Q)$(call CFG_RUN_TARG,stage2, \
117117
$(CFG_VALGRIND_COMPILE) stage3/rustc$(X) \
118-
$(CFG_RUSTC_FLAGS) -L stage3)
118+
$(CFG_RUSTC_FLAGS))
119119

120120
# "Source" files we generate in builddir along the way.
121121
GENERATED :=

trunk/src/comp/driver/rustc.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,11 @@ fn build_target_config() -> @session::config {
202202
ret target_cfg;
203203
}
204204

205-
fn build_session_options(str binary, getopts::match match) ->
205+
fn build_session_options(str binary, getopts::match match, str binary_dir) ->
206206
@session::options {
207207
auto shared = opt_present(match, "shared");
208-
auto library_search_paths = getopts::opt_strs(match, "L");
208+
auto library_search_paths = [binary_dir];
209+
library_search_paths += getopts::opt_strs(match, "L");
209210
auto output_type =
210211
if (opt_present(match, "parse-only")) {
211212
link::output_type_none
@@ -297,6 +298,7 @@ fn main(vec[str] args) {
297298
optflag("time-llvm-passes"), optflag("no-typestate"),
298299
optflag("noverify")];
299300
auto binary = vec::shift[str](args);
301+
auto binary_dir = fs::dirname(binary);
300302
auto match =
301303
alt (getopts::getopts(args, opts)) {
302304
case (getopts::success(?m)) { m }
@@ -313,7 +315,7 @@ fn main(vec[str] args) {
313315
version(binary);
314316
ret;
315317
}
316-
auto sopts = build_session_options(binary, match);
318+
auto sopts = build_session_options(binary, match, binary_dir);
317319
auto sess = build_session(sopts);
318320
auto n_inputs = vec::len[str](match.free);
319321
auto output_file = getopts::opt_maybe_str(match, "o");
@@ -391,7 +393,6 @@ fn main(vec[str] args) {
391393
//
392394
// TODO: Factor this out of main.
393395
if (sopts.output_type == link::output_type_exe) {
394-
auto binary_dir = fs::dirname(binary);
395396
let str glu = binary_dir + "/glue.o";
396397
let str main = "rt/main.o";
397398
let str stage = "-L" + binary_dir;

0 commit comments

Comments
 (0)