diff --git a/Jamfile b/Jamfile index 0b0ab5c0c..b8129ce2e 100644 --- a/Jamfile +++ b/Jamfile @@ -267,14 +267,6 @@ rule building ( properties * ) result += /bigobj ; } - if ( debug in $(properties) - && ( clang in $(properties) - || gcc in $(properties) - || darwin in $(properties) ) ) - { - result += -ftrapv ; - } - if ( production in $(properties) || on in $(properties) ) { @@ -388,13 +380,11 @@ rule sanitizer-options ( properties * ) local flags ; # sanitize is a clang and GCC feature - # TODO: carve out specific sanitizers based on compiler version - # if clang in $(properties) { local version = [ feature.get-values : $(properties) ] ; # implicit-conversion sanitizer was added in clang-7 - if $(version) >= 7 { + if $(version) >= 7.0 { sanitizers += address,undefined,leak,implicit-conversion ; } else { @@ -403,19 +393,21 @@ rule sanitizer-options ( properties * ) extra = -fsanitize-blacklist=$(blacklist-file) ; flags = -fsanitize=$(sanitizers) -fno-sanitize-recover=all ; } - else if gcc in $(properties) + # sanitizers are not available on windows (mingw) + else if gcc in $(properties) && ! windows in $(properties) { local version = [ feature.get-values : $(properties) ] ; - if $(version) >= 7 { + if $(version) >= 7.0 { extra = -fsanitize-address-use-after-scope ; } - if $(version) >= 5 { + if $(version) >= 5.0 { sanitizers = address,undefined,leak ; flags = -fsanitize=$(sanitizers) -fno-sanitize-recover=all ; } } else if darwin in $(properties) { + # apple's compiler is typically an old version of clang sanitizers = address,undefined ; flags = -fsanitize=$(sanitizers) -fno-sanitize-recover=all ; } @@ -502,8 +494,7 @@ feature boost-link : default static shared : propagated composite ; # constructors on some containers when enabling debug iterators, so it's # possible to turn them off feature debug-iterators : default off on : composite propagated link-incompatible ; -feature.compose on : _ITERATOR_DEBUG_LEVEL=2 _GLIBCXX_DEBUG - _GLIBCXX_DEBUG_PEDANTIC ; +feature.compose on : _GLIBCXX_DEBUG _GLIBCXX_DEBUG_PEDANTIC ; feature.compose off : _ITERATOR_DEBUG_LEVEL=0 ; feature fpic : off on : composite propagated link-incompatible ;