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
This commit is contained in:
@@ -156,12 +156,18 @@ func makeOverrideModuleNames(ctx AndroidMkContext, overrides []string) []string
|
||||
|
||||
func (library *libraryDecorator) androidMkWriteExportedFlags(w io.Writer) {
|
||||
exportedFlags := library.exportedFlags()
|
||||
for _, dir := range library.exportedDirs() {
|
||||
exportedFlags = append(exportedFlags, "-I"+dir)
|
||||
}
|
||||
for _, dir := range library.exportedSystemDirs() {
|
||||
exportedFlags = append(exportedFlags, "-isystem "+dir)
|
||||
}
|
||||
if len(exportedFlags) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_EXPORT_CFLAGS :=", strings.Join(exportedFlags, " "))
|
||||
}
|
||||
exportedFlagsDeps := library.exportedFlagsDeps()
|
||||
if len(exportedFlagsDeps) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_EXPORT_C_INCLUDE_DEPS :=", strings.Join(exportedFlagsDeps.Strings(), " "))
|
||||
exportedDeps := library.exportedDeps()
|
||||
if len(exportedDeps) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_EXPORT_C_INCLUDE_DEPS :=", strings.Join(exportedDeps.Strings(), " "))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user