diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bcd38a..3998557 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,8 +353,7 @@ endif() if(SANITIZERS) # ASan + Ruby = SEGFAULT set(SANITIZERS "undefined,leak,shift,shift-base,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin,pointer-subtract,pointer-compare") - check_option(SANITIZERS_OPTIONS -fsanitize=${SANITIZERS}) - add_compile_options(${SANITIZERS_OPTIONS}) + add_compile_options(-fsanitize=${SANITIZERS} -static-libhwasan -static-liblsan -static-libtsan -static-libubsan) add_link_options(${SANITIZERS_OPTIONS}) endif() if(DEBUG) @@ -363,7 +362,8 @@ if(DEBUG) -fno-omit-frame-pointer -Og -fcheck-new - -fstrict-flex-arrays=3) + -fstrict-flex-arrays=3 + -fprofile) add_compile_options(${OPTIONS_DEBUG}) if("${ARCH_DEBUG}" STREQUAL "") @@ -386,10 +386,20 @@ else() -frename-registers -fuse-linker-plugin -fipa-pta + -fipa-icf -fext-dce -fstrict-enums -fimplicit-constexpr - -fomit-frame-pointer) + -fomit-frame-pointer + -fno-ident + -fvirtual-function-elimination + -fwhole-program-vtables + -fweb + -fuse-linker-plugin + -mrecip + -fno-unique-section-names + -fira-loop-pressure + -fira-hoist-pressure) add_compile_options(${OPTIONS_RELEASE}) add_link_options(-Wl,-O2 @@ -399,6 +409,13 @@ else() -Wl,--strip-all -Wl,--no-copy-dt-needed-entries) + #Platform Specific + if(LINUX) + check_option(OPTIONS_RELEASE_LINUX -fno-plt) + add_compile_options(${OPTIONS_RELEASE_LINUX}) + endif() + + # Loading release options specific for cpu arch from toolchain file if("${ARCH_RELEASE}" STREQUAL "") message(STATUS "ARCH_RELEASE empty") else() diff --git a/scripts_benchmark/Main.rb b/scripts_benchmark/Main.rb index 7799caa..b545126 100644 --- a/scripts_benchmark/Main.rb +++ b/scripts_benchmark/Main.rb @@ -1,8 +1,10 @@ c = 0 +Graphics.frame_rate = 1000 while c < 1000 c = c + 1 - puts c - Graphics.frame_reset + Font.default_size = c + puts CTime.day + puts CTime.hour Graphics.update - Font.default_size = c + puts c end diff --git a/toolchain/arch/x86.cmake b/toolchain/arch/x86.cmake index 9007c30..3808250 100644 --- a/toolchain/arch/x86.cmake +++ b/toolchain/arch/x86.cmake @@ -1,8 +1,11 @@ set(ARCH_COMMON "") -set(ARCH_RELEASE +set(ARCH_RELEASE -mnoreturn-no-callee-saved-registers -mrelax-cmpxchg-loop -momit-leaf-frame-pointer -mgather - -mscatter) + -mscatter + -mcldemote + -mbranches-within-32B-boundaries + -mavoid-false-dependencies) set(ARCH_DEBUG "")