Skip to content

Commit 50ca86b

Browse files
committed
Set link args for rustdoc
1 parent 8ecbec1 commit 50ca86b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/rustc/rustc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// We only build for msvc and gnu now, but we use a exhaustive condition here
1818
// so we can expect either the stack size to be set or the build fails.
1919
#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
20+
// Also, don't forget to set this for rustdoc.
2021
extern {}
2122

2223
extern crate rustc_driver;

src/tools/rustdoc/main.rs

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(link_args)]
12+
// Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread
13+
// for the rationale.
14+
#[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
15+
// We only build for msvc and gnu now, but we use a exhaustive condition here
16+
// so we can expect either the stack size to be set or the build fails.
17+
#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
18+
// See src/rustc/rustc.rs for the corresponding rustc settings.
19+
extern {}
20+
1121
extern crate rustdoc;
1222

1323
fn main() { rustdoc::main() }

0 commit comments

Comments
 (0)