diff options
author | Raphael <raphael@google.com> | 2011-01-13 15:12:30 -0800 |
---|---|---|
committer | Raphael <raphael@google.com> | 2011-01-13 15:12:30 -0800 |
commit | eb17d172c661dc61104d6f38e20a4f4f83e271ab (patch) | |
tree | ccca24fbc1f8705fda1564a1a22a77197012d1c5 | |
parent | 7fa502c8157d3e9584da0bf3c6f87f7ca70e5b69 (diff) | |
download | external_llvm-eb17d172c661dc61104d6f38e20a4f4f83e271ab.zip external_llvm-eb17d172c661dc61104d6f38e20a4f4f83e271ab.tar.gz external_llvm-eb17d172c661dc61104d6f38e20a4f4f83e271ab.tar.bz2 |
Support for building/using tblgen for Windows SDK.
Change-Id: I174939e0acb4bc3bea368c8a8e8435384bcc8d48
-rw-r--r-- | host/include/llvm/Config/config.h | 39 | ||||
-rw-r--r-- | llvm.mk | 2 | ||||
-rw-r--r-- | utils/TableGen/Android.mk | 7 |
3 files changed, 32 insertions, 16 deletions
diff --git a/host/include/llvm/Config/config.h b/host/include/llvm/Config/config.h index 8e18855..5a48cd5 100644 --- a/host/include/llvm/Config/config.h +++ b/host/include/llvm/Config/config.h @@ -182,18 +182,9 @@ /* Define if you have the libdl library or equivalent. */ #define HAVE_LIBDL 1 -/* Define to 1 if you have the `imagehlp' library (-limagehlp). */ -/* #undef HAVE_LIBIMAGEHLP */ - /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 -/* Define to 1 if you have the `psapi' library (-lpsapi). */ -/* #undef HAVE_LIBPSAPI */ - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#define HAVE_LIBPTHREAD 1 - /* Define to 1 if you have the `udis86' library (-ludis86). */ /* #undef HAVE_LIBUDIS86 */ @@ -280,6 +271,10 @@ /* Define to have the %a format string */ #define HAVE_PRINTF_A 1 +#ifndef USE_MINGW +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + /* Have pthread_getspecific */ #define HAVE_PTHREAD_GETSPECIFIC 1 @@ -291,6 +286,7 @@ /* Have pthread_rwlock_init */ #define HAVE_PTHREAD_RWLOCK_INIT 1 +#endif /* not USE_MINGW */ /* Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h> */ #define HAVE_RAND48 1 @@ -368,7 +364,9 @@ #define HAVE_STRERROR 1 /* Define to 1 if you have the `strerror_r' function. */ +#ifndef USE_MINGW #define HAVE_STRERROR_R 1 +#endif /* Define to 1 if you have the `strerror_s' function. */ /* #undef HAVE_STRERROR_S */ @@ -447,9 +445,6 @@ /* Define to 1 if the system has the type `u_int64_t'. */ /* #undef HAVE_U_INT64_T */ -/* Define to 1 if you have the <windows.h> header file. */ -/* #undef HAVE_WINDOWS_H */ - /* Define to 1 if you have the `__dso_handle' function. */ #define HAVE___DSO_HANDLE 1 @@ -495,11 +490,26 @@ /* Short LLVM architecture name for the native architecture, if available */ #define LLVM_NATIVE_ARCHNAME X86 +#ifdef USE_MINGW +/* Define if this is Win32ish platform */ +#define LLVM_ON_WIN32 1 + +/* Define to 1 if you have the <windows.h> header file. */ +#define HAVE_WINDOWS_H 1 + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +#define HAVE_LIBPSAPI 1 + +/* Define to 1 if you have the `imagehlp' library (-limagehlp). */ +#define HAVE_LIBIMAGEHLP 1 + +#else /* not USE_MINGW */ + /* Define if this is Unixish platform */ #define LLVM_ON_UNIX 1 -/* Define if this is Win32ish platform */ -/* #undef LLVM_ON_WIN32 */ +#endif + /* Define to path to circo program if found or 'echo circo' otherwise */ /* #undef LLVM_PATH_CIRCO */ @@ -601,3 +611,4 @@ /* #undef size_t */ #endif + @@ -2,7 +2,7 @@ ifeq ($(LLVM_ROOT_PATH),) $(error Must set variable LLVM_ROOT_PATH before including this! $(LOCAL_PATH)) endif -TBLGEN := $(HOST_OUT_EXECUTABLES)/tblgen$(HOST_EXECUTABLE_SUFFIX) +TBLGEN := $(BUILD_OUT_EXECUTABLES)/tblgen$(BUILD_EXECUTABLE_SUFFIX) CLEAR_TBLGEN_VARS := $(LLVM_ROOT_PATH)/clear_tblgen_vars.mk LLVM_HOST_BUILD_MK := $(LLVM_ROOT_PATH)/llvm-host-build.mk diff --git a/utils/TableGen/Android.mk b/utils/TableGen/Android.mk index 9d4e9d5..8dae6f0 100644 --- a/utils/TableGen/Android.mk +++ b/utils/TableGen/Android.mk @@ -44,7 +44,12 @@ REQUIRES_RTTI := 1 LOCAL_STATIC_LIBRARIES := libLLVMSupport libLLVMSystem LOCAL_MODULE := tblgen -LOCAL_LDLIBS += -lpthread -lm -ldl +LOCAL_LDLIBS += -lm +ifeq ($(HOST_OS),windows) + LOCAL_LDLIBS += -limagehlp -lpsapi +else + LOCAL_LDLIBS += -lpthread -ldl +endif include $(LLVM_HOST_BUILD_MK) include $(BUILD_HOST_EXECUTABLE) |