Issue 123848
Summary [compiler-rt] circular dependency on libc
Labels compiler-rt
Assignees
Reporter nickdesaulniers
    cc @petrhosek @frobtech @michaelrj-google @pcc @compnerd 

Ideally, we'd be able to build the compiler builtins without depending on the libc (for purposes of bootstrapping a system).  Right now, I observe build failures for the `builtins` ninja target when attempting to bootstrap such a sysroot:

- compiler-rt/lib/builtins/emutls.c depends on <stdlib.h>
- compiler-rt/lib/builtins/clear_cache.c depends on <assert.h>
- compiler-rt/lib/builtins/enable_execute_stack.c depends on <sys/mman.h>
- compiler-rt/lib/builtins/eprintf.c depends on <stdio.h>
- compiler-rt/lib/builtins/cpu_model/x86.c depends on <assert.h>

It looks like `COMPILER_RT_BAREMETAL_BUILD` can be unset to disable the addition of emutls.c, enable_execute_stack.c, and eprintf.c . (Ah @petrhosek has been here before, thanks @petrhosek !)  AFAICT, there's currently no cmake option to skip building the rest.

Otherwise, it seems like we may have a circular dependency between the compiler builtins and the libc.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to