Remove legacy NDK code.

am: fac114b9a5

Change-Id: I3f6917f8accb5b0139dc476efdd6491c2ed01cb0
This commit is contained in:
Dan Albert
2018-11-28 08:29:32 -08:00
committed by android-build-merger

View File

@@ -299,6 +299,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
} }
if ctx.useSdk() { if ctx.useSdk() {
// TODO: Switch to --sysroot.
// The NDK headers are installed to a common sysroot. While a more // The NDK headers are installed to a common sysroot. While a more
// typical Soong approach would be to only make the headers for the // typical Soong approach would be to only make the headers for the
// library you're using available, we're trying to emulate the NDK // library you're using available, we're trying to emulate the NDK
@@ -307,6 +308,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
"-isystem "+getCurrentIncludePath(ctx).String(), "-isystem "+getCurrentIncludePath(ctx).String(),
"-isystem "+getCurrentIncludePath(ctx).Join(ctx, config.NDKTriple(tc)).String()) "-isystem "+getCurrentIncludePath(ctx).Join(ctx, config.NDKTriple(tc)).String())
// TODO: Migrate to API suffixed triple?
// Traditionally this has come from android/api-level.h, but with the // Traditionally this has come from android/api-level.h, but with the
// libc headers unified it must be set by the build system since we // libc headers unified it must be set by the build system since we
// don't have per-API level copies of that header now. // don't have per-API level copies of that header now.
@@ -316,14 +318,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
} }
flags.GlobalFlags = append(flags.GlobalFlags, flags.GlobalFlags = append(flags.GlobalFlags,
"-D__ANDROID_API__="+version) "-D__ANDROID_API__="+version)
// Until the full NDK has been migrated to using ndk_headers, we still
// need to add the legacy sysroot includes to get the full set of
// headers.
legacyIncludes := fmt.Sprintf(
"prebuilts/ndk/current/platforms/android-%s/arch-%s/usr/include",
ctx.sdkVersion(), ctx.Arch().ArchType.String())
flags.SystemIncludeFlags = append(flags.SystemIncludeFlags, "-isystem "+legacyIncludes)
} }
if ctx.useVndk() { if ctx.useVndk() {