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:
12
cc/gen.go
12
cc/gen.go
@@ -162,16 +162,18 @@ 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")
|
headerFile := android.PathForModuleGen(ctx, "sysprop", "include", syspropFile.Rel()+".h")
|
||||||
publicHeaderFile := android.PathForModuleGen(ctx, "sysprop/public", "include", syspropFile.Rel()+".h")
|
publicHeaderFile := android.PathForModuleGen(ctx, "sysprop/public", "include", syspropFile.Rel()+".h")
|
||||||
cppFile := android.PathForModuleGen(ctx, "sysprop", syspropFile.Rel()+".cpp")
|
cppFile := android.PathForModuleGen(ctx, "sysprop", syspropFile.Rel()+".cpp")
|
||||||
|
|
||||||
|
headers := android.WritablePaths{headerFile, publicHeaderFile}
|
||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: sysprop,
|
Rule: sysprop,
|
||||||
Description: "sysprop " + syspropFile.Rel(),
|
Description: "sysprop " + syspropFile.Rel(),
|
||||||
Output: cppFile,
|
Output: cppFile,
|
||||||
ImplicitOutput: headerFile,
|
ImplicitOutputs: headers,
|
||||||
Input: syspropFile,
|
Input: syspropFile,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"headerOutDir": filepath.Dir(headerFile.String()),
|
"headerOutDir": filepath.Dir(headerFile.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) {
|
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
|
srcFiles[i] = rcFile
|
||||||
deps = append(deps, headerFile)
|
deps = append(deps, headerFile)
|
||||||
case ".sysprop":
|
case ".sysprop":
|
||||||
cppFile, headerFile := genSysprop(ctx, srcFile)
|
cppFile, headerFiles := genSysprop(ctx, srcFile)
|
||||||
srcFiles[i] = cppFile
|
srcFiles[i] = cppFile
|
||||||
deps = append(deps, headerFile)
|
deps = append(deps, headerFiles...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user