Skip to content

Commit 2b037cf

Browse files
z0w0graydon
authored andcommitted
---
yaml --- r: 46300 b: refs/heads/auto c: c82183d h: refs/heads/master v: v3
1 parent f1621cc commit 2b037cf

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
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e34e072d1777ad2064ed9b70ccdbe29b4f100f9b
17+
refs/heads/auto: c82183de19ad3c77c16bbf34bebf1f73b297e526

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