This originally used the spelling Ws2_32 when added ina5ffabce98, but was changed to WS2_32 in042a2e8932with the intent to use the canonical spelling from WinSDK, in order to aid cross compilation from case sensitive file systems with WinSDK. However, the WinSDK itself is self-inconsistent with respect to file name cases. Headers refer to each other with many different casings, so the original, out of the box casing doesn't work on case sensitive file systems. Import libraries like these use a variety of casings (some use all lowercase, some use CamelCase, some all uppercase, and the suffix is either .lib, .Lib or .LIB). In order to use the WinSDK on a case sensitive file system, these case issues has to be worked around somehow. Either by lowercasing all files (and the #includes within them, and potentially keeping symlinks with their original casing), or by setting up a Clang case insensitive VFS overlay. LLVM's llvm/cmake/platforms/WinMsvc.cmake sets up such a VFS overlay. For the linker, it creates a directory with lowercase symlinks. Therefore, the canonical way of handling these casing issues on case sensitive file systems is to consistently use lowercase. That is also what MinGW toolchains use. As an example, the same list of system_libs refers to advapi32, even if the actual file on disk in WinSDK is AdvAPI32.Lib. Likewise, other in-tree build systems that picked up this change for ws2_32 made it all lowercase, inb07aaf8d3bandd22dad9f76. This also matches other existing references to ws2_32 in e.g. lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt and lldb/source/Utility/CMakeLists.txt.
8 lines
252 B
Plaintext
8 lines
252 B
Plaintext
RUN: llvm-config --link-static --system-libs Support 2>&1 | FileCheck %s
|
|
REQUIRES: static-libs
|
|
REQUIRES: host={{.*-windows-msvc}}
|
|
CHECK-NOT: -l
|
|
CHECK: psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib ws2_32.lib
|
|
CHECK-NOT: error
|
|
CHECK-NOT: warning
|