Skip to content

Commit 1853619

Browse files
committed
auto merge of #13557 : FlaPer87/rust/ls-behind-z, r=brson
Closes #13549
2 parents 787f415 + fcdc36b commit 1853619

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

Diff for: man/rustc.1

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ Display this message
2727
\fB\-L\fR PATH
2828
Add a directory to the library search path
2929
.TP
30-
\fB\-\-ls\fR
31-
List the symbols defined by a library crate
32-
.TP
3330
\fB\-\-no\-trans\fR
3431
Run all passes except translation; no output
3532
.TP

Diff for: src/librustc/driver/driver.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
10961096
optflag("", "crate-name", "Output the crate name and exit"),
10971097
optflag("", "crate-file-name", "Output the file(s) that would be written if compilation \
10981098
continued and exit"),
1099-
optflag("", "ls", "List the symbols defined by a library crate"),
11001099
optflag("g", "", "Equivalent to --debuginfo=2"),
11011100
optopt("", "debuginfo", "Emit DWARF debug info to the objects created:
11021101
0 = no debug info,

Diff for: src/librustc/driver/session.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ debugging_opts!(
6969
PRINT_LLVM_PASSES,
7070
LTO,
7171
AST_JSON,
72-
AST_JSON_NOEXPAND
72+
AST_JSON_NOEXPAND,
73+
LS
7374
]
7475
0
7576
)
@@ -102,7 +103,8 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
102103
PRINT_LLVM_PASSES),
103104
("lto", "Perform LLVM link-time optimizations", LTO),
104105
("ast-json", "Print the AST as JSON and halt", AST_JSON),
105-
("ast-json-noexpand", "Print the pre-expansion AST as JSON and halt", AST_JSON_NOEXPAND))
106+
("ast-json-noexpand", "Print the pre-expansion AST as JSON and halt", AST_JSON_NOEXPAND),
107+
("ls", "List the symbols defined by a library crate", LS))
106108
}
107109

108110
#[deriving(Clone, Eq)]

Diff for: src/librustc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ pub fn run_compiler(args: &[~str]) {
299299
}
300300
None::<d::PpMode> => {/* continue */ }
301301
}
302-
let ls = matches.opt_present("ls");
303-
if ls {
302+
303+
if r.contains(&~"ls") {
304304
match input {
305305
d::FileInput(ref ifile) => {
306306
let mut stdout = io::stdout();

Diff for: src/test/run-make/ls-metadata/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
all:
44
$(RUSTC) foo.rs
5-
$(RUSTC) --ls $(TMPDIR)/foo
5+
$(RUSTC) -Z ls $(TMPDIR)/foo
66
touch $(TMPDIR)/bar
7-
$(RUSTC) --ls $(TMPDIR)/bar
7+
$(RUSTC) -Z ls $(TMPDIR)/bar

0 commit comments

Comments
 (0)