From 1c390cd2160a5588318936e5f27ca2b7bf895821 Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Sat, 30 Jan 2021 19:19:01 +0530 Subject: [PATCH] Replace old-style kernel headers only when building inline Change-Id: I71b891928a13771c176adc0eaa79b46503cb176f --- core/binary.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/binary.mk b/core/binary.mk index 8b88bd09fe..aa06802704 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -45,7 +45,8 @@ endif my_soong_problems := # Automatically replace the old-style kernel header include with a dependency -# on the generated_kernel_headers header library +# on the generated_kernel_headers header library when building inline +ifeq ($(INLINE_KERNEL_BUILDING),true) ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,$(LOCAL_C_INCLUDES))) LOCAL_C_INCLUDES := $(patsubst $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,,$(LOCAL_C_INCLUDES)) LOCAL_HEADER_LIBRARIES += generated_kernel_headers @@ -63,6 +64,7 @@ endif ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,$(LOCAL_ADDITIONAL_DEPENDENCIES))) LOCAL_ADDITIONAL_DEPENDENCIES := $(patsubst $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,,$(LOCAL_ADDITIONAL_DEPENDENCIES)) endif +endif # The following LOCAL_ variables will be modified in this file. # Because the same LOCAL_ variables may be used to define modules for both 1st arch and 2nd arch,