forked from openkylin/platform_build
Add java modules to soong_to_convert.txt
Test: examine soong_to_convert.txt Change-Id: Ibb6db664238a4e98f5d8885dfb3ddc0f35d11ff6
This commit is contained in:
parent
5f03da0404
commit
3277ba34ae
|
@ -521,7 +521,7 @@ SOONG_CONV := $(sort $(SOONG_CONV))
|
|||
SOONG_CONV_DATA := $(call intermediates-dir-for,PACKAGING,soong_conversion)/soong_conv_data
|
||||
$(SOONG_CONV_DATA):
|
||||
@rm -f $@
|
||||
@$(foreach s,$(SOONG_CONV),echo "$(s),$(sort $(SOONG_CONV.$(s).PROBLEMS)),$(sort $(filter-out $(SOONG_ALREADY_CONV),$(SOONG_CONV.$(s).DEPS)))" >>$@;)
|
||||
@$(foreach s,$(SOONG_CONV),echo "$(s),$(SOONG_CONV.$(s).TYPE),$(sort $(SOONG_CONV.$(s).PROBLEMS)),$(sort $(filter-out $(SOONG_ALREADY_CONV),$(SOONG_CONV.$(s).DEPS)))" >>$@;)
|
||||
|
||||
SOONG_TO_CONVERT_SCRIPT := build/tools/soong_to_convert.py
|
||||
SOONG_TO_CONVERT := $(PRODUCT_OUT)/soong_to_convert.txt
|
||||
|
|
|
@ -1889,6 +1889,7 @@ SOONG_CONV.$(LOCAL_MODULE).DEPS := \
|
|||
$(my_whole_static_libraries) \
|
||||
$(my_shared_libraries) \
|
||||
$(my_system_shared_libraries))
|
||||
SOONG_CONV.$(LOCAL_MODULE).TYPE := native
|
||||
SOONG_CONV := $(SOONG_CONV) $(LOCAL_MODULE)
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# Common to host and target Java modules.
|
||||
|
||||
my_soong_problems :=
|
||||
|
||||
ifneq ($(filter ../%,$(LOCAL_SRC_FILES)),)
|
||||
my_soong_problems += dotdot_srcs
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
## Java version
|
||||
###########################################################
|
||||
|
@ -440,3 +446,17 @@ my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
|
|||
my_common := COMMON
|
||||
include $(BUILD_SYSTEM)/link_type.mk
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
||||
|
||||
SOONG_CONV.$(LOCAL_MODULE).PROBLEMS := \
|
||||
$(SOONG_CONV.$(LOCAL_MODULE).PROBLEMS) $(my_soong_problems)
|
||||
SOONG_CONV.$(LOCAL_MODULE).DEPS := \
|
||||
$(SOONG_CONV.$(LOCAL_MODULE).DEPS) \
|
||||
$(LOCAL_STATIC_JAVA_LIBRARIES) \
|
||||
$(LOCAL_JAVA_LIBRARIES) \
|
||||
$(LOCAL_JNI_SHARED_LIBRARIES)
|
||||
SOONG_CONV.$(LOCAL_MODULE).TYPE := java
|
||||
SOONG_CONV := $(SOONG_CONV) $(LOCAL_MODULE)
|
||||
|
||||
endif
|
||||
|
|
|
@ -76,8 +76,10 @@ def process(reader):
|
|||
problems = dict()
|
||||
deps = dict()
|
||||
reverse_deps = dict()
|
||||
module_types = dict()
|
||||
|
||||
for (module, problem, dependencies) in reader:
|
||||
for (module, module_type, problem, dependencies) in reader:
|
||||
module_types[module] = module_type
|
||||
problems[module] = problem
|
||||
deps[module] = [d for d in dependencies.strip().split(' ') if d != ""]
|
||||
for dep in deps[module]:
|
||||
|
@ -94,16 +96,19 @@ def process(reader):
|
|||
extra = ""
|
||||
if len(problems[module]) > 0:
|
||||
extra = " ({})".format(problems[module])
|
||||
results.append((count_deps(reverse_deps, module, []), module + extra))
|
||||
results.append((count_deps(reverse_deps, module, []), module + extra, module_types[module]))
|
||||
|
||||
return sorted(results, key=lambda result: (-result[0], result[1]))
|
||||
|
||||
def filter(results, module_type):
|
||||
return [x for x in results if x[2] == module_type]
|
||||
|
||||
def display(results):
|
||||
"""Displays the results"""
|
||||
count_header = "# Blocked on"
|
||||
count_width = len(count_header)
|
||||
print("{} Module (potential problems)".format(count_header))
|
||||
for (count, module) in results:
|
||||
for (count, module, module_type) in results:
|
||||
print("{:>{}} {}".format(count, count_width, module))
|
||||
|
||||
def main(filename):
|
||||
|
@ -111,7 +116,15 @@ def main(filename):
|
|||
with open(filename, 'rb') as csvfile:
|
||||
results = process(csv.reader(csvfile))
|
||||
|
||||
display(results)
|
||||
native_results = filter(results, "native")
|
||||
java_results = filter(results, "java")
|
||||
|
||||
print("native modules ready to convert")
|
||||
display(native_results)
|
||||
|
||||
print("")
|
||||
print("java modules ready to convert")
|
||||
display(java_results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
|
|
Loading…
Reference in New Issue