Skip to content

Commit

Permalink
ANDROID_BUILD_TOP is deprecated.
Browse files Browse the repository at this point in the history
ANDROID_BUILD_TOP variable is deprecated and thus all paths are assumed
to be relative to the top directory. However, this is causing problem
when some of the paths are constructed in the Android build system and
used in the non-Android makefiles that are usually executed NOT at the
top directory but at a sub directory using -C option. As a result, the
relative path from the Android build system become invalid in the
non-Android makefiles.

In order to overcome the restriction, ANDROID_BUILD_TOP is manually
constructed when invoking the non-Android makefiles by using $$(pwd).
The non-Android makefiles are expected to construct the absolute path
by prepending ANDROID_BUILD_TOP to any path that came from the Android
build system.

Change-Id: Ia2e380cf329f56c8d36ad8dbde90d6a655f9509a
Signed-off-by: Divya Sharma <divyash@codeaurora.org>
Signed-off-by: Bruce Levy <blevy@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
  • Loading branch information
Divya Sharma authored and Prasad Sodagudi committed Oct 27, 2018
1 parent 9aaa4fc commit 12b9364
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AndroidKernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ TARGET_KERNEL_CROSS_COMPILE_PREFIX := $(strip $(TARGET_KERNEL_CROSS_COMPILE_PREF
ifeq ($(TARGET_KERNEL_CROSS_COMPILE_PREFIX),)
KERNEL_CROSS_COMPILE := arm-eabi-
else
KERNEL_CROSS_COMPILE := $(TARGET_KERNEL_CROSS_COMPILE_PREFIX)
KERNEL_CROSS_COMPILE := $(shell pwd)/$(TARGET_TOOLS_PREFIX)
endif

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

0 comments on commit 12b9364

Please sign in to comment.