• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# FIXME(Nowar): Use llvm-ndk-cc instead of clang.
2#TARGET_CC := $(TOOLCHAIN_PREBUILT_ROOT)/llvm-ndk-cc
3#TARGET_CFLAGS :=
4#
5#TARGET_CXX := $(TARGET_CC)
6#TARGET_CXXFLAGS := $(TARGET_CFLAGS) -fno-exceptions -fno-rtti -D __cplusplus
7#
8#TARGET_LD := $(TOOLCHAIN_PREBUILT_ROOT)/llvm-ndk-link
9#TARGET_LDFLAGS :=
10
11TARGET_C_INCLUDES := $(GDK_PLATFORMS_ROOT)/android-portable/arch-llvm/usr/include
12
13# Workaround before the required headers are in the above dir.
14##TARGET_C_INCLUDES += $(NDK_ROOT)/platforms/android-9/arch-arm/usr/include
15TARGET_C_INCLUDES += $(NDK_ROOT)/sources/cxx-stl/system/include
16TARGET_C_INCLUDES += $(NDK_ROOT)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.4.3/include
17#TARGET_C_INCLUDES += $(NDK_ROOT)/toolchains/mips-linux-android-4.4.3/prebuilt/linux-x86/lib/gcc/mips-linux-android/4.4.3/include
18#TARGET_C_INCLUDES += $(NDK_ROOT)/toolchains/x86-4.4.3/prebuilt/linux-x86/lib/gcc/i686-android-linux/4.4.3/include
19
20TARGET_CC       := $(OUT)/../../../host/linux-x86/bin/clang
21TARGET_CFLAGS   := -ccc-host-triple armv7-none-linux-gnueabi
22#TARGET_CFLAGS   := -ccc-host-triple mipsel-none-linux-gnueabi
23#TARGET_CFLAGS   := -ccc-host-triple i686-unknown-linux
24TARGET_CFLAGS   += -emit-llvm
25TARGET_CFLAGS += -D_MIPS_SZLONG=32  ## Workaround for arch-mips
26
27TARGET_CXX      := $(OUT)/../../../host/linux-x86/bin/clang++
28TARGET_CXXFLAGS := $(TARGET_CFLAGS) -fno-exceptions -fno-rtti -D __cplusplus -ffunction-sections -fdata-sections
29
30TARGET_LD       := $(OUT)/../../../host/linux-x86/bin/llvm-link
31TARGET_LDFLAGS  :=
32
33TARGET_STRIP    := $(OUT)/../../../host/linux-x86/bin/opt
34
35define cmd-link-bitcodes
36$(TARGET_LD) \
37  $(call host-path, $(PRIVATE_OBJECTS)) | \
38  $(TARGET_STRIP) -strip -o $(call host-path,$@)
39endef
40