Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the right contents. Wrap it in an android.WriteFileRule that handles the escaping. Test: compare all android.WriteFile outputs Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
This commit is contained in:
@@ -651,14 +651,8 @@ func updatableBcpPackagesRule(ctx android.SingletonContext, image *bootImageConf
|
||||
updatableBcpPackagesName := "updatable-bcp-packages.txt"
|
||||
updatableBcpPackages := image.dir.Join(ctx, updatableBcpPackagesName)
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.WriteFile,
|
||||
Output: updatableBcpPackages,
|
||||
Args: map[string]string{
|
||||
// WriteFile automatically adds the last end-of-line.
|
||||
"content": strings.Join(updatablePackages, "\\n"),
|
||||
},
|
||||
})
|
||||
// WriteFileRule automatically adds the last end-of-line.
|
||||
android.WriteFileRule(ctx, updatableBcpPackages, strings.Join(updatablePackages, "\n"))
|
||||
|
||||
rule := android.NewRuleBuilder()
|
||||
rule.MissingDeps(missingDeps)
|
||||
@@ -720,13 +714,7 @@ func dumpOatRules(ctx android.SingletonContext, image *bootImageConfig) {
|
||||
func writeGlobalConfigForMake(ctx android.SingletonContext, path android.WritablePath) {
|
||||
data := dexpreopt.GetGlobalConfigRawData(ctx)
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.WriteFile,
|
||||
Output: path,
|
||||
Args: map[string]string{
|
||||
"content": string(data),
|
||||
},
|
||||
})
|
||||
android.WriteFileRule(ctx, path, string(data))
|
||||
}
|
||||
|
||||
// Export paths for default boot image to Make
|
||||
|
Reference in New Issue
Block a user