mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +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
|
@ -206,7 +206,7 @@ ErrorOr<void> memset_user(void* dest_ptr, int c, size_t n)
|
|||
return {};
|
||||
}
|
||||
|
||||
#if defined(__clang__) && defined(ENABLE_KERNEL_LTO)
|
||||
#if defined(AK_COMPILER_CLANG) && defined(ENABLE_KERNEL_LTO)
|
||||
// Due to a chicken-and-egg situation, certain linker-defined symbols that are added on-demand (like the GOT)
|
||||
// need to be present before LTO bitcode files are compiled. And since we don't link to any native object files,
|
||||
// the linker does not know that _GLOBAL_OFFSET_TABLE_ is needed, so it doesn't define it, so linking as a PIE fails.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue