diff options
Diffstat (limited to 'core/java.mk')
-rw-r--r-- | core/java.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java.mk b/core/java.mk index 1cde62b..47f7b41 100644 --- a/core/java.mk +++ b/core/java.mk @@ -5,7 +5,7 @@ # Make sure there's something to build. # It's possible to build a package that doesn't contain any classes. -ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets))) +ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)$(LOCAL_STATIC_JAVA_LIBRARIES))) $(error $(LOCAL_PATH): Target java module does not define any source or resource files) endif @@ -152,6 +152,11 @@ ifeq ($(LOCAL_RENDERSCRIPT_CC),) LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC) endif +# Turn on all warnings and warnings as errors for RS compiles. +# This can be disabled with LOCAL_RENDERSCRIPT_FLAGS := -Wno-error +renderscript_flags := -Wall -Werror +renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS) + # prepend the RenderScript system include path ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),) LOCAL_RENDERSCRIPT_INCLUDES := \ @@ -171,6 +176,7 @@ endif $(RenderScript_file_stamp): PRIVATE_RS_INCLUDES := $(LOCAL_RENDERSCRIPT_INCLUDES) $(RenderScript_file_stamp): PRIVATE_RS_CC := $(LOCAL_RENDERSCRIPT_CC) +$(RenderScript_file_stamp): PRIVATE_RS_FLAGS := $(renderscript_flags) $(RenderScript_file_stamp): PRIVATE_RS_SOURCE_FILES := $(renderscript_sources_fullpath) # By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be # automatically found by the java compiling function transform-java-to-classes.jar. @@ -214,7 +220,7 @@ $(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON) # If the module includes java code (i.e., it's not framework-res), compile it. full_classes_jar := built_dex := -ifneq (,$(strip $(all_java_sources))) +ifneq (,$(strip $(all_java_sources)$(full_static_java_libs))) # If LOCAL_BUILT_MODULE_STEM wasn't overridden by our caller, # full_classes_jar will be the same module as LOCAL_BUILT_MODULE. |