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

Commit 6df33725 authored by Jeongik Cha's avatar Jeongik Cha Committed by Gerrit Code Review
Browse files

Merge "Introduce AlwaysUsePrebuiltSdks"

parents 91c3e4ec 816a23a5
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -722,7 +722,7 @@ func (c *config) AllowMissingDependencies() bool {
	return Bool(c.productVariables.Allow_missing_dependencies)
}

// Returns true if building without full platform sources.
// Returns true if a full platform source tree cannot be assumed.
func (c *config) UnbundledBuild() bool {
	return Bool(c.productVariables.Unbundled_build)
}
@@ -733,8 +733,9 @@ func (c *config) UnbundledBuildApps() bool {
	return Bool(c.productVariables.Unbundled_build_apps)
}

func (c *config) UnbundledBuildUsePrebuiltSdks() bool {
	return Bool(c.productVariables.Unbundled_build) && !Bool(c.productVariables.Unbundled_build_sdks_from_source)
// Returns true if building modules against prebuilt SDKs.
func (c *config) AlwaysUsePrebuiltSdks() bool {
	return Bool(c.productVariables.Always_use_prebuilt_sdks)
}

func (c *config) Fuchsia() bool {
+24 −24
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ type productVariables struct {
	Allow_missing_dependencies   *bool `json:",omitempty"`
	Unbundled_build              *bool `json:",omitempty"`
	Unbundled_build_apps         *bool `json:",omitempty"`
	Unbundled_build_sdks_from_source *bool `json:",omitempty"`
	Always_use_prebuilt_sdks     *bool `json:",omitempty"`
	Malloc_not_svelte            *bool `json:",omitempty"`
	Malloc_zero_contents         *bool `json:",omitempty"`
	Malloc_pattern_fill_contents *bool `json:",omitempty"`
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import (

func init() {
	pctx.VariableFunc("rsCmd", func(ctx android.PackageVarContext) string {
		if ctx.Config().UnbundledBuild() {
		if ctx.Config().AlwaysUsePrebuiltSdks() {
			// Use RenderScript prebuilts for unbundled builds but not PDK builds
			return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin/llvm-rs-cc")
		} else {
+1 −1
Original line number Diff line number Diff line
@@ -625,7 +625,7 @@ func (a *AARImport) JacocoReportClassesFile() android.Path {
}

func (a *AARImport) DepsMutator(ctx android.BottomUpMutatorContext) {
	if !ctx.Config().UnbundledBuildUsePrebuiltSdks() {
	if !ctx.Config().AlwaysUsePrebuiltSdks() {
		sdkDep := decodeSdkDep(ctx, sdkContext(a))
		if sdkDep.useModule && sdkDep.frameworkResModule != "" {
			ctx.AddVariationDependencies(nil, frameworkResTag, sdkDep.frameworkResModule)
+1 −0
Original line number Diff line number Diff line
@@ -2866,6 +2866,7 @@ func TestUncompressDex(t *testing.T) {
		config := testAppConfig(nil, bp, nil)
		if unbundled {
			config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true)
			config.TestProductVariables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
		}

		ctx := testContext()
Loading