Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9343e3f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11130229 from 2c0f58a0 to 24Q1-release

Change-Id: I0766661de0504d9fe2a99e22aaee0bb571282f99
parents 8c064a2d 2c0f58a0
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -40,7 +40,7 @@ var (
			Restat: true,
			Restat: true,
		}, "release_version", "package", "declarations", "values", "default-permission")
		}, "release_version", "package", "declarations", "values", "default-permission")


	// For java_aconfig_library: Generate java file
	// For java_aconfig_library: Generate java library
	javaRule = pctx.AndroidStaticRule("java_aconfig_library",
	javaRule = pctx.AndroidStaticRule("java_aconfig_library",
		blueprint.RuleParams{
		blueprint.RuleParams{
			Command: `rm -rf ${out}.tmp` +
			Command: `rm -rf ${out}.tmp` +
@@ -58,7 +58,7 @@ var (
			Restat: true,
			Restat: true,
		}, "mode")
		}, "mode")


	// For java_aconfig_library: Generate java file
	// For cc_aconfig_library: Generate C++ library
	cppRule = pctx.AndroidStaticRule("cc_aconfig_library",
	cppRule = pctx.AndroidStaticRule("cc_aconfig_library",
		blueprint.RuleParams{
		blueprint.RuleParams{
			Command: `rm -rf ${gendir}` +
			Command: `rm -rf ${gendir}` +
@@ -69,10 +69,10 @@ var (
				`    --out ${gendir}`,
				`    --out ${gendir}`,
			CommandDeps: []string{
			CommandDeps: []string{
				"$aconfig",
				"$aconfig",
				"$soong_zip",
			},
			},
		}, "gendir", "mode")
		}, "gendir", "mode")


	// For rust_aconfig_library: Generate Rust library
	rustRule = pctx.AndroidStaticRule("rust_aconfig_library",
	rustRule = pctx.AndroidStaticRule("rust_aconfig_library",
		blueprint.RuleParams{
		blueprint.RuleParams{
			Command: `rm -rf ${gendir}` +
			Command: `rm -rf ${gendir}` +
@@ -83,11 +83,10 @@ var (
				`    --out ${gendir}`,
				`    --out ${gendir}`,
			CommandDeps: []string{
			CommandDeps: []string{
				"$aconfig",
				"$aconfig",
				"$soong_zip",
			},
			},
		}, "gendir", "mode")
		}, "gendir", "mode")


	// For all_aconfig_declarations
	// For all_aconfig_declarations: Combine all parsed_flags proto files
	allDeclarationsRule = pctx.AndroidStaticRule("all_aconfig_declarations_dump",
	allDeclarationsRule = pctx.AndroidStaticRule("all_aconfig_declarations_dump",
		blueprint.RuleParams{
		blueprint.RuleParams{
			Command: `${aconfig} dump --format protobuf --out ${out} ${cache_files}`,
			Command: `${aconfig} dump --format protobuf --out ${out} ${cache_files}`,
+8 −0
Original line number Original line Diff line number Diff line
@@ -2210,6 +2210,14 @@ type DataPath struct {
	RelativeInstallPath string
	RelativeInstallPath string
}
}


func (d *DataPath) ToRelativeInstallPath() string {
	relPath := d.SrcPath.Rel()
	if d.RelativeInstallPath != "" {
		relPath = filepath.Join(d.RelativeInstallPath, relPath)
	}
	return relPath
}

// PathsIfNonNil returns a Paths containing only the non-nil input arguments.
// PathsIfNonNil returns a Paths containing only the non-nil input arguments.
func PathsIfNonNil(paths ...Path) Paths {
func PathsIfNonNil(paths ...Path) Paths {
	if len(paths) == 0 {
	if len(paths) == 0 {
+4 −8
Original line number Original line Diff line number Diff line
@@ -563,13 +563,8 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) {
		// Copy the test files (if any)
		// Copy the test files (if any)
		for _, d := range fi.dataPaths {
		for _, d := range fi.dataPaths {
			// TODO(eakammer): This is now the third repetition of ~this logic for test paths, refactoring should be possible
			// TODO(eakammer): This is now the third repetition of ~this logic for test paths, refactoring should be possible
			relPath := d.SrcPath.Rel()
			relPath := d.ToRelativeInstallPath()
			dataPath := d.SrcPath.String()
			dataDest := imageDir.Join(ctx, fi.apexRelativePath(relPath)).String()
			if !strings.HasSuffix(dataPath, relPath) {
				panic(fmt.Errorf("path %q does not end with %q", dataPath, relPath))
			}

			dataDest := imageDir.Join(ctx, fi.apexRelativePath(relPath), d.RelativeInstallPath).String()


			copyCommands = append(copyCommands, "cp -f "+d.SrcPath.String()+" "+dataDest)
			copyCommands = append(copyCommands, "cp -f "+d.SrcPath.String()+" "+dataDest)
			implicitInputs = append(implicitInputs, d.SrcPath)
			implicitInputs = append(implicitInputs, d.SrcPath)
@@ -1095,7 +1090,8 @@ func (a *apexBundle) buildCannedFsConfig(ctx android.ModuleContext) android.Outp
		if f.installDir == "bin" || strings.HasPrefix(f.installDir, "bin/") {
		if f.installDir == "bin" || strings.HasPrefix(f.installDir, "bin/") {
			executablePaths = append(executablePaths, pathInApex)
			executablePaths = append(executablePaths, pathInApex)
			for _, d := range f.dataPaths {
			for _, d := range f.dataPaths {
				readOnlyPaths = append(readOnlyPaths, filepath.Join(f.installDir, d.RelativeInstallPath, d.SrcPath.Rel()))
				rel := d.ToRelativeInstallPath()
				readOnlyPaths = append(readOnlyPaths, filepath.Join(f.installDir, rel))
			}
			}
			for _, s := range f.symlinks {
			for _, s := range f.symlinks {
				executablePaths = append(executablePaths, filepath.Join(f.installDir, s))
				executablePaths = append(executablePaths, filepath.Join(f.installDir, s))
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ bootstrap_go_package {
        "soong-multitree",
        "soong-multitree",
        "soong-snapshot",
        "soong-snapshot",
        "soong-sysprop-bp2build",
        "soong-sysprop-bp2build",
        "soong-testing",
        "soong-tradefed",
        "soong-tradefed",
    ],
    ],
    srcs: [
    srcs: [
+8 −3
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import (
	"strconv"
	"strconv"
	"strings"
	"strings"


	"android/soong/testing"
	"android/soong/ui/metrics/bp2build_metrics_proto"
	"android/soong/ui/metrics/bp2build_metrics_proto"


	"github.com/google/blueprint"
	"github.com/google/blueprint"
@@ -865,6 +866,7 @@ type Module struct {
	hod        android.HostOrDeviceSupported
	hod        android.HostOrDeviceSupported
	multilib   android.Multilib
	multilib   android.Multilib
	bazelable  bool
	bazelable  bool
	testModule bool


	// Allowable SdkMemberTypes of this module type.
	// Allowable SdkMemberTypes of this module type.
	sdkMemberTypes []android.SdkMemberType
	sdkMemberTypes []android.SdkMemberType
@@ -2329,6 +2331,9 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
			}
			}
		}
		}
	}
	}
	if c.testModule {
		ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
	}


	c.maybeInstall(ctx, apexInfo)
	c.maybeInstall(ctx, apexInfo)
}
}
Loading