Skip to content

Commit

Permalink
Move --ls behind -Z ls
Browse files Browse the repository at this point in the history
Closes #13549
  • Loading branch information
flaper87 committed Apr 16, 2014
1 parent 246ebd2 commit fcdc36b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
3 changes: 0 additions & 3 deletions man/rustc.1
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/librustc/driver/driver.rs
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions src/librustc/driver/session.rs
Expand Up @@ -69,7 +69,8 @@ debugging_opts!(
PRINT_LLVM_PASSES,
LTO,
AST_JSON,
AST_JSON_NOEXPAND
AST_JSON_NOEXPAND,
LS
]
0
)
Expand Down Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/lib.rs
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-make/ls-metadata/Makefile
Expand Up @@ -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

5 comments on commit fcdc36b

@bors
Copy link
Contributor

@bors bors commented on fcdc36b Apr 17, 2014

Choose a reason for hiding this comment

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

saw approval from brson
at flaper87@fcdc36b

@bors
Copy link
Contributor

@bors bors commented on fcdc36b Apr 17, 2014

Choose a reason for hiding this comment

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

merging FlaPer87/rust/ls-behind-z = fcdc36b into auto

@bors
Copy link
Contributor

@bors bors commented on fcdc36b Apr 17, 2014

Choose a reason for hiding this comment

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

FlaPer87/rust/ls-behind-z = fcdc36b merged ok, testing candidate = 1853619

@bors
Copy link
Contributor

@bors bors commented on fcdc36b Apr 17, 2014

@bors
Copy link
Contributor

@bors bors commented on fcdc36b Apr 17, 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 = 1853619

Please sign in to comment.