Set link args for rustdoc

This commit is contained in:
Tatsuyuki Ishi 2018-03-28 18:51:25 +09:00
parent 8ecbec1dba
commit 50ca86be24
2 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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() }