I think that the point that we might disagree on is the cleanliness of the approach. In my mind, a separate SDK is pretty clean, but I do admit not exactly trivial. Glad that the explanation was helpful.
I think that there is some confusion here.
Mostly correct, until recently, it would be %ProgramFiles(x86)%, there is now a 64-bit Visual Studio, however the build tools are still 32-bit only, except for the toolset, which is 64-bit. If this is clear as mud, then you are on the right path. (The install location was driven by the shell, which was 32-bit, but the toolset is 32/64 bit, and the latter is required to deal with memory limitations, the build tools are always a "32-bit shell" for some reason).
This is actually not entirely true. The linker is told what to do by the invocation by MSBuild (or in our case clang or clang++). Unless you are talking about something like an embedded linker directive, in which case, that is pretty much something embedded by the user.
No, this is not. This is dependent on /MT. The default (/MD) would use vcruntime.lib rather than libvcruntime.lib. You will dynamically link in the vcruntime.
The entry point is not from vcruntime.lib but rather from:
/MTd: libmsvcrtd.lib
/MT: libmsvcrt.lib
/MDd: msvcrtd.lib
/MD: msvcrt.lib
The actual CRT entry point is determined by the definition of the entry point:
wWinMain (-D_UNICODE, /SUBSYSTEM:GUI) => wWinMainCRTStartup
WinMain (-U_UNICODE, /SUBSYSTEM:GUI) => WinMainCRTStartup
wmain (-D_UNICODE, /SUBSYSTEM:CONSOLE) => mainCRTStartup
main (-U_UNICODE, /SUBSYSTEM:CONSOLE) => wmainCRTStartup
The command line flags take precedence, but if missing the spelling will select the CRT Startup path.
The appropriate version of msvcrt.lib and vcruntime.lib. The startup paths are (lib)?msvcrtd?.lib. (lib)?vcruntimed?.lib contains the compiler support functions (aka compiler-rt). This primarily will provide static copies of the atomic operations and IAT thunks for any dynamically linked content (or their static counterpart).
This is not so. The role of the "hidden entry point" (which is not a hidden entry point at all), is to setup the C runtime. On Unix, this is spelt crt0.o, crti.o. On Windows, this is spelt msvcrt.lib. There is nothing magical going on here. There is simply the C startup routines that must be invoked (e.g. walking the init table for C++ global constructors).
I think that you had mixed up msvcrt and vcruntime. VCRuntime is significantly lower in the stack than msvcrt.
No, ucrt is the equivalent to msvcrt, libc++ or libstdc++ are the equivalents to msvcprt. The UCRT is the top half msvcrt after "The Great C Runtime Refactoring", the bottom half remains embedded in VS.