Add -minimal mode to rustboot that skips emitting code that's broken or unneeded for rustc. Shrink rustc by 300kb. Back under 1mb.
This commit is contained in:
parent
d1e59d6910
commit
8ecbe49a8f
6 changed files with 38 additions and 16 deletions
|
|
@ -126,7 +126,8 @@ type abi =
|
|||
-> Common.nabi
|
||||
-> Common.fixup (* grow_task *)
|
||||
-> bool (* is_obj_fn *)
|
||||
-> unit);
|
||||
-> bool (* minimal *)
|
||||
-> unit);
|
||||
|
||||
abi_emit_fn_epilogue: (Il.emitter -> unit);
|
||||
|
||||
|
|
|
|||
|
|
@ -1236,6 +1236,7 @@ let fn_prologue
|
|||
(nabi:nabi)
|
||||
(grow_task_fixup:fixup)
|
||||
(is_obj_fn:bool)
|
||||
(minimal:bool)
|
||||
: unit =
|
||||
|
||||
let esi_n = word_n (h esi) in
|
||||
|
|
@ -1372,8 +1373,11 @@ let fn_prologue
|
|||
in
|
||||
|
||||
(* "Full" frame size-check. *)
|
||||
stack_growth_check e nabi grow_task_fixup
|
||||
dynamic_frame_sz dynamic_grow_jmp restart_pc (h esi) (h edi);
|
||||
match dynamic_grow_jmp with
|
||||
None when minimal -> ()
|
||||
| _ ->
|
||||
stack_growth_check e nabi grow_task_fixup
|
||||
dynamic_frame_sz dynamic_grow_jmp restart_pc (h esi) (h edi);
|
||||
|
||||
|
||||
(* Establish a frame, wherever we landed. *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue