From e7a3e38c9ea9e8355d2918a554da20ec252614a4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 16 Dec 2011 06:21:08 +0000 Subject: [PATCH] Tweak CMake build on Cygwin. llvm-svn: 146725 --- cmake/modules/HandleLLVMOptions.cmake | 2 +- unittests/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 6788f8ec68a..c316ab63331 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -76,7 +76,7 @@ if( LLVM_ENABLE_PIC ) # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't # know how to disable this, so just force ENABLE_PIC off for now. message(WARNING "-fPIC not supported with Xcode.") - elseif( WIN32 ) + elseif( WIN32 OR CYGWIN) # On Windows all code is PIC. MinGW warns if -fPIC is used. else() include(CheckCXXCompilerFlag) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 81d702981f8..15423dce460 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -96,7 +96,7 @@ endif() add_llvm_unittest(ExecutionEngine/JIT ${JITTestsSources}) -if(MINGW) +if(MINGW OR CYGWIN) set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) endif()