auto merge of #12155 : sanxiyn/rust/binary, r=pnkfelix
The field is unused.
This commit is contained in:
commit
8ef25597e6
|
@ -728,8 +728,7 @@ pub fn host_triple() -> ~str {
|
||||||
(env!("CFG_COMPILER")).to_owned()
|
(env!("CFG_COMPILER")).to_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_session_options(binary: ~str,
|
pub fn build_session_options(matches: &getopts::Matches)
|
||||||
matches: &getopts::Matches)
|
|
||||||
-> @session::Options {
|
-> @session::Options {
|
||||||
let crate_types = matches.opt_strs("crate-type").flat_map(|s| {
|
let crate_types = matches.opt_strs("crate-type").flat_map(|s| {
|
||||||
s.split(',').map(|part| {
|
s.split(',').map(|part| {
|
||||||
|
@ -864,7 +863,6 @@ pub fn build_session_options(binary: ~str,
|
||||||
maybe_sysroot: sysroot_opt,
|
maybe_sysroot: sysroot_opt,
|
||||||
target_triple: target,
|
target_triple: target,
|
||||||
cfg: cfg,
|
cfg: cfg,
|
||||||
binary: binary,
|
|
||||||
test: test,
|
test: test,
|
||||||
parse_only: parse_only,
|
parse_only: parse_only,
|
||||||
no_trans: no_trans,
|
no_trans: no_trans,
|
||||||
|
@ -1159,7 +1157,7 @@ mod test {
|
||||||
Ok(m) => m,
|
Ok(m) => m,
|
||||||
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
|
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 sess = build_session(sessopts, None);
|
||||||
let cfg = build_configuration(sess);
|
let cfg = build_configuration(sess);
|
||||||
assert!((attr::contains_name(cfg, "test")));
|
assert!((attr::contains_name(cfg, "test")));
|
||||||
|
@ -1177,7 +1175,7 @@ mod test {
|
||||||
f.to_err_msg());
|
f.to_err_msg());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let sessopts = build_session_options(~"rustc", matches);
|
let sessopts = build_session_options(matches);
|
||||||
let sess = build_session(sessopts, None);
|
let sess = build_session(sessopts, None);
|
||||||
let cfg = build_configuration(sess);
|
let cfg = build_configuration(sess);
|
||||||
let mut test_items = cfg.iter().filter(|m| m.name().equiv(&("test")));
|
let mut test_items = cfg.iter().filter(|m| m.name().equiv(&("test")));
|
||||||
|
|
|
@ -132,7 +132,6 @@ pub struct Options {
|
||||||
// will be added to the crate AST node. This should not be used for
|
// will be added to the crate AST node. This should not be used for
|
||||||
// anything except building the full crate config prior to parsing.
|
// anything except building the full crate config prior to parsing.
|
||||||
cfg: ast::CrateConfig,
|
cfg: ast::CrateConfig,
|
||||||
binary: ~str,
|
|
||||||
test: bool,
|
test: bool,
|
||||||
parse_only: bool,
|
parse_only: bool,
|
||||||
no_trans: bool,
|
no_trans: bool,
|
||||||
|
@ -334,7 +333,6 @@ pub fn basic_options() -> @Options {
|
||||||
maybe_sysroot: None,
|
maybe_sysroot: None,
|
||||||
target_triple: host_triple(),
|
target_triple: host_triple(),
|
||||||
cfg: ~[],
|
cfg: ~[],
|
||||||
binary: ~"rustc",
|
|
||||||
test: false,
|
test: false,
|
||||||
parse_only: false,
|
parse_only: false,
|
||||||
no_trans: false,
|
no_trans: false,
|
||||||
|
|
|
@ -274,7 +274,7 @@ pub fn run_compiler(args: &[~str]) {
|
||||||
_ => d::early_error("multiple input filenames provided")
|
_ => 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 sess = d::build_session(sopts, input_file_path);
|
||||||
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
|
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
|
||||||
let ofile = matches.opt_str("o").map(|o| Path::new(o));
|
let ofile = matches.opt_str("o").map(|o| Path::new(o));
|
||||||
|
|
|
@ -51,7 +51,6 @@ fn get_ast_and_resolve(cpath: &Path,
|
||||||
let input = FileInput(cpath.clone());
|
let input = FileInput(cpath.clone());
|
||||||
|
|
||||||
let sessopts = @driver::session::Options {
|
let sessopts = @driver::session::Options {
|
||||||
binary: ~"rustdoc",
|
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: @RefCell::new(libs),
|
addl_lib_search_paths: @RefCell::new(libs),
|
||||||
crate_types: ~[driver::session::CrateTypeDylib],
|
crate_types: ~[driver::session::CrateTypeDylib],
|
||||||
|
|
|
@ -41,7 +41,6 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int {
|
||||||
let libs = @RefCell::new(libs.move_iter().collect());
|
let libs = @RefCell::new(libs.move_iter().collect());
|
||||||
|
|
||||||
let sessopts = @session::Options {
|
let sessopts = @session::Options {
|
||||||
binary: ~"rustdoc",
|
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: libs,
|
addl_lib_search_paths: libs,
|
||||||
crate_types: ~[session::CrateTypeDylib],
|
crate_types: ~[session::CrateTypeDylib],
|
||||||
|
@ -101,7 +100,6 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>) {
|
||||||
let input = driver::StrInput(test);
|
let input = driver::StrInput(test);
|
||||||
|
|
||||||
let sessopts = @session::Options {
|
let sessopts = @session::Options {
|
||||||
binary: ~"rustdoctest",
|
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: @RefCell::new(libs),
|
addl_lib_search_paths: @RefCell::new(libs),
|
||||||
crate_types: ~[session::CrateTypeExecutable],
|
crate_types: ~[session::CrateTypeExecutable],
|
||||||
|
|
Loading…
Reference in New Issue