diff --git a/CMakeLists.txt b/CMakeLists.txt index 57f28c8..edf97a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ include(FindPackageHandleStandardArgs) option(STEAM "Build for Steam" OFF) option(DEBUG "Debug mode" 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 set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE) @@ -310,22 +312,68 @@ if (MSVC) if(DEBUG) add_compile_options(/EHr /fsanitize /validate-charset /DEBUG /RTCu /RTCs /RTCc) 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() else() - if(NATIVE) - add_compile_options(-march=native -mtune=native) - endif() if(DEBUG) add_compile_options(-g3 -fno-omit-frame-pointer) - #add_compile_options(-g3 -O0 -fno-omit-frame-pointer -ggdb -fcheck-new -gbtf) else() - add_compile_options(-O2 -ffast-math -fipa-pta -ftree-vectorize -fstdarg-opt -fomit-frame-pointer -frename-registers - -ffunction-sections -fdata-sections -fvisibility=hidden) - add_link_options(-Wl,-O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--strip-debug -Wl,--no-undefined) - if(!WIN32) - add_compile_options(-flto) + add_compile_options( + -O2 + -ffast-math + -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_link_options(-flto) 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() diff --git a/changelogs/0.1.2.txt b/changelogs/0.1.2.txt index 3211059..d94e3f5 100644 --- a/changelogs/0.1.2.txt +++ b/changelogs/0.1.2.txt @@ -4,3 +4,7 @@ Added Crashdump privacy setting Ling faces updated Magpie faces updated 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 diff --git a/src/security.cpp b/src/security.cpp index 10fdc67..896035a 100644 --- a/src/security.cpp +++ b/src/security.cpp @@ -4,7 +4,7 @@ #include "debugwriter.h" #include #include -// 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__ #include