diff options
| author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2021-11-27 18:04:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-27 18:04:06 +0000 |
| commit | e71c12efcddc1076d5367461a5b416092267aa77 (patch) | |
| tree | 72abdf06c22880b0ea1f093fd6bbad63426d81ce /configure.ac | |
| parent | af9ee57b96cb872df6574e36027cc753417605f9 (diff) | |
| download | cpython-git-e71c12efcddc1076d5367461a5b416092267aa77.tar.gz | |
bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806)
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e96d88fb8c..0fce3f61f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2565,8 +2565,10 @@ AC_ARG_WITH(memory_sanitizer, [enable MemorySanitizer allocation error detector, 'msan' (default is no)]), [ AC_MSG_RESULT($withval) +AX_CHECK_COMPILE_FLAG([-fsanitize=memory],[ BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS" LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS" +],[AC_MSG_ERROR([The selected compiler doesn't support memory sanitizer])]) # MSan works by controlling memory allocation, our own malloc interferes. with_pymalloc="no" ], |
