]> git.lizzy.rs Git - rust.git/commitdiff
Move `--ls` behind `-Z ls`
authorFlavio Percoco <flaper87@gmail.com>
Wed, 16 Apr 2014 14:28:09 +0000 (16:28 +0200)
committerFlavio Percoco <flaper87@gmail.com>
Wed, 16 Apr 2014 15:45:06 +0000 (17:45 +0200)
Closes #13549

man/rustc.1
src/librustc/driver/driver.rs
src/librustc/driver/session.rs
src/librustc/lib.rs
src/test/run-make/ls-metadata/Makefile

index 8fc6828ced18b1ac09693a164b61fa0083741204..308b2f089f4a03ad62065a9cd53e2637136faeb0 100644 (file)
@@ -27,9 +27,6 @@ Display this message
 \fB\-L\fR PATH
 Add a directory to the library search path
 .TP
-\fB\-\-ls\fR
-List the symbols defined by a library crate
-.TP
 \fB\-\-no\-trans\fR
 Run all passes except translation; no output
 .TP
index 1b3653c6948a699910344b7f12e88c22c2ec1a12..908ef5ca63698b18b67bd4caae708b56333598fc 100644 (file)
@@ -1096,7 +1096,6 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
   optflag("", "crate-name", "Output the crate name and exit"),
   optflag("", "crate-file-name", "Output the file(s) that would be written if compilation \
           continued and exit"),
-  optflag("",  "ls",  "List the symbols defined by a library crate"),
   optflag("g",  "",  "Equivalent to --debuginfo=2"),
   optopt("",  "debuginfo",  "Emit DWARF debug info to the objects created:
          0 = no debug info,
index a412742ab3a3612076dbe9e3d15ffd7bd4dfcc06..16b05612e252a2259169ffa15558140d419394b4 100644 (file)
@@ -69,7 +69,8 @@ macro_rules! debugging_opts(
         PRINT_LLVM_PASSES,
         LTO,
         AST_JSON,
-        AST_JSON_NOEXPAND
+        AST_JSON_NOEXPAND,
+        LS
     ]
     0
 )
@@ -102,7 +103,8 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
       PRINT_LLVM_PASSES),
      ("lto", "Perform LLVM link-time optimizations", LTO),
      ("ast-json", "Print the AST as JSON and halt", AST_JSON),
-     ("ast-json-noexpand", "Print the pre-expansion AST as JSON and halt", AST_JSON_NOEXPAND))
+     ("ast-json-noexpand", "Print the pre-expansion AST as JSON and halt", AST_JSON_NOEXPAND),
+     ("ls", "List the symbols defined by a library crate", LS))
 }
 
 #[deriving(Clone, Eq)]
index b9acd4132152060cd31bcf69a850bfa22a9729a2..411d9019632ce8a5465bbb5ad7517dbdfd9c8fa5 100644 (file)
@@ -299,8 +299,8 @@ pub fn run_compiler(args: &[~str]) {
         }
         None::<d::PpMode> => {/* continue */ }
     }
-    let ls = matches.opt_present("ls");
-    if ls {
+
+    if r.contains(&~"ls") {
         match input {
             d::FileInput(ref ifile) => {
                 let mut stdout = io::stdout();
index b568809156bfb3f14f604e7edbddaafa0c0984e7..fc3f5bce0cda2c8557255a3195403dd0f8d0ea19 100644 (file)
@@ -2,6 +2,6 @@
 
 all:
        $(RUSTC) foo.rs
-       $(RUSTC) --ls $(TMPDIR)/foo
+       $(RUSTC) -ls $(TMPDIR)/foo
        touch $(TMPDIR)/bar
-       $(RUSTC) --ls $(TMPDIR)/bar
+       $(RUSTC) -ls $(TMPDIR)/bar