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

Commit 184a6b87 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Prototype changes for multitree"

parents f8c34128 5eb7ee9f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1486,6 +1486,10 @@ func (c *config) MissingUsesLibraries() []string {
	return c.productVariables.MissingUsesLibraries
}

func (c *config) TargetMultitreeUpdateMeta() bool {
	return c.productVariables.MultitreeUpdateMeta
}

func (c *deviceConfig) DeviceArch() string {
	return String(c.config.productVariables.DeviceArch)
}
+4 −2
Original line number Diff line number Diff line
@@ -1057,7 +1057,8 @@ func safePathForSource(ctx PathContext, pathComponents ...string) (SourcePath, e
	}

	// absolute path already checked by validateSafePath
	if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) {
	// special-case api surface gen files for now
	if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) && !strings.Contains(ret.String(), ctx.Config().soongOutDir+"/.export") {
		return ret, fmt.Errorf("source path %q is in output", ret.String())
	}

@@ -1073,7 +1074,8 @@ func pathForSource(ctx PathContext, pathComponents ...string) (SourcePath, error
	}

	// absolute path already checked by validatePath
	if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) {
	// special-case for now
	if strings.HasPrefix(ret.String(), ctx.Config().soongOutDir) && !strings.Contains(ret.String(), ctx.Config().soongOutDir+"/.export") {
		return ret, fmt.Errorf("source path %q is in output", ret.String())
	}

+2 −0
Original line number Diff line number Diff line
@@ -352,6 +352,8 @@ type productVariables struct {
	RecoverySnapshotDirsIncluded []string `json:",omitempty"`
	HostFakeSnapshotEnabled      bool     `json:",omitempty"`

	MultitreeUpdateMeta bool `json:",omitempty"`

	BoardVendorSepolicyDirs           []string `json:",omitempty"`
	BoardOdmSepolicyDirs              []string `json:",omitempty"`
	BoardReqdMaskPolicy               []string `json:",omitempty"`
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ bootstrap_go_package {
        "soong-cc",
        "soong-filesystem",
        "soong-java",
        "soong-multitree",
        "soong-provenance",
        "soong-python",
        "soong-rust",
+18 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import (
	prebuilt_etc "android/soong/etc"
	"android/soong/filesystem"
	"android/soong/java"
	"android/soong/multitree"
	"android/soong/python"
	"android/soong/rust"
	"android/soong/sh"
@@ -358,6 +359,7 @@ type apexBundle struct {
	android.OverridableModuleBase
	android.SdkBase
	android.BazelModuleBase
	multitree.ExportableModuleBase

	// Properties
	properties            apexBundleProperties
@@ -1359,6 +1361,21 @@ func (a *apexBundle) OutputFiles(tag string) (android.Paths, error) {
	}
}

var _ multitree.Exportable = (*apexBundle)(nil)

func (a *apexBundle) Exportable() bool {
	if a.properties.ApexType == flattenedApex {
		return false
	}
	return true
}

func (a *apexBundle) TaggedOutputs() map[string]android.Paths {
	ret := make(map[string]android.Paths)
	ret["apex"] = android.Paths{a.outputFile}
	return ret
}

var _ cc.Coverage = (*apexBundle)(nil)

// Implements cc.Coverage
@@ -2372,6 +2389,7 @@ func newApexBundle() *apexBundle {
	android.InitSdkAwareModule(module)
	android.InitOverridableModule(module, &module.overridableProperties.Overrides)
	android.InitBazelModule(module)
	multitree.InitExportableModule(module)
	return module
}

Loading