forked from openkylin/platform_build
Add support for LOCAL_JAVACFLAGS
The Dalvik core libraries team would like to start making warnings errors in certain packages by definition LOCAL_JAVACFLAGS. This will allow easier debuging of warnings in other packages by supplying "-Xlint:..." options.
This commit is contained in:
parent
f397ea2f81
commit
f184a0f26d
|
@ -704,6 +704,11 @@ automatically generated and then linked in when your module is built.
|
|||
See the <a href="#custom-tools">Custom Tools</a> template makefile for an
|
||||
example.</p>
|
||||
|
||||
<h4>LOCAL_JAVACFLAGS</h4>
|
||||
<p>If you have additional flags to pass into the javac compiler, add
|
||||
them here. For example:</p>
|
||||
<p><code>LOCAL_JAVACFLAGS += -Xlint:deprecation</code></p>
|
||||
|
||||
<h4>LOCAL_JAVA_LIBRARIES</h4>
|
||||
<p>When linking Java apps and libraries, <code>LOCAL_JAVA_LIBRARIES</code>
|
||||
specifies which sets of java classes to include. Currently there are
|
||||
|
|
|
@ -51,6 +51,7 @@ LOCAL_PREBUILT_JAVA_LIBRARIES:=
|
|||
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=
|
||||
LOCAL_PREBUILT_STRIP_COMMENTS:=
|
||||
LOCAL_INTERMEDIATE_SOURCES:=
|
||||
LOCAL_JAVACFLAGS:=
|
||||
LOCAL_JAVA_LIBRARIES:=
|
||||
LOCAL_NO_STANDARD_LIBRARIES:=
|
||||
LOCAL_CLASSPATH:=
|
||||
|
|
|
@ -671,6 +671,7 @@ define dump-module-variables
|
|||
@echo PRIVATE_ARFLAGS=$(PRIVATE_ARFLAGS);
|
||||
@echo PRIVATE_AAPT_FLAGS=$(PRIVATE_AAPT_FLAGS);
|
||||
@echo PRIVATE_DX_FLAGS=$(PRIVATE_DX_FLAGS);
|
||||
@echo PRIVATE_JAVACFLAGS=$(PRIVATE_JAVACFLAGS);
|
||||
@echo PRIVATE_JAVA_LIBRARIES=$(PRIVATE_JAVA_LIBRARIES);
|
||||
@echo PRIVATE_ALL_SHARED_LIBRARIES=$(PRIVATE_ALL_SHARED_LIBRARIES);
|
||||
@echo PRIVATE_ALL_STATIC_LIBRARIES=$(PRIVATE_ALL_STATIC_LIBRARIES);
|
||||
|
@ -1308,7 +1309,7 @@ $(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)))) \
|
||||
$(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) $(xlint_unchecked) \
|
||||
$(PRIVATE_JAVACFLAGS) $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) $(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 )
|
||||
|
@ -1446,7 +1447,7 @@ $(call dump-words-to-file,$(sort\
|
|||
$(PRIVATE_JAVA_SOURCES)),\
|
||||
$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq)
|
||||
$(hide) $(HOST_JAVAC) -encoding ascii -g \
|
||||
$(xlint_unchecked) \
|
||||
$(PRIVATE_JAVACFLAGS) $(xlint_unchecked) \
|
||||
$(addprefix -classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
|
||||
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR)\
|
||||
|
|
|
@ -25,5 +25,6 @@ LOCAL_BUILT_MODULE_STEM := javalib.jar
|
|||
|
||||
include $(BUILD_SYSTEM)/base_rules.mk
|
||||
|
||||
$(LOCAL_BUILT_MODULE): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
|
||||
$(LOCAL_BUILT_MODULE): $(java_sources) $(java_resource_sources) $(full_java_lib_deps)
|
||||
$(transform-host-java-to-package)
|
||||
|
|
|
@ -135,6 +135,7 @@ ALL_MODULES.$(LOCAL_MODULE).STUBS := $(full_classes_stubs_jar)
|
|||
# This intentionally depends on java_sources, not all_java_sources.
|
||||
# Deps for generated source files must be handled separately,
|
||||
# via deps on the target that generates the sources.
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
|
||||
$(full_classes_compiled_jar): $(java_sources) $(full_java_lib_deps)
|
||||
$(transform-java-to-classes.jar)
|
||||
|
||||
|
|
Loading…
Reference in New Issue