diff --git a/Jamfile b/Jamfile index ba1617a4c..a51a9d65b 100644 --- a/Jamfile +++ b/Jamfile @@ -480,9 +480,14 @@ feature.compose off : TORRENT_NO_DEPRECATE ; feature boost-link : default static shared : propagated composite ; -feature debug-iterators : off on : composite propagated link-incompatible ; -feature.compose on : _SCL_SECURE=1 _GLIBCXX_DEBUG +# msvc enables debug iterators by default in debug builds whereas GCC and +# clang do not, that's why "default" is there. msvc has incorrect noexcept +# 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 off : _ITERATOR_DEBUG_LEVEL=0 ; feature fpic : off on : composite propagated link-incompatible ; feature.compose on : -fPIC ; @@ -508,7 +513,7 @@ feature.compose on : TORRENT_EXPORT_EXTRA ; variant test_release : release : production on full shared off - on on multi + on multi on off ; variant test_debug : debug diff --git a/appveyor.yml b/appveyor.yml index 37258dd1f..bb3ec7b7d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -68,32 +68,32 @@ cache: build_script: # examples - cd %ROOT_DIRECTORY%\examples -- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% +- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% # tools - cd %ROOT_DIRECTORY%\tools -- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% +- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% # test - cd %ROOT_DIRECTORY%\test -- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% win-tests test_upnp test_natpmp testing.execute=off +- b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% win-tests test_upnp test_natpmp testing.execute=off # python binding - cd %ROOT_DIRECTORY%\bindings\python # we use 64 bit python builds - if defined python ( - b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% libtorrent-link=shared stage_module stage_dependencies + b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% libtorrent-link=shared stage_module stage_dependencies ) # simulations - cd %ROOT_DIRECTORY%\simulation - if defined sim ( - b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% deprecated-functions=off %linkflags% %include% link=shared crypto=built-in testing.execute=off + b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% deprecated-functions=off %linkflags% %include% link=shared crypto=built-in testing.execute=off ) test_script: - cd %ROOT_DIRECTORY%\test -- appveyor-retry b2.exe -l400 --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% win-tests +- appveyor-retry b2.exe -l400 --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% win-tests - cd %ROOT_DIRECTORY%\bindings\python # we use 64 bit python build @@ -103,7 +103,11 @@ test_script: ) # simulation tests +# debug iterators are turned off here because msvc has issues with noexcept +# specifiers when debug iterators are enabled. Specifically, constructors that +# allocate memory are still marked as noexcept. That results in program +# termination - cd %ROOT_DIRECTORY%\simulation - if defined sim ( - b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% boost-link=default link=static crypto=built-in + b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full test_debug %linkflags% %include% boost-link=default link=static crypto=built-in ) diff --git a/simulation/Jamfile b/simulation/Jamfile index 92e1c02a6..96c4eba99 100644 --- a/simulation/Jamfile +++ b/simulation/Jamfile @@ -21,7 +21,6 @@ project : default-build multi full - on on on ; diff --git a/test/Jamfile b/test/Jamfile index 43e7f4dd3..842dea6e9 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -15,7 +15,6 @@ exe test_natpmp : test_natpmp.cpp full shared on - on on ; @@ -31,7 +30,6 @@ exe enum_if : enum_if.cpp full shared on - on on ; @@ -96,7 +94,6 @@ project full shared on - on on ;