Skip to content

Commit 3cacbfc

Browse files
committed
[Cygwin] CYGWIN is not WIN32 in current CMake
On old CMake, Cygwin were also WIN32 but currently not. LLVM_ON_UNIX=1 and LLVM_HAVE_LINK_VERSION_SCRIPT=0 should be defined for Cygwin target.
1 parent ac4893d commit 3cacbfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ if( LLVM_REVERSE_ITERATION )
214214
set( LLVM_ENABLE_REVERSE_ITERATION 1 )
215215
endif()
216216

217-
if(WIN32)
217+
if(WIN32 OR CYGWIN)
218218
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
219219
if(CYGWIN)
220220
set(LLVM_ON_WIN32 0)
221221
set(LLVM_ON_UNIX 1)
222-
else(CYGWIN)
222+
else()
223223
set(LLVM_ON_WIN32 1)
224224
set(LLVM_ON_UNIX 0)
225-
endif(CYGWIN)
225+
endif()
226226
elseif(FUCHSIA OR UNIX)
227227
set(LLVM_ON_WIN32 0)
228228
set(LLVM_ON_UNIX 1)

0 commit comments

Comments
 (0)