Separate exported includes out of flags
Exported includes have been maintained along with other C/C++ flags.
This makes dependencies unclear, and users have had to parse flags to
get exported directories. This separates exported includes and
exported flags, thus making data more structured and explicit.
Bug: 132818174
Test: m
Change-Id: I5c25ac2224988c4a67e4db6fd6e4d39090b74041
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index 6cdf5c7..e8208ae 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -144,17 +144,17 @@
timestampFiles = append(timestampFiles, stub.processHeaders(ctx, dir, genHeaderOutDir))
}
- includePrefix := "-I"
if Bool(stub.Properties.Export_headers_as_system) {
- includePrefix = "-isystem "
+ stub.reexportSystemDirs(genHeaderOutDir.String())
+ } else {
+ stub.reexportDirs(genHeaderOutDir.String())
}
- stub.reexportFlags([]string{includePrefix + genHeaderOutDir.String()})
- stub.reexportDeps(timestampFiles)
+ stub.reexportDeps(timestampFiles...)
}
if Bool(stub.Properties.Export_headers_as_system) {
- stub.exportIncludes(ctx, "-isystem ")
+ stub.exportIncludesAsSystem(ctx)
stub.libraryDecorator.flagExporter.Properties.Export_include_dirs = []string{}
}