2017-02-23 85 views
0

我想在Windows上生成exe文件, 而不需要vcruntime。链接EXE与//MT标志

所以,我想:

.cargo/config 
[target.i686-pc-windows-msvc] 
rustflags = ["-Clink-args=/MT"] 

样子货发现配置,因为cargo重建 整个项目,但dumpbin /DEPENDENTS test.exe 仍然显示VCRUNTIME140.dll作为依赖, 任何想法如何链接VCRUNTIME140静态?

回答

1

看到这个rfc

您可以rustc尝试夜间:

c:\Users\IEUser\test2>rustc -Z unstable-options -C target-feature=+crt-static test.rs