Skip to content

Commit

Permalink
AndroidKernel: Add configuration for the LLVM path
Browse files Browse the repository at this point in the history
Set LLVM path depending on the configuration done by the build system.

Change-Id: Ib4ebf15c17c2febfee44404df0d2582625f11516
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
  • Loading branch information
Raghavendra Rao Ananta committed Apr 17, 2018
1 parent 4cec0cd commit 4d2072f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions AndroidKernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ else
KERNEL_CROSS_COMPILE := $(TARGET_KERNEL_CROSS_COMPILE_PREFIX)
endif

ifeq ($(KERNEL_LLVM_SUPPORT), true)
ifeq ($(KERNEL_SD_LLVM_SUPPORT), true) #Using sd-llvm compiler
ifeq ($(shell echo $(SDCLANG_PATH_2) | head -c 1),/)
KERNEL_LLVM_BIN := $(SDCLANG_PATH_2)/clang
else
KERNEL_LLVM_BIN := $(ANDROID_BUILD_TOP)/$(SDCLANG_PATH_2)/clang
endif
$(warning "Using sdllvm" $(KERNEL_LLVM_BIN))
else
KERNEL_LLVM_BIN := $(ANDROID_BUILD_TOP)/$(CLANG) #Using aosp-llvm compiler
$(warning "Using aosp-llvm" $(KERNEL_LLVM_BIN))
endif
endif

ifeq ($(TARGET_PREBUILT_KERNEL),)

KERNEL_GCC_NOANDROID_CHK := $(shell (echo "int main() {return 0;}" | $(KERNEL_CROSS_COMPILE)gcc -E -mno-android - > /dev/null 2>&1 ; echo $$?))
Expand Down

0 comments on commit 4d2072f

Please sign in to comment.