Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1353)

Unified Diff: autoconf/configure.ac

Issue 1084753002: Add some configure/CMake options for enabling/disabling Subzero targets. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: line up better Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | configure » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: autoconf/configure.ac
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index face88ae038ca55bcbb4e7be4fd44cd14911aefe..c6f41382bf1c3f9869b6e39a925d26ff5af7614d 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -936,7 +936,7 @@ TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
[Build specific host targets: all or target1,target2,... Valid targets are:
host, x86, x86_64, sparc, powerpc, arm64, arm, aarch64, mips, hexagon,
- xcore, msp430, nvptx, systemz, r600, and cpp (default=all)]),,
+ xcore, msp430, nvptx, systemz, r600, js, and cpp (default=all)]),,
enableval=all)
if test "$enableval" = host-only ; then
enableval=host
@@ -1055,6 +1055,33 @@ AC_SUBST(LLVM_ENUM_ASM_PRINTERS)
AC_SUBST(LLVM_ENUM_ASM_PARSERS)
AC_SUBST(LLVM_ENUM_DISASSEMBLERS)
+
+dnl Allow specific Subzero targets to be specified for building (or not)
+SUBZERO_TARGETS_TO_BUILD=""
+AC_ARG_ENABLE([subzero_targets],AS_HELP_STRING([--enable-subzero-targets],
+ [Build specific subzero targets: target1,target2,...(default=none)]),,
+ enableval=none)
+case "$enableval" in
+ none) ;;
+ *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
+ case "$a_target" in
+ X8632) SUBZERO_TARGETS_TO_BUILD="X8632 $SUBZERO_TARGETS_TO_BUILD" ;;
+ X8664) SUBZERO_TARGETS_TO_BUILD="X8664 $SUBZERO_TARGETS_TO_BUILD" ;;
+ ARM32) SUBZERO_TARGETS_TO_BUILD="ARM32 $SUBZERO_TARGETS_TO_BUILD" ;;
+ ARM64) SUBZERO_TARGETS_TO_BUILD="ARM64 $SUBZERO_TARGETS_TO_BUILD" ;;
+ *) AC_MSG_ERROR([Unrecognized subzero target $a_target]) ;;
+ esac
+ done
+ ;;
+esac
+
+dnl Build the SUBZERO_ENUM_TARGETS macro for SZTargets.def.
+SUBZERO_ENUM_TARGETS=""
+for target_to_build in $SUBZERO_TARGETS_TO_BUILD; do
+ SUBZERO_ENUM_TARGETS="SUBZERO_TARGET($target_to_build) $SUBZERO_ENUM_TARGETS"
+done
+AC_SUBST(SUBZERO_ENUM_TARGETS)
+
dnl Override the option to use for optimized builds.
AC_ARG_WITH(optimize-option,
AS_HELP_STRING([--with-optimize-option],
@@ -2003,6 +2030,7 @@ AH_TOP([#ifndef CONFIG_H
#define CONFIG_H])
AH_BOTTOM([#endif])
+AC_CONFIG_FILES([include/llvm/Config/SZTargets.def])
AC_CONFIG_FILES([include/llvm/Config/Targets.def])
AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
« no previous file with comments | « Makefile ('k') | configure » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698