This is slightly different from dlltool but I think it should be compatible. The transition is done by first replacing dlltool with its bugs, and fixing them in separate changes.
I based the ARM / AARCH64 implementation on the existing code around, but I have no idea if it is correct, and dlltool also doesn't include any delay load implementation for ARM.
--
v2: winebuild: Put the delay import descriptor in data section.
winebuild: Fix import hint value for symbols imported by name.
winebuild: Implement import lib generation to replace dlltool.
winebuild: Split output_static_lib into output_(import|static)_lib.
winebuild: Use asm_name to add underscore prefix in asm_globl.
winebuild: Pass the desired symbol name to get_link_name.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1001
This shows that media session samples are correctly oriented, but that mfmediaengine renders them upside down.
--
v4: mfmediaengine: Remove vertical flipping of video frames.
mfmediaengine/tests: Check IMFMediaEngine_TransferVideoFrames output orientation.
mfmediaengine/tests: Pass a device and output format to create_media_engine.
mf/tests: Check sample grabber RGB / NV12 orientation.
mf/tests: Factor test grabber callback implementations.
https://gitlab.winehq.org/wine/wine/-/merge_requests/874
The practical aspect of this (besides that msvcp140 just should not probably load msvcp120) is that for an app using VC runtime 140 mspcp140.__ExceptionPtrCurrentException gets the thread data from msvcp120.dll while vcruntime140_1 sets those thread data from ucrtbase.dll which are different data. So the application calling mspcp140.__ExceptionPtrCurrentException in catch block gets NULL exception while it was technically set by vcruntime140_1 before calling the app's catch block handler. After this patchset all the current exception data should end up in ucrtbase for VC runtime 140.
There is a bit more to it (not covered by this patchset) when there is a mix of native and builtin VC runtime 140 dlls. From the app behaviour and some tests it looks like with native DLLs msvcp140 and vcruntime140_1 handle current exception data through vcruntime140.dll and vcruntime140.dll does not forward that to ucrtbase. I am not sure if the latter (not forwarding vcruntime140->ucrtbase) is practically important but to avoid the similar problem when mixing native and builtin VC runtime DLLs we should also probably link msvcp140 and vcruntime140_1 to vcruntime140.
--
v2: msvcp140: Import __ExceptionPtrCompare implementation.
msvcp140: Import __ExceptionPtrCopyException implementation.
msvcp140: Import __ExceptionPtrToBool implementation.
msvcp140: Import __ExceptionPtrCurrentException implementation.
msvcp140: Import __ExceptionPtrRethrow implementation.
msvcp140: Import __ExceptionPtrAssign implementation.
msvcp140: Import __ExceptionPtrCopy implementation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1034