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/x86_device.go b/cc/x86_device.go
index 72689fb..ba2f23a 100644
--- a/cc/x86_device.go
+++ b/cc/x86_device.go
@@ -167,14 +167,7 @@
pctx.StaticVariable("x86Cflags", strings.Join(x86Cflags, " "))
pctx.StaticVariable("x86Ldflags", strings.Join(x86Ldflags, " "))
pctx.StaticVariable("x86Cppflags", strings.Join(x86Cppflags, " "))
- pctx.StaticVariable("x86IncludeFlags", strings.Join([]string{
- "-isystem ${LibcRoot}/arch-x86/include",
- "-isystem ${LibcRoot}/include",
- "-isystem ${LibcRoot}/kernel/uapi",
- "-isystem ${LibcRoot}/kernel/android/uapi",
- "-isystem ${LibcRoot}/kernel/common",
- "-isystem ${LibcRoot}/kernel/uapi/asm-x86",
- }, " "))
+ pctx.StaticVariable("x86IncludeFlags", bionicHeaders("x86", "x86"))
// Clang cflags
pctx.StaticVariable("x86ClangCflags", strings.Join(clangFilterUnknownCflags(x86ClangCflags), " "))