cmake: Add ENABLE_UBSAN for -fsanitize=undefined
Change-Id: I73db5f904a7d86052aae62e67b01281763c83561
This commit is contained in:
@@ -45,6 +45,11 @@ set(MCKERNEL_SRCS
|
||||
${IHK_FULL_SOURCE_DIR}/cokernel/smp/${ARCH}/setup.c
|
||||
)
|
||||
|
||||
if (ENABLE_UBSAN)
|
||||
add_compile_options(-fsanitize=undefined)
|
||||
list(APPEND MCKERNEL_SRCS ubsan.c)
|
||||
endif(ENABLE_UBSAN)
|
||||
|
||||
if (BUILD_TARGET STREQUAL "smp-x86")
|
||||
list(APPEND MCKERNEL_SRCS
|
||||
${PROJECT_SOURCE_DIR}/arch/${ARCH}/kernel/context.S
|
||||
|
||||
Reference in New Issue
Block a user