Add LOCAL_EXPORT_C_INCLUDE_DEPS
This shouldn't be necessary for most makefiles, since we add $(LOCAL_GENERATED_SOURCES) to this already included, but for prebuilts that aren't actually prebuilts (Soong modules), we need to pass dependencies so that the generated headers are built before being used. Bug: 31742855 Test: Use, inspect build-*.ninja Change-Id: I8d9f675af639d3f40780d48a016fc079a82531c2
This commit is contained in:
parent
6784a3fcdd
commit
ba6a164da7
3 changed files with 4 additions and 2 deletions
|
@ -56,6 +56,7 @@ my_c_includes := $(LOCAL_C_INCLUDES)
|
||||||
my_generated_sources := $(LOCAL_GENERATED_SOURCES)
|
my_generated_sources := $(LOCAL_GENERATED_SOURCES)
|
||||||
my_additional_dependencies := $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
my_additional_dependencies := $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||||
my_export_c_include_dirs := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
|
my_export_c_include_dirs := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
|
||||||
|
my_export_c_include_deps := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
|
||||||
|
|
||||||
ifneq (,$(foreach dir,$(COVERAGE_PATHS),$(filter $(dir)%,$(LOCAL_PATH))))
|
ifneq (,$(foreach dir,$(COVERAGE_PATHS),$(filter $(dir)%,$(LOCAL_PATH))))
|
||||||
my_native_coverage := true
|
my_native_coverage := true
|
||||||
|
@ -1727,7 +1728,7 @@ export_include_deps += $(strip \
|
||||||
$(export_includes): PRIVATE_REEXPORTED_INCLUDES := $(export_include_deps)
|
$(export_includes): PRIVATE_REEXPORTED_INCLUDES := $(export_include_deps)
|
||||||
# By adding $(my_generated_sources) it makes sure the headers get generated
|
# By adding $(my_generated_sources) it makes sure the headers get generated
|
||||||
# before any dependent source files get compiled.
|
# before any dependent source files get compiled.
|
||||||
$(export_includes) : $(my_generated_sources) $(export_include_deps)
|
$(export_includes) : $(my_export_c_include_deps) $(my_generated_sources) $(export_include_deps)
|
||||||
@echo Export includes file: $< -- $@
|
@echo Export includes file: $< -- $@
|
||||||
$(hide) mkdir -p $(dir $@) && rm -f $@.tmp && touch $@.tmp
|
$(hide) mkdir -p $(dir $@) && rm -f $@.tmp && touch $@.tmp
|
||||||
ifdef my_export_c_include_dirs
|
ifdef my_export_c_include_dirs
|
||||||
|
|
|
@ -56,6 +56,7 @@ LOCAL_CLANG_CPPFLAGS:=
|
||||||
LOCAL_CONLYFLAGS:=
|
LOCAL_CONLYFLAGS:=
|
||||||
LOCAL_RTTI_FLAG:=
|
LOCAL_RTTI_FLAG:=
|
||||||
LOCAL_C_INCLUDES:=
|
LOCAL_C_INCLUDES:=
|
||||||
|
LOCAL_EXPORT_C_INCLUDE_DEPS:=
|
||||||
LOCAL_EXPORT_C_INCLUDE_DIRS:=
|
LOCAL_EXPORT_C_INCLUDE_DIRS:=
|
||||||
LOCAL_LDFLAGS:=
|
LOCAL_LDFLAGS:=
|
||||||
LOCAL_CLANG_LDFLAGS:=
|
LOCAL_CLANG_LDFLAGS:=
|
||||||
|
|
|
@ -126,7 +126,7 @@ else # my_strip_module and my_pack_module_relocations not true
|
||||||
ifdef prebuilt_module_is_a_library
|
ifdef prebuilt_module_is_a_library
|
||||||
export_includes := $(intermediates)/export_includes
|
export_includes := $(intermediates)/export_includes
|
||||||
$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
|
$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
|
||||||
$(export_includes) :
|
$(export_includes): $(LOCAL_EXPORT_C_INCLUDE_DEPS)
|
||||||
@echo Export includes file: $< -- $@
|
@echo Export includes file: $< -- $@
|
||||||
$(hide) mkdir -p $(dir $@) && rm -f $@
|
$(hide) mkdir -p $(dir $@) && rm -f $@
|
||||||
ifdef LOCAL_EXPORT_C_INCLUDE_DIRS
|
ifdef LOCAL_EXPORT_C_INCLUDE_DIRS
|
||||||
|
|
Loading…
Reference in a new issue