File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ project(aws-lambda-runtime
66
77option (ENABLE_LTO "Enables link-time optimization, requires compiler support." OFF )
88option (ENABLE_TESTS "Enables building the test project, requires AWS C++ SDK." OFF )
9+ option (ENABLE_SANITIZERS "Enables ASan and UBSan." OFF )
910
1011add_library (${PROJECT_NAME}
1112 "src/logging.cpp"
@@ -22,6 +23,11 @@ target_include_directories(${PROJECT_NAME} PUBLIC
2223 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
2324 $<INSTALL_INTERFACE:include >)
2425
26+ if (ENABLE_SANITIZERS)
27+ target_compile_options (${PROJECT_NAME} PUBLIC "-fsanitize=address,undefined" )
28+ target_link_libraries (${PROJECT_NAME} PUBLIC "-fsanitize=address,undefined" )
29+ endif ()
30+
2531if (ENABLE_LTO)
2632 include (CheckIPOSupported)
2733 check_ipo_supported(RESULT has_lto OUTPUT lto_check_output)
Original file line number Diff line number Diff line change 44 build :
55 commands :
66 - echo Build started on `date`
7- - ./ci/codebuild/build.sh -DTEST_RESOURCE_PREFIX=lambda-cpp-archbtw
7+ - ./ci/codebuild/build.sh -DTEST_RESOURCE_PREFIX=lambda-cpp-archbtw -DENABLE_SANITIZERS=ON
88 - ./ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun
99 - echo Build completed on `date`
You can’t perform that action at this time.
0 commit comments