summaryrefslogtreecommitdiff
path: root/cmake/base-config-ix.cmake
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2016-09-07 20:32:48 +0000
committerFrancis Ricci <francisjricci@gmail.com>2016-09-07 20:32:48 +0000
commit4a0c5cdd3e3feb1a94b78f1196668e83fedfbca8 (patch)
tree93c7079d0fa6d47fa02f910686248e44295e250b /cmake/base-config-ix.cmake
parent58a7731dafc791d58adf86783dbd6cb420e651e5 (diff)
[compiler-rt] Fix library suffixes on windows
Summary: Make sure that windows libraries contain the suffixes expected by clang. This is expecially important when compiling the windows builtins with clang, as cmake will use .a as the suffix by default. Reviewers: beanz, compnerd Subscribers: llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D24046 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/base-config-ix.cmake')
-rw-r--r--cmake/base-config-ix.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 830e443ea..4ea9eb8ce 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -86,6 +86,15 @@ if(APPLE)
option(COMPILER_RT_ENABLE_TVOS "Enable building for tvOS - Experimental" Off)
endif()
+if(WIN32 AND NOT MINGW AND NOT CYGWIN)
+ set(CMAKE_SHARED_LIBRARY_PREFIX_C "")
+ set(CMAKE_SHARED_LIBRARY_PREFIX_CXX "")
+ set(CMAKE_STATIC_LIBRARY_PREFIX_C "")
+ set(CMAKE_STATIC_LIBRARY_PREFIX_CXX "")
+ set(CMAKE_STATIC_LIBRARY_SUFFIX_C ".lib")
+ set(CMAKE_STATIC_LIBRARY_SUFFIX_CXX ".lib")
+endif()
+
macro(test_targets)
# Find and run MSVC (not clang-cl) and get its version. This will tell clang-cl
# what version of MSVC to pretend to be so that the STL works.