Skip to content

Commit 0553361

Browse files
z0w0graydon
authored andcommitted
---
yaml --- r: 53145 b: refs/heads/dist-snap c: c82183d h: refs/heads/master i: 53143: 9f2c44f v: v3
1 parent d35d580 commit 0553361

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: e34e072d1777ad2064ed9b70ccdbe29b4f100f9b
10+
refs/heads/dist-snap: c82183de19ad3c77c16bbf34bebf1f73b297e526
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)