Enable compiler optimizations and enforce x86-64-v2 on GCC/Clang (#9442)

* Testing LTO (#4)

* Testing LTO

* clang

* linux

* Added the rest of Blinkhawk's optimizations

* Unlikely asserts

* Removing LTO from Linux builds - GCC

* Removing LTO from Linux builds - Clang
This commit is contained in:
Matías Locatti 2022-12-17 22:16:52 -03:00 committed by GitHub
parent 48108a8c9b
commit fd1ea0fd84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -69,7 +69,7 @@ void assert_fail_impl();
#define ASSERT_OR_EXECUTE(_a_, _b_) \
do { \
ASSERT(_a_); \
if (!(_a_)) { \
if (!(_a_)) [[unlikely]] { \
_b_ \
} \
} while (0)
@ -78,7 +78,7 @@ void assert_fail_impl();
#define ASSERT_OR_EXECUTE_MSG(_a_, _b_, ...) \
do { \
ASSERT_MSG(_a_, __VA_ARGS__); \
if (!(_a_)) { \
if (!(_a_)) [[unlikely]] { \
_b_ \
} \
} while (0)