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
This commit is contained in:
Dan Willemsen
2015-12-18 15:11:17 -08:00
parent 122d9f3e1d
commit 7b310eefb7
3 changed files with 73 additions and 19 deletions

View File

@@ -125,7 +125,7 @@ func init() {
// 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",