Skip to content

Commit ea44841

Browse files
author
Elliott Slaughter
committed
---
yaml --- r: 30057 b: refs/heads/incoming c: 7706262 h: refs/heads/master i: 30055: fe7d276 v: v3
1 parent 38d6569 commit ea44841

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 30768d3609d905439a129e7e9bf4571b38e321f3
9+
refs/heads/incoming: 7706262a730ac7bbea73decc551cdafffa8f1dbd
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustc/driver/driver.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ fn build_session_options(matches: getopts::matches,
421421
session::unknown_crate
422422
};
423423
let static = opt_present(matches, ~"static");
424+
let gc = opt_present(matches, ~"gc");
424425

425426
let parse_only = opt_present(matches, ~"parse-only");
426427
let no_trans = opt_present(matches, ~"no-trans");
@@ -519,6 +520,7 @@ fn build_session_options(matches: getopts::matches,
519520
let sopts: @session::options =
520521
@{crate_type: crate_type,
521522
static: static,
523+
gc: gc,
522524
optimize: opt_level,
523525
debuginfo: debuginfo,
524526
extra_debuginfo: extra_debuginfo,

branches/incoming/src/rustc/driver/session.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type options =
8282
// with additional crate configurations during the compile process
8383
{crate_type: crate_type,
8484
static: bool,
85+
gc: bool,
8586
optimize: OptLevel,
8687
debuginfo: bool,
8788
extra_debuginfo: bool,
@@ -221,6 +222,7 @@ fn basic_options() -> @options {
221222
@{
222223
crate_type: session::lib_crate,
223224
static: false,
225+
gc: false,
224226
optimize: No,
225227
debuginfo: false,
226228
extra_debuginfo: false,

branches/incoming/src/rustc/middle/trans/base.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4792,6 +4792,13 @@ fn trans_closure(ccx: @crate_ctxt, path: path, decl: ast::fn_decl,
47924792
some(body.span));
47934793
create_llargs_for_fn_args(fcx, ty_self, decl.inputs);
47944794

4795+
// Set GC for function.
4796+
if ccx.sess.opts.gc {
4797+
do str::as_c_str("generic") |strategy| {
4798+
llvm::LLVMSetGC(fcx.llfn, strategy);
4799+
}
4800+
}
4801+
47954802
// Create the first basic block in the function and keep a handle on it to
47964803
// pass to finish_fn later.
47974804
let bcx_top = top_scope_block(fcx, body.info());

0 commit comments

Comments
 (0)