Skip to content

Commit e7e651b

Browse files
committed
---
yaml --- r: 13563 b: refs/heads/master c: 636a849 h: refs/heads/master i: 13561: d57fa41 13559: bdb38d7 v: v3
1 parent 7d341d6 commit e7e651b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ec0fbf526e76716379b86d53c1588e8f02ae986d
2+
refs/heads/master: 636a849bf20105ba4c316c2cc44cca391cb11d84
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/back/link.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,10 @@ fn link_binary(sess: session,
631631
}
632632
}
633633

634-
// Always want the runtime linked in
635-
cc_args += ["-lrustrt"];
634+
if !sess.debugging_opt(session::no_rt) {
635+
// Always want the runtime linked in
636+
cc_args += ["-lrustrt"];
637+
}
636638

637639
// On linux librt and libdl are an indirect dependencies via rustrt,
638640
// and binutils 2.22+ won't add them automatically

trunk/src/rustc/driver/session.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ const stats: uint = 16u;
3232
const no_asm_comments: uint = 32u;
3333
const no_verify: uint = 64u;
3434
const trace: uint = 128u;
35+
// FIXME: This exists to transition to a Rust crate runtime
36+
// It should be removed
37+
const no_rt: uint = 256u;
3538

3639
fn debugging_opts_map() -> [(str, str, uint)] {
3740
[("ppregions", "prettyprint regions with \
@@ -43,7 +46,9 @@ fn debugging_opts_map() -> [(str, str, uint)] {
4346
("stats", "gather trans statistics", stats),
4447
("no-asm-comments", "omit comments when using -S", no_asm_comments),
4548
("no-verify", "skip LLVM verification", no_verify),
46-
("trace", "emit trace logs", trace)]
49+
("trace", "emit trace logs", trace),
50+
("no-rt", "do not link to the runtime", no_rt)
51+
]
4752
}
4853

4954
type options =
@@ -64,7 +69,6 @@ type options =
6469
test: bool,
6570
parse_only: bool,
6671
no_trans: bool,
67-
6872
debugging_opts: uint,
6973
};
7074

0 commit comments

Comments
 (0)