diff --git a/BUILD.gn b/BUILD.gn index 1a4922ff97..869c332968 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -18,6 +18,14 @@ import("//build_overrides/build.gni") import("//testing/test.gni") +# Use Chromium's dcheck_always_on when available so that we respect it when +# running tests on the GPU builders +if (build_with_chromium) { + import("//build/config/dcheck_always_on.gni") +} else { + dcheck_always_on = false +} + ############################################################################### # Template to wrap the Dawn code generator ############################################################################### @@ -153,7 +161,7 @@ config("dawn_internal") { include_dirs = [ "src" ] defines = [] - if (dawn_always_assert || is_debug) { + if (dawn_always_assert || dcheck_always_on || is_debug) { defines += [ "DAWN_ENABLE_ASSERTS" ] }