Fix header deps of sysprop_library
This adds public header to deps correctly. Bug: 148123511 Bug: 149252327 Test: VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk Change-Id: Ib8df3dfb4a068a11fc647de8588cc52889d82fba
This commit is contained in:
20
cc/gen.go
20
cc/gen.go
@@ -162,17 +162,19 @@ func genLex(ctx android.ModuleContext, lexFile android.Path, outFile android.Mod
|
||||
})
|
||||
}
|
||||
|
||||
func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Path, android.Path) {
|
||||
func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Path, android.Paths) {
|
||||
headerFile := android.PathForModuleGen(ctx, "sysprop", "include", syspropFile.Rel()+".h")
|
||||
publicHeaderFile := android.PathForModuleGen(ctx, "sysprop/public", "include", syspropFile.Rel()+".h")
|
||||
cppFile := android.PathForModuleGen(ctx, "sysprop", syspropFile.Rel()+".cpp")
|
||||
|
||||
headers := android.WritablePaths{headerFile, publicHeaderFile}
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: sysprop,
|
||||
Description: "sysprop " + syspropFile.Rel(),
|
||||
Output: cppFile,
|
||||
ImplicitOutput: headerFile,
|
||||
Input: syspropFile,
|
||||
Rule: sysprop,
|
||||
Description: "sysprop " + syspropFile.Rel(),
|
||||
Output: cppFile,
|
||||
ImplicitOutputs: headers,
|
||||
Input: syspropFile,
|
||||
Args: map[string]string{
|
||||
"headerOutDir": filepath.Dir(headerFile.String()),
|
||||
"publicOutDir": filepath.Dir(publicHeaderFile.String()),
|
||||
@@ -181,7 +183,7 @@ func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Pa
|
||||
},
|
||||
})
|
||||
|
||||
return cppFile, headerFile
|
||||
return cppFile, headers.Paths()
|
||||
}
|
||||
|
||||
func genWinMsg(ctx android.ModuleContext, srcFile android.Path, flags builderFlags) (android.Path, android.Path) {
|
||||
@@ -259,9 +261,9 @@ func genSources(ctx android.ModuleContext, srcFiles android.Paths,
|
||||
srcFiles[i] = rcFile
|
||||
deps = append(deps, headerFile)
|
||||
case ".sysprop":
|
||||
cppFile, headerFile := genSysprop(ctx, srcFile)
|
||||
cppFile, headerFiles := genSysprop(ctx, srcFile)
|
||||
srcFiles[i] = cppFile
|
||||
deps = append(deps, headerFile)
|
||||
deps = append(deps, headerFiles...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user