diff options
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/include/zencore/zencore.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index 3d8f3f1e3..3f92d7ac4 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -220,9 +220,15 @@ ZENCORE_API void zencore_forcelinktests(); ////////////////////////////////////////////////////////////////////////// #if ZEN_COMPILER_MSC -# define ZEN_DISABLE_OPTIMIZATION_ACTUAL __pragma(optimize("", off)) +# define ZEN_DISABLE_OPTIMIZATION_ACTUAL __pragma(optimize("", off)) # define ZEN_ENABLE_OPTIMIZATION_ACTUAL __pragma(optimize("", on)) -#else +#elif ZEN_COMPILER_GCC +# define ZEN_DISABLE_OPTIMIZATION_ACTUAL _Pragma( "GCC push_options" ) \ + _Pragma( "GCC optimize (\"O0\")" ) +# define ZEN_ENABLE_OPTIMIZATION_ACTUAL _Pragma( "GCC pop_options" ) +#elif ZEN_COMPILER_CLANG +# define ZEN_DISABLE_OPTIMIZATION_ACTUAL _Pragma("clang optimize off") +# define ZEN_ENABLE_OPTIMIZATION_ACTUAL _Pragma("clang optimize on") #endif // Set up optimization control macros, now that we have both the build settings and the platform macros |