Merge "Add java modules to soong_to_convert.txt"
This commit is contained in:
commit
fedcf41cc3
|
@ -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 := $(call intermediates-dir-for,PACKAGING,soong_conversion)/soong_conv_data
|
||||||
$(SOONG_CONV_DATA):
|
$(SOONG_CONV_DATA):
|
||||||
@rm -f $@
|
@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_SCRIPT := build/tools/soong_to_convert.py
|
||||||
SOONG_TO_CONVERT := $(PRODUCT_OUT)/soong_to_convert.txt
|
SOONG_TO_CONVERT := $(PRODUCT_OUT)/soong_to_convert.txt
|
||||||
|
|
|
@ -1889,6 +1889,7 @@ SOONG_CONV.$(LOCAL_MODULE).DEPS := \
|
||||||
$(my_whole_static_libraries) \
|
$(my_whole_static_libraries) \
|
||||||
$(my_shared_libraries) \
|
$(my_shared_libraries) \
|
||||||
$(my_system_shared_libraries))
|
$(my_system_shared_libraries))
|
||||||
|
SOONG_CONV.$(LOCAL_MODULE).TYPE := native
|
||||||
SOONG_CONV := $(SOONG_CONV) $(LOCAL_MODULE)
|
SOONG_CONV := $(SOONG_CONV) $(LOCAL_MODULE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
# Common to host and target Java modules.
|
# Common to host and target Java modules.
|
||||||
|
|
||||||
|
my_soong_problems :=
|
||||||
|
|
||||||
|
ifneq ($(filter ../%,$(LOCAL_SRC_FILES)),)
|
||||||
|
my_soong_problems += dotdot_srcs
|
||||||
|
endif
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Java version
|
## Java version
|
||||||
###########################################################
|
###########################################################
|
||||||
|
@ -440,3 +446,17 @@ my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
|
||||||
my_common := COMMON
|
my_common := COMMON
|
||||||
include $(BUILD_SYSTEM)/link_type.mk
|
include $(BUILD_SYSTEM)/link_type.mk
|
||||||
endif # !LOCAL_IS_HOST_MODULE
|
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()
|
problems = dict()
|
||||||
deps = dict()
|
deps = dict()
|
||||||
reverse_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
|
problems[module] = problem
|
||||||
deps[module] = [d for d in dependencies.strip().split(' ') if d != ""]
|
deps[module] = [d for d in dependencies.strip().split(' ') if d != ""]
|
||||||
for dep in deps[module]:
|
for dep in deps[module]:
|
||||||
|
@ -94,16 +96,19 @@ def process(reader):
|
||||||
extra = ""
|
extra = ""
|
||||||
if len(problems[module]) > 0:
|
if len(problems[module]) > 0:
|
||||||
extra = " ({})".format(problems[module])
|
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]))
|
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):
|
def display(results):
|
||||||
"""Displays the results"""
|
"""Displays the results"""
|
||||||
count_header = "# Blocked on"
|
count_header = "# Blocked on"
|
||||||
count_width = len(count_header)
|
count_width = len(count_header)
|
||||||
print("{} Module (potential problems)".format(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))
|
print("{:>{}} {}".format(count, count_width, module))
|
||||||
|
|
||||||
def main(filename):
|
def main(filename):
|
||||||
|
@ -111,7 +116,15 @@ def main(filename):
|
||||||
with open(filename, 'rb') as csvfile:
|
with open(filename, 'rb') as csvfile:
|
||||||
results = process(csv.reader(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 __name__ == "__main__":
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
|
|
Loading…
Reference in New Issue