1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

AK: Use __builtin_offsetof() + -Wno-invalid-offsetof to silence ASAN

ASAN was crying way too much when running the LibJS JIT since the old
OFFSET_OF implementation was too wild for its liking.

By turning off the invalid-offsetof warnings, we can use the offsetof
builtin instead. However, I'm leaving this as a wrapper macro, since
we may still want to do something different for other compilers.
This commit is contained in:
Andreas Kling 2023-11-24 09:24:23 +01:00
parent 1541942e10
commit a6106ca221
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_options(-Wall)
add_compile_options(-Wextra)
add_compile_options(-Wno-invalid-offsetof)
add_compile_options(-Wno-unknown-warning-option)
add_compile_options(-Wno-unused-command-line-argument)