Brent suggested to use DLL CRT instead of static CRT (bug 157067 comment 6). MSDN: CRT Library Features https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx One benefit of DLL CRT is avoiding heap mismatch crash (Bug 156831). Any other benefits?
Created attachment 306483 [details] WIP patch
Created attachment 306665 [details] WIP patch AppleWin port reports mismatch CRT type linkage error: >WebKitSystemInterface.lib(WebKitSystemInterface.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in StorageAreaImpl.obj WebKitLibraries/win/lib32/WebKitSystemInterface.lib needs to be compiled with /MD.
Created attachment 310631 [details] Similar to the Fujii's patch, but some extra files covered As mentioned on webkit-dev ( https://lists.webkit.org/pipermail/webkit-dev/2017-May/029141.html ), I have been working on this as well. I've also changed the vsprops files as well, but from looking at Fujii's patch (which I prefer over mine), it looks like these aren't modified. Does this mean they are no longer used and can be removed?
Unfortunately we can't remove the vsprops files yet.
Created attachment 327383 [details] Patch This patch takes a different approach since WebKitSystemInterface.lib might not be compiled with /MD anytime soon. This introduces MSVC_STATIC_RUNTIME which AppleWin has as ON. Then the compile and linker flags are modified according to whether /MD or /MT should be specified.
Error from AppleWin is around FourCC.h again....
Created attachment 327424 [details] Patch Put setting of MSVC_STATIC_RUNTIME before the include of OptionsWin and adding some logging for the value. This should get AppleWin working.
Comment on attachment 327424 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=327424&action=review > Source/cmake/OptionsAppleWin.cmake:1 > +# FIXME: Remove after WebKitSystemInterface.lib is compiled with /MD I'm not sure we ever intend to do this. We would have to do changes to how we distribute Windows binaries and merge modules, etc. > Source/cmake/OptionsMSVC.cmake:66 > + set(MSVC_RUNTIME_LINKER_FLAGS "") I don't think this is necessary.
Created attachment 327655 [details] Patch Fixing review comments
Created attachment 327656 [details] Patch
Comment on attachment 327656 [details] Patch Clearing flags on attachment: 327656 Committed r225191: <https://trac.webkit.org/changeset/225191>
All reviewed patches have been landed. Closing bug.
<rdar://problem/35705731>