mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:47:34 +00:00
AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places
Doesn't use them in libc headers so that those don't have to pull in AK/Platform.h. AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is defined in clang builds as well.) Using AK_COMPILER_GCC simplifies things some. AK_COMPILER_CLANG isn't as much of a win, other than that it's consistent with AK_COMPILER_GCC.
This commit is contained in:
parent
ff4b912b7c
commit
2af028132a
35 changed files with 64 additions and 49 deletions
|
@ -41,7 +41,7 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(__clang__) && !defined(_DYNAMIC_LOADER)
|
||||
#if !defined(AK_COMPILER_CLANG) && !defined(_DYNAMIC_LOADER)
|
||||
[[gnu::ifunc("resolve_memset")]] void* memset(void*, int, size_t);
|
||||
#else
|
||||
// DynamicLoader can't self-relocate IFUNCs.
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#if defined(AK_COMPILER_CLANG)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wdouble-promotion"
|
||||
#endif
|
||||
|
@ -1148,6 +1148,6 @@ float nearbyintf(float value) NOEXCEPT
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#if defined(AK_COMPILER_CLANG)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue