| 
1 |  | -if( WIN32 AND NOT CYGWIN )  | 
2 |  | -  # We consider Cygwin as another Unix  | 
3 |  | -  set(PURE_WINDOWS 1)  | 
4 |  | -endif()  | 
5 |  | - | 
6 | 1 | include(CheckIncludeFile)  | 
7 | 2 | include(CheckLibraryExists)  | 
8 | 3 | include(CheckSymbolExists)  | 
@@ -31,7 +26,7 @@ elseif (APPLE)  | 
31 | 26 |   set(HAVE_SYS_MMAN_H 1)  | 
32 | 27 |   set(HAVE_SYSEXITS_H 1)  | 
33 | 28 |   set(HAVE_UNISTD_H 1)  | 
34 |  | -elseif (PURE_WINDOWS)  | 
 | 29 | +elseif (WIN32)  | 
35 | 30 |   set(HAVE_MACH_MACH_H 0)  | 
36 | 31 |   set(HAVE_MALLOC_MALLOC_H 0)  | 
37 | 32 |   set(HAVE_PTHREAD_H 0)  | 
@@ -132,7 +127,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")  | 
132 | 127 | endif()  | 
133 | 128 | 
 
  | 
134 | 129 | # library checks  | 
135 |  | -if( NOT PURE_WINDOWS )  | 
 | 130 | +if(NOT WIN32)  | 
136 | 131 |   check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)  | 
137 | 132 |   if (HAVE_LIBPTHREAD)  | 
138 | 133 |     check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)  | 
@@ -275,7 +270,7 @@ endif()  | 
275 | 270 | # party code may call MSan interceptors like strlen, leading to false positives.  | 
276 | 271 | if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")  | 
277 | 272 |   # Don't look for these libraries on Windows.  | 
278 |  | -  if (NOT PURE_WINDOWS)  | 
 | 273 | +  if (NOT WIN32)  | 
279 | 274 |     # Skip libedit if using ASan as it contains memory leaks.  | 
280 | 275 |     if (LLVM_ENABLE_LIBEDIT AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")  | 
281 | 276 |       if(LLVM_ENABLE_LIBEDIT STREQUAL FORCE_ON)  | 
@@ -384,7 +379,7 @@ check_symbol_exists(sbrk unistd.h HAVE_SBRK)  | 
384 | 379 | check_symbol_exists(strerror_r string.h HAVE_STRERROR_R)  | 
385 | 380 | check_symbol_exists(strerror_s string.h HAVE_DECL_STRERROR_S)  | 
386 | 381 | check_symbol_exists(setenv stdlib.h HAVE_SETENV)  | 
387 |  | -if( PURE_WINDOWS )  | 
 | 382 | +if(WIN32)  | 
388 | 383 |   check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S)  | 
389 | 384 | 
 
  | 
390 | 385 |   check_function_exists(_alloca HAVE__ALLOCA)  | 
@@ -420,8 +415,7 @@ else()  | 
420 | 415 |       "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)  | 
421 | 416 | endif()  | 
422 | 417 | 
 
  | 
423 |  | -# This check requires _GNU_SOURCE.  | 
424 |  | -if (NOT PURE_WINDOWS)  | 
 | 418 | +if (NOT WIN32)  | 
425 | 419 |   if (LLVM_PTHREAD_LIB)  | 
426 | 420 |     list(APPEND CMAKE_REQUIRED_LIBRARIES ${LLVM_PTHREAD_LIB})  | 
427 | 421 |   endif()  | 
 | 
0 commit comments