Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit f07b789

Browse files
authored
Merge pull request #942 from ehuss/fix-win-stack
Fix stack overflow on windows.
2 parents 2b57851 + 203a807 commit f07b789

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
#![warn(clippy)]
2424
#![allow(cyclomatic_complexity, needless_pass_by_value, too_many_arguments)]
2525

26+
// See rustc/rustc.rs in rust repo for explanation of stack adjustments.
27+
#![feature(link_args)]
28+
#[allow(unused_attributes)]
29+
#[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
30+
#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
31+
extern {}
32+
2633
extern crate cargo;
2734
extern crate cargo_metadata;
2835
extern crate env_logger;

0 commit comments

Comments
 (0)