In initializeProfileForContinuousMode, we have already locked the profile file when merging is enabled, so there's no need to lock the same file second time in openFileForMerging.
On Linux/Darwin, the locking the same file twice doesn't cause any problem. But on Windows, it causes the problem to hang forever.
With this minor fix, continuous mode seems working with online merging on Windows.
This broke testing on mingw; the -dll option is MS link/lld-link specific and doesn't work with the unix like interface of the linker for mingw targets. For mingw targets, one can pass -shared to the GNU like interface of clang, and that translates to the right linker options, but the test still relies on details like -o foo.dll implicitly creating an import library named foo.lib which don't work the same in mingw mode.
I'll push a fix to use REQUIRES: target={{.*windows-msvc.*}} here instead.