diff options
author | Damjan Marion <damarion@cisco.com> | 2020-05-21 19:09:13 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-05-27 18:46:27 +0000 |
commit | ec3a3f16e4cd3b33e2a409fb01b8d8826e05f9fa (patch) | |
tree | bd4059fba9842cf9d467e5fa9b3db9102ec3dae1 /src/CMakeLists.txt | |
parent | 5500d1d6502554229d0542b89b857777b3c1851e (diff) |
build: make address sanitizer options configurable with cmake
Type: improvement
Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 59c7512a044..e2937c99db6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -110,6 +110,12 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY ############################################################################## option(VPP_ENABLE_SANITIZE_ADDR "Enable Address Sanitizer" OFF) +set(VPP_SANITIZE_ADDR_ARGS + "unmap_shadow_on_exit=1:disable_coredump=0:abort_on_error=1:detect_leaks=0" + CACHE + STRING "Address sanitizer arguments" +) + if (VPP_ENABLE_SANITIZE_ADDR) set(CMAKE_C_FLAGS "-fsanitize=address --param asan-stack=0 -DCLIB_SANITIZE_ADDR ${CMAKE_C_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address ${CMAKE_EXE_LINKER_FLAGS}") |