mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Build: Add -fno-delete-null-pointer-checks
This prevents GCC and Clang from deleting null pointer checks for optimization purposes. I think we're strictly better off crashing in those cases instead of the compiler hiding errors from us.
This commit is contained in:
parent
16105091ba
commit
619ee99c34
Notes:
sideshowbarker
2024-07-18 04:22:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/619ee99c342
1 changed files with 3 additions and 0 deletions
|
@ -113,6 +113,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
add_compile_options(-fsized-deallocation)
|
||||
|
||||
add_compile_options(-fno-delete-null-pointer-checks)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_compile_options(-Wno-literal-suffix)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
|
|
Loading…
Reference in a new issue