From 3d29315c1ebcfaef1609d0c9b9c3a03899c78f13 Mon Sep 17 00:00:00 2001 From: Rashed Abdel-Tawab Date: Mon, 6 Aug 2018 22:01:29 -0700 Subject: [PATCH] kernel: Remove ANDROID_BUILD_TOP This is no longer used in Pie, so just get the top dir of the build system and use that. Change-Id: I4bc416e471ddeb9810960f4ddcd647b20aa531c2 --- build/tasks/kernel.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index 8965b1c1..5025218e 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -230,15 +230,17 @@ KERNEL_TOOLCHAIN_PATH := $(KERNEL_TOOLCHAIN)/$(KERNEL_TOOLCHAIN_PREFIX) endif endif +BUILD_TOP := $(shell pwd) + ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true) ifneq ($(TARGET_KERNEL_CLANG_VERSION),) # Find the clang-* directory containing the specified version - KERNEL_CLANG_VERSION := $(shell find $(ANDROID_BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/ -name AndroidVersion.txt -exec grep -l $(TARGET_KERNEL_CLANG_VERSION) "{}" \; | sed -e 's|/AndroidVersion.txt$$||g;s|^.*/||g') + KERNEL_CLANG_VERSION := $(shell find $(BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/ -name AndroidVersion.txt -exec grep -l $(TARGET_KERNEL_CLANG_VERSION) "{}" \; | sed -e 's|/AndroidVersion.txt$$||g;s|^.*/||g') else # Use the default version of clang if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config KERNEL_CLANG_VERSION := $(LLVM_PREBUILTS_VERSION) endif - TARGET_KERNEL_CLANG_PATH ?= $(ANDROID_BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/bin + TARGET_KERNEL_CLANG_PATH ?= $(BUILD_TOP)/prebuilts/clang/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/bin ifeq ($(KERNEL_ARCH),arm64) KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=aarch64-linux-gnu- else ifeq ($(KERNEL_ARCH),arm) @@ -253,7 +255,7 @@ ifneq ($(USE_CCACHE),) ccache := $(shell which ccache) ifeq ($(ccache),) - ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache + ccache := $(BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache # Check that the executable is here. ccache := $(strip $(wildcard $(ccache))) endif @@ -270,7 +272,7 @@ endif ccache = ifeq ($(HOST_OS),darwin) - MAKE_FLAGS += C_INCLUDE_PATH=$(ANDROID_BUILD_TOP)/external/elfutils/libelf:/usr/local/opt/openssl/include + MAKE_FLAGS += C_INCLUDE_PATH=$(BUILD_TOP)/external/elfutils/libelf:/usr/local/opt/openssl/include MAKE_FLAGS += LIBRARY_PATH=/usr/local/opt/openssl/lib endif