Allow explicit warnings for projects
Enabled compiler warnings by default and then modified javac command to include warnings only if a project's warning flag, LOCAL_WARNINGS_ENABLE, is set to true. Change-Id: I5111d16a862f3afaaf1dcba2f2c2b7fc072613f1
This commit is contained in:
parent
6c2df3e98b
commit
7adbf97d11
|
@ -92,6 +92,7 @@ LOCAL_NO_EMMA_INSTRUMENT:=
|
|||
LOCAL_NO_EMMA_COMPILE:=
|
||||
LOCAL_PROGUARD_ENABLED:= # '',optonly,full,custom
|
||||
LOCAL_PROGUARD_FLAGS:=
|
||||
LOCAL_WARNINGS_ENABLE:=
|
||||
|
||||
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
|
||||
# iterate over thousands of entries every time.
|
||||
|
|
|
@ -1238,7 +1238,7 @@ endef
|
|||
ifeq ($(HOST_OS),windows)
|
||||
xlint_unchecked :=
|
||||
else
|
||||
#xlint_unchecked := -Xlint:unchecked
|
||||
xlint_unchecked := -Xlint:unchecked
|
||||
endif
|
||||
|
||||
# emit-line, <word list>, <output file>
|
||||
|
@ -1308,7 +1308,8 @@ $(hide) tr ' ' '\n' < $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list
|
|||
$(hide) $(TARGET_JAVAC) -encoding ascii $(PRIVATE_BOOTCLASSPATH) \
|
||||
$(addprefix -classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
|
||||
$(PRIVATE_JAVACFLAGS) $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) $(xlint_unchecked) \
|
||||
$(PRIVATE_JAVACFLAGS) $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
|
||||
$(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
|
||||
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
|
||||
\@$(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list-uniq \
|
||||
|| ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
|
||||
|
|
Loading…
Reference in New Issue