From 67894b399b46cc4e5262371d9c3b2736c0a66bf7 Mon Sep 17 00:00:00 2001 From: J Reece Wilson Date: Mon, 13 May 2024 23:15:52 +0100 Subject: [PATCH] [*] Revert clang 'optimization' because this piece of shit compiler wont listen to me. Even worse, im just going to fucking nuke all clang related checks from orbit in our global build_scripts (8b00dc69fceea62ecbbf5a21255a41e2f23921a4), because they admit they cause a 2x slowdown. --- Source/Threading/AuWakeOnAddress.cpp | 4 ---- Source/Threading/Primitives/SMTYield.hpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Threading/AuWakeOnAddress.cpp b/Source/Threading/AuWakeOnAddress.cpp index 668bb580..ddcfecf2 100644 --- a/Source/Threading/AuWakeOnAddress.cpp +++ b/Source/Threading/AuWakeOnAddress.cpp @@ -11,10 +11,6 @@ #pragma check_stack(off) #endif -#if defined(AURORA_COMPILER_CLANG) - #pragma check_stack(off) -#endif - #include #include "AuWakeOnAddress.hpp" #include "Primitives/SMTYield.hpp" diff --git a/Source/Threading/Primitives/SMTYield.hpp b/Source/Threading/Primitives/SMTYield.hpp index 335f3b70..d82f7675 100644 --- a/Source/Threading/Primitives/SMTYield.hpp +++ b/Source/Threading/Primitives/SMTYield.hpp @@ -17,8 +17,8 @@ // dumbshit compiler is emitting stack checks under a non-zero amount of my thread primitives. // "dumbshit compiler" doesnt quite do it justice when it believe a fucking spinlock-lock with an atomic bit test and set is worth a stack check. -#if defined(AURORA_COMPILER_CLANG) - #pragma check_stack(off) +#if defined(AURORA_COMPILER_CLANG) || defined(AURORA_COMPILER_GCC) + #pragma GCC optimize("no-stack-protector") #endif #if (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) && \