eaff
This commit is contained in:
parent
0a9a487b8b
commit
f230a72b64
|
|
@ -6,6 +6,8 @@ include(FindPackageHandleStandardArgs)
|
||||||
option(STEAM "Build for Steam" OFF)
|
option(STEAM "Build for Steam" OFF)
|
||||||
option(DEBUG "Debug mode" OFF)
|
option(DEBUG "Debug mode" OFF)
|
||||||
option(NATIVE "Use native instructions(for local use only)" OFF)
|
option(NATIVE "Use native instructions(for local use only)" OFF)
|
||||||
|
#x86, arm64, ia-64
|
||||||
|
option(CPU_ARCH "Enter here your target arch" "x86")
|
||||||
|
|
||||||
#Configuration
|
#Configuration
|
||||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)
|
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)
|
||||||
|
|
@ -310,22 +312,68 @@ if (MSVC)
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
add_compile_options(/EHr /fsanitize /validate-charset /DEBUG /RTCu /RTCs /RTCc)
|
add_compile_options(/EHr /fsanitize /validate-charset /DEBUG /RTCu /RTCs /RTCc)
|
||||||
else()
|
else()
|
||||||
add_compile_options(/O2 /fp:fast /GL /GF /GA)
|
add_compile_options(/O2 /fp:fast /GL /GF /GA /Gy)
|
||||||
|
add_link_options(/LTCG /OPT:REF /OPT:ICF)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(NATIVE)
|
|
||||||
add_compile_options(-march=native -mtune=native)
|
|
||||||
endif()
|
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
add_compile_options(-g3 -fno-omit-frame-pointer)
|
add_compile_options(-g3 -fno-omit-frame-pointer)
|
||||||
#add_compile_options(-g3 -O0 -fno-omit-frame-pointer -ggdb -fcheck-new -gbtf)
|
|
||||||
else()
|
else()
|
||||||
add_compile_options(-O2 -ffast-math -fipa-pta -ftree-vectorize -fstdarg-opt -fomit-frame-pointer -frename-registers
|
add_compile_options(
|
||||||
-ffunction-sections -fdata-sections -fvisibility=hidden)
|
-O2
|
||||||
add_link_options(-Wl,-O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--strip-debug -Wl,--no-undefined)
|
-ffast-math
|
||||||
if(!WIN32)
|
-fipa-pta
|
||||||
|
-ftree-vectorize
|
||||||
|
-fstdarg-opt
|
||||||
|
-fomit-frame-pointer
|
||||||
|
-frename-registers
|
||||||
|
-ffunction-sections
|
||||||
|
-fdata-sections
|
||||||
|
-fvisibility=hidden
|
||||||
|
-finline-functions #-fno-rtti
|
||||||
|
-fno-asynchronous-unwind-tables
|
||||||
|
-fno-unwind-tables
|
||||||
|
-s)
|
||||||
|
|
||||||
|
add_link_options(-Wl,-O2
|
||||||
|
-Wl,--gc-sections
|
||||||
|
-Wl,--as-needed
|
||||||
|
-Wl,--no-undefined
|
||||||
|
-Wl,--strip-all
|
||||||
|
-Wl,--no-copy-dt-needed-entries)
|
||||||
|
if(NOT WIN32)
|
||||||
add_compile_options(-flto)
|
add_compile_options(-flto)
|
||||||
|
add_link_options(-flto)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_compile_options(-flto)
|
||||||
|
add_link_options(-flto)
|
||||||
|
elseif(LINUX)
|
||||||
|
add_compile_options(-fno-plt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CPU_ARCH MATCHES "x86")
|
||||||
|
add_compile_options(
|
||||||
|
-mnoreturn-no-callee-saved-registers
|
||||||
|
-mrelax-cmpxchg-loop)
|
||||||
|
elseif(CPU_ARCH MATCHES "arm64")
|
||||||
|
add_compile_options(
|
||||||
|
-mlow-precision-recip-sqrt
|
||||||
|
-mlow-precision-sqrt
|
||||||
|
-mlow-precision-div
|
||||||
|
)
|
||||||
|
elseif(CPU_ARCH MATCHES "ia-64")
|
||||||
|
add_compile_options(
|
||||||
|
-minline-float-divide-min-latency
|
||||||
|
-minline-float-divide-max-throughput
|
||||||
|
-minline-int-divide-min-latency
|
||||||
|
-minline-int-divide-max-throughput
|
||||||
|
-minline-sqrt-min-latency
|
||||||
|
-minline-sqrt-max-throughput
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,7 @@ Added Crashdump privacy setting
|
||||||
Ling faces updated
|
Ling faces updated
|
||||||
Magpie faces updated
|
Magpie faces updated
|
||||||
Added ITS TIME FOR FIGHT CRIME setting(enabled fight_crime.ogg when niko on roomba)
|
Added ITS TIME FOR FIGHT CRIME setting(enabled fight_crime.ogg when niko on roomba)
|
||||||
|
Added x86, ARM64 and IA-64 specific optimizations
|
||||||
|
Game Optimized
|
||||||
|
Added help screen in Settings
|
||||||
|
"Skip Text (R)" fixed
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include "debugwriter.h"
|
#include "debugwriter.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <SDL3/SDL_system.h>
|
#include <SDL3/SDL_system.h>
|
||||||
// In the future, we plan to add a mod loader, so this component is needed to protect users from mod attacks.
|
// this component is needed to protect users from mod attacks.
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue