llvm.org GIT mirror llvm / bcba7f9
Work around build problem with OpenJDK, which defines X86 as a macro. Fixes PR 4427. Patch by Xerxes Rånby! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73961 91177308-0d34-0410-b5e6-96231b3b80d8 Douglas Gregor 11 years ago
3 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
446446 # If so, define LLVM_NATIVE_ARCH to that LLVM target.
447447 for a_target in $TARGETS_TO_BUILD; do
448448 if test "$a_target" = "$LLVM_NATIVE_ARCH"; then
449 AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH,
449 LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target"
450 AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET,
450451 [LLVM architecture name for the native architecture, if available])
451452 fi
452453 done
581581 #cmakedefine strdup ${strdup}
582582
583583 /* Native LLVM architecture */
584 #cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}
584 #cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}Target
4949 inline bool InitializeNativeTarget() {
5050 // If we have a native target, initialize it to ensure it is linked in.
5151 #ifdef LLVM_NATIVE_ARCH
52 #define DoInit2(TARG, MOD) llvm::Initialize ## TARG ## MOD()
53 #define DoInit(T, M) DoInit2(T, M)
54 DoInit(LLVM_NATIVE_ARCH, Target);
52 #define DoInit2(TARG) llvm::Initialize ## TARG ()
53 #define DoInit(T) DoInit2(T)
54 DoInit(LLVM_NATIVE_ARCH);
5555 return false;
5656 #undef DoInit
5757 #undef DoInit2