From d1845bf51fccba3d4a756040e07d277a4581aee8 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Thu, 25 Sep 2025 15:52:58 -0700 Subject: [PATCH] no_inline on entry_point --- src/base/base_core.h | 12 ++++++++++++ src/os/core/os_core.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/base/base_core.h b/src/base/base_core.h index e1123db9..e9a166f2 100644 --- a/src/base/base_core.h +++ b/src/base/base_core.h @@ -45,12 +45,24 @@ # define thread_static __declspec(thread) #elif COMPILER_CLANG || COMPILER_GCC # define thread_static __thread +#else +# error thread_static not defined for this compiler. #endif #if COMPILER_MSVC # define force_inline __forceinline #elif COMPILER_CLANG || COMPILER_GCC # define force_inline __attribute__((always_inline)) +#else +# error force_inline not defined for this compiler. +#endif + +#if COMPILER_MSVC +# define no_inline __declspec(noinline) +#elif COMPILER_CLANG || COMPILER_GCC +# define no_inline __attribute__((noinline)) +#else +# error no_inline not defined for this compiler. #endif //////////////////////////////// diff --git a/src/os/core/os_core.h b/src/os/core/os_core.h index a35852a6..317f1d05 100644 --- a/src/os/core/os_core.h +++ b/src/os/core/os_core.h @@ -319,7 +319,7 @@ internal Guid os_make_guid(void); #if BUILD_ENTRY_DEFINING_UNIT raddbg_entry_point(entry_point); -internal void entry_point(CmdLine *cmdline); +internal no_inline void entry_point(CmdLine *cmdline); #endif #endif // OS_CORE_H