mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Meta: Enable RTTI for Userspace programs
RTTI is still disabled for the Kernel, and for the Dynamic Loader. This allows for much less awkward navigation of class heirarchies in LibCore, LibGUI, LibWeb, and LibJS (eventually). Measured RootFS size increase was < 1%, and libgui.so binary size was ~3.3%. The small binary size increase here seems worth it :^)
This commit is contained in:
parent
43908db594
commit
350d4d3543
Notes:
sideshowbarker
2024-07-19 00:16:40 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/350d4d3543a Pull-request: https://github.com/SerenityOS/serenity/pull/4714
@ -127,7 +127,7 @@ endif()
|
||||
|
||||
#FIXME: -fstack-protector
|
||||
|
||||
add_compile_options(-Os -g1 -fno-exceptions -fno-rtti -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy -Wno-expansion-to-defined)
|
||||
add_compile_options(-Os -g1 -fno-exceptions -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy -Wno-expansion-to-defined)
|
||||
add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.)
|
||||
|
||||
add_compile_definitions(DEBUG SANITIZE_PTRS)
|
||||
|
@ -261,7 +261,7 @@ set(SOURCES
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -DKERNEL")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE -ffreestanding -fbuiltin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE -fno-rtti -ffreestanding -fbuiltin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-80387 -mno-mmx -mno-sse -mno-sse2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-asynchronous-unwind-tables")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib -nostdinc -nostdinc++")
|
||||
|
@ -8,7 +8,7 @@ if (NOT DEFINED ENV{SERENITY_ROOT})
|
||||
message(FATAL_ERROR "SERENITY_ROOT not set.")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
|
||||
# where to read from/write to
|
||||
set(CMAKE_SYSROOT $ENV{SERENITY_ROOT}/Build/Root)
|
||||
|
@ -16,7 +16,7 @@ list(FILTER LIBC_SOURCES1 EXCLUDE REGEX ".+crt0.+.cpp")
|
||||
|
||||
set(SOURCES ${LOADER_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${LIBC_SOURCES1} ${LIBC_SOURCES2} ${LIBC_SOURCES3})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib -pie -fpic -DNO_TLS")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -nostdlib -pie -fpic -DNO_TLS")
|
||||
|
||||
add_executable(Loader.so ${SOURCES})
|
||||
target_link_options(Loader.so PRIVATE LINKER:--no-dynamic-linker)
|
||||
|
Loading…
Reference in New Issue
Block a user