mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +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
|
@ -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