-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to get static linkage for MSVCRT #660
Comments
The Aside from In addition to |
Maybe the linker wrapper is the easiest solution to all these. We can strip So we don't need to build a custom toolchain at all, right? Just fix the linker invocation? Is there just one invocation of link.exe globally here, for the final exe/dll? This seems almost easy... |
|
So that sounds like we do need a custom toolchain.
|
@brson If you do use a linker wrapper, then there is no need to rebuild the Rust toolchain. There is no C/C++ code in |
To pass /MT in gcc-rs I just used a local fork with a cargo override. A |
@brson I think custom linker shenanigans would work here, but having never done it I'm not 100% sure it'd actually work. |
I think so. |
If this does turn out to work, then I can totally use this as an example to push along my RFC. |
This can now be implemented fairly easily considering Rust now has a built in way to link to the static CRT. rust-lang/rust#37406 |
@kinnison I think this issue is resolved. |
Yep, thanks @lzutao |
In order to get the MSI installers working we need to build with the MSVC toolchain and link statically to the CRT.
@alexcrichton without an upstream solution how can we solve this the hard way? I'm thinking something like:
cc #635 (comment)
cc rust-lang/rfcs#1684
cc @Boddlnagg @retep998
The text was updated successfully, but these errors were encountered: