Radar 8710868: Build a separate version of libcc_kext.a for each ARM slice.
[llvm-gcc-4.2.git] / build-for-llvm-top.sh
blob4c31d96bab635b90f7163b099e7a9a94e5de4d7d
1 #!/bin/sh
2 # build script for llvm-gcc-4.2
3 #
4 # This file was developed by Reid Spencer and is distributed under the
5 # University of Illinois Open Source License. See LICENSE.TXT for details.
6 #
7 #===------------------------------------------------------------------------===#
10 # Get the llvm-top library
11 . ../library.sh
13 # Process the arguments
14 process_arguments "$@"
16 # First, see if the build directory is there. If not, create it.
17 build_dir="$LLVM_TOP/build.llvm-gcc-4.2"
18 if test ! -d "$build_dir" ; then
19 mkdir -p "$build_dir"
22 # Next, see if we have previously been configured by sensing the presense
23 # of the config.status scripts
24 config_status="$build_dir/config.status"
25 if test ! -f "$config_status" -o "$config_status" -ot "$0" ; then
26 # We must configure so build a list of configure options
27 config_options="--prefix=$PREFIX --enable-llvm=$LLVM_TOP/build.llvm "
28 config_options="$config_options --program-prefix=llvm-"
29 config_options="$config_options --enable-languages=c,c++"
30 config_options="$config_options --disable-bootstrap"
31 if test "$OPTIMIZED" -eq 0 ; then
32 config_options="$config_options --enable-checking"
34 host=`./config.guess`
35 if test ! -z `echo "$host" | grep 'linux'` ; then
36 config_options="$config_options --disable-shared"
38 config_options="$config_options $config_opts"
39 src_dir=`pwd`
40 cd "$build_dir"
41 msg 0 Configuring $module with:
42 msg 0 " $src_dir/configure $config_options"
43 $src_dir/configure $config_options || \
44 die $? "Configuring $module module failed"
45 else
46 msg 0 Module $module already configured, ignoring configure options.
47 cd "$build_dir"
50 msg 0 Building $module with:
51 msg 0 " make"
52 make