summaryrefslogtreecommitdiff
path: root/autoconf/configure.ac
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-22 07:27:28 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-22 07:27:28 +0000
commit945de9b764a86578f6e363fee20128bae2fb7dd5 (patch)
treefa7e4d5f4fef809968c2d9a619f0fdf0d4c6ee89 /autoconf/configure.ac
parent9f838225658a5c900b5199db36779c56d0adbc11 (diff)
downloadllvm-945de9b764a86578f6e363fee20128bae2fb7dd5.tar.gz
llvm-945de9b764a86578f6e363fee20128bae2fb7dd5.tar.bz2
llvm-945de9b764a86578f6e363fee20128bae2fb7dd5.tar.xz
First step in avoiding compilation/usage of non-relevant targets. New
options have been added to the configure script that control which targets will be used. The options are: --enable-target-this (default=disabled) This will specify that the target corresponding to the build host is the target that will be compiled/used. You can't use this with any of the other options (they'll be ignored). This is what most people want. --disable-target-x86 (default=enabled) This will prevent the X86 target(s) from being compiled/used. --disable-target-sparc (default=enabled) This will prevent both SparcV8 and SparcV9 from being compiled/used. --disable-target-powerpc (default=enabled) This will prevent the PowerPC target from being compiled/used. --disable-target-alpha (default=enabled) This will prevent the Alpha target from being compiled/used. --disable-target-ia64 (default=enabled) This will prevent the IA64 target from being compiled/used. Note that without any of these options, the default behavior is to build all targets, as is the current practice. All these options do is set up the substititution variable TARGETS_TO_BUILD which contains the targets that should be compiled/used. The variable is intended to be used in the makefiles. Those changes will come later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/configure.ac')
-rw-r--r--autoconf/configure.ac50
1 files changed, 50 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 5f0d5b6238..8284a14f65 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -218,6 +218,8 @@ else
Sparc) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
PowerPC) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
x86_64) AC_SUBST(JIT,[[]]) ;;
+ Alpha) AC_SUBST(JIT,[[]]) ;;
+ IA64) AC_SUBST(JIT,[[]]) ;;
*) AC_SUBST(JIT,[[]]) ;;
esac
fi
@@ -234,6 +236,53 @@ case "$enableval" in
*) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;;
esac
+dnl Allow specific targets to be specified for building (or not)
+TARGETS_TO_BUILD=""
+AC_ARG_ENABLE([target-this],AS_HELP_STRING([--enable-target-this],
+[Build only the current host's target (default is NO)]),,enable_target_this=no)
+AC_ARG_ENABLE([target-x86],AS_HELP_STRING([--enable-target-x86],
+[Build the x86 target (default is YES)]),,enable_target_x86=yes)
+AC_ARG_ENABLE([target-x86-64],AS_HELP_STRING([--enable-target-x86-64],
+[Build the x86_64 target (default is YES)]),,enable_target_x86_64=yes)
+AC_ARG_ENABLE([target-sparc],AS_HELP_STRING([--enable-target-sparc],
+[Build the Sparc target (default is YES)]),,enable_target_sparc=yes)
+AC_ARG_ENABLE([target-powerpc],AS_HELP_STRING([--enable-target-powerpc],
+[Build the PowerPC target (default is YES)]),,enable_target_powerpc=yes)
+AC_ARG_ENABLE([target-alpha],AS_HELP_STRING([--enable-target-alpha],
+[Build the Alpha target (default is YES)]),,enable_target_alpha=yes)
+AC_ARG_ENABLE(]target-ia64],AS_HELP_STRING([--enable-target-ia64],
+[Build the IA64 target (default is YES)]),,enable_target_ia64=yes)
+
+if test "$enable_target_this" = "yes" ; then
+ case "$llvm_cv_target_arch" in
+ x86) TARGETS_TO_BUILD="X86" ;;
+ x86_64) TARGETS_TO_BUILD="X86" ;;
+ Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
+ PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
+ Alpha) TARGETS_TO_BUILD="Alpha" ;;
+ IA64) TARGETS_TO_BUILD="IA64" ;;
+ *) AC_MSG_ERROR([Can not set target to build]) ;;
+ esac
+else
+ if test "$enable_target_x86" = "yes" -o "$enable_target_x86_64" = "yes" ; then
+ TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD"
+ fi
+ if test "$enable_target_sparc" = "yes" ; then
+ TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD"
+ fi
+ if test "$enable_target_powerpc" = "yes" ; then
+ TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD"
+ fi
+ if test "$enable_target_alpha" = "yes" ; then
+ TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD"
+ fi
+ if test "$enable_target_ia64" = "yes" ; then
+ TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD"
+ fi
+fi
+
+AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)
+
dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.
AC_ARG_WITH(llvmgccdir,
AS_HELP_STRING([--with-llvmgccdir],
@@ -245,6 +294,7 @@ case "$withval" in
*) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;;
esac
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 4: Check for programs we need and that they are the right version