Skip to content

Commit

Permalink
Set link args for rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitatsuyuki committed Mar 28, 2018
1 parent 8ecbec1 commit 50ca86b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rustc/rustc.rs
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/tools/rustdoc/main.rs
Expand Up @@ -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() }

0 comments on commit 50ca86b

Please sign in to comment.