make the "alternate" clang build use -O0 optimizations

The alternate clang build currently uses strict compilation = false,
this was requested so that we get as many error messages as possible.

We would also like to have an -O0 build run against the unit tests,
as sometimes -O0 will segfault while -O2 won't, etc. So in this
commit the alternate build uses that option also. I also rename
the environment variables, so that the build matrix is based on
casing out whether "alternate_configuration" is true (not strict_
compilation) as previously, and the alternate_configuration flag
leads to options being exported in the before_install phase.
This commit is contained in:
Chris Beck 2014-07-04 15:27:00 -04:00
parent 314b6cbfcc
commit 8bff0848a1

View file

@ -3,17 +3,21 @@ compiler:
- gcc
- clang
env:
- STRICT_COMPILATION=True
- STRICT_COMPILATION=False
- ALTERNATE_CONFIGURATION=true
- ALTERNATE_CONFIGURATION=false
matrix:
exclude:
- compiler: gcc
env: STRICT_COMPILATION=False
env: ALTERNATE_CONFIGURATION=false
before_install:
- export TARGETS="wesnoth wesnothd campaignd test"
- export WML_TESTS=true
- export CPP_TESTS=true
- export CHECK_UTF8=true
- export STRICT_COMPILATION=true
- export EXTRA_FLAGS_RELEASE=""
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export STRICT_COMPILATION=false
- if [ "$ALTERNATE_CONFIGURATION" = true ]; then export EXTRA_FLAGS_RELEASE="-O0"
- if [ "$CXX" = "g++" ]; then export TARGETS="wesnoth test"; fi
- if [ "$CXX" = "g++" ]; then export WML_TESTS=false; fi
# - if [ "$CXX" = "g++" ]; then export CPP_TESTS=false; fi
@ -30,7 +34,7 @@ script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi
- time if grep -qorHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; then echo "Error, Found a UTF8 BOM:\n"; grep -orHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; exit 1; fi
# UTF8 checks are the previous two lines. the second one checks po src data for UTF8 bom, this takes a few seconds.
- scons cxxtool=$CXX --debug=time strict=$STRICT_COMPILATION $TARGETS
- scons cxxtool=$CXX --debug=time build=release extra_flags_release="$EXRTA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- if [[ "$CPP_TESTS" = true ]]; then time ./utils/travis/test_wrapper.sh; fi