I am trying to increase the stack size of my program using linker arguments and am finding that they're not being passed. I've tried both the RUSTFLAGS
environment variable and the .cargo/config
file. I am using MSVC.
config:
build.rustflags = [
"-Clink-arg=/F 100000000"
]
I have also tried (invalid):
build.rustflags = [
"-Clink-arg=/not_real"
]
While I don't have a conclusive way to check if stack size has increased, ~100MB is far higher than the 1MB default so I'd expect to be able to run code that uses 20% more stack memory. The last example is also invalid and should fail the build. I have also guaranteed that cargo is reading these rust flags by using an invalid flag '-not_real
' instead of '-Clink-arg
' and it did fail.