We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7008a95 + b70305f commit 9cc3d44Copy full SHA for 9cc3d44
src/librustdoc/lib.rs
@@ -103,10 +103,14 @@ struct Output {
103
}
104
105
pub fn main() {
106
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ let thread_stack_size: usize = if cfg!(target_os = "haiku") {
107
+ 16_000_000 // 16MB on Haiku
108
+ } else {
109
+ 32_000_000 // 32MB on other platforms
110
+ };
111
rustc_driver::set_sigpipe_handler();
112
env_logger::init();
- let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
113
+ let res = std::thread::Builder::new().stack_size(thread_stack_size).spawn(move || {
114
syntax::with_globals(move || {
115
get_args().map(|args| main_args(&args)).unwrap_or(1)
116
})
0 commit comments