Hi Holger,
I applied this patch, with a few modifications. The reason the debug
option doesn't work is because of the LLVM makefile system. Its not
possible to do optimized and debug at the same time. In the future
(after the makefile improvements in the support module), this will be
possible.
Reid.
On Thu, 2007-08-30 at 22:53 +0200, Holger Schurig wrote:> Hi Raid !
>
> This patch fixes some issues with llvm-top:
>
> a) it always makes a debug build of llvm, even
> when OPTIMIZED="1" is in .options
> b) it now handles ASSERTIONS, CHECKING and DOXYGEN
> from .options, it handles DEBUG a bit (not much)
> better
> c) it adds support for THREAD
>
> After this patch there still is support missing for
> DEBUG. PROFILING, OPT_FOR_SIZE, STRIPPED missing.
> I think that for this you need to taylor CFLAGS,
> CXXFLAGS and LDFLAGS.
>
>
> --- build-for-llvm-top.sh (revision 41557)
> +++ build-for-llvm-top.sh (working copy)
> @@ -14,6 +14,22 @@
> if test ! -x "config.status" ; then
> # We must configure so build a list of configure options
> config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
> + if test "$OPTIMIZED" -eq 1 ; then
> + if test "$DEBUG" -eq 1 ; then
> + config_options="$config_options --enable-debug-runtime"
> + fi
> + else
> + config_options="$config_options --enable-optimized"
> + fi
> + if test "$ASSERTIONS" -eq 1 ; then
> + config_options="$config_options --enable-assertions"
> + fi
> + if test "$CHECKING" -eq 1 ; then
> + config_options="$config_options --enable-checking"
> + fi
> + if test "$DOXYGEN" -eq 1 ; then
> + config_options="$config_options --enable-doxygen"
> + fi
> config_options="$config_options $OPTIONS_DASH
$OPTIONS_DASH_DASH"
> msg 0 Configuring $module with:
> msg 0 " ./configure" $config_options
> @@ -22,4 +38,4 @@
>
> msg 0 Building $module with:
> msg 0 " make" $OPTIONS_ASSIGN tools-only
> -make $OPTIONS_ASSIGN tools-only
> +make -j $THREADS $OPTIONS_ASSIGN tools-only