summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-08-07 00:29:15 +0000
committerReid Kleckner <reid@kleckner.net>2013-08-07 00:29:15 +0000
commit3e53241fea9c39789ec65c5814f69a2f1e4ab68e (patch)
tree8a04628d99a697ef7b84643d1616df4b51bfaec2 /cmake
parent040ef013acf3e4ceed7fb052e00f2e0b7cd7650a (diff)
downloadllvm-3e53241fea9c39789ec65c5814f69a2f1e4ab68e.tar.gz
llvm-3e53241fea9c39789ec65c5814f69a2f1e4ab68e.tar.bz2
llvm-3e53241fea9c39789ec65c5814f69a2f1e4ab68e.tar.xz
Check for _strtoi64 in the cmake build if strtoll is missing
Previously this check was guarded by MSVC, which doesn't distinguish between the compiler and the headers/library. This enables clang to compile more of LLVM on Windows with Microsoft headers. Remove some unused macros while I'm here: error_t and LTDL stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake21
1 files changed, 10 insertions, 11 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 9f686c3dc7..85c4d81255 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -214,7 +214,6 @@ endif()
check_type_exists(int64_t "${headers}" HAVE_INT64_T)
check_type_exists(uint64_t "${headers}" HAVE_UINT64_T)
check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T)
-check_type_exists(error_t errno.h HAVE_ERROR_T)
# available programs checks
function(llvm_find_program name)
@@ -392,20 +391,20 @@ if( MINGW )
# CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
endif( MINGW )
+if (NOT HAVE_STRTOLL)
+ # Use _strtoi64 if strtoll is not available.
+ check_symbol_exists(_strtoi64 stdlib.h have_strtoi64)
+ if (have_strtoi64)
+ set(HAVE_STRTOLL 1)
+ set(strtoll "_strtoi64")
+ set(strtoull "_strtoui64")
+ endif ()
+endif ()
+
if( MSVC )
- set(error_t int)
- set(LTDL_SYSSEARCHPATH "")
- set(LTDL_DLOPEN_DEPLIBS 1)
set(SHLIBEXT ".lib")
- set(LTDL_OBJDIR "_libs")
- set(HAVE_STRTOLL 1)
- set(strtoll "_strtoi64")
- set(strtoull "_strtoui64")
set(stricmp "_stricmp")
set(strdup "_strdup")
-else( MSVC )
- set(LTDL_SYSSEARCHPATH "") # TODO
- set(LTDL_DLOPEN_DEPLIBS 0) # TODO
endif( MSVC )
if( PURE_WINDOWS )