Skip to content

Commit 2b5a334

Browse files
committed
rustc: Use 4MB stacks. Needed for unoptimized builds apparently.
1 parent c2d1e9e commit 2b5a334

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/librustc/rustc.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,18 @@ bug and need to present an error.
300300
*/
301301
pub fn monitor(f: ~fn(diagnostic::Emitter)) {
302302
use std::comm::*;
303+
304+
// XXX: This is a hack for newsched since it doesn't support split stacks.
305+
// rustc needs a lot of stack!
306+
static STACK_SIZE: uint = 4000000;
307+
303308
let (p, ch) = stream();
304309
let ch = SharedChan::new(ch);
305310
let ch_capture = ch.clone();
306-
match do task::try || {
311+
let mut task_builder = task::task();
312+
task_builder.supervised();
313+
task_builder.opts.stack_size = Some(STACK_SIZE);
314+
match do task_builder.try {
307315
let ch = ch_capture.clone();
308316
let ch_capture = ch.clone();
309317
// The 'diagnostics emitter'. Every error, warning, etc. should

0 commit comments

Comments
 (0)