Merge "Change bool, and string properties to *bool, and *string for cc"
This commit is contained in:
@@ -25,7 +25,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/proptools"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -77,7 +76,7 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext
|
||||
|
||||
sort.Sort(AndroidModulesByName{androidMkModulesList, ctx})
|
||||
|
||||
transMk := PathForOutput(ctx, "Android"+proptools.String(config.ProductVariables.Make_suffix)+".mk")
|
||||
transMk := PathForOutput(ctx, "Android"+String(config.ProductVariables.Make_suffix)+".mk")
|
||||
if ctx.Failed() {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ type Module interface {
|
||||
|
||||
type nameProperties struct {
|
||||
// The name of the module. Must be unique across all modules.
|
||||
Name string
|
||||
Name *string
|
||||
}
|
||||
|
||||
type commonProperties struct {
|
||||
@@ -351,12 +351,12 @@ func (a *ModuleBase) BuildParamsForTests() []BuildParams {
|
||||
// Name returns the name of the module. It may be overridden by individual module types, for
|
||||
// example prebuilts will prepend prebuilt_ to the name.
|
||||
func (a *ModuleBase) Name() string {
|
||||
return a.nameProperties.Name
|
||||
return String(a.nameProperties.Name)
|
||||
}
|
||||
|
||||
// BaseModuleName returns the name of the module as specified in the blueprints file.
|
||||
func (a *ModuleBase) BaseModuleName() string {
|
||||
return a.nameProperties.Name
|
||||
return String(a.nameProperties.Name)
|
||||
}
|
||||
|
||||
func (a *ModuleBase) base() *ModuleBase {
|
||||
|
||||
@@ -32,7 +32,7 @@ var prebuiltDepTag prebuiltDependencyTag
|
||||
type PrebuiltProperties struct {
|
||||
// When prefer is set to true the prebuilt will be used instead of any source module with
|
||||
// a matching name.
|
||||
Prefer bool `android:"arch_variant"`
|
||||
Prefer *bool `android:"arch_variant"`
|
||||
|
||||
SourceExists bool `blueprint:"mutated"`
|
||||
UsePrebuilt bool `blueprint:"mutated"`
|
||||
@@ -146,7 +146,7 @@ func (p *Prebuilt) usePrebuilt(ctx TopDownMutatorContext, source Module) bool {
|
||||
}
|
||||
|
||||
// TODO: use p.Properties.Name and ctx.ModuleDir to override preference
|
||||
if p.properties.Prefer {
|
||||
if Bool(p.properties.Prefer) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user