mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Fix SAFE_BUFFERS attribute for GCC
This commit is contained in:
parent
3e496f6625
commit
4f8cac731b
7 changed files with 33 additions and 29 deletions
|
@ -24,11 +24,15 @@ using namespace std::literals;
|
|||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define SAFE_BUFFERS __declspec(safebuffers)
|
||||
#define SAFE_BUFFERS(...) __declspec(safebuffers) __VA_ARGS__
|
||||
#define NEVER_INLINE __declspec(noinline)
|
||||
#define FORCE_INLINE __forceinline
|
||||
#else // not _MSC_VER
|
||||
#define SAFE_BUFFERS __attribute__((no_stack_protector))
|
||||
#ifdef __clang__
|
||||
#define SAFE_BUFFERS(...) __attribute__((no_stack_protector)) __VA_ARGS__
|
||||
#else
|
||||
#define SAFE_BUFFERS(...) __VA_ARGS__ __attribute__((__optimize__("no-stack-protector")))
|
||||
#endif
|
||||
#define NEVER_INLINE __attribute__((noinline)) inline
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
#endif // _MSC_VER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue