Fix bugs section.
[llvm-complete.git] / build-for-llvm-top.sh
blob2a68c79965b8408748bf33f0d2a5077adb6c31cb
1 #!/bin/sh
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.
6 . ../library.sh
8 # Process the options passed in to us by the build script into standard
9 # variables.
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"
19 else
20 config_options="$config_options --disable-optimized"
22 if test "$DEBUG" -eq 1 ; then
23 config_options="$config_options --enable-debug"
24 else
25 config_options="$config_options --disable-debug"
27 if test "$ASSERTIONS" -eq 1 ; then
28 config_options="$config_options --enable-assertions"
29 else
30 config_options="$config_options --disable-assertions"
32 if test "$CHECKING" -eq 1 ; then
33 config_options="$config_options --enable-expensive-checks"
34 else
35 config_options="$config_options --disable-expensive-checks"
37 if test "$DOXYGEN" -eq 1 ; then
38 config_options="$config_options --enable-doxygen"
39 else
40 config_options="$config_options --disable-doxygen"
42 if test "$THREADS" -eq 1 ; then
43 config_options="$config_options --enable-threads"
44 else
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"
52 else
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