[PATCH] D53727: Only call FlushFileBuffers when writing executables

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 14:27:36 PDT 2018


aganea marked an inline comment as done.
aganea added inline comments.


================
Comment at: lib/Support/Windows/WindowsSupport.h:78-80
+inline llvm::VersionTuple GetWindowsOSVersion() {
+  HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
+  if (hMod) {
----------------
rnk wrote:
> I was going to say, surely `GetVersionInfoEx` will give us this info, but now I see the mess that is versionhelpers.h, and I assume you tried that, and they don't expose the build number.
In addition to `GetVersion` and `GetVersionEx` being deprecated, applications now need to be [[ https://docs.microsoft.com/en-us/windows/desktop/SysInfo/targeting-your-application-at-windows-8-1 | manifested ]] in order to target Windows 10. If the application don't provide a manifest, the [[ https://docs.microsoft.com/en-us/windows/desktop/SysInfo/version-helper-apis | version helpers ]] functions will report Windows 8. In this case we want the actual version at the OS-level, not at the application-level. `RtlGetVersion` is the only way of doing that correctly.


https://reviews.llvm.org/D53727





More information about the llvm-commits mailing list