[PATCH] D41156: [cmake] Add support for case-sensitive Windows SDKs

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 09:52:38 PST 2017


compnerd added inline comments.


================
Comment at: cmake/platforms/WinMsvc.cmake:78-93
+# WINSDK_CASE_SENSITIVE:
+#   The Windows SDK headers and libraries are not case-correct. You can mount
+#   the SDK in a case-insensitive mount to work around this. Run the following
+#   commands to set the mount up, and then copy the SDK headers and libraries to
+#   the winsdk.icase folder and use *that* folder as the path when configuring
+#   CMake.
 #
----------------
zturner wrote:
> Assuming that the vfs overlay works as you claim it does, is there any advantage to using the `WINSDK_CASE_SENSITIVE=NO` path?  Why would someone ever want to use ciopfs instead of the vfs overlay?  Would it be good enough to just say "If CMAKE_SYSTEM_NAME is not windows, use the overlay"?
Yes, the VFS overlay works as claimed.  The thing is that it would only alleviate it for the compilation portion, not the linking portion.  In fact, I used the same trick to deal with the cross-compilation on Linux for Windows in swift.  The one thing which is slightly annoying is that the VFS overlay needs to walk over the file system to be generated, as opposed to the swift case, where I manually hand constructed the mapping for the handful of files used in the swift build.

The only advantage that I see for the ciopfs is that it also accounts for the linking portion.  It is good enough to just enable the VFS overlay for all of the compilation though based on:

  CMAKE_SYSTEM_NAME MATCHES Windows AND CMAKE_HOST_SYSTEM_NAME NOT STREQUAL CMAKE_SYSTEM_NAME


https://reviews.llvm.org/D41156





More information about the llvm-commits mailing list