Clean LOCAL_RESOURCE_DIR paths
With LOCAL_USE_AAPT2, resource directories like a/b/../res cause problems, since ninja will canonicalize the path before creating the intermediate resource directory, so it creates <intermediates>/a/res while we give AAPT2 <intermediates>/a/b/../res, which fails to open. Bug: 37716307 Test: Switch LOCAL_USE_AAPT2:=true for TelecommUnitTests, mma Test: lunch aosp_marlin-userdebug; m -j Change-Id: Id0d167e68185a119390e7b7e3c344895e77ca0e3
This commit is contained in:
parent
5ec6bbc3d5
commit
fa7ecfb752
2 changed files with 2 additions and 0 deletions
|
@ -92,6 +92,7 @@ ifeq (,$(LOCAL_RESOURCE_DIR))
|
|||
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
|
||||
else
|
||||
need_compile_res := true
|
||||
LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
|
||||
endif
|
||||
|
||||
package_resource_overlays := $(strip \
|
||||
|
|
|
@ -39,6 +39,7 @@ need_compile_res :=
|
|||
# A static Java library needs to explicily set LOCAL_RESOURCE_DIR.
|
||||
ifdef LOCAL_RESOURCE_DIR
|
||||
need_compile_res := true
|
||||
LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
|
||||
endif
|
||||
ifdef LOCAL_USE_AAPT2
|
||||
ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)
|
||||
|
|
Loading…
Reference in a new issue