Skip to content

Build: reserve the default Windows thread stack on GNU targets - #1

Open
MichaelSmithAI wants to merge 1 commit into
ItsYusei99:fix/default-thread-stackfrom
MichaelSmithAI:fix/windows-gnu-thread-stack
Open

MichaelSmithAI wants to merge 1 commit into
ItsYusei99:fix/default-thread-stackfrom
MichaelSmithAI:fix/windows-gnu-thread-stack

Conversation

@MichaelSmithAI

Copy link
Copy Markdown

This extends the Windows executable setting from Marvisak#151 to Rust’s GNU and GNU/LLVM Windows targets. A Win64 GNU/LLVM build of VIctory still had the linker’s default 1 MiB stack reserve. The build script now passes the GNU linker’s stack option on those targets and keeps the existing MSVC option.

We inspected the PE headers of actual Win64 GNU/LLVM builds on main ffe310e before and after applying the setting. The stack reserve changed from 1 MiB to 16 MiB, with the initial commit at 4 KiB in both executables. Two small Wine 11.22 controls linked with the matching settings created an ordinary CreateThread with a default stack size. Inside each thread the observed reservation matched its respective executable header, and both controls exited 0.

On the proposed branch, the build script emitted the expected options for Windows MSVC, GNU and GNU/LLVM and emitted no linker option for Linux GNU. The asset check passed. Game behavior with a GNU-built executable remains unmeasured.

AI-assisted implementation and verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant