[travis][build] run clang's address sanitizer + fixup cxxflags on linux

This commit is contained in:
Dane Springmeyer
2014-05-29 16:40:07 -07:00
parent be01b42854
commit deaa1f2824
2 changed files with 5 additions and 4 deletions

View File

@@ -28,7 +28,8 @@ install:
before_script:
- if [[ ${CXX} == "g++" ]]; then export CXX="g++-4.8" ; fi
- if [[ ${BUILDTYPE} == "Debug" ]]; then export CXXFLAGS="-fsanitize=address";export LDFLAGS="-fsanitize=address" ; fi
- if [[ ${BUILDTYPE} == "Debug" ]] && [[ ${CXX} == "g++" ]]; then export CXXFLAGS="-fsanitize=address";export LDFLAGS="-fsanitize=address" ; fi
- if [[ ${BUILDTYPE} == "Debug" ]] && [[ ${CXX} == "clang++" ]]; then export CXXFLAGS="-fsanitize=thread -fPIC";export LDFLAGS="-fsanitize=thread -pie" ; fi
script:
- make llmr BUILDTYPE=${BUILDTYPE}

View File

@@ -11,10 +11,10 @@
'GCC_WARN_PEDANTIC': 'YES',
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE'
},
'cflags_cc': ['-std=c++11'],
'cflags_cc': ['-std=c++11', '-Wall', '-Wextra'],
'configurations': {
'Debug': {
'cflags': [ '-g', '-O0' ],
'cflags_cc': [ '-g', '-O1', '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
'defines': [ 'DEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '1',
@@ -25,7 +25,7 @@
}
},
'Release': {
'cflags': [ '-O3' ],
'cflags_cc': [ '-O3' ],
'defines': [ 'NDEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3',