Loading android/allowlists/allowlists.go +4 −0 Original line number Diff line number Diff line Loading @@ -1649,5 +1649,9 @@ var ( Label: "//build/bazel/examples/partitions:system_image", Host: false, }, { Label: "//build/bazel/examples/partitions:run_test", Host: false, }, } ) android/bazel_handler.go +8 −1 Original line number Diff line number Diff line Loading @@ -1382,7 +1382,14 @@ func (c *bazelSingleton) GenerateBuildActions(ctx SingletonContext) { WriteFileRuleVerbatim(ctx, out, "") case "FileWrite", "SourceSymlinkManifest": out := PathForBazelOut(ctx, buildStatement.OutputPaths[0]) // TODO(b/297366783) This is a hack to make files from skylib's diff_test executable. // We need to update bazel to have aquery tell us whether a file is supposed to be // executable or not. if strings.HasSuffix(buildStatement.OutputPaths[0], "-test.sh") { WriteExecutableFileRuleVerbatim(ctx, out, buildStatement.FileContents) } else { WriteFileRuleVerbatim(ctx, out, buildStatement.FileContents) } case "SymlinkTree": // build-runfiles arguments are the manifest file and the target directory // where it creates the symlink tree according to this manifest (and then Loading android/defs.go +7 −5 Original line number Diff line number Diff line Loading @@ -209,12 +209,14 @@ func WriteFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content buildWriteFileRule(ctx, outputFile, content) } func CatFileRule(ctx BuilderContext, paths Paths, outputFile WritablePath) { // WriteExecutableFileRuleVerbatim is the same as WriteFileRuleVerbatim, but runs chmod +x on the result func WriteExecutableFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content string) { intermediate := PathForIntermediates(ctx, "write_executable_file_intermediates").Join(ctx, outputFile.String()) WriteFileRuleVerbatim(ctx, intermediate, content) ctx.Build(pctx, BuildParams{ Rule: Cat, Inputs: paths, Rule: CpExecutable, Output: outputFile, Description: "combine files to " + outputFile.Base(), Input: intermediate, }) } Loading Loading
android/allowlists/allowlists.go +4 −0 Original line number Diff line number Diff line Loading @@ -1649,5 +1649,9 @@ var ( Label: "//build/bazel/examples/partitions:system_image", Host: false, }, { Label: "//build/bazel/examples/partitions:run_test", Host: false, }, } )
android/bazel_handler.go +8 −1 Original line number Diff line number Diff line Loading @@ -1382,7 +1382,14 @@ func (c *bazelSingleton) GenerateBuildActions(ctx SingletonContext) { WriteFileRuleVerbatim(ctx, out, "") case "FileWrite", "SourceSymlinkManifest": out := PathForBazelOut(ctx, buildStatement.OutputPaths[0]) // TODO(b/297366783) This is a hack to make files from skylib's diff_test executable. // We need to update bazel to have aquery tell us whether a file is supposed to be // executable or not. if strings.HasSuffix(buildStatement.OutputPaths[0], "-test.sh") { WriteExecutableFileRuleVerbatim(ctx, out, buildStatement.FileContents) } else { WriteFileRuleVerbatim(ctx, out, buildStatement.FileContents) } case "SymlinkTree": // build-runfiles arguments are the manifest file and the target directory // where it creates the symlink tree according to this manifest (and then Loading
android/defs.go +7 −5 Original line number Diff line number Diff line Loading @@ -209,12 +209,14 @@ func WriteFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content buildWriteFileRule(ctx, outputFile, content) } func CatFileRule(ctx BuilderContext, paths Paths, outputFile WritablePath) { // WriteExecutableFileRuleVerbatim is the same as WriteFileRuleVerbatim, but runs chmod +x on the result func WriteExecutableFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content string) { intermediate := PathForIntermediates(ctx, "write_executable_file_intermediates").Join(ctx, outputFile.String()) WriteFileRuleVerbatim(ctx, intermediate, content) ctx.Build(pctx, BuildParams{ Rule: Cat, Inputs: paths, Rule: CpExecutable, Output: outputFile, Description: "combine files to " + outputFile.Base(), Input: intermediate, }) } Loading