Update of /cvsroot/fink/experimental/fangism/finkinfo
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11963

Modified Files:
        llvm33.info 
Log Message:
use Release build (-O2), make re-compile script more robust


Index: llvm33.info
===================================================================
RCS file: /cvsroot/fink/experimental/fangism/finkinfo/llvm33.info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- llvm33.info 15 Jun 2013 15:59:01 -0000      1.2
+++ llvm33.info 21 Jun 2013 01:36:01 -0000      1.3
@@ -178,14 +178,21 @@
        relsrcdir=../../llvm-%v.src
        # gcc-4.0.1 workaround for units failing -O1 and higher, fallback to -O0
        compile_lib_unit() {
+       test $# = 3 || { echo "Error calling compile_lib_unit." ; exit 1; }
        builddir=$PWD
-       # $1 = source file path
-       # $2 = lib name
-       subdir=`dirname $1`
-       fbase=`basename $1`
-       target=CMakeFiles/LLVM$2.dir/$fbase.o
-       echo "Compiling $1 to $target"
-       pushd $builddir/$subdir
+       # $1 = source lib dir
+       # $2 = source file path (relative to $1)
+       # $3 = lib name
+       libdir=$1
+       srcfile=$1/$2
+       lib=LLVM$3
+       subdir=`dirname $srcfile`
+       target=CMakeFiles/$lib.dir/$2.o
+       if test ! -f $target
+       then
+       echo "Compiling $srcfile to $target"
+       pushd $libdir
+       # mkdir -p `dirname $target`
        $CXX \
        -DLLVMAnalysis_EXPORTS -D_DEBUG \
        -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
@@ -193,40 +200,46 @@
        -fvisibility-inlines-hidden \
        -Wall -W -Wno-unused-parameter -Wwrite-strings 
-Wno-missing-field-initializers \
        -pedantic -Wno-long-long -Wno-uninitialized -Wnon-virtual-dtor 
-fno-rtti \
-       -g -fPIC \
+       -fPIC \
        -I$builddir/$subdir \
        -I$abssrcdir/$subdir \
        -I$builddir/include \
        -I$abssrcdir/include \
+       -I$abssrcdir/tools/polly/include \
        -fno-exceptions \
        -o $target \
-       -c $abssrcdir/$1
+       -c $abssrcdir/$srcfile
+       # -g
        popd
+       fi
        }
 
        # more of the same workaround
        recompile_known_units() {
        echo "Recompiling known problematic units with -O0."
        for f in \
-       lib/Analysis/ScalarEvolution{,Expander}.cpp:Analysis \
-       lib/Transforms/Utils/{BreakCriticalEdges,LoopUnroll}.cpp:TransformUtils 
\
-       
lib/Transforms/Scalar/{LoopInstSimplify,LoopRotation,LoopUnswitch}.cpp:ScalarOpts
 \
-       
lib/CodeGen/{MachineBasicBlock,MachineBlockPlacement,MachineTraceMetrics,PHIElimination}.cpp:CodeGen
 \
+       lib/Analysis:{ScalarEvolution{,Expander},LoopPass}.cpp:Analysis \
+       
lib/Transforms/Utils:{BreakCriticalEdges,LoopUnroll,LoopSimplify}.cpp:TransformUtils
 \
+       
lib/Transforms/Scalar:{LoopInstSimplify,LoopRotation,LoopUnswitch}.cpp:ScalarOpts
 \
+       lib/Transforms/Vectorize:LoopVectorize.cpp:Vectorize \
+       
lib/CodeGen:{MachineBasicBlock,MachineBlockPlacement,MachineTraceMetrics,PHIElimination}.cpp:CodeGen
 \
+       tools/polly/lib:CodeGen/LoopGenerators.cpp:Polly \
 
        do
        saveIFS=$IFS
        IFS=:
        set -- $f
-       src=$1
-       lib=$2
+       dir=$1
+       src=$2
+       lib=$3
        IFS=$saveIFS
        # echo "$src -> $lib"
-       compile_lib_unit $src $lib
+       compile_lib_unit $dir $src $lib
        done
        }
 
-#      build_type=Release
-       build_type=RelWithDebInfo
+       build_type=Release
+#      build_type=RelWithDebInfo
        # do not let cmake auto-detect OSX_SYSROOT
        CMAKE_OPTIONS="$CMAKE_OPTIONS 
-DCMAKE_INSTALL_PREFIX:PATH=%p/opt/llvm-%v 
-DCMAKE_BUILD_TYPE:STRING=$build_type -DLLVM_LIT_ARGS:STRING=-v 
-DLLVM_ENABLE_ASSERTIONS:BOOL=ON -DPYTHON_EXECUTABLE:FILEPATH=%p/bin/python2.7 
-DCMAKE_OSX_SYSROOT:STRING=/ -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="
 
@@ -235,10 +248,11 @@
 
        # trying to disable optimization flags on non-trustworthy compilers
        # worked around in recompile_known_units(), and now using RelWithDebInfo
-#      ccvers=`$CXX -v 2>&1 | tail -n 1 | cut -d\  -f3`
-#      if test $ccvers = 4.0.1
-#      then STAGE1_CMAKE_OPTIONS='-DCMAKE_C_FLAGS_RELEASE:STRING=-O0 
-DCMAKE_CXX_FLAGS_RELEASE:STRING=-O0'
-#      fi
+       ccvers=`$CXX -v 2>&1 | tail -n 1 | cut -d\  -f3`
+       if test $ccvers = 4.0.1
+       then STAGE1_CMAKE_OPTIONS='-DCMAKE_C_FLAGS_RELEASE:STRING=-O2 
-DCMAKE_CXX_FLAGS_RELEASE:STRING=-O2'
+       fi
+       # else default to -O3
 
        echo "######## START of BOOTSTRAP STAGE 1: building llvm/clang with the 
system compiler"
        # wd: %b


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to