Bug 286591

Summary: [ANGLE] Add envvar to allow gating ASSERTs at runtime
Product: WebKit Reporter: zak ridouh <zakr>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

zak ridouh
Reported 2025-01-27 14:10:51 PST
Add a `ANGLE_ASSERTS_OFF` environment variable that allows us to disable asserts at runtime regardless of how ANGLE was built. This is necessary due to how some of our build systems work, where we need to be able to disable asserts at runtime regardless of if we built ANGLE with the `ANGLE_ASSERT_ALWAYS_ON` or `ANGLE_ENABLE_ASSERTS` flag set. We cache the value from the `envvar`, so that we don't incur a `getenv` check penalty on every ASSERT. Additionally, this will not impact release and production builds as this function is gated by a guard: `#if defined(ANGLE_ENABLE_ASSERTS)`. This is essentially a reland of https://bugs.webkit.org/show_bug.cgi?id=281156, with fixes.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-01-27 14:11:01 PST
zak ridouh
Comment 2 2025-01-28 10:05:35 PST
EWS
Comment 3 2025-01-29 23:19:04 PST
Committed 289548@main (591d8cca0024): <https://commits.webkit.org/289548@main> Reviewed commits have been landed. Closing PR #39628 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.