Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d54aee57 authored by Jiyong Park's avatar Jiyong Park
Browse files

Recovery variants are built with -D__ANDROID_RECOVERY__

Recovery variant of a module is now by default built with
-D__ANDROID_RECOVERY__, thus eliminating the need to define a custom
macro to conditionally compile the module for the recovery mode.
(Of course, they can define their own macro if needed)

Bug: 63673171
Test: m -j
Change-Id: I1d1b990329793472b93c2f56080e72d690eef9ec
parent 2e674317
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -332,6 +332,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
			"-D__ANDROID_API__="+version, "-D__ANDROID_VNDK__")
	}

	if ctx.inRecovery() {
		flags.GlobalFlags = append(flags.GlobalFlags, "-D__ANDROID_RECOVERY__")
	}

	instructionSet := String(compiler.Properties.Instruction_set)
	if flags.RequiredInstructionSet != "" {
		instructionSet = flags.RequiredInstructionSet