[DEBUG] Android build in multithread ==> java build is now mono threaded
This commit is contained in:
parent
7c664f156d
commit
c35e1d3a24
@ -332,7 +332,7 @@ class Module:
|
|||||||
# call here to build the module
|
# call here to build the module
|
||||||
def build(self, target, package_name):
|
def build(self, target, package_name):
|
||||||
# ckeck if not previously build
|
# ckeck if not previously build
|
||||||
if target.is_module_build(self.name)==True:
|
if target.is_module_build(self.name) == True:
|
||||||
if self.sub_heritage_list == None:
|
if self.sub_heritage_list == None:
|
||||||
self.local_heritage = heritage.heritage(self, target)
|
self.local_heritage = heritage.heritage(self, target)
|
||||||
return self.sub_heritage_list
|
return self.sub_heritage_list
|
||||||
@ -417,6 +417,9 @@ class Module:
|
|||||||
fileExt = file.split(".")[-1]
|
fileExt = file.split(".")[-1]
|
||||||
try:
|
try:
|
||||||
tmp_builder = builder.get_builder(fileExt);
|
tmp_builder = builder.get_builder(fileExt);
|
||||||
|
multithreading = tmp_builder.get_support_multithreading()
|
||||||
|
if multithreading == False:
|
||||||
|
multiprocess.pool_synchrosize()
|
||||||
res_file = tmp_builder.compile(file,
|
res_file = tmp_builder.compile(file,
|
||||||
package_name,
|
package_name,
|
||||||
target,
|
target,
|
||||||
@ -426,6 +429,8 @@ class Module:
|
|||||||
name = self.name,
|
name = self.name,
|
||||||
basic_path = self.origin_path,
|
basic_path = self.origin_path,
|
||||||
module_src = self.src)
|
module_src = self.src)
|
||||||
|
if multithreading == False:
|
||||||
|
multiprocess.pool_synchrosize()
|
||||||
if res_file["action"] == "add":
|
if res_file["action"] == "add":
|
||||||
list_sub_file_needed_to_build.append(res_file["file"])
|
list_sub_file_needed_to_build.append(res_file["file"])
|
||||||
elif res_file["action"] == "path":
|
elif res_file["action"] == "path":
|
||||||
@ -440,7 +445,10 @@ class Module:
|
|||||||
#debug.info(" " + self.name + " <== " + file);
|
#debug.info(" " + self.name + " <== " + file);
|
||||||
fileExt = file.split(".")[-1]
|
fileExt = file.split(".")[-1]
|
||||||
try:
|
try:
|
||||||
tmp_builder = builder.get_builder(fileExt);
|
tmp_builder = builder.get_builder(fileExt)
|
||||||
|
multithreading = tmp_builder.get_support_multithreading()
|
||||||
|
if multithreading == False:
|
||||||
|
multiprocess.pool_synchrosize()
|
||||||
res_file = tmp_builder.compile(file,
|
res_file = tmp_builder.compile(file,
|
||||||
package_name,
|
package_name,
|
||||||
target,
|
target,
|
||||||
@ -450,6 +458,8 @@ class Module:
|
|||||||
name = self.name,
|
name = self.name,
|
||||||
basic_path = self.origin_path,
|
basic_path = self.origin_path,
|
||||||
module_src = self.src)
|
module_src = self.src)
|
||||||
|
if multithreading == False:
|
||||||
|
multiprocess.pool_synchrosize()
|
||||||
if res_file["action"] == "add":
|
if res_file["action"] == "add":
|
||||||
list_sub_file_needed_to_build.append(res_file["file"])
|
list_sub_file_needed_to_build.append(res_file["file"])
|
||||||
elif res_file["action"] == "path":
|
elif res_file["action"] == "path":
|
||||||
|
@ -36,6 +36,13 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["", "exe", "bin"]
|
return ["", "exe", "bin"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to link an executable.
|
## @brief Commands for running gcc to link an executable.
|
||||||
|
@ -37,6 +37,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["o"]
|
return ["o"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return True
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to compile a C file in object file.
|
## @brief Commands for running gcc to compile a C file in object file.
|
||||||
##
|
##
|
||||||
|
@ -36,6 +36,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["o"]
|
return ["o"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return True
|
||||||
|
|
||||||
def remove_element(data, to_remove):
|
def remove_element(data, to_remove):
|
||||||
out = []
|
out = []
|
||||||
for elem in data:
|
for elem in data:
|
||||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["jar"]
|
return ["jar"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to link a shared library.
|
## @brief Commands for running gcc to link a shared library.
|
||||||
##
|
##
|
||||||
|
@ -33,6 +33,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["class"]
|
return ["class"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
def create_dependency_files(target, src, heritage_src, basic_path):
|
def create_dependency_files(target, src, heritage_src, basic_path):
|
||||||
depend = []
|
depend = []
|
||||||
for elem in src:
|
for elem in src:
|
||||||
|
@ -33,6 +33,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["h"]
|
return ["h"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
def create_dependency_files(target, src, heritage_src, basic_path):
|
def create_dependency_files(target, src, heritage_src, basic_path):
|
||||||
depend = []
|
depend = []
|
||||||
for elem in src:
|
for elem in src:
|
||||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["so", "dynlib", "dll"]
|
return ["so", "dynlib", "dll"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to link a shared library.
|
## @brief Commands for running gcc to link a shared library.
|
||||||
##
|
##
|
||||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["a"]
|
return ["a"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return False
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running ar.
|
## @brief Commands for running ar.
|
||||||
##
|
##
|
||||||
|
@ -38,6 +38,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["o"]
|
return ["o"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return True
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to compile a m file in object file.
|
## @brief Commands for running gcc to compile a m file in object file.
|
||||||
##
|
##
|
||||||
@ -94,7 +102,7 @@ def compile(file, binary, target, depancy, flags, path, name, basic_path, module
|
|||||||
# Create cmd line
|
# Create cmd line
|
||||||
cmdLine=tools.list_to_str(cmd)
|
cmdLine=tools.list_to_str(cmd)
|
||||||
# check the dependency for this file :
|
# check the dependency for this file :
|
||||||
if False==depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine):
|
if depend.need_re_build(file_dst, file_src, file_depend, file_cmd, cmdLine) == False:
|
||||||
return {"action":"add", "file":file_dst}
|
return {"action":"add", "file":file_dst}
|
||||||
tools.create_directory_of_file(file_dst)
|
tools.create_directory_of_file(file_dst)
|
||||||
comment = ["m", name, "<==", file]
|
comment = ["m", name, "<==", file]
|
||||||
|
@ -38,6 +38,14 @@ def get_input_type():
|
|||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["o"]
|
return ["o"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return True
|
||||||
|
|
||||||
##
|
##
|
||||||
## @brief Commands for running gcc to compile a m++ file in object file.
|
## @brief Commands for running gcc to compile a m++ file in object file.
|
||||||
##
|
##
|
||||||
|
@ -31,3 +31,11 @@ def get_input_type():
|
|||||||
##
|
##
|
||||||
def get_output_type():
|
def get_output_type():
|
||||||
return ["o"]
|
return ["o"]
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief Get builder support multi-threading or not
|
||||||
|
## @return True Multithreading supported
|
||||||
|
## @return False Multithreading NOT supported
|
||||||
|
##
|
||||||
|
def get_support_multithreading():
|
||||||
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user