Merge "Fix header deps of sysprop_library" am: 0298d036e9 am: 2009aa299b am: 5c260af50b

Change-Id: I7e80e4b18c0951053f59ba728ca631df2a2f51c1
This commit is contained in:
Automerger Merge Worker
2020-02-20 00:51:29 +00:00

View File

@@ -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...)
} }
} }