Use move semantics if possible to construct ConstantRanges.
[oota-llvm.git] / utils / buildit / build_llvm
index 896ede3e46658d9878d4cbb496d9c4b380c8109b..4ed25f2e67163798078fe25a8fbe09f95353cde5 100755 (executable)
@@ -103,7 +103,8 @@ COMMON_CONFIGURE_OPTS="\
   --prefix=$DEST_DIR$DEST_ROOT \
   --enable-assertions=$LLVM_ASSERTIONS \
   --enable-optimized=$LLVM_OPTIMIZED \
-  --disable-bindings"
+  --disable-bindings \
+  --disable-zlib"
 
 COMMON_MAKEFLAGS="\
   UNIVERSAL=1 \
@@ -234,6 +235,16 @@ RC_ProjectSourceSubversion=`printf "%d" $LLVM_MINOR_VERSION`
 echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h
 echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h
 
+# Run unifdef to preprocess the installed headers to reflect whether this
+# was a debug or release build.
+for file in `find $DEST_DIR$DEST_ROOT/include -type f -print`; do
+  if [ "$LLVM_ASSERTIONS" = yes ]; then
+    unifdef -UNDEBUG -D_DEBUG -o $file $file
+  else
+    unifdef -DNDEBUG -U_DEBUG -ULLVM_ENABLE_DUMP -o $file $file
+  fi
+done
+
 # Find the right version of strip to use.
 STRIP=strip
 if [ -n "$SDKROOT" ]; then