Merge "Do not chmod the symlink target when a prebuilt binary is symlinked."

This commit is contained in:
Martin Stjernholm 2020-09-28 13:02:33 +00:00 committed by Gerrit Code Review
commit 0de50208a3
2 changed files with 10 additions and 4 deletions

View File

@ -150,11 +150,14 @@ endif
$(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE) $(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE)
ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true) ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true)
$(copy-or-link-prebuilt-to-target) $(copy-or-link-prebuilt-to-target)
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
[ -x $@ ] || $(call echo-error,$@,Target of symlink is not executable)
endif
else else
$(transform-prebuilt-to-target) $(transform-prebuilt-to-target)
endif ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
$(hide) chmod +x $@ $(hide) chmod +x $@
endif
endif endif
ifndef LOCAL_IS_HOST_MODULE ifndef LOCAL_IS_HOST_MODULE

View File

@ -59,11 +59,14 @@ endif
$(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE) $(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE)
ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true) ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true)
$(copy-or-link-prebuilt-to-target) $(copy-or-link-prebuilt-to-target)
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
[ -x $@ ] || $(call echo-error,$@,Target of symlink is not executable)
endif
else else
$(transform-prebuilt-to-target) $(transform-prebuilt-to-target)
endif ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
$(hide) chmod +x $@ $(hide) chmod +x $@
endif
endif endif
ifndef LOCAL_IS_HOST_MODULE ifndef LOCAL_IS_HOST_MODULE