Merge "Add an __ANDROID_RAMDISK__ preprocessor define."

This commit is contained in:
David Anderson 2022-02-18 23:29:27 +00:00 committed by Gerrit Code Review
commit 7309742728

View file

@ -406,6 +406,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_RECOVERY__") flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_RECOVERY__")
} }
if ctx.inRecovery() || ctx.inRamdisk() || ctx.inVendorRamdisk() {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_RAMDISK__")
}
if ctx.apexVariationName() != "" { if ctx.apexVariationName() != "" {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX__") flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX__")
if ctx.Device() { if ctx.Device() {