[travis][build] run clang's address sanitizer + fixup cxxflags on linux
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user