Skip to content

Commit 0929eb4

Browse files
committed
rustc: Use 4MB stacks. Needed for unoptimized builds apparently.
1 parent ae1ed4f commit 0929eb4

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
@@ -298,10 +298,18 @@ bug and need to present an error.
298298
*/
299299
pub fn monitor(f: ~fn(diagnostic::Emitter)) {
300300
use std::comm::*;
301+
302+
// XXX: This is a hack for newsched since it doesn't support split stacks.
303+
// rustc needs a lot of stack!
304+
static STACK_SIZE: uint = 4000000;
305+
301306
let (p, ch) = stream();
302307
let ch = SharedChan::new(ch);
303308
let ch_capture = ch.clone();
304-
match do task::try || {
309+
let mut task_builder = task::task();
310+
task_builder.supervised();
311+
task_builder.opts.stack_size = Some(STACK_SIZE);
312+
match do task_builder.try {
305313
let ch = ch_capture.clone();
306314
let ch_capture = ch.clone();
307315
// The 'diagnostics emitter'. Every error, warning, etc. should

0 commit comments

Comments
 (0)