Skip to content

Commit f39d632

Browse files
z0w0graydon
authored andcommitted
---
yaml --- r: 47709 b: refs/heads/incoming c: c82183d h: refs/heads/master i: 47707: 01a77eb v: v3
1 parent 12228a3 commit f39d632

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
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: e34e072d1777ad2064ed9b70ccdbe29b4f100f9b
9+
refs/heads/incoming: c82183de19ad3c77c16bbf34bebf1f73b297e526
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/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)