diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-03-28 18:51:25 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-03-28 18:51:25 +0900 |
| commit | 50ca86be2438369dd1263c619a3bac21bd30a37f (patch) | |
| tree | e1cef68912632ae71b1679ef8d7d0e9e7d1ef85f | |
| parent | 8ecbec1dba048bf55461dbff772f18a72311ecc2 (diff) | |
| download | rust-50ca86be2438369dd1263c619a3bac21bd30a37f.tar.gz rust-50ca86be2438369dd1263c619a3bac21bd30a37f.zip | |
Set link args for rustdoc
| -rw-r--r-- | src/rustc/rustc.rs | 1 | ||||
| -rw-r--r-- | src/tools/rustdoc/main.rs | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/rustc/rustc.rs b/src/rustc/rustc.rs index bd36aaf01f8..9fa33f911a1 100644 --- a/src/rustc/rustc.rs +++ b/src/rustc/rustc.rs @@ -17,6 +17,7 @@ // We only build for msvc and gnu now, but we use a exhaustive condition here // so we can expect either the stack size to be set or the build fails. #[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")] +// Also, don't forget to set this for rustdoc. extern {} extern crate rustc_driver; diff --git a/src/tools/rustdoc/main.rs b/src/tools/rustdoc/main.rs index 9c37e249ba8..e726dea84f1 100644 --- a/src/tools/rustdoc/main.rs +++ b/src/tools/rustdoc/main.rs @@ -8,6 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(link_args)] +// Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread +// for the rationale. +#[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")] +// We only build for msvc and gnu now, but we use a exhaustive condition here +// so we can expect either the stack size to be set or the build fails. +#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")] +// See src/rustc/rustc.rs for the corresponding rustc settings. +extern {} + extern crate rustdoc; fn main() { rustdoc::main() } |
