Skip to content

Commit 11071c7

Browse files
z0w0graydon
authored andcommitted
---
yaml --- r: 47021 b: refs/heads/try c: c82183d h: refs/heads/master i: 47019: bde2fb4 v: v3
1 parent a70b45a commit 11071c7

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: e34e072d1777ad2064ed9b70ccdbe29b4f100f9b
5+
refs/heads/try: c82183de19ad3c77c16bbf34bebf1f73b297e526
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustpkg/util.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ use syntax::ast_util::*;
1616
use syntax::{ast, attr, codemap, diagnostic, fold, parse, visit};
1717
use codemap::span;
1818
use semver::Version;
19-
use std::{json, term, sort};
19+
use std::{json, term, sort, getopts};
20+
use getopts::groups::getopts;
2021
use api::Listener;
2122

2223
pub struct Package {
@@ -866,14 +867,15 @@ pub fn compile_input(sysroot: Option<Path>, input: driver::input, dir: &Path,
866867
let bin_dir = dir.push(~"bin");
867868
let test_dir = dir.push(~"test");
868869
let binary = os::args()[0];
869-
let options: @session::options = @{
870-
binary: binary,
871-
crate_type: session::unknown_crate,
872-
optimize: if opt { session::Aggressive } else { session::No },
873-
test: test,
874-
maybe_sysroot: sysroot,
875-
.. *session::basic_options()
876-
};
870+
let matches = getopts(flags, driver::optgroups()).get();
871+
let mut options = driver::build_session_options(binary, matches,
872+
diagnostic::emit);
873+
874+
options.crate_type = session::unknown_crate;
875+
options.optimize = if opt { session::Aggressive } else { session::No };
876+
options.test = test;
877+
options.maybe_sysroot = sysroot;
878+
877879
let sess = driver::build_session(options, diagnostic::emit);
878880
let cfg = driver::build_configuration(sess, binary, input);
879881
let mut outputs = driver::build_output_filenames(input, &None, &None,

0 commit comments

Comments
 (0)