build: differentiate between building for and on Windows

This is necessary to support cross-compiling a Windows libc++ from
Linux.  The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools
parlance, is known as the build as opposed to WIN32 which maps to, in
autotools parlance, host.

llvm-svn: 290800
This commit is contained in:
Saleem Abdulrasool 2017-01-01 20:20:36 +00:00
parent a9e1450b07
commit 61bce47e3b
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ if (LIBCXX_INSTALL_HEADERS)
if (LIBCXX_NEEDS_SITE_CONFIG)
set(UNIX_CAT cat)
if (WIN32)
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
set(UNIX_CAT type)
endif()
# Generate and install a custom __config header. The new header is created