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

Commit fe850386 authored by LaMont Jones's avatar LaMont Jones Committed by Automerger Merge Worker
Browse files

Merge "Add support for PRODUCT_RELEASE_CONFIG_MAPS" into main am: c416ddd1 am: 1b6f1d27

parents 727dc7ce 1b6f1d27
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@ type configImpl struct {
	includeTags    []string
	sourceRootDirs []string

	productReleaseConfigMaps       string
	productReleaseConfigMapsLoaded bool

	// Data source to write ninja weight list
	ninjaWeightListSource NinjaWeightListSource
}
@@ -925,6 +928,9 @@ func (c *configImpl) configureLocale(ctx Context) {
}

func (c *configImpl) Environment() *Environment {
	if c.productReleaseConfigMapsLoaded {
		c.environ.Set("PRODUCT_RELEASE_CONFIG_MAPS", c.productReleaseConfigMaps)
	}
	return c.environ
}

+17 −0
Original line number Diff line number Diff line
@@ -92,6 +92,20 @@ func dumpMakeVars(ctx Context, config Config, goals, vars []string, write_soong_
	}
	defer tool.Finish()

	releaseConfigVars := []string{
		"PRODUCT_RELEASE_CONFIG_MAPS",
	}

	if !config.productReleaseConfigMapsLoaded {
		// Get the PRODUCT_RELEASE_CONFIG_MAPS for this product, to avoid polluting the environment
		// when we run product config to get the rest of the make vars.
		config.productReleaseConfigMapsLoaded = true
		releaseMapVars, err := dumpMakeVars(ctx, config, goals, releaseConfigVars, false, "")
		if err != nil {
			ctx.Fatalln("Error getting PRODUCT_RELEASE_CONFIG_MAPS:", err)
		}
		config.productReleaseConfigMaps = releaseMapVars["PRODUCT_RELEASE_CONFIG_MAPS"]
	}
	cmd := Command(ctx, config, "dumpvars",
		config.PrebuiltBuildTool("ckati"),
		"-f", "build/make/core/config.mk",
@@ -191,6 +205,9 @@ func runMakeProductConfig(ctx Context, config Config) {
		"TARGET_BUILD_APPS",
		"TARGET_BUILD_UNBUNDLED",

		// Additional release config maps
		"PRODUCT_RELEASE_CONFIG_MAPS",

		// compiler wrappers set up by make
		"CC_WRAPPER",
		"CXX_WRAPPER",