Loading java/hiddenapi_modular.go +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ var hiddenAPIFlagFileInfoProvider = blueprint.NewProvider(hiddenAPIFlagFileInfo{ // augmentationInfo is a struct containing paths to files that augment the information provided by // the moduleSpecificFlagsPaths. func ruleToGenerateHiddenApiFlags(ctx android.BuilderContext, outputPath android.WritablePath, baseFlagsPath android.Path, moduleSpecificFlagsPaths android.Paths, augmentationInfo hiddenAPIFlagFileInfo) { tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp") tempPath := tempPathForRestat(ctx, outputPath) rule := android.NewRuleBuilder(pctx, ctx) command := rule.Command(). BuiltTool("generate_hiddenapi_lists"). Loading java/hiddenapi_singleton.go +13 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ package java import ( "strings" "android/soong/android" ) Loading Loading @@ -242,7 +244,7 @@ func stubFlagsRule(ctx android.SingletonContext) { rule := android.NewRuleBuilder(pctx, ctx) outputPath := hiddenAPISingletonPaths(ctx).stubFlags tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp") tempPath := tempPathForRestat(ctx, outputPath) rule.MissingDeps(missingDeps) Loading Loading @@ -348,6 +350,16 @@ func emptyFlagsRule(ctx android.SingletonContext) android.Path { return outputPath } // tempPathForRestat creates a path of the same type as the supplied type but with a name of // <path>.tmp. // // e.g. If path is an OutputPath for out/soong/hiddenapi/hiddenapi-flags.csv then this will return // an OutputPath for out/soong/hiddenapi/hiddenapi-flags.csv.tmp func tempPathForRestat(ctx android.PathContext, path android.WritablePath) android.WritablePath { extWithoutLeadingDot := strings.TrimPrefix(path.Ext(), ".") return path.ReplaceExtension(ctx, extWithoutLeadingDot+".tmp") } // commitChangeForRestat adds a command to a rule that updates outputPath from tempPath if they are different. It // also marks the rule as restat and marks the tempPath as a temporary file that should not be considered an output of // the rule. Loading java/sdk.go +3 −3 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ func createSdkFrameworkAidl(ctx android.SingletonContext) { } combinedAidl := sdkFrameworkAidlPath(ctx) tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp") tempPath := tempPathForRestat(ctx, combinedAidl) rule := createFrameworkAidl(stubsModules, tempPath, ctx) Loading @@ -261,7 +261,7 @@ func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) { stubsModules := []string{"android_module_lib_stubs_current"} combinedAidl := nonUpdatableFrameworkAidlPath(ctx) tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp") tempPath := tempPathForRestat(ctx, combinedAidl) rule := createFrameworkAidl(stubsModules, tempPath, ctx) Loading @@ -270,7 +270,7 @@ func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) { rule.Build("framework_non_updatable_aidl", "generate framework_non_updatable.aidl") } func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx android.SingletonContext) *android.RuleBuilder { func createFrameworkAidl(stubsModules []string, path android.WritablePath, ctx android.SingletonContext) *android.RuleBuilder { stubsJars := make([]android.Paths, len(stubsModules)) ctx.VisitAllModules(func(module android.Module) { Loading Loading
java/hiddenapi_modular.go +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ var hiddenAPIFlagFileInfoProvider = blueprint.NewProvider(hiddenAPIFlagFileInfo{ // augmentationInfo is a struct containing paths to files that augment the information provided by // the moduleSpecificFlagsPaths. func ruleToGenerateHiddenApiFlags(ctx android.BuilderContext, outputPath android.WritablePath, baseFlagsPath android.Path, moduleSpecificFlagsPaths android.Paths, augmentationInfo hiddenAPIFlagFileInfo) { tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp") tempPath := tempPathForRestat(ctx, outputPath) rule := android.NewRuleBuilder(pctx, ctx) command := rule.Command(). BuiltTool("generate_hiddenapi_lists"). Loading
java/hiddenapi_singleton.go +13 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ package java import ( "strings" "android/soong/android" ) Loading Loading @@ -242,7 +244,7 @@ func stubFlagsRule(ctx android.SingletonContext) { rule := android.NewRuleBuilder(pctx, ctx) outputPath := hiddenAPISingletonPaths(ctx).stubFlags tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp") tempPath := tempPathForRestat(ctx, outputPath) rule.MissingDeps(missingDeps) Loading Loading @@ -348,6 +350,16 @@ func emptyFlagsRule(ctx android.SingletonContext) android.Path { return outputPath } // tempPathForRestat creates a path of the same type as the supplied type but with a name of // <path>.tmp. // // e.g. If path is an OutputPath for out/soong/hiddenapi/hiddenapi-flags.csv then this will return // an OutputPath for out/soong/hiddenapi/hiddenapi-flags.csv.tmp func tempPathForRestat(ctx android.PathContext, path android.WritablePath) android.WritablePath { extWithoutLeadingDot := strings.TrimPrefix(path.Ext(), ".") return path.ReplaceExtension(ctx, extWithoutLeadingDot+".tmp") } // commitChangeForRestat adds a command to a rule that updates outputPath from tempPath if they are different. It // also marks the rule as restat and marks the tempPath as a temporary file that should not be considered an output of // the rule. Loading
java/sdk.go +3 −3 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ func createSdkFrameworkAidl(ctx android.SingletonContext) { } combinedAidl := sdkFrameworkAidlPath(ctx) tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp") tempPath := tempPathForRestat(ctx, combinedAidl) rule := createFrameworkAidl(stubsModules, tempPath, ctx) Loading @@ -261,7 +261,7 @@ func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) { stubsModules := []string{"android_module_lib_stubs_current"} combinedAidl := nonUpdatableFrameworkAidlPath(ctx) tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp") tempPath := tempPathForRestat(ctx, combinedAidl) rule := createFrameworkAidl(stubsModules, tempPath, ctx) Loading @@ -270,7 +270,7 @@ func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) { rule.Build("framework_non_updatable_aidl", "generate framework_non_updatable.aidl") } func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx android.SingletonContext) *android.RuleBuilder { func createFrameworkAidl(stubsModules []string, path android.WritablePath, ctx android.SingletonContext) *android.RuleBuilder { stubsJars := make([]android.Paths, len(stubsModules)) ctx.VisitAllModules(func(module android.Module) { Loading