Merge "Revert "Add __ANDROID_APEX_<NAME>__ for apex variants""
This commit is contained in:
@@ -320,9 +320,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
}
|
||||
|
||||
if ctx.apexName() != "" {
|
||||
// TODO(b/142582178): remove the value for __ANDROID_APEX__
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, "-D__ANDROID_APEX__="+ctx.apexName())
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, "-D__ANDROID_APEX_"+makeDefineString(ctx.apexName())+"__")
|
||||
}
|
||||
|
||||
instructionSet := String(compiler.Properties.Instruction_set)
|
||||
@@ -530,12 +528,6 @@ func (compiler *baseCompiler) hasSrcExt(ext string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// makeDefineString transforms a name of an APEX module into a value to be used as value for C define
|
||||
// For example, com.android.foo => COM_ANDROID_FOO
|
||||
func makeDefineString(name string) string {
|
||||
return strings.ReplaceAll(strings.ToUpper(name), ".", "_")
|
||||
}
|
||||
|
||||
var gnuToCReplacer = strings.NewReplacer("gnu", "c")
|
||||
|
||||
func ndkPathDeps(ctx ModuleContext) android.Paths {
|
||||
|
Reference in New Issue
Block a user