This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch cmake_asan in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 12e9d24756c63ad8ad3861d4da371d8f93b83619 Author: Bryan Call <[email protected]> AuthorDate: Wed Jul 12 08:34:38 2023 -0700 cmake: asan support --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1300bccb97..ee9622f490 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,7 @@ execute_process(COMMAND id -ng OUTPUT_VARIABLE BUILD_GROUP OUTPUT_STRIP_TRAILING execute_process(COMMAND uname -n OUTPUT_VARIABLE BUILD_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE) # Options +option(ENABLE_ASAN "Use address sanitizer (default OFF)") option(BUILD_REGRESSION_TESTING "Build regression tests (default ON)" ON) set(DEFAULT_STACK_SIZE 1048576 CACHE STRING "Default stack size (default 1048576)") option(ENABLE_FAST_SDK "Use fast SDK APIs (default OFF)") @@ -212,6 +213,11 @@ if(ENABLE_QUICHE) endif() endif() +if(ENABLE_ASAN) + add_compile_options(-fsanitize=address) + add_link_options(-fsanitize=address) +endif() + find_package(ZLIB REQUIRED) include(Check128BitCas)
