diff options
| author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-06-15 09:08:59 +0100 |
|---|---|---|
| committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-06-15 09:08:59 +0100 |
| commit | 244601f4720d9cda6e81ea1908f3ce905a4bcb0e (patch) | |
| tree | c33396728804142e9287b17f52579d396d9d9d1a /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | c11032ad9a6c4523d0d9d591ebce82c87a9fb3a0 (diff) | |
[builtins] Allow compiling the builtins without libc headers
When compiled with -ffreestanding, we should not assume that headers
declaring functions such as abort() are available. While the compiler may
still emit calls to those functions [1], we should not require the headers
to build compiler-rt since that can result in a cyclic dependency graph:
The compiler-rt functions might be required to build libc.so, but the libc
headers such as stdlib.h might only be available once libc has been built.
[1] From https://gcc.gnu.org/onlinedocs/gcc/Standards.html:
GCC requires the freestanding environment provide memcpy, memmove,
memset and memcmp. Finally, if __builtin_trap is used, and the target
does not implement the trap pattern, then GCC emits a call to abort.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D103876
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
