mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
CMake: Fix sanitizer builds
The sanitizer flags need to be applied to all compilation units, and to all final link stages. As this is whole-project (dawn + tint), these options have been promoted to DAWN_ options. Bug: dawn:1339 Change-Id: I17beb5bd2a8f15de9d8f13d132356b5c663d71bf Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86143 Kokoro-Run: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
d820f48f35
commit
96e245e576
@@ -131,9 +131,9 @@ if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||
fi
|
||||
|
||||
if [ "$BUILD_SANITIZER" == "asan" ]; then
|
||||
COMMON_CMAKE_FLAGS+=" -DTINT_ENABLE_ASAN=1"
|
||||
COMMON_CMAKE_FLAGS+=" -DDAWN_ENABLE_ASAN=1"
|
||||
elif [ "$BUILD_SANITIZER" == "ubsan" ]; then
|
||||
COMMON_CMAKE_FLAGS+=" -DTINT_ENABLE_UBSAN=1"
|
||||
COMMON_CMAKE_FLAGS+=" -DDAWN_ENABLE_UBSAN=1"
|
||||
export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user