Ensure prebuilt executables are executable
Use 'chmod +x' to make sure that they're executable, even if the source
file is not.
Change-Id: Id155f6b4ff188f5c909fd6237fd64183af264f79
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 8c14775..3d7ddd0 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -275,13 +275,17 @@
endif # LOCAL_PACKAGE_SPLITS
else # LOCAL_MODULE_CLASS != APPS
-ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
+
$(built_module) : $(my_prebuilt_src_file)
+ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(transform-prebuilt-to-target-strip-comments)
else
-$(built_module) : $(my_prebuilt_src_file)
$(transform-prebuilt-to-target)
endif
+ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES)
+ $(hide) chmod +x $@
+endif
+
endif # LOCAL_MODULE_CLASS != APPS
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)