Commit f14e5bfb authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

ANDROID: Makefile: add compiler-rt dependency explicitly



AOSP clang still has a dependency on libgcc_s (the "compiler runtime")
(upstream LLVM does not.) When building the kernel in a hermetic
environment, we observe the following linkage failures while building
host executables:

  HOSTCC  scripts/basic/fixdep
ld.lld: error: cannot open crtbegin.o: No such file or directory
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc_s
ld.lld: error: unable to find library -lgcc
ld.lld: error: unable to find library -lgcc_s
ld.lld: error: cannot open crtend.o: No such file or directory

AOSP clang is not bound by the same dependencies for kernel builds that
it is for userspace; tell it to use LLVM's compiler runtime,
compiler-rt, instead explicitly. This allows us to drop the libgcc
dependency from our hermetic Docker image.

Bug: 65987925
Bug: 131098715
Bug: 135922132
Bug: 141693040
Suggested-by: default avatarStephen Hines <srhines@google.com>
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Change-Id: Ied7bd6fadd30fe56b85c2bfa59b5ea0a87d476d8
parent 537c1df0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment