mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
b9e3647e66
The "CMAKE_<foo>" variable namespace is reserved, and CXXFILT is not currently a variable known to upstream CMake.
38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
list(APPEND CMAKE_MODULE_PATH "@SERENITY_SOURCE_DIR@/Toolchain/CMake")
|
|
|
|
set(CMAKE_SYSTEM_NAME SerenityOS)
|
|
set(CMAKE_SYSTEM_PROCESSOR "@SERENITY_ARCH@")
|
|
|
|
set(SERENITYOS 1)
|
|
set(triple @SERENITY_ARCH@-pc-serenity)
|
|
set(TOOLCHAIN_PATH @SERENITY_SOURCE_DIR@/Toolchain/Local/@SERENITY_ARCH@/bin)
|
|
set(TOOLCHAIN_PREFIX ${TOOLCHAIN_PATH}/${triple}-)
|
|
|
|
# where to read from/write to
|
|
set(CMAKE_SYSROOT @SERENITY_BUILD_DIR@/Root)
|
|
set(CMAKE_STAGING_PREFIX @SERENITY_BUILD_DIR@/Root/usr/local)
|
|
set(CMAKE_INSTALL_PREFIX @SERENITY_BUILD_DIR@/Root/usr/local)
|
|
set(CMAKE_INSTALL_DATAROOTDIR @SERENITY_BUILD_DIR@/Root/usr/local/share)
|
|
|
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
|
|
set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}gcc)
|
|
set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld)
|
|
set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}gcc-ranlib)
|
|
set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}strip)
|
|
set(CMAKE_AR ${TOOLCHAIN_PREFIX}gcc-ar)
|
|
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
|
|
set(SERENITY_CXXFILT ${TOOLCHAIN_PREFIX}c++filt)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,max-page-size=0x1000,-z,separate-code")
|
|
|
|
# FIXME: We could eliminate this setting by building LibC and support asm files (crti.o, crtn.o)
|
|
# in a separate build stage before the main build to ensure that LibC is available
|
|
# for the try_compile check for the main build.
|
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
|
|
|
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 BOTH)
|