mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Kernel: Enable building the kernel with -flto
GCC with -flto is more aggressive when it comes to inlining and discarding functions which is why we must mark some of the functions as NEVER_INLINE (because they contain asm labels which would be duplicated in the object files if the compiler decides to inline the function elsewhere) and __attribute__((used)) for others so that GCC doesn't discard them.
This commit is contained in:
committed by
Andreas Kling
parent
b861259098
commit
55ae52fdf8
@@ -256,7 +256,7 @@ Process::~Process()
|
||||
}
|
||||
|
||||
// Make sure the compiler doesn't "optimize away" this function:
|
||||
extern void signal_trampoline_dummy();
|
||||
extern void signal_trampoline_dummy() __attribute__((used));
|
||||
void signal_trampoline_dummy()
|
||||
{
|
||||
#if ARCH(I386)
|
||||
@@ -287,7 +287,7 @@ void signal_trampoline_dummy()
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" void asm_signal_trampoline(void);
|
||||
extern "C" void asm_signal_trampoline(void) __attribute__((used));
|
||||
extern "C" void asm_signal_trampoline_end(void);
|
||||
|
||||
void create_signal_trampoline()
|
||||
|
||||
Reference in New Issue
Block a user