rustc: Remove the wrong-compiler warning; we're self-hosting now.
This commit is contained in:
parent
a2f68b2d58
commit
c52fb52fbc
|
@ -16,9 +16,9 @@ CFG_GCC_LINK_FLAGS :=
|
||||||
CFG_BOOT_FLAGS := $(BOOT_FLAGS)
|
CFG_BOOT_FLAGS := $(BOOT_FLAGS)
|
||||||
ifdef CFG_DISABLE_OPTIMIZE
|
ifdef CFG_DISABLE_OPTIMIZE
|
||||||
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
||||||
CFG_RUSTC_FLAGS := --nowarn
|
CFG_RUSTC_FLAGS :=
|
||||||
else
|
else
|
||||||
CFG_RUSTC_FLAGS := --nowarn -O
|
CFG_RUSTC_FLAGS := -O
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef SAVE_TEMPS
|
ifdef SAVE_TEMPS
|
||||||
|
|
|
@ -98,19 +98,11 @@ fn pretty_print_input(session.session sess,
|
||||||
pretty.pprust.print_file(crate.node.module, input, std.io.stdout());
|
pretty.pprust.print_file(crate.node.module, input, std.io.stdout());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn warn_wrong_compiler() {
|
|
||||||
io.stdout().write_str("This is the rust 'self-hosted' compiler.
|
|
||||||
The one written in rust.
|
|
||||||
It is currently incomplete.
|
|
||||||
You may want rustboot instead, the compiler next door.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
fn usage(session.session sess, str argv0) {
|
fn usage(session.session sess, str argv0) {
|
||||||
io.stdout().write_str(#fmt("usage: %s [options] <input>\n", argv0) + "
|
io.stdout().write_str(#fmt("usage: %s [options] <input>\n", argv0) + "
|
||||||
options:
|
options:
|
||||||
|
|
||||||
-o <filename> write output to <filename>
|
-o <filename> write output to <filename>
|
||||||
--nowarn suppress wrong-compiler warning
|
|
||||||
--glue generate glue.bc file
|
--glue generate glue.bc file
|
||||||
--shared compile a shared-library crate
|
--shared compile a shared-library crate
|
||||||
--pretty pretty-print the input instead of compiling
|
--pretty pretty-print the input instead of compiling
|
||||||
|
@ -147,7 +139,7 @@ fn main(vec[str] args) {
|
||||||
auto sess = session.session(target_crate_num, target_cfg, crate_cache,
|
auto sess = session.session(target_crate_num, target_cfg, crate_cache,
|
||||||
md, front.codemap.new_codemap());
|
md, front.codemap.new_codemap());
|
||||||
|
|
||||||
auto opts = vec(optflag("nowarn"), optflag("h"), optflag("glue"),
|
auto opts = vec(optflag("h"), optflag("glue"),
|
||||||
optflag("pretty"), optflag("ls"), optflag("parse-only"),
|
optflag("pretty"), optflag("ls"), optflag("parse-only"),
|
||||||
optflag("O"), optflag("shared"), optmulti("L"),
|
optflag("O"), optflag("shared"), optmulti("L"),
|
||||||
optflag("S"), optflag("c"), optopt("o"),
|
optflag("S"), optflag("c"), optopt("o"),
|
||||||
|
@ -158,9 +150,6 @@ fn main(vec[str] args) {
|
||||||
case (GetOpts.failure(?f)) { sess.err(GetOpts.fail_str(f)); fail; }
|
case (GetOpts.failure(?f)) { sess.err(GetOpts.fail_str(f)); fail; }
|
||||||
case (GetOpts.success(?m)) { match = m; }
|
case (GetOpts.success(?m)) { match = m; }
|
||||||
}
|
}
|
||||||
if (!opt_present(match, "nowarn")) {
|
|
||||||
warn_wrong_compiler();
|
|
||||||
}
|
|
||||||
if (opt_present(match, "h")) {
|
if (opt_present(match, "h")) {
|
||||||
usage(sess, binary);
|
usage(sess, binary);
|
||||||
ret;
|
ret;
|
||||||
|
|
Loading…
Reference in New Issue