diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-17 00:42:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-17 00:42:33 +0000 |
commit | 76166fc7f20dcd989db844fcd1767bc393f149bc (patch) | |
tree | a5f30b1b21cda14f450424f069713edc6219a81f | |
parent | efdbfc4ceff91a44a835244db9516eb4d1953f8a (diff) | |
download | external_llvm-76166fc7f20dcd989db844fcd1767bc393f149bc.zip external_llvm-76166fc7f20dcd989db844fcd1767bc393f149bc.tar.gz external_llvm-76166fc7f20dcd989db844fcd1767bc393f149bc.tar.bz2 |
Define LLVM_NATIVE_ARCH in llvm/Config/config.h to be the LLVM back end that corresponds to the native executable, but only when that LLVM back end is being built
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73590 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | autoconf/configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 4ba6b2b..bd05891 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -234,6 +234,13 @@ if test "$llvm_cv_target_arch" = "Unknown" ; then AC_MSG_WARN([Configuring LLVM for an unknown target archicture]) fi +# Determine the LLVM native architecture for the target +case "$llvm_cv_target_arch" in + x86) LLVM_NATIVE_ARCH="X86" ;; + x86_64) LLVM_NATIVE_ARCH="X86" ;; + *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; +esac + dnl Define a substitution, ARCH, for the target architecture AC_SUBST(ARCH,$llvm_cv_target_arch) @@ -436,6 +443,15 @@ case "$enableval" in esac AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) +# Determine whether we are building LLVM support for the native architecture. +# If so, define LLVM_NATIVE_ARCH to that LLVM target. +for a_target in $TARGETS_TO_BUILD; do + if test "$a_target" = "$LLVM_NATIVE_ARCH"; then + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH, + [LLVM architecture name for the native architecture, if available]) + fi +done + # Build the LLVM_TARGET and LLVM_ASM_PRINTER macro uses for # Targets.def and AsmPrinters.def. LLVM_ENUM_TARGETS="" |