Bugfix: Fixes #322, Disable ASan for checked build on distros that use musl

This commit is contained in:
Rory Fewell
2024-06-15 21:06:09 +01:00
parent e42d604079
commit 52980c3c66

View File

@@ -29,11 +29,16 @@ if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_compile_definitions(WINTC_CHECKED)
endif()
# Enable ASAN for checked builds
# Enable ASAN for checked builds - but NOT for musl targets!!
#
if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
add_link_options(-fsanitize=address)
if (
NOT ${WINTC_PKGMGR} STREQUAL apk AND
NOT ${WINTC_PKGMGR_EXT} STREQUAL musl
)
if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
add_link_options(-fsanitize=address)
endif()
endif()
# Handle SKU stuff