From 753f3265dafdcfeec07b561ca278524c35477583 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 30 Aug 2010 18:34:48 +0000 Subject: Fix LLVM target initialization to deal with sociopathic outside projects that like to randomly define things like "X86", regenerate autoconf bits and update cmake. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes PR7852. Patch by Xerxes RĂ„nby! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112499 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Config/config.h.cmake | 16 +++++++++++----- include/llvm/Config/config.h.in | 10 ++++++++-- include/llvm/Config/llvm-config.h.cmake | 12 +++++++++--- include/llvm/Config/llvm-config.h.in | 10 ++++++++-- 4 files changed, 36 insertions(+), 12 deletions(-) (limited to 'include/llvm/Config') diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index 81e6ab5748..e8feabffda 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -626,10 +626,16 @@ /* Define to a function implementing strdup */ #cmakedefine strdup ${strdup} -/* Native LLVM architecture */ -#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}Target - -/* Native LLVM architecture, short name */ -#cmakedefine LLVM_NATIVE_ARCHNAME ${LLVM_NATIVE_ARCH} +/* LLVM architecture name for the native architecture, if available */ +#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH} + +/* LLVM name for the native Target init function, if available */ +#cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target + +/* LLVM name for the native TargetInfo init function, if available */ +#cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo + +/* LLVM name for the native AsmPrinter init function, if available */ +#cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter #endif diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 911f9877ba..d62da1ab03 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -500,8 +500,14 @@ /* LLVM architecture name for the native architecture, if available */ #undef LLVM_NATIVE_ARCH -/* Short LLVM architecture name for the native architecture, if available */ -#undef LLVM_NATIVE_ARCHNAME +/* LLVM name for the native AsmPrinter init function, if available */ +#undef LLVM_NATIVE_ASMPRINTER + +/* LLVM name for the native Target init function, if available */ +#undef LLVM_NATIVE_TARGET + +/* LLVM name for the native TargetInfo init function, if available */ +#undef LLVM_NATIVE_TARGETINFO /* Define if this is Unixish platform */ #undef LLVM_ON_UNIX diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index b68592a64a..8469bcc606 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -50,10 +50,16 @@ #cmakedefine LLVM_MULTITHREADED /* LLVM architecture name for the native architecture, if available */ -#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}Target +#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH} -/* Short LLVM architecture name for the native architecture, if available */ -#cmakedefine LLVM_NATIVE_ARCHNAME ${LLVM_NATIVE_ARCH} +/* LLVM name for the native Target init function, if available */ +#cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target + +/* LLVM name for the native TargetInfo init function, if available */ +#cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo + +/* LLVM name for the native AsmPrinter init function, if available */ +#cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter /* Define if this is Unixish platform */ #cmakedefine LLVM_ON_UNIX diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index f35859ea04..e7a04ee91b 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -52,8 +52,14 @@ /* LLVM architecture name for the native architecture, if available */ #undef LLVM_NATIVE_ARCH -/* Short LLVM architecture name for the native architecture, if available */ -#undef LLVM_NATIVE_ARCHNAME +/* LLVM name for the native Target init function, if available */ +#undef LLVM_NATIVE_TARGET + +/* LLVM name for the native TargetInfo init function, if available */ +#undef LLVM_NATIVE_TARGETINFO + +/* LLVM name for the native AsmPrinter init function, if available */ +#undef LLVM_NATIVE_ASMPRINTER /* Define if this is Unixish platform */ #undef LLVM_ON_UNIX -- cgit v1.2.3-18-g5258