Skip to content

Move --ls behind -Z ls #13557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions man/rustc.1
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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