for a_target in $TARGETS_TO_BUILD; do
if test "$a_target" = "$LLVM_NATIVE_ARCH"; then
LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target"
+ AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCHNAME,$LLVM_NATIVE_ARCH,
+ [Short LLVM architecture name for the native architecture, if available])
AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET,
[LLVM architecture name for the native architecture, if available])
fi
endif ()
if (LLVM_NATIVE_ARCH)
+ set(LLVM_NATIVE_ARCHNAME ${LLVM_NATIVE_ARCH})
list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX)
if (NATIVE_ARCH_IDX EQUAL -1)
message(STATUS
if test "$a_target" = "$LLVM_NATIVE_ARCH"; then
LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target"
+cat >>confdefs.h <<_ACEOF
+#define LLVM_NATIVE_ARCHNAME $LLVM_NATIVE_ARCH
+_ACEOF
+
+
cat >>confdefs.h <<_ACEOF
#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCHTARGET
_ACEOF
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11394 "configure"
+#line 11399 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
/* 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 */
#undef LLVM_NATIVE_ARCH
+/* Short LLVM architecture name for the native architecture, if available */
+#undef LLVM_NATIVE_ARCHNAME
+
/* Define if this is Unixish platform */
#undef LLVM_ON_UNIX
#define LLVM_ASM_PRINTER(TargetName) void LLVMInitialize##TargetName##AsmPrinter();
#include "llvm/Config/AsmPrinters.def"
- // FIXME: Workaround for unfortunate definition of LLVM_NATIVE_ARCH.
-#define LLVM_ASM_PRINTER(TargetName) \
- static inline void LLVMInitialize##TargetName##TargetAsmPrinter() { \
- LLVMInitialize##TargetName##AsmPrinter(); \
- }
-#include "llvm/Config/AsmPrinters.def"
-
// Declare all of the available assembly parser initialization functions.
#define LLVM_ASM_PARSER(TargetName) void LLVMInitialize##TargetName##AsmParser();
#include "llvm/Config/AsmParsers.def"
/// It is legal for a client to make multiple calls to this function.
inline bool InitializeNativeTarget() {
// If we have a native target, initialize it to ensure it is linked in.
-#ifdef LLVM_NATIVE_ARCH
+#ifdef LLVM_NATIVE_ARCHNAME
#define DoInit2(TARG) \
LLVMInitialize ## TARG ## Info (); \
LLVMInitialize ## TARG ()
#define DoInit2(TARG) \
LLVMInitialize ## TARG ## AsmPrinter ();
#define DoInit(T) DoInit2(T)
- DoInit(LLVM_NATIVE_ARCH);
+ DoInit(LLVM_NATIVE_ARCHNAME);
return false;
#undef DoInit
#undef DoInit2