Add asan and ubsan to WAMR CI (#2161)

Add nightly (UTC time) checks with asan and ubsan, and also put gcc-4.8 build
to nightly run since we don't need to run it with every PR.

Co-authored-by: Maksim Litskevich <makslit@amazon.co.uk>
This commit is contained in:
Zzzabiyaka
2023-05-26 02:45:37 +01:00
committed by GitHub
parent f10563dfb4
commit 27239723a9
9 changed files with 690 additions and 110 deletions

View File

@ -87,15 +87,6 @@ endif()
set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
if (NOT DEFINED SANITIZER)
set(SANITIZER "")
elseif (SANITIZER STREQUAL "ubsan")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
elseif (NOT (SANITIZER STREQUAL "") )
message(SEND_ERROR "Unsupported sanitizer: ${SANITIZER}")
endif()
add_library(vmlib STATIC ${WAMR_RUNTIME_LIB_SOURCE})
if (MSVC)
target_compile_definitions(vmlib PRIVATE WASM_API_EXTERN=)