Make global C include paths optional
Only add them to the global C include paths if they exist. And make sure
to set up proper dependencies so that we notice when they are added or
removed.
Change-Id: Ia9df14f6ae6869927ad3d3a15fb5a8081f616a81
diff --git a/cc/cc.go b/cc/cc.go
index 312e42b..c532e50 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -125,7 +125,7 @@
// Everything in this list is a crime against abstraction and dependency tracking.
// Do not add anything to this list.
- pctx.PrefixedPathsForSourceVariable("commonGlobalIncludes", "-isystem ",
+ pctx.PrefixedPathsForOptionalSourceVariable("commonGlobalIncludes", "-isystem ",
[]string{
"system/core/include",
"hardware/libhardware/include",