llvm.org GIT mirror llvm / d14baf4
Add options to disable building of ARCMT, Rewriter and Static Analyzer in clang. The default remains to build those. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170134 91177308-0d34-0410-b5e6-96231b3b80d8 Roman Divacky 6 years ago
3 changed file(s) with 189 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
221221 # When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
222222 ENABLE_CXX11 = @ENABLE_CXX11@
223223
224 # When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
225 ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
226
227 # When ENABLE_CLANG_REWRITER is enabled, clang will have Rewriter.
228 ENABLE_CLANG_REWRITER = @ENABLE_CLANG_REWRITER@
229
230 # When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer.
231 ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@
232
224233 # When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
225234 ENABLE_WERROR = @ENABLE_WERROR@
226235
474474 *) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
475475 esac
476476
477 dnl --enable-clang-arcmt: check whether to enable clang arcmt
478 clang_arcmt="yes"
479 AC_ARG_ENABLE(clang-arcmt,
480 AS_HELP_STRING([--enable-clang-arcmt],
481 [Enable building of clang ARCMT (default is YES)]),
482 clang_arcmt="$enableval",
483 enableval="yes")
484 case "$enableval" in
485 yes) AC_SUBST(ENABLE_CLANG_ARCMT,[1]) ;;
486 no) AC_SUBST(ENABLE_CLANG_ARCMT,[0]) ;;
487 default) AC_SUBST(ENABLE_CLANG_ARCMT,[1]);;
488 *) AC_MSG_ERROR([Invalid setting for --enable-clang-arcmt. Use "yes" or "no"]) ;;
489 esac
490
491 dnl --enable-clang-static-analyzer: check whether to enable static-analyzer
492 clang_static_analyzer="yes"
493 AC_ARG_ENABLE(clang-static-analyzer,
494 AS_HELP_STRING([--enable-clang-static-analyzer],
495 [Enable building of clang Static Analyzer (default is YES)]),
496 clang_static_analyzer="$enableval",
497 enableval="yes")
498 case "$enableval" in
499 yes) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]) ;;
500 no) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[0]) ;;
501 default) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]);;
502 *) AC_MSG_ERROR([Invalid setting for --enable-clang-static-analyzer. Use "yes" or "no"]) ;;
503 esac
504
505 dnl --enable-clang-rewriter: check whether to enable clang rewriter
506 AC_ARG_ENABLE(clang-rewriter,
507 AS_HELP_STRING([--enable-clang-rewriter],
508 [Enable building of clang rewriter (default is YES)]),,
509 enableval="yes")
510 case "$enableval" in
511 yes) AC_SUBST(ENABLE_CLANG_REWRITER,[1]) ;;
512 no)
513 if test clang_arcmt != "no" ; then
514 AC_MSG_ERROR([Cannot enable clang ARC Migration Tool while disabling rewriter.])
515 fi
516 if test clang_static_analyzer != "no" ; then
517 AC_MSG_ERROR([Cannot enable clang static analyzer while disabling rewriter.])
518 fi
519 AC_SUBST(ENABLE_CLANG_REWRITER,[0])
520 ;;
521 default) AC_SUBST(ENABLE_CLANG_REWRITER,[1]);;
522 *) AC_MSG_ERROR([Invalid setting for --enable-clang-rewriter. Use "yes" or "no"]) ;;
523 esac
524
477525 dnl --enable-optimized : check whether they want to do an optimized build:
478526 AC_ARG_ENABLE(optimized, AS_HELP_STRING(
479527 --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
684684 CVSBUILD
685685 ENABLE_LIBCPP
686686 ENABLE_CXX11
687 ENABLE_CLANG_ARCMT
688 ENABLE_CLANG_STATIC_ANALYZER
689 ENABLE_CLANG_REWRITER
687690 ENABLE_OPTIMIZED
688691 ENABLE_PROFILING
689692 DISABLE_ASSERTIONS
13961399 --enable-polly Use polly if available (default is YES)
13971400 --enable-libcpp Use libc++ if available (default is NO)
13981401 --enable-cxx11 Use c++11 if available (default is NO)
1402 --enable-clang-arcmt Enable building of clang ARCMT (default is YES)
1403 --enable-clang-static-analyzer
1404 Enable building of clang Static Analyzer (default is
1405 YES)
1406 --enable-clang-rewriter Enable building of clang rewriter (default is YES)
13991407 --enable-optimized Compile with optimizations enabled (default is NO)
14001408 --enable-profiling Compile with profiling enabled (default is NO)
14011409 --enable-assertions Compile with assertion checks enabled (default is
50465054 { (exit 1); exit 1; }; } ;;
50475055 esac
50485056
5057 clang_arcmt="yes"
5058 # Check whether --enable-clang-arcmt was given.
5059 if test "${enable_clang_arcmt+set}" = set; then
5060 enableval=$enable_clang_arcmt; clang_arcmt="$enableval"
5061 else
5062 enableval="yes"
5063 fi
5064
5065 case "$enableval" in
5066 yes) ENABLE_CLANG_ARCMT=1
5067 ;;
5068 no) ENABLE_CLANG_ARCMT=0
5069 ;;
5070 default) ENABLE_CLANG_ARCMT=1
5071 ;;
5072 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&5
5073 echo "$as_me: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&2;}
5074 { (exit 1); exit 1; }; } ;;
5075 esac
5076
5077 clang_static_analyzer="yes"
5078 # Check whether --enable-clang-static-analyzer was given.
5079 if test "${enable_clang_static_analyzer+set}" = set; then
5080 enableval=$enable_clang_static_analyzer; clang_static_analyzer="$enableval"
5081 else
5082 enableval="yes"
5083 fi
5084
5085 case "$enableval" in
5086 yes) ENABLE_CLANG_STATIC_ANALYZER=1
5087 ;;
5088 no) ENABLE_CLANG_STATIC_ANALYZER=0
5089 ;;
5090 default) ENABLE_CLANG_STATIC_ANALYZER=1
5091 ;;
5092 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&5
5093 echo "$as_me: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&2;}
5094 { (exit 1); exit 1; }; } ;;
5095 esac
5096
5097 # Check whether --enable-clang-rewriter was given.
5098 if test "${enable_clang_rewriter+set}" = set; then
5099 enableval=$enable_clang_rewriter;
5100 else
5101 enableval="yes"
5102 fi
5103
5104 case "$enableval" in
5105 yes) ENABLE_CLANG_REWRITER=1
5106 ;;
5107 no)
5108 if test clang_arcmt != "no" ; then
5109 { { echo "$as_me:$LINENO: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&5
5110 echo "$as_me: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&2;}
5111 { (exit 1); exit 1; }; }
5112 fi
5113 if test clang_static_analyzer != "no" ; then
5114 { { echo "$as_me:$LINENO: error: Cannot enable clang static analyzer while disabling rewriter." >&5
5115 echo "$as_me: error: Cannot enable clang static analyzer while disabling rewriter." >&2;}
5116 { (exit 1); exit 1; }; }
5117 fi
5118 ENABLE_CLANG_REWRITER=0
5119
5120 ;;
5121 default) ENABLE_CLANG_REWRITER=1
5122 ;;
5123 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&5
5124 echo "$as_me: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&2;}
5125 { (exit 1); exit 1; }; } ;;
5126 esac
5127
50495128 # Check whether --enable-optimized was given.
50505129 if test "${enable_optimized+set}" = set; then
50515130 enableval=$enable_optimized;
1031310392 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1031410393 lt_status=$lt_dlunknown
1031510394 cat > conftest.$ac_ext <
10316 #line 10317 "configure"
10395 #line 10396 "configure"
1031710396 #include "confdefs.h"
1031810397
1031910398 #if HAVE_DLFCN_H
2190921988 CVSBUILD!$CVSBUILD$ac_delim
2191021989 ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
2191121990 ENABLE_CXX11!$ENABLE_CXX11$ac_delim
21991 ENABLE_CLANG_ARCMT!$ENABLE_CLANG_ARCMT$ac_delim
21992 ENABLE_CLANG_STATIC_ANALYZER!$ENABLE_CLANG_STATIC_ANALYZER$ac_delim
21993 ENABLE_CLANG_REWRITER!$ENABLE_CLANG_REWRITER$ac_delim
2191221994 ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
2191321995 ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
2191421996 DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
2192022002 KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim
2192122003 JIT!$JIT$ac_delim
2192222004 TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
21923 ENABLE_DOCS!$ENABLE_DOCS$ac_delim
21924 ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
21925 LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
2192622005 _ACEOF
2192722006
2192822007 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2196422043 ac_delim='%!_!# '
2196522044 for ac_last_try in false false false false false :; do
2196622045 cat >conf$$subs.sed <<_ACEOF
22046 ENABLE_DOCS!$ENABLE_DOCS$ac_delim
22047 ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
22048 LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
2196722049 ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
2196822050 ENABLE_PIC!$ENABLE_PIC$ac_delim
2196922051 ENABLE_SHARED!$ENABLE_SHARED$ac_delim
2205822140 RDYNAMIC!$RDYNAMIC$ac_delim
2205922141 program_prefix!$program_prefix$ac_delim
2206022142 LIBOBJS!$LIBOBJS$ac_delim
22061 LTLIBOBJS!$LTLIBOBJS$ac_delim
22062 _ACEOF
22063
22064 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
22143 _ACEOF
22144
22145 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2206522146 break
2206622147 elif $ac_last_try; then
2206722148 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
2208022161
2208122162 cat >>$CONFIG_STATUS <<_ACEOF
2208222163 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
22164 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22165 _ACEOF
22166 sed '
22167 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
22168 s/^/s,@/; s/!/@,|#_!!_#|/
22169 :n
22170 t n
22171 s/'"$ac_delim"'$/,g/; t
22172 s/$/\\/; p
22173 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
22174 ' >>$CONFIG_STATUS
22175 rm -f conf$$subs.sed
22176 cat >>$CONFIG_STATUS <<_ACEOF
22177 CEOF$ac_eof
22178 _ACEOF
22179
22180
22181 ac_delim='%!_!# '
22182 for ac_last_try in false false false false false :; do
22183 cat >conf$$subs.sed <<_ACEOF
22184 LTLIBOBJS!$LTLIBOBJS$ac_delim
22185 _ACEOF
22186
22187 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 1; then
22188 break
22189 elif $ac_last_try; then
22190 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22191 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22192 { (exit 1); exit 1; }; }
22193 else
22194 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22195 fi
22196 done
22197
22198 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
22199 if test -n "$ac_eof"; then
22200 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
22201 ac_eof=`expr $ac_eof + 1`
22202 fi
22203
22204 cat >>$CONFIG_STATUS <<_ACEOF
22205 cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
2208322206 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
2208422207 _ACEOF
2208522208 sed '
2234222465 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
2234322466 s&@INSTALL@&$ac_INSTALL&;t t
2234422467 $ac_datarootdir_hack
22345 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
22468 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
2234622469
2234722470 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
2234822471 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&