From 14d9c0cdde204d8d7a9faae96340ee43e468acdf Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 28 Jun 2012 00:27:28 +0100 Subject: [PATCH] Don't build the deploy in debug mode. Debug mode turns off all optimisations. This make PhantomJS considerably slower. Instead, we build in 'release' mode, but generate debugging symbols at the same time. This may present some problems analysing crashes, if the optimisations make that difficult. However, in my testing I was able to get useful debug output even with optimisations enabled. So we should see how we go - if it becomes a problem we can produce seperate debug binaries with no optimisations. https://code.google.com/p/phantomjs/issues/detail?id=599 --- deploy/build-and-package.sh | 6 ++++-- src/qt/preconfig.sh | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deploy/build-and-package.sh b/deploy/build-and-package.sh index 12ea3d29..551d9622 100755 --- a/deploy/build-and-package.sh +++ b/deploy/build-and-package.sh @@ -8,8 +8,10 @@ echo echo " $ make clean && cd src/qt && make clean && cd ../.." echo -# Build the project -./build.sh --qt-config "-debug -webkit-debug" --qmake-args "CONFIG-=release CONFIG+=debug" || exit 1 +# This incantation will cause Qt and WebKit and PhantomJS to all build in "release" +# mode, with compiler optimisations, but also with debug symbols. (We will strip the +# symbols in package.sh.) +CFLAGS=-g CXXFLAGS=-g ./build.sh --qt-config '-webkit-debug' --qmake-args "QMAKE_CFLAGS=-g QMAKE_CXXFLAGS=-g" || exit 1 # Package the release tarball rm deploy/*.tar.bz2 2>/dev/null diff --git a/src/qt/preconfig.sh b/src/qt/preconfig.sh index 4f3dd1a8..58ddbb12 100755 --- a/src/qt/preconfig.sh +++ b/src/qt/preconfig.sh @@ -109,10 +109,10 @@ export MAKEFLAGS=-j$COMPILE_JOBS ./configure -prefix $PWD $QT_CFG make -j$COMPILE_JOBS -if [[ $QT_CFG =~ "-webkit-debug" ]]; then - DEBUG_OR_RELEASE=debug -else +if [[ $QT_CFG =~ "-release" ]]; then DEBUG_OR_RELEASE=release +else + DEBUG_OR_RELEASE=debug fi # Extra step to ensure the static libraries are found