Skip to content

Commit

Permalink
Remove binary field
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Feb 10, 2014
1 parent d440a56 commit d1cbdc6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,7 @@ pub fn host_triple() -> ~str {
(env!("CFG_COMPILER")).to_owned()
}

pub fn build_session_options(binary: ~str,
matches: &getopts::Matches)
pub fn build_session_options(matches: &getopts::Matches)
-> @session::Options {
let crate_types = matches.opt_strs("crate-type").flat_map(|s| {
s.split(',').map(|part| {
Expand Down Expand Up @@ -864,7 +863,6 @@ pub fn build_session_options(binary: ~str,
maybe_sysroot: sysroot_opt,
target_triple: target,
cfg: cfg,
binary: binary,
test: test,
parse_only: parse_only,
no_trans: no_trans,
Expand Down Expand Up @@ -1159,7 +1157,7 @@ mod test {
Ok(m) => m,
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
};
let sessopts = build_session_options(~"rustc", matches);
let sessopts = build_session_options(matches);
let sess = build_session(sessopts, None);
let cfg = build_configuration(sess);
assert!((attr::contains_name(cfg, "test")));
Expand All @@ -1177,7 +1175,7 @@ mod test {
f.to_err_msg());
}
};
let sessopts = build_session_options(~"rustc", matches);
let sessopts = build_session_options(matches);
let sess = build_session(sessopts, None);
let cfg = build_configuration(sess);
let mut test_items = cfg.iter().filter(|m| m.name().equiv(&("test")));
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ pub struct Options {
// will be added to the crate AST node. This should not be used for
// anything except building the full crate config prior to parsing.
cfg: ast::CrateConfig,
binary: ~str,
test: bool,
parse_only: bool,
no_trans: bool,
Expand Down Expand Up @@ -334,7 +333,6 @@ pub fn basic_options() -> @Options {
maybe_sysroot: None,
target_triple: host_triple(),
cfg: ~[],
binary: ~"rustc",
test: false,
parse_only: false,
no_trans: false,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pub fn run_compiler(args: &[~str]) {
_ => d::early_error("multiple input filenames provided")
};

let sopts = d::build_session_options(binary, matches);
let sopts = d::build_session_options(matches);
let sess = d::build_session(sopts, input_file_path);
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
let ofile = matches.opt_str("o").map(|o| Path::new(o));
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ fn get_ast_and_resolve(cpath: &Path,
let input = FileInput(cpath.clone());

let sessopts = @driver::session::Options {
binary: ~"rustdoc",
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
addl_lib_search_paths: @RefCell::new(libs),
crate_types: ~[driver::session::CrateTypeDylib],
Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int {
let libs = @RefCell::new(libs.move_iter().collect());

let sessopts = @session::Options {
binary: ~"rustdoc",
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
addl_lib_search_paths: libs,
crate_types: ~[session::CrateTypeDylib],
Expand Down Expand Up @@ -101,7 +100,6 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>) {
let input = driver::StrInput(test);

let sessopts = @session::Options {
binary: ~"rustdoctest",
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
addl_lib_search_paths: @RefCell::new(libs),
crate_types: ~[session::CrateTypeExecutable],
Expand Down

5 comments on commit d1cbdc6

@bors
Copy link
Contributor

@bors bors commented on d1cbdc6 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pnkfelix
at sanxiyn@d1cbdc6

@bors
Copy link
Contributor

@bors bors commented on d1cbdc6 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sanxiyn/rust/binary = d1cbdc6 into auto

@bors
Copy link
Contributor

@bors bors commented on d1cbdc6 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanxiyn/rust/binary = d1cbdc6 merged ok, testing candidate = 8ef2559

@bors
Copy link
Contributor

@bors bors commented on d1cbdc6 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on d1cbdc6 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 8ef2559

Please sign in to comment.