Expand local file path to allow users to fix ndk-build
local-source-file-path does not expand to correct file paths in some circumstances so some users override it. Therefore flatbuffers_header_build_rules has been modified to generate rules that expand LOCAL_SRC_FILES values with flatbuffers_header_build_rules. Also, this overrides local-source-file-path to allow nest projects to build when NDK_OUT is set. Tested: Verified a dependent project continues to build. Bug: 25673744 Change-Id: Ic90186fe96d6e4533f9f3b7ca9ef78084de08a7e
This commit is contained in:
parent
4f96603e12
commit
ef53aebf9e
|
@ -192,7 +192,7 @@ $(foreach schema,$(1),\
|
|||
$(call flatbuffers_header_build_rule,\
|
||||
$(schema),$(strip $(2)),$(strip $(3)),$(strip $(4))))\
|
||||
$(foreach src,$(strip $(5)),\
|
||||
$(eval $(PORTABLE_LOCAL_PATH)$$(src): \
|
||||
$(eval $(call local-source-file-path,$(src)): \
|
||||
$(foreach schema,$(strip $(1)),\
|
||||
$(call flatbuffers_fbs_to_h,$(strip $(2)),$(strip $(3)),$(schema)))))\
|
||||
$(if $(6),\
|
||||
|
@ -201,11 +201,18 @@ $(if $(6),\
|
|||
$(call flatbuffers_fbs_to_h,$(strip $(2)),$(strip $(3)),$(schema)))),)\
|
||||
$(if $(7),\
|
||||
$(foreach src,$(strip $(5)),\
|
||||
$(eval $(PORTABLE_LOCAL_PATH)$$(src): $(strip $(7)))),)\
|
||||
$(eval $(call local-source-file-path,$(src)): $(strip $(7)))),)\
|
||||
$(if $(7),\
|
||||
$(foreach dependency,$(strip $(7)),\
|
||||
$(eval $(6): $(dependency))),)
|
||||
endef
|
||||
|
||||
# TODO: Remove when the LOCAL_PATH expansion bug in the NDK is fixed.
|
||||
# Override the default behavior of local-source-file-path to workaround
|
||||
# a bug which prevents the build of deeply nested projects when NDK_OUT is
|
||||
# set.
|
||||
local-source-file-path = \
|
||||
$(if $(call host-path-is-absolute,$1),$1,$(realpath $(LOCAL_PATH)/$1))
|
||||
|
||||
endif # FLATBUFFERS_INCLUDE_MK_
|
||||
|
||||
|
|
Loading…
Reference in New Issue