mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Build: Remove -fno-sized-deallocation -Wno-sized-deallocation
Add sized variants of the global operator delete functions so we don't have to use these GCC options anymore.
This commit is contained in:
parent
81ddd2dae0
commit
603bf6fb4a
Notes:
sideshowbarker
2024-07-19 09:50:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/603bf6fb4a0
3 changed files with 12 additions and 20 deletions
11
AK/kmalloc.h
11
AK/kmalloc.h
|
@ -47,6 +47,7 @@
|
|||
# define krealloc realloc
|
||||
|
||||
# ifdef __serenity__
|
||||
|
||||
inline void* operator new(size_t size)
|
||||
{
|
||||
return kmalloc(size);
|
||||
|
@ -57,6 +58,11 @@ inline void operator delete(void* ptr)
|
|||
return kfree(ptr);
|
||||
}
|
||||
|
||||
inline void operator delete(void* ptr, size_t)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
inline void* operator new[](size_t size)
|
||||
{
|
||||
return kmalloc(size);
|
||||
|
@ -67,6 +73,11 @@ inline void operator delete[](void* ptr)
|
|||
return kfree(ptr);
|
||||
}
|
||||
|
||||
inline void operator delete[](void* ptr, size_t)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
inline void* operator new(size_t, void* ptr)
|
||||
{
|
||||
return ptr;
|
||||
|
|
|
@ -239,22 +239,3 @@ void* operator new[](size_t size)
|
|||
return kmalloc(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, size_t)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr, size_t)
|
||||
{
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
SERENITY_BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
|
||||
|
||||
CXX_STANDARD_FLAGS = -std=c++17 -Wno-sized-deallocation -fno-sized-deallocation
|
||||
CXX_STANDARD_FLAGS = -std=c++17
|
||||
CXX_WARNING_FLAGS = -Werror -Wextra -Wall -Wno-nonnull-compare -Wno-deprecated-copy -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined
|
||||
CXX_FLAVOR_FLAGS = -fno-exceptions -fno-rtti -fstack-protector
|
||||
#CXX_SUGGEST_FLAGS = -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override #-Wsuggest-attribute=noreturn
|
||||
|
|
Loading…
Reference in a new issue