Merge "Add a flag to allow unbundled builds to build SDKs from source"
This commit is contained in:
@@ -569,6 +569,10 @@ func (c *config) UnbundledBuild() bool {
|
|||||||
return Bool(c.productVariables.Unbundled_build)
|
return Bool(c.productVariables.Unbundled_build)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *config) UnbundledBuildPrebuiltSdks() bool {
|
||||||
|
return Bool(c.productVariables.Unbundled_build) && !Bool(c.productVariables.Unbundled_build_sdks_from_source)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *config) IsPdkBuild() bool {
|
func (c *config) IsPdkBuild() bool {
|
||||||
return Bool(c.productVariables.Pdk)
|
return Bool(c.productVariables.Pdk)
|
||||||
}
|
}
|
||||||
|
@@ -179,6 +179,7 @@ type productVariables struct {
|
|||||||
|
|
||||||
Allow_missing_dependencies *bool `json:",omitempty"`
|
Allow_missing_dependencies *bool `json:",omitempty"`
|
||||||
Unbundled_build *bool `json:",omitempty"`
|
Unbundled_build *bool `json:",omitempty"`
|
||||||
|
Unbundled_build_sdks_from_source *bool `json:",omitempty"`
|
||||||
Malloc_not_svelte *bool `json:",omitempty"`
|
Malloc_not_svelte *bool `json:",omitempty"`
|
||||||
Safestack *bool `json:",omitempty"`
|
Safestack *bool `json:",omitempty"`
|
||||||
HostStaticBinaries *bool `json:",omitempty"`
|
HostStaticBinaries *bool `json:",omitempty"`
|
||||||
|
@@ -443,7 +443,7 @@ func (a *AARImport) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *AARImport) DepsMutator(ctx android.BottomUpMutatorContext) {
|
func (a *AARImport) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||||
if !ctx.Config().UnbundledBuild() {
|
if !ctx.Config().UnbundledBuildPrebuiltSdks() {
|
||||||
sdkDep := decodeSdkDep(ctx, sdkContext(a))
|
sdkDep := decodeSdkDep(ctx, sdkContext(a))
|
||||||
if sdkDep.useModule && sdkDep.frameworkResModule != "" {
|
if sdkDep.useModule && sdkDep.frameworkResModule != "" {
|
||||||
ctx.AddVariationDependencies(nil, frameworkResTag, sdkDep.frameworkResModule)
|
ctx.AddVariationDependencies(nil, frameworkResTag, sdkDep.frameworkResModule)
|
||||||
|
@@ -555,7 +555,7 @@ func decodeSdkDep(ctx android.BaseContext, sdkContext sdkContext) sdkDep {
|
|||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Config().UnbundledBuild() && v != "" {
|
if ctx.Config().UnbundledBuildPrebuiltSdks() && v != "" {
|
||||||
return toPrebuilt(v)
|
return toPrebuilt(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user