Merge "Add an __ANDROID_RAMDISK__ preprocessor define." am: 7309742728 am: 6a3b60969e am: 13f34bef8d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1989090

Change-Id: Ibbd1c1130c90f28aa5822fe73c907d55bfd14df1
This commit is contained in:
David Anderson 2022-02-19 00:56:11 +00:00 committed by Automerger Merge Worker
commit a480cc78ef

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__")
}
if ctx.inRecovery() || ctx.inRamdisk() || ctx.inVendorRamdisk() {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_RAMDISK__")
}
if ctx.apexVariationName() != "" {
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX__")
if ctx.Device() {