Merge "Remove use_apex_name_macro"

This commit is contained in:
Jiyong Park
2021-10-14 02:32:43 +00:00
committed by Gerrit Code Review
3 changed files with 0 additions and 61 deletions

View File

@@ -3249,16 +3249,6 @@ func (c *Module) TestFor() []string {
return c.Properties.Test_for
}
func (c *Module) UniqueApexVariations() bool {
if u, ok := c.compiler.(interface {
uniqueApexVariations() bool
}); ok {
return u.uniqueApexVariations()
} else {
return false
}
}
func (c *Module) EverInstallable() bool {
return c.installer != nil &&
// Check to see whether the module is actually ever installable.

View File

@@ -209,15 +209,6 @@ type BaseCompilerProperties struct {
// Build and link with OpenMP
Openmp *bool `android:"arch_variant"`
// Deprecated.
// Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
Use_apex_name_macro *bool
// Adds two macros for apex variants in addition to __ANDROID_APEX__
// * __ANDROID_APEX_COM_ANDROID_FOO__
// * __ANDROID_APEX_NAME__="com.android.foo"
UseApexNameMacro bool `blueprint:"mutated"`
}
func NewBaseCompiler() *baseCompiler {
@@ -291,10 +282,6 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
return deps
}
func (compiler *baseCompiler) useApexNameMacro() bool {
return Bool(compiler.Properties.Use_apex_name_macro) || compiler.Properties.UseApexNameMacro
}
// Return true if the module is in the WarningAllowedProjects.
func warningsAreAllowed(subdir string) bool {
subdir += "/"
@@ -405,10 +392,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
if ctx.apexVariationName() != "" {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX__")
if compiler.useApexNameMacro() {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX_"+makeDefineString(ctx.apexVariationName())+"__")
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX_NAME__='\""+ctx.apexVariationName()+"\"'")
}
if ctx.Device() {
flags.Global.CommonFlags = append(flags.Global.CommonFlags,
fmt.Sprintf("-D__ANDROID_APEX_MIN_SDK_VERSION__=%d",
@@ -634,10 +617,6 @@ func (compiler *baseCompiler) hasSrcExt(ext string) bool {
return false
}
func (compiler *baseCompiler) uniqueApexVariations() bool {
return compiler.useApexNameMacro()
}
var invalidDefineCharRegex = regexp.MustCompile("[^a-zA-Z0-9_]")
// makeDefineString transforms a name of an APEX module into a value to be used as value for C define