Do we always distribute msvcp.dll with Windows JDKs now?
erik.joelsson at oracle.com
erik.joelsson at oracle.com
Wed Nov 15 14:50:49 UTC 2023
On 11/14/23 17:58, Julian Waters wrote:
> This question was brought up in
> https://github.com/openjdk/jdk/pull/15096, the issue is that awt.dll
> has historically tried to avoid depending on msvcp.dll, and as
> https://github.com/openjdk/jdk/pull/15096#issuecomment-1796303631
> points out, it is unclear whether it is now safe to introduce a
> dependency to msvcp.dll in awt.dll since it is unclear whether
> msvcp.dll is now always distributed with the JDK, though I am fairly
> confident that it is (The fix in that PR is dependent on some
> facilities in the C++ Standard Library). Can anyone confirm whether
> this is the case?
>
Back in JDK 8 when we used Visual Studio 2010, we used to not ship
msvcp*.dll. This changed when I added support for building with Visual
Studio 2013 [1] in JDK 9. In the patch for that bug I found this text:
+ # If building with Visual Studio 2010, we can still use
_STATIC_CPPLIB to
+ # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of
visual
+ # studio.
So since we switched to Visual Studio 2013, we started to bundle
msvcp*.dll. It was only ever possible to not bundle it if you built with
Visual Studio 2010 (or older I suppose). It's pretty safe to say that
the current mainline JDK build requires msvcp.dll to be bundled. Looking
at the configure logic, configure will fail unless we find it and the
copying in open/make/modules/java.base/Copy.gmk is unconditional.
/Erik
[1] https://bugs.openjdk.org/browse/JDK-8042707
More information about the build-dev
mailing list