3 # This includes the Bourne shell library from llvm-top. Since this file is
4 # generally only used when building from llvm-top, it is safe to assume that
5 # llvm is checked out into llvm-top in which case .. just works.
8 # Process the options passed in to us by the build script into standard
10 process_arguments
"$@"
12 # See if we have previously been configured by sensing the presence
13 # of the config.status scripts
14 if test ! -x "config.status" ; then
15 # We must configure so build a list of configure options
16 config_options
="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
17 if test "$OPTIMIZED" -eq 1 ; then
18 config_options
="$config_options --enable-optimized"
20 config_options
="$config_options --disable-optimized"
22 if test "$DEBUG" -eq 1 ; then
23 config_options
="$config_options --enable-debug"
25 config_options
="$config_options --disable-debug"
27 if test "$ASSERTIONS" -eq 1 ; then
28 config_options
="$config_options --enable-assertions"
30 config_options
="$config_options --disable-assertions"
32 if test "$CHECKING" -eq 1 ; then
33 config_options
="$config_options --enable-expensive-checks"
35 config_options
="$config_options --disable-expensive-checks"
37 if test "$DOXYGEN" -eq 1 ; then
38 config_options
="$config_options --enable-doxygen"
40 config_options
="$config_options --disable-doxygen"
42 if test "$THREADS" -eq 1 ; then
43 config_options
="$config_options --enable-threads"
45 config_options
="$config_options --disable-threads"
47 config_options
="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH"
48 msg
0 Configuring
$module with
:
49 msg
0 " ./configure" $config_options
50 $LLVM_TOP/llvm
/configure
$config_options || \
51 die $?
"Configuring llvm module failed"
53 msg
0 Module
$module already configured
, ignoring configure options.
56 msg
0 Building
$module with
:
57 msg
0 " make" $OPTIONS_ASSIGN tools-only
58 make $OPTIONS_ASSIGN tools-only