diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-04-16 16:28:09 +0200 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-04-16 17:45:06 +0200 |
| commit | fcdc36b1424928bfccee52b60d74f07577bc02fc (patch) | |
| tree | 1c77a4a9278cfb52d51c77ec320e0f5f9820f960 /src | |
| parent | 246ebd2d5aebc68a581c33c33cbce5f2bc7dc7d6 (diff) | |
| download | rust-fcdc36b1424928bfccee52b60d74f07577bc02fc.tar.gz rust-fcdc36b1424928bfccee52b60d74f07577bc02fc.zip | |
Move `--ls` behind `-Z ls`
Closes #13549
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/driver/driver.rs | 1 | ||||
| -rw-r--r-- | src/librustc/driver/session.rs | 6 | ||||
| -rw-r--r-- | src/librustc/lib.rs | 4 | ||||
| -rw-r--r-- | src/test/run-make/ls-metadata/Makefile | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index 1b3653c6948..908ef5ca636 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -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, diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index a412742ab3a..16b05612e25 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -69,7 +69,8 @@ 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)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index b9acd413215..411d9019632 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -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(); diff --git a/src/test/run-make/ls-metadata/Makefile b/src/test/run-make/ls-metadata/Makefile index b568809156b..fc3f5bce0cd 100644 --- a/src/test/run-make/ls-metadata/Makefile +++ b/src/test/run-make/ls-metadata/Makefile @@ -2,6 +2,6 @@ all: $(RUSTC) foo.rs - $(RUSTC) --ls $(TMPDIR)/foo + $(RUSTC) -Z ls $(TMPDIR)/foo touch $(TMPDIR)/bar - $(RUSTC) --ls $(TMPDIR)/bar + $(RUSTC) -Z ls $(TMPDIR)/bar |
