[Lldb-commits] [lldb] r316985 - Android.rules: build with "unified android headers"

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 31 03:33:03 PDT 2017


Author: labath
Date: Tue Oct 31 03:33:03 2017
New Revision: 316985

URL: http://llvm.org/viewvc/llvm-project?rev=316985&view=rev
Log:
Android.rules: build with "unified android headers"

Unified headers will be the only way to build applications in NDK r16,
and it also works with NDK r15.

This also bumps the minimum supported android version to 16.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules?rev=316985&r1=316984&r2=316985&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules Tue Oct 31 03:33:03 2017
@@ -8,7 +8,7 @@ else ifeq "$(ARCH)" "i386"
 	API_LEVEL := 17
 else
 	# lowest supported 32-bit API level
-	API_LEVEL := 9
+	API_LEVEL := 16
 endif
 
 ifeq "$(ARCH)" "arm"
@@ -18,8 +18,8 @@ ifeq "$(ARCH)" "arm"
 	ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
 else ifeq "$(ARCH)" "aarch64"
 	SYSROOT_ARCH := arm64
-	TRIPLE := aarch64-none-linux-android
 	STL_ARCH := arm64-v8a
+	TRIPLE := aarch64-none-linux-android
 else ifeq "$(ARCH)" "i386"
 	SYSROOT_ARCH := x86
 	STL_ARCH := x86
@@ -70,7 +70,9 @@ ifeq "$(findstring clang,$(CC))" "clang"
 	ARCH_LDFLAGS += -target $(TRIPLE) -gcc-toolchain $(GCC_TOOLCHAIN)
 endif
 
-ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH)
+ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/sysroot \
+	-isystem $(NDK_ROOT)/sysroot/usr/include/$(TOOL_PREFIX) \
+	-D__ANDROID_API__=$(API_LEVEL)
 ARCH_LDFLAGS += --sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) -lm
 
 ifeq (1,$(USE_LIBCPP))




More information about the lldb-commits mailing list