]> git.lizzy.rs Git - rust.git/commitdiff
Remove binary field
authorSeo Sanghyeon <sanxiyn@gmail.com>
Mon, 10 Feb 2014 16:10:26 +0000 (01:10 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Mon, 10 Feb 2014 16:10:26 +0000 (01:10 +0900)
src/librustc/driver/driver.rs
src/librustc/driver/session.rs
src/librustc/lib.rs
src/librustdoc/core.rs
src/librustdoc/test.rs

index 15240897b2aee9d99372dfee1187d8a648bada7e..a23348bb0ff5d8c34c2a8759604e04d9d9715b99 100644 (file)
@@ -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| {
@@ -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,
@@ -1159,7 +1157,7 @@ fn test_switch_implies_cfg_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")));
@@ -1177,7 +1175,7 @@ fn test_switch_implies_cfg_test_unless_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);
         let mut test_items = cfg.iter().filter(|m| m.name().equiv(&("test")));
index 27b8e681666058c51fafd71acaea3f4f2a081088..bea374fe1077f91062b07ce0bc7fbacb8f5c4761 100644 (file)
@@ -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,
@@ -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,
index 1b575e96df6eeb50db38f60075c92248a54616ae..2aea69d967176799ff2e80ad1a46db3fc0147ae9 100644 (file)
@@ -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));
index 9ac0e1acec53cf652d5fcadfedb9b503097a24e0..108286fdb5c786312ae96ab062c625b0b9b03757 100644 (file)
@@ -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],
index 17ef8732413e654f5d5c223abd1f95ee447c779e..5da5f62e10c20c25010b5ce552dcd5f3eacca4ea 100644 (file)
@@ -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],
@@ -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],