[LLVMdev] [PATCH] enhance llvm-top

Holger Schurig hs4233 at mail.mn-solutions.de
Thu Aug 30 13:53:10 PDT 2007


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



More information about the llvm-dev mailing list