serenity/Toolchain/CMakeToolchain.txt
Andrew Kaster 350d4d3543 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 :^)
2021-01-01 14:45:09 +01:00

27 lines
853 B
Plaintext

set(CMAKE_SYSTEM_NAME Generic)
if (NOT DEFINED ENV{SERENITY_ARCH})
message(FATAL_ERROR "SERENITY_ARCH not set.")
endif()
if (NOT DEFINED ENV{SERENITY_ROOT})
message(FATAL_ERROR "SERENITY_ROOT not set.")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
# where to read from/write to
set(CMAKE_SYSROOT $ENV{SERENITY_ROOT}/Build/Root)
set(CMAKE_STAGING_PREFIX $ENV{SERENITY_ROOT}/Build/Root/usr)
set(CMAKE_INSTALL_PREFIX $ENV{SERENITY_ROOT}/Build/Root/usr)
set(CMAKE_INSTALL_DATAROOTDIR $ENV{SERENITY_ROOT}/Build/Root/usr/share)
set(CMAKE_C_COMPILER $ENV{SERENITY_ARCH}-pc-serenity-gcc)
set(CMAKE_CXX_COMPILER $ENV{SERENITY_ARCH}-pc-serenity-g++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)