diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-02-27 16:05:17 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-02-28 06:31:28 -0800 |
| commit | bceea8339a87193c25472f22a92dbbaa52ac6ed3 (patch) | |
| tree | 6cc937e467ca51637917677d92ce039f09ac0132 /src/comp/driver | |
| parent | a1b2f34bd0f301f550a55ad1ccf43b65f3d5a0c1 (diff) | |
| download | rust-bceea8339a87193c25472f22a92dbbaa52ac6ed3.tar.gz rust-bceea8339a87193c25472f22a92dbbaa52ac6ed3.zip | |
change def's that are always local to use node_id, add --inline opt
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/driver.rs | 6 | ||||
| -rw-r--r-- | src/comp/driver/session.rs | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/comp/driver/driver.rs b/src/comp/driver/driver.rs index 33398722605..fd3b718231a 100644 --- a/src/comp/driver/driver.rs +++ b/src/comp/driver/driver.rs @@ -177,9 +177,10 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg, last_uses: last_uses, impl_map: impl_map, method_map: method_map, dict_map: dict_map}; + let ienbld = sess.opts.inline; let inline_map = time(time_passes, "inline", - bind inline::instantiate_inlines(ty_cx, maps, crate)); + bind inline::instantiate_inlines(ienbld, ty_cx, maps, crate)); let (llmod, link_meta) = time(time_passes, "translation", @@ -363,6 +364,7 @@ fn build_session_options(match: getopts::match, lint_opts += [(lint::ctypes, false)]; } let monomorphize = opt_present(match, "monomorphize"); + let inline = opt_present(match, "inline"); let output_type = if parse_only || no_trans { @@ -441,6 +443,7 @@ fn build_session_options(match: getopts::match, no_trans: no_trans, no_asm_comments: no_asm_comments, monomorphize: monomorphize, + inline: inline, warn_unused_imports: warn_unused_imports}; ret sopts; } @@ -511,6 +514,7 @@ fn opts() -> [getopts::opt] { optflag("no-verify"), optflag("no-lint-ctypes"), optflag("monomorphize"), + optflag("inline"), optmulti("cfg"), optflag("test"), optflag("lib"), optflag("bin"), optflag("static"), optflag("gc"), optflag("no-asm-comments"), diff --git a/src/comp/driver/session.rs b/src/comp/driver/session.rs index b38240b60c3..b967ad23f58 100644 --- a/src/comp/driver/session.rs +++ b/src/comp/driver/session.rs @@ -46,6 +46,7 @@ type options = no_trans: bool, no_asm_comments: bool, monomorphize: bool, + inline: bool, warn_unused_imports: bool}; type crate_metadata = {name: str, data: [u8]}; |
