From c3247296920b4a6d43631546bbaa158a01848576 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 7 Aug 2019 10:24:28 -0700 Subject: [PATCH] -D__ANDROID_NDK__ for SDK builds. The NDK is built like this. Having it for app builds within the Android build system allows us to distinguish platform code from app code. This is specifically to distinguish AIDL interfaces using libbinder_ndk. 'myBinder-ndk_platform' libs will use additional functionality that 'myBinder-ndk' libs won't use (in the future, these may be separate variants with the same name, see b/121157555). Bug: 136027762 Test: using this to distinuish code in NDK vs platform code Change-Id: I4de6f2e066982e7573ffd28cda44407d9e5648e4 --- cc/compiler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cc/compiler.go b/cc/compiler.go index ffb6ad210..85ff400ab 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -309,6 +309,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps flags.SystemIncludeFlags = append(flags.SystemIncludeFlags, "-isystem "+getCurrentIncludePath(ctx).String(), "-isystem "+getCurrentIncludePath(ctx).Join(ctx, config.NDKTriple(tc)).String()) + flags.GlobalFlags = append(flags.GlobalFlags, "-D__ANDROID_NDK__") } if ctx.useVndk() {