Rename ModuleBase receivers
I3b23590b8ce7c8a1ea1139411d84a53163288da7 renamed AndroidModuleBase
to ModuleBase, but left the receivers called 'a'. Rename them to
'm' to match the type.
Test: m checkbuild
Change-Id: I0ebb738152febfd9a2a56ac0b197f19f9e01a1e7
diff --git a/android/arch.go b/android/arch.go
index 04eb1e2..f4a3c06 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -1129,7 +1129,7 @@
var variantReplacer = strings.NewReplacer("-", "_", ".", "_")
-func (a *ModuleBase) appendProperties(ctx BottomUpMutatorContext,
+func (m *ModuleBase) appendProperties(ctx BottomUpMutatorContext,
dst interface{}, src reflect.Value, field, srcPrefix string) reflect.Value {
src = src.FieldByName(field)
@@ -1167,16 +1167,16 @@
}
// Rewrite the module's properties structs to contain arch-specific values.
-func (a *ModuleBase) setArchProperties(ctx BottomUpMutatorContext) {
- arch := a.Arch()
- os := a.Os()
+func (m *ModuleBase) setArchProperties(ctx BottomUpMutatorContext) {
+ arch := m.Arch()
+ os := m.Os()
- for i := range a.generalProperties {
- genProps := a.generalProperties[i]
- if a.archProperties[i] == nil {
+ for i := range m.generalProperties {
+ genProps := m.generalProperties[i]
+ if m.archProperties[i] == nil {
continue
}
- for _, archProperties := range a.archProperties[i] {
+ for _, archProperties := range m.archProperties[i] {
archPropValues := reflect.ValueOf(archProperties).Elem()
archProp := archPropValues.FieldByName("Arch")
@@ -1197,7 +1197,7 @@
if arch.ArchType != Common {
field := proptools.FieldNameForProperty(t.Name)
prefix := "arch." + t.Name
- archStruct := a.appendProperties(ctx, genProps, archProp, field, prefix)
+ archStruct := m.appendProperties(ctx, genProps, archProp, field, prefix)
// Handle arch-variant-specific properties in the form:
// arch: {
@@ -1209,7 +1209,7 @@
if v != "" {
field := proptools.FieldNameForProperty(v)
prefix := "arch." + t.Name + "." + v
- a.appendProperties(ctx, genProps, archStruct, field, prefix)
+ m.appendProperties(ctx, genProps, archStruct, field, prefix)
}
// Handle cpu-variant-specific properties in the form:
@@ -1223,7 +1223,7 @@
if c != "" {
field := proptools.FieldNameForProperty(c)
prefix := "arch." + t.Name + "." + c
- a.appendProperties(ctx, genProps, archStruct, field, prefix)
+ m.appendProperties(ctx, genProps, archStruct, field, prefix)
}
}
@@ -1236,7 +1236,7 @@
for _, feature := range arch.ArchFeatures {
field := proptools.FieldNameForProperty(feature)
prefix := "arch." + t.Name + "." + feature
- a.appendProperties(ctx, genProps, archStruct, field, prefix)
+ m.appendProperties(ctx, genProps, archStruct, field, prefix)
}
// Handle multilib-specific properties in the form:
@@ -1247,7 +1247,7 @@
// },
field = proptools.FieldNameForProperty(t.Multilib)
prefix = "multilib." + t.Multilib
- a.appendProperties(ctx, genProps, multilibProp, field, prefix)
+ m.appendProperties(ctx, genProps, multilibProp, field, prefix)
}
// Handle host-specific properties in the form:
@@ -1259,7 +1259,7 @@
if os.Class == Host || os.Class == HostCross {
field = "Host"
prefix = "target.host"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
// Handle target OS generalities of the form:
@@ -1274,24 +1274,24 @@
if os.Linux() {
field = "Linux"
prefix = "target.linux"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
if arch.ArchType != Common {
field = "Linux_" + arch.ArchType.Name
prefix = "target.linux_" + arch.ArchType.Name
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
}
if os.Bionic() {
field = "Bionic"
prefix = "target.bionic"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
if arch.ArchType != Common {
field = "Bionic_" + t.Name
prefix = "target.bionic_" + t.Name
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
}
@@ -1321,18 +1321,18 @@
// },
field = os.Field
prefix = "target." + os.Name
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
if arch.ArchType != Common {
field = os.Field + "_" + t.Name
prefix = "target." + os.Name + "_" + t.Name
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
if (os.Class == Host || os.Class == HostCross) && os != Windows {
field := "Not_windows"
prefix := "target.not_windows"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
// Handle 64-bit device properties in the form:
@@ -1352,11 +1352,11 @@
if ctx.Config().Android64() {
field := "Android64"
prefix := "target.android64"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
} else {
field := "Android32"
prefix := "target.android32"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
if (arch.ArchType == X86 && (hasArmAbi(arch) ||
@@ -1365,7 +1365,7 @@
hasX86AndroidArch(ctx.Config().Targets[Android])) {
field := "Arm_on_x86"
prefix := "target.arm_on_x86"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
if (arch.ArchType == X86_64 && (hasArmAbi(arch) ||
hasArmAndroidArch(ctx.Config().Targets[Android]))) ||
@@ -1373,7 +1373,7 @@
hasX8664AndroidArch(ctx.Config().Targets[Android])) {
field := "Arm_on_x86_64"
prefix := "target.arm_on_x86_64"
- a.appendProperties(ctx, genProps, targetProp, field, prefix)
+ m.appendProperties(ctx, genProps, targetProp, field, prefix)
}
}
}
diff --git a/android/module.go b/android/module.go
index 4d0d438..c3d5f6a 100644
--- a/android/module.go
+++ b/android/module.go
@@ -526,83 +526,83 @@
prefer32 func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool
}
-func (a *ModuleBase) DepsMutator(BottomUpMutatorContext) {}
+func (m *ModuleBase) DepsMutator(BottomUpMutatorContext) {}
-func (a *ModuleBase) AddProperties(props ...interface{}) {
- a.registerProps = append(a.registerProps, props...)
+func (m *ModuleBase) AddProperties(props ...interface{}) {
+ m.registerProps = append(m.registerProps, props...)
}
-func (a *ModuleBase) GetProperties() []interface{} {
- return a.registerProps
+func (m *ModuleBase) GetProperties() []interface{} {
+ return m.registerProps
}
-func (a *ModuleBase) BuildParamsForTests() []BuildParams {
- return a.buildParams
+func (m *ModuleBase) BuildParamsForTests() []BuildParams {
+ return m.buildParams
}
-func (a *ModuleBase) RuleParamsForTests() map[blueprint.Rule]blueprint.RuleParams {
- return a.ruleParams
+func (m *ModuleBase) RuleParamsForTests() map[blueprint.Rule]blueprint.RuleParams {
+ return m.ruleParams
}
-func (a *ModuleBase) VariablesForTests() map[string]string {
- return a.variables
+func (m *ModuleBase) VariablesForTests() map[string]string {
+ return m.variables
}
-func (a *ModuleBase) Prefer32(prefer32 func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool) {
- a.prefer32 = prefer32
+func (m *ModuleBase) Prefer32(prefer32 func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool) {
+ m.prefer32 = prefer32
}
// 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 String(a.nameProperties.Name)
+func (m *ModuleBase) Name() string {
+ return String(m.nameProperties.Name)
}
// BaseModuleName returns the name of the module as specified in the blueprints file.
-func (a *ModuleBase) BaseModuleName() string {
- return String(a.nameProperties.Name)
+func (m *ModuleBase) BaseModuleName() string {
+ return String(m.nameProperties.Name)
}
-func (a *ModuleBase) base() *ModuleBase {
- return a
+func (m *ModuleBase) base() *ModuleBase {
+ return m
}
-func (a *ModuleBase) SetTarget(target Target, multiTargets []Target, primary bool) {
- a.commonProperties.CompileTarget = target
- a.commonProperties.CompileMultiTargets = multiTargets
- a.commonProperties.CompilePrimary = primary
+func (m *ModuleBase) SetTarget(target Target, multiTargets []Target, primary bool) {
+ m.commonProperties.CompileTarget = target
+ m.commonProperties.CompileMultiTargets = multiTargets
+ m.commonProperties.CompilePrimary = primary
}
-func (a *ModuleBase) Target() Target {
- return a.commonProperties.CompileTarget
+func (m *ModuleBase) Target() Target {
+ return m.commonProperties.CompileTarget
}
-func (a *ModuleBase) TargetPrimary() bool {
- return a.commonProperties.CompilePrimary
+func (m *ModuleBase) TargetPrimary() bool {
+ return m.commonProperties.CompilePrimary
}
-func (a *ModuleBase) MultiTargets() []Target {
- return a.commonProperties.CompileMultiTargets
+func (m *ModuleBase) MultiTargets() []Target {
+ return m.commonProperties.CompileMultiTargets
}
-func (a *ModuleBase) Os() OsType {
- return a.Target().Os
+func (m *ModuleBase) Os() OsType {
+ return m.Target().Os
}
-func (a *ModuleBase) Host() bool {
- return a.Os().Class == Host || a.Os().Class == HostCross
+func (m *ModuleBase) Host() bool {
+ return m.Os().Class == Host || m.Os().Class == HostCross
}
-func (a *ModuleBase) Arch() Arch {
- return a.Target().Arch
+func (m *ModuleBase) Arch() Arch {
+ return m.Target().Arch
}
-func (a *ModuleBase) ArchSpecific() bool {
- return a.commonProperties.ArchSpecific
+func (m *ModuleBase) ArchSpecific() bool {
+ return m.commonProperties.ArchSpecific
}
-func (a *ModuleBase) OsClassSupported() []OsClass {
- switch a.commonProperties.HostOrDeviceSupported {
+func (m *ModuleBase) OsClassSupported() []OsClass {
+ switch m.commonProperties.HostOrDeviceSupported {
case HostSupported:
return []OsClass{Host, HostCross}
case HostSupportedNoCross:
@@ -611,13 +611,13 @@
return []OsClass{Device}
case HostAndDeviceSupported, HostAndDeviceDefault:
var supported []OsClass
- if Bool(a.hostAndDeviceProperties.Host_supported) ||
- (a.commonProperties.HostOrDeviceSupported == HostAndDeviceDefault &&
- a.hostAndDeviceProperties.Host_supported == nil) {
+ if Bool(m.hostAndDeviceProperties.Host_supported) ||
+ (m.commonProperties.HostOrDeviceSupported == HostAndDeviceDefault &&
+ m.hostAndDeviceProperties.Host_supported == nil) {
supported = append(supported, Host, HostCross)
}
- if a.hostAndDeviceProperties.Device_supported == nil ||
- *a.hostAndDeviceProperties.Device_supported {
+ if m.hostAndDeviceProperties.Device_supported == nil ||
+ *m.hostAndDeviceProperties.Device_supported {
supported = append(supported, Device)
}
return supported
@@ -626,49 +626,49 @@
}
}
-func (a *ModuleBase) DeviceSupported() bool {
- return a.commonProperties.HostOrDeviceSupported == DeviceSupported ||
- a.commonProperties.HostOrDeviceSupported == HostAndDeviceSupported &&
- (a.hostAndDeviceProperties.Device_supported == nil ||
- *a.hostAndDeviceProperties.Device_supported)
+func (m *ModuleBase) DeviceSupported() bool {
+ return m.commonProperties.HostOrDeviceSupported == DeviceSupported ||
+ m.commonProperties.HostOrDeviceSupported == HostAndDeviceSupported &&
+ (m.hostAndDeviceProperties.Device_supported == nil ||
+ *m.hostAndDeviceProperties.Device_supported)
}
-func (a *ModuleBase) Platform() bool {
- return !a.DeviceSpecific() && !a.SocSpecific() && !a.ProductSpecific() && !a.ProductServicesSpecific()
+func (m *ModuleBase) Platform() bool {
+ return !m.DeviceSpecific() && !m.SocSpecific() && !m.ProductSpecific() && !m.ProductServicesSpecific()
}
-func (a *ModuleBase) DeviceSpecific() bool {
- return Bool(a.commonProperties.Device_specific)
+func (m *ModuleBase) DeviceSpecific() bool {
+ return Bool(m.commonProperties.Device_specific)
}
-func (a *ModuleBase) SocSpecific() bool {
- return Bool(a.commonProperties.Vendor) || Bool(a.commonProperties.Proprietary) || Bool(a.commonProperties.Soc_specific)
+func (m *ModuleBase) SocSpecific() bool {
+ return Bool(m.commonProperties.Vendor) || Bool(m.commonProperties.Proprietary) || Bool(m.commonProperties.Soc_specific)
}
-func (a *ModuleBase) ProductSpecific() bool {
- return Bool(a.commonProperties.Product_specific)
+func (m *ModuleBase) ProductSpecific() bool {
+ return Bool(m.commonProperties.Product_specific)
}
-func (a *ModuleBase) ProductServicesSpecific() bool {
- return Bool(a.commonProperties.Product_services_specific)
+func (m *ModuleBase) ProductServicesSpecific() bool {
+ return Bool(m.commonProperties.Product_services_specific)
}
-func (a *ModuleBase) Enabled() bool {
- if a.commonProperties.Enabled == nil {
- return !a.Os().DefaultDisabled
+func (m *ModuleBase) Enabled() bool {
+ if m.commonProperties.Enabled == nil {
+ return !m.Os().DefaultDisabled
}
- return *a.commonProperties.Enabled
+ return *m.commonProperties.Enabled
}
-func (a *ModuleBase) SkipInstall() {
- a.commonProperties.SkipInstall = true
+func (m *ModuleBase) SkipInstall() {
+ m.commonProperties.SkipInstall = true
}
-func (a *ModuleBase) ExportedToMake() bool {
- return a.commonProperties.NamespaceExportedToMake
+func (m *ModuleBase) ExportedToMake() bool {
+ return m.commonProperties.NamespaceExportedToMake
}
-func (a *ModuleBase) computeInstallDeps(
+func (m *ModuleBase) computeInstallDeps(
ctx blueprint.ModuleContext) Paths {
result := Paths{}
@@ -683,35 +683,35 @@
return result
}
-func (a *ModuleBase) filesToInstall() Paths {
- return a.installFiles
+func (m *ModuleBase) filesToInstall() Paths {
+ return m.installFiles
}
-func (p *ModuleBase) NoAddressSanitizer() bool {
- return p.noAddressSanitizer
+func (m *ModuleBase) NoAddressSanitizer() bool {
+ return m.noAddressSanitizer
}
-func (p *ModuleBase) InstallInData() bool {
+func (m *ModuleBase) InstallInData() bool {
return false
}
-func (p *ModuleBase) InstallInSanitizerDir() bool {
+func (m *ModuleBase) InstallInSanitizerDir() bool {
return false
}
-func (p *ModuleBase) InstallInRecovery() bool {
- return Bool(p.commonProperties.Recovery)
+func (m *ModuleBase) InstallInRecovery() bool {
+ return Bool(m.commonProperties.Recovery)
}
-func (a *ModuleBase) Owner() string {
- return String(a.commonProperties.Owner)
+func (m *ModuleBase) Owner() string {
+ return String(m.commonProperties.Owner)
}
-func (a *ModuleBase) NoticeFile() OptionalPath {
- return a.noticeFile
+func (m *ModuleBase) NoticeFile() OptionalPath {
+ return m.noticeFile
}
-func (a *ModuleBase) generateModuleTarget(ctx ModuleContext) {
+func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {
allInstalledFiles := Paths{}
allCheckbuildFiles := Paths{}
ctx.VisitAllModuleVariants(func(module Module) {
@@ -736,7 +736,7 @@
Default: !ctx.Config().EmbeddedInMake(),
})
deps = append(deps, name)
- a.installTarget = name
+ m.installTarget = name
}
if len(allCheckbuildFiles) > 0 {
@@ -747,7 +747,7 @@
Implicits: allCheckbuildFiles,
})
deps = append(deps, name)
- a.checkbuildTarget = name
+ m.checkbuildTarget = name
}
if len(deps) > 0 {
@@ -763,26 +763,26 @@
Implicits: deps,
})
- a.blueprintDir = ctx.ModuleDir()
+ m.blueprintDir = ctx.ModuleDir()
}
}
-func determineModuleKind(a *ModuleBase, ctx blueprint.BaseModuleContext) moduleKind {
- var socSpecific = Bool(a.commonProperties.Vendor) || Bool(a.commonProperties.Proprietary) || Bool(a.commonProperties.Soc_specific)
- var deviceSpecific = Bool(a.commonProperties.Device_specific)
- var productSpecific = Bool(a.commonProperties.Product_specific)
- var productServicesSpecific = Bool(a.commonProperties.Product_services_specific)
+func determineModuleKind(m *ModuleBase, ctx blueprint.BaseModuleContext) moduleKind {
+ var socSpecific = Bool(m.commonProperties.Vendor) || Bool(m.commonProperties.Proprietary) || Bool(m.commonProperties.Soc_specific)
+ var deviceSpecific = Bool(m.commonProperties.Device_specific)
+ var productSpecific = Bool(m.commonProperties.Product_specific)
+ var productServicesSpecific = Bool(m.commonProperties.Product_services_specific)
msg := "conflicting value set here"
if socSpecific && deviceSpecific {
ctx.PropertyErrorf("device_specific", "a module cannot be specific to SoC and device at the same time.")
- if Bool(a.commonProperties.Vendor) {
+ if Bool(m.commonProperties.Vendor) {
ctx.PropertyErrorf("vendor", msg)
}
- if Bool(a.commonProperties.Proprietary) {
+ if Bool(m.commonProperties.Proprietary) {
ctx.PropertyErrorf("proprietary", msg)
}
- if Bool(a.commonProperties.Soc_specific) {
+ if Bool(m.commonProperties.Soc_specific) {
ctx.PropertyErrorf("soc_specific", msg)
}
}
@@ -801,13 +801,13 @@
if deviceSpecific {
ctx.PropertyErrorf("device_specific", msg)
} else {
- if Bool(a.commonProperties.Vendor) {
+ if Bool(m.commonProperties.Vendor) {
ctx.PropertyErrorf("vendor", msg)
}
- if Bool(a.commonProperties.Proprietary) {
+ if Bool(m.commonProperties.Proprietary) {
ctx.PropertyErrorf("proprietary", msg)
}
- if Bool(a.commonProperties.Soc_specific) {
+ if Bool(m.commonProperties.Soc_specific) {
ctx.PropertyErrorf("soc_specific", msg)
}
}
@@ -826,23 +826,23 @@
}
}
-func (a *ModuleBase) baseContextFactory(ctx blueprint.BaseModuleContext) baseContextImpl {
+func (m *ModuleBase) baseContextFactory(ctx blueprint.BaseModuleContext) baseContextImpl {
return baseContextImpl{
- target: a.commonProperties.CompileTarget,
- targetPrimary: a.commonProperties.CompilePrimary,
- multiTargets: a.commonProperties.CompileMultiTargets,
- kind: determineModuleKind(a, ctx),
+ target: m.commonProperties.CompileTarget,
+ targetPrimary: m.commonProperties.CompilePrimary,
+ multiTargets: m.commonProperties.CompileMultiTargets,
+ kind: determineModuleKind(m, ctx),
config: ctx.Config().(Config),
}
}
-func (a *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) {
+func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) {
ctx := &moduleContext{
- module: a.module,
+ module: m.module,
ModuleContext: blueprintCtx,
- baseContextImpl: a.baseContextFactory(blueprintCtx),
- installDeps: a.computeInstallDeps(blueprintCtx),
- installFiles: a.installFiles,
+ baseContextImpl: m.baseContextFactory(blueprintCtx),
+ installDeps: m.computeInstallDeps(blueprintCtx),
+ installFiles: m.installFiles,
missingDeps: blueprintCtx.GetMissingDependencies(),
variables: make(map[string]string),
}
@@ -869,52 +869,52 @@
ctx.Variable(pctx, "moduleDescSuffix", s)
// Some common property checks for properties that will be used later in androidmk.go
- if a.commonProperties.Dist.Dest != nil {
- _, err := validateSafePath(*a.commonProperties.Dist.Dest)
+ if m.commonProperties.Dist.Dest != nil {
+ _, err := validateSafePath(*m.commonProperties.Dist.Dest)
if err != nil {
ctx.PropertyErrorf("dist.dest", "%s", err.Error())
}
}
- if a.commonProperties.Dist.Dir != nil {
- _, err := validateSafePath(*a.commonProperties.Dist.Dir)
+ if m.commonProperties.Dist.Dir != nil {
+ _, err := validateSafePath(*m.commonProperties.Dist.Dir)
if err != nil {
ctx.PropertyErrorf("dist.dir", "%s", err.Error())
}
}
- if a.commonProperties.Dist.Suffix != nil {
- if strings.Contains(*a.commonProperties.Dist.Suffix, "/") {
+ if m.commonProperties.Dist.Suffix != nil {
+ if strings.Contains(*m.commonProperties.Dist.Suffix, "/") {
ctx.PropertyErrorf("dist.suffix", "Suffix may not contain a '/' character.")
}
}
- if a.Enabled() {
- a.module.GenerateAndroidBuildActions(ctx)
+ if m.Enabled() {
+ m.module.GenerateAndroidBuildActions(ctx)
if ctx.Failed() {
return
}
- a.installFiles = append(a.installFiles, ctx.installFiles...)
- a.checkbuildFiles = append(a.checkbuildFiles, ctx.checkbuildFiles...)
+ m.installFiles = append(m.installFiles, ctx.installFiles...)
+ m.checkbuildFiles = append(m.checkbuildFiles, ctx.checkbuildFiles...)
- notice := proptools.StringDefault(a.commonProperties.Notice, "NOTICE")
- if m := SrcIsModule(notice); m != "" {
- a.noticeFile = ctx.ExpandOptionalSource(¬ice, "notice")
+ notice := proptools.StringDefault(m.commonProperties.Notice, "NOTICE")
+ if module := SrcIsModule(notice); module != "" {
+ m.noticeFile = ctx.ExpandOptionalSource(¬ice, "notice")
} else {
noticePath := filepath.Join(ctx.ModuleDir(), notice)
- a.noticeFile = ExistentPathForSource(ctx, noticePath)
+ m.noticeFile = ExistentPathForSource(ctx, noticePath)
}
}
- if a == ctx.FinalModule().(Module).base() {
- a.generateModuleTarget(ctx)
+ if m == ctx.FinalModule().(Module).base() {
+ m.generateModuleTarget(ctx)
if ctx.Failed() {
return
}
}
- a.buildParams = ctx.buildParams
- a.ruleParams = ctx.ruleParams
- a.variables = ctx.variables
+ m.buildParams = ctx.buildParams
+ m.ruleParams = ctx.ruleParams
+ m.variables = ctx.variables
}
type baseContextImpl struct {
@@ -1291,16 +1291,16 @@
// Makes this module a platform module, i.e. not specific to soc, device,
// product, or product_services.
-func (a *ModuleBase) MakeAsPlatform() {
- a.commonProperties.Vendor = boolPtr(false)
- a.commonProperties.Proprietary = boolPtr(false)
- a.commonProperties.Soc_specific = boolPtr(false)
- a.commonProperties.Product_specific = boolPtr(false)
- a.commonProperties.Product_services_specific = boolPtr(false)
+func (m *ModuleBase) MakeAsPlatform() {
+ m.commonProperties.Vendor = boolPtr(false)
+ m.commonProperties.Proprietary = boolPtr(false)
+ m.commonProperties.Soc_specific = boolPtr(false)
+ m.commonProperties.Product_specific = boolPtr(false)
+ m.commonProperties.Product_services_specific = boolPtr(false)
}
-func (a *ModuleBase) EnableNativeBridgeSupportByDefault() {
- a.commonProperties.Native_bridge_supported = boolPtr(true)
+func (m *ModuleBase) EnableNativeBridgeSupportByDefault() {
+ m.commonProperties.Native_bridge_supported = boolPtr(true)
}
func (m *moduleContext) InstallInData() bool {
diff --git a/android/variable.go b/android/variable.go
index d039a16..b4f31c6 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -402,12 +402,12 @@
}
}
-func (a *ModuleBase) setVariableProperties(ctx BottomUpMutatorContext,
+func (m *ModuleBase) setVariableProperties(ctx BottomUpMutatorContext,
prefix string, productVariablePropertyValue reflect.Value, variableValue interface{}) {
printfIntoProperties(ctx, prefix, productVariablePropertyValue, variableValue)
- err := proptools.AppendMatchingProperties(a.generalProperties,
+ err := proptools.AppendMatchingProperties(m.generalProperties,
productVariablePropertyValue.Addr().Interface(), nil)
if err != nil {
if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {