aboutsummaryrefslogtreecommitdiff
path: root/src/boot/driver
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-05 18:44:39 -0700
committerGraydon Hoare <[email protected]>2010-10-05 18:44:39 -0700
commit8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6 (patch)
tree11c52a82f424b8782e7dd13e7965e580dbf01c5d /src/boot/driver
parentAdd input coordinate tracking to all major rustc ast nodes. (diff)
downloadrust-8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6.tar.xz
rust-8ecbe49a8fa8b4bb17c2d798d5de6fc0303c5bc6.zip
Add -minimal mode to rustboot that skips emitting code that's broken or unneeded for rustc. Shrink rustc by 300kb. Back under 1mb.
Diffstat (limited to 'src/boot/driver')
-rw-r--r--src/boot/driver/main.ml5
-rw-r--r--src/boot/driver/session.ml1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml
index 3c37a032..eacecc2d 100644
--- a/src/boot/driver/main.ml
+++ b/src/boot/driver/main.ml
@@ -24,6 +24,7 @@ let (sess:Session.sess) =
Session.sess_out = None;
Session.sess_library_mode = false;
Session.sess_alt_backend = false;
+ Session.sess_minimal = false;
Session.sess_use_pexps = false;
(* FIXME (issue #69): need something fancier here for unix
* sub-flavours.
@@ -229,6 +230,10 @@ let argspecs =
(flag (fun _ -> sess.Session.sess_use_pexps <- true)
"-pexp" "use pexp portion of AST");
+ (flag (fun _ -> sess.Session.sess_minimal <- true)
+ "-minimal" ("reduce code size by disabling various features"
+ ^ " (use at own risk)"));
+
("-zc", Arg.Int (fun i -> sess.Session.sess_fuzz_item_count <- i),
"count of items to generate when fuzzing");
diff --git a/src/boot/driver/session.ml b/src/boot/driver/session.ml
index ae16c139..8d7c3319 100644
--- a/src/boot/driver/session.ml
+++ b/src/boot/driver/session.ml
@@ -13,6 +13,7 @@ type sess =
mutable sess_out: filename option;
mutable sess_library_mode: bool;
mutable sess_alt_backend: bool;
+ mutable sess_minimal: bool;
mutable sess_use_pexps: bool;
mutable sess_targ: target;
mutable sess_log_lex: bool;