Use abort() for ASSERT() for chrome build
Call abort() can make chrome dump crash stack in console, it is
useful for chrome development.
Change-Id: Ieabbb2e06fd06e6ec33946dab7621e7577d4f782
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/136920
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
diff --git a/src/dawn/common/BUILD.gn b/src/dawn/common/BUILD.gn
index c02f46c..7509d0d 100644
--- a/src/dawn/common/BUILD.gn
+++ b/src/dawn/common/BUILD.gn
@@ -48,14 +48,15 @@
defines += [ "DAWN_ENABLE_ASSERTS" ]
}
- if (use_fuzzing_engine) {
- defines += [
- # Does a hard abort when an assertion fails so that fuzzers catch and parse the failure.
- "DAWN_ABORT_ON_ASSERT",
+ if (build_with_chromium || use_fuzzing_engine) {
+ # Does a hard abort when an assertion fails so that fuzzers catch and parse the failure.
+ # Also call abort() so chrome can dump crash stach in console.
+ defines += [ "DAWN_ABORT_ON_ASSERT" ]
+ }
- # Disable logging to make fuzzing more efficient.
- "DAWN_DISABLE_LOGGING",
- ]
+ if (use_fuzzing_engine) {
+ # Disable logging to make fuzzing more efficient.
+ defines += [ "DAWN_DISABLE_LOGGING" ]
}
if (dawn_enable_d3d11) {