Tweak CMake build on Cygwin.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 16 Dec 2011 06:21:08 +0000 (06:21 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 16 Dec 2011 06:21:08 +0000 (06:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146725 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake
unittests/CMakeLists.txt

index 6788f8ec68a63efb6426e7ae41556e9fbafa728f..c316ab6333171d7391cc418bb6a41f9f612a6aaa 100644 (file)
@@ -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)
index 81d702981f82e16324d87cdb88de1f10d59d2cbc..15423dce460a9f7a8e2cea2bd5c8254718958716 100644 (file)
@@ -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()