Refactor bionic includes into a single place
Bionic includes are the same on all architectures, modulo
architecture-specific includes. Use a single function to populate the
list, passing in bionic's and the kernel's names for the architecture.
Also get rid of the ${LibcRoot} variable, it is not providing any value
and makes grepping harder.
Change-Id: I39e7907d312f52dd1378a3937ab1bcba12c4e97f
diff --git a/cc/arm_device.go b/cc/arm_device.go
index e985a38..dc8ba81 100644
--- a/cc/arm_device.go
+++ b/cc/arm_device.go
@@ -168,14 +168,7 @@
pctx.StaticVariable("armCflags", strings.Join(armCflags, " "))
pctx.StaticVariable("armLdflags", strings.Join(armLdflags, " "))
pctx.StaticVariable("armCppflags", strings.Join(armCppflags, " "))
- pctx.StaticVariable("armIncludeFlags", strings.Join([]string{
- "-isystem ${LibcRoot}/arch-arm/include",
- "-isystem ${LibcRoot}/include",
- "-isystem ${LibcRoot}/kernel/uapi",
- "-isystem ${LibcRoot}/kernel/android/uapi",
- "-isystem ${LibcRoot}/kernel/common",
- "-isystem ${LibcRoot}/kernel/uapi/asm-arm",
- }, " "))
+ pctx.StaticVariable("armIncludeFlags", bionicHeaders("arm", "arm"))
// Extended cflags