2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Add on-no-recover option for sanitizers

This option causes the program to exit after detecting the first
sanitizer issue.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
Damian Jarek
2019-03-11 00:17:54 +01:00
parent 67c2402053
commit 44e1befd0b
2 changed files with 9 additions and 3 deletions

View File

@@ -8,13 +8,13 @@
import feature ;
feature.feature address-sanitizer
: off on
: off on on-no-recover
: propagated optional ;
feature.feature undefined-sanitizer
: off on
: off on on-no-recover
: propagated optional ;
feature.feature thread-sanitizer
: off on
: off on on-no-recover
: propagated optional ;

View File

@@ -731,6 +731,9 @@ toolset.flags gcc.compile.c++ OPTIONS <exception-handling>off : -fno-exceptions
toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>on : -fsanitize=address ;
toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>on : -fsanitize=undefined ;
toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>on : -fsanitize=thread ;
toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>on-no-recover : -fsanitize=address -fno-sanitize-recover=address ;
toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>on-no-recover : -fsanitize=undefined -fno-sanitize-recover=undefined ;
toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>on-no-recover : -fsanitize=thread -fno-sanitize-recover=thread ;
# configure Dinkum STL to match compiler options
toolset.flags gcc.compile.c++ DEFINES <rtti>off/<target-os>vxworks : _NO_RTTI ;
@@ -874,6 +877,9 @@ toolset.flags gcc.link OPTIONS <local-visibility>global : -fvisibility=default ;
toolset.flags gcc.link OPTIONS <address-sanitizer>on : -fsanitize=address ;
toolset.flags gcc.link OPTIONS <undefined-sanitizer>on : -fsanitize=undefined ;
toolset.flags gcc.link OPTIONS <thread-sanitizer>on : -fsanitize=thread ;
toolset.flags gcc.link OPTIONS <address-sanitizer>on-no-recover : -fsanitize=address -fno-sanitize-recover=address ;
toolset.flags gcc.link OPTIONS <undefined-sanitizer>on-no-recover : -fsanitize=undefined -fno-sanitize-recover=undefined ;
toolset.flags gcc.link OPTIONS <thread-sanitizer>on-no-recover : -fsanitize=thread -fno-sanitize-recover=thread ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;