diff --git a/src/tools/features/sanitizers-feature.jam b/src/tools/features/sanitizers-feature.jam index 8c35d3368..d57d6279f 100644 --- a/src/tools/features/sanitizers-feature.jam +++ b/src/tools/features/sanitizers-feature.jam @@ -18,3 +18,7 @@ feature.feature undefined-sanitizer feature.feature thread-sanitizer : on norecover : propagated optional ; +feature.feature leak-sanitizer + : on norecover + : propagated optional ; + diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index ecc45c260..f4a36089c 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -733,9 +733,11 @@ toolset.flags gcc.compile.c++ OPTIONS off : -fno-exceptions toolset.flags gcc.compile.c++ OPTIONS on : -fsanitize=address ; toolset.flags gcc.compile.c++ OPTIONS on : -fsanitize=undefined ; toolset.flags gcc.compile.c++ OPTIONS on : -fsanitize=thread ; +toolset.flags gcc.compile.c++ OPTIONS on : -fsanitize=leak ; toolset.flags gcc.compile.c++ OPTIONS norecover : -fsanitize=address -fno-sanitize-recover=address ; toolset.flags gcc.compile.c++ OPTIONS norecover : -fsanitize=undefined -fno-sanitize-recover=undefined ; toolset.flags gcc.compile.c++ OPTIONS norecover : -fsanitize=thread -fno-sanitize-recover=thread ; +toolset.flags gcc.compile.c++ OPTIONS norecover : -fsanitize=leak -fno-sanitize-recover=leak ; toolset.flags gcc.compile.c++ OPTIONS all : --coverage ; toolset.flags gcc.compile.c++ OPTIONS profile : -fprofile-arcs ; toolset.flags gcc.compile.c++ OPTIONS test : -ftest-coverage ; @@ -882,9 +884,11 @@ toolset.flags gcc.link OPTIONS global : -fvisibility=default ; toolset.flags gcc.link OPTIONS on : -fsanitize=address ; toolset.flags gcc.link OPTIONS on : -fsanitize=undefined ; toolset.flags gcc.link OPTIONS on : -fsanitize=thread ; +toolset.flags gcc.link OPTIONS on : -fsanitize=leak ; toolset.flags gcc.link OPTIONS norecover : -fsanitize=address -fno-sanitize-recover=address ; toolset.flags gcc.link OPTIONS norecover : -fsanitize=undefined -fno-sanitize-recover=undefined ; toolset.flags gcc.link OPTIONS norecover : -fsanitize=thread -fno-sanitize-recover=thread ; +toolset.flags gcc.link OPTIONS norecover : -fsanitize=leak -fno-sanitize-recover=leak ; toolset.flags gcc.link OPTIONS all : --coverage ; toolset.flags gcc.link OPTIONS profile : -fprofile-arcs ; toolset.flags gcc.link OPTIONS test : -lgcov ;