mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger! llvm-svn: 123659
This commit is contained in:
parent
30124fea1f
commit
512d8eb82a
@ -55,6 +55,7 @@ check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stdio.h HAVE_STDIO_H)
|
||||
check_include_file(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_file(string.h HAVE_STRING_H)
|
||||
check_include_file(strings.h HAVE_STRINGS_H)
|
||||
check_include_file(sys/dir.h HAVE_SYS_DIR_H)
|
||||
check_include_file(sys/dl.h HAVE_SYS_DL_H)
|
||||
check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
@ -72,6 +73,8 @@ check_include_file(utime.h HAVE_UTIME_H)
|
||||
check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
|
||||
check_include_file(windows.h HAVE_WINDOWS_H)
|
||||
check_include_file(fenv.h HAVE_FENV_H)
|
||||
check_include_file(mach/mach.h HAVE_MACH_MACH_H)
|
||||
check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
|
||||
|
||||
# library checks
|
||||
if( NOT LLVM_ON_WIN32 )
|
||||
@ -106,6 +109,10 @@ check_symbol_exists(opendir "sys/types.h;dirent.h" HAVE_OPENDIR)
|
||||
check_symbol_exists(getcwd unistd.h HAVE_GETCWD)
|
||||
check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
|
||||
check_symbol_exists(getrlimit "sys/types.h;sys/time.h;sys/resource.h" HAVE_GETRLIMIT)
|
||||
check_symbol_exists(strchr string.h HAVE_STRCHR)
|
||||
check_symbol_exists(strcmp string.h HAVE_STRCMP)
|
||||
check_symbol_exists(strdup string.h HAVE_STRDUP)
|
||||
check_symbol_exists(strrchr string.h HAVE_STRRCHR)
|
||||
if( NOT LLVM_ON_WIN32 )
|
||||
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
|
||||
endif()
|
||||
@ -127,6 +134,12 @@ if( HAVE_ARGZ_H )
|
||||
check_symbol_exists(argz_next argz.h HAVE_ARGZ_NEXT)
|
||||
check_symbol_exists(argz_stringify argz.h HAVE_ARGZ_STRINGIFY)
|
||||
endif()
|
||||
if( HAVE_DLFCN_H AND HAVE_LIBDL )
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
|
||||
check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
|
||||
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
|
||||
if( LLVM_USING_GLIBC )
|
||||
@ -154,6 +167,7 @@ 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)
|
||||
|
@ -91,13 +91,13 @@
|
||||
#cmakedefine HAVE_DLD_H ${HAVE_DLD_H}
|
||||
|
||||
/* Define to 1 if you have the `dlerror' function. */
|
||||
#undef HAVE_DLERROR
|
||||
#cmakedefine HAVE_DLERROR ${HAVE_DLERROR}
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
|
||||
|
||||
/* Define if dlopen() is available on this platform. */
|
||||
#undef HAVE_DLOPEN
|
||||
#cmakedefine HAVE_DLOPEN ${HAVE_DLOPEN}
|
||||
|
||||
/* Define to 1 if you have the <dl.h> header file. */
|
||||
#cmakedefine HAVE_DL_H ${HAVE_DL_H}
|
||||
@ -115,7 +115,7 @@
|
||||
#cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}
|
||||
|
||||
/* Define to 1 if the system has the type `error_t'. */
|
||||
#undef HAVE_ERROR_T
|
||||
#cmakedefine HAVE_ERROR_T ${HAVE_ERROR_T}
|
||||
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
#cmakedefine HAVE_EXECINFO_H ${HAVE_EXECINFO_H}
|
||||
@ -193,7 +193,7 @@
|
||||
#cmakedefine HAVE_ISNAN_IN_MATH_H ${HAVE_ISNAN_IN_MATH_H}
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
#cmakedefine HAVE_LIBDL ${HAVE_LIBDL}
|
||||
|
||||
/* Define to 1 if you have the `imagehlp' library (-limagehlp). */
|
||||
#cmakedefine HAVE_LIBIMAGEHLP ${HAVE_LIBIMAGEHLP}
|
||||
@ -227,10 +227,10 @@
|
||||
#undef HAVE_LONGJMP
|
||||
|
||||
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||
#undef HAVE_MACH_MACH_H
|
||||
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
|
||||
|
||||
/* Define to 1 if you have the <mach-o/dyld.h> header file. */
|
||||
#undef HAVE_MACH_O_DYLD_H
|
||||
#cmakedefine HAVE_MACH_O_DYLD_H ${HAVE_MACH_O_DYLD_H}
|
||||
|
||||
/* Define if mallinfo() is available on this platform. */
|
||||
#cmakedefine HAVE_MALLINFO ${HAVE_MALLINFO}
|
||||
@ -372,13 +372,13 @@
|
||||
#undef HAVE_STD_ISNAN_IN_CMATH
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
#cmakedefine HAVE_STRCHR ${HAVE_STRCHR}
|
||||
|
||||
/* Define to 1 if you have the `strcmp' function. */
|
||||
#undef HAVE_STRCMP
|
||||
#cmakedefine HAVE_STRCMP ${HAVE_STRCMP}
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
#cmakedefine HAVE_STRDUP ${HAVE_STRDUP}
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#cmakedefine HAVE_STRERROR ${HAVE_STRERROR}
|
||||
@ -390,13 +390,13 @@
|
||||
#cmakedefine HAVE_STRERROR_S ${HAVE_STRERROR_S}
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
#cmakedefine HAVE_STRRCHR ${HAVE_STRRCHR}
|
||||
|
||||
/* Define to 1 if you have the `strtof' function. */
|
||||
#cmakedefine HAVE_STRTOF ${HAVE_STRTOF}
|
||||
|
@ -1,4 +1,4 @@
|
||||
##===- tools/ed/Makefile -----------------------------------*- Makefile -*-===##
|
||||
##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
@ -26,7 +26,7 @@ ifneq ($(filter $(TARGETS_TO_BUILD), X86),)
|
||||
LINK_COMPONENTS += x86asmprinter x86disassembler
|
||||
endif
|
||||
|
||||
# If the X86 target is enabled, link in the asmprinter and disassembler.
|
||||
# If the ARM target is enabled, link in the asmprinter and disassembler.
|
||||
ifneq ($(filter $(TARGETS_TO_BUILD), ARM),)
|
||||
LINK_COMPONENTS += armasmprinter armdisassembler
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user