Stop using libandroid_support when unnecessary.

There isn't a libandroid_support for LP64 any more, so we need to
avoid depending on it when we don't need it.

Unlike in master, we do still need libandroid_support in libc++abi
because we still support ICS in r17, which did not have
posix_memalign.

Test: ndk/checkbuild.py && ndk/run_tests.py
Bug: None
Change-Id: Idca2507494ba73847949bbab452e91fd1c0b65d3
diff --git a/Android.mk b/Android.mk
index 247467d..ed62c10 100644
--- a/Android.mk
+++ b/Android.mk
@@ -80,7 +80,9 @@
 LOCAL_CPPFLAGS := $(libcxxabi_cppflags)
 LOCAL_CPP_FEATURES := rtti exceptions
 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
-LOCAL_STATIC_LIBRARIES := android_support
+ifeq ($(NDK_PLATFORM_NEEDS_ANDROID_SUPPORT),true)
+    LOCAL_STATIC_LIBRARIES := android_support
+endif
 
 # Unlike the platform build, ndk-build will actually perform dependency checking
 # on static libraries and topologically sort them to determine link order.