llvm.org GIT mirror llvm / 8d1b8f7
Make use of the process_builder_args library function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39965 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
1 changed file(s) with 14 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
11
2 is_debug=1
3 for arg in "$@" ; do
4 case "$arg" in
5 LLVM_TOP=*)
6 LLVM_TOP=`echo "$arg" | sed -e 's/LLVM_TOP=//'`
7 ;;
8 PREFIX=*)
9 PREFIX=`echo "$arg" | sed -e 's/PREFIX=//'`
10 ;;
11 *=*)
12 build_opts="$build_opts $arg"
13 ;;
14 --*)
15 config_opts="$config_opts $arg"
16 ;;
17 esac
18 done
2 # This includes the Bourne shell library from llvm-top. Since this file is
3 # generally only used when building from llvm-top, it is safe to assume that
4 # llvm is checked out into llvm-top in which case .. just works.
5 . ../library.sh
6
7 # Process the options passed in to us by the build script into standard
8 # variables.
9 process_builder_args "$@"
1910
2011 # See if we have previously been configured by sensing the presense
2112 # of the config.status scripts
2213 if test ! -x "config.status" ; then
2314 # We must configure so build a list of configure options
2415 config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
25 config_options="$config_options $config_opts"
26 echo ./configure $config_options
16 config_options="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH"
17 msg 0 Configuring $module with:
18 msg 0 " ./configure" $config_options
2719 ./configure $config_options || (echo "Can't configure llvm" ; exit 1)
2820 fi
2921
30 echo make $build_opts '&&' make install $build_opts
31 make $build_opts tools-only
22 msg 0 Building $module with:
23 msg 0 " make" $OPTIONS_ASSIGN tools-only
24 make $OPTIONS_ASSIGN tools-only