[DEBUG] Android build in multithread ==> java build is now mono threaded
This commit is contained in:
parent
7c664f156d
commit
c35e1d3a24
@ -417,6 +417,9 @@ class Module:
|
||||
fileExt = file.split(".")[-1]
|
||||
try:
|
||||
tmp_builder = builder.get_builder(fileExt);
|
||||
multithreading = tmp_builder.get_support_multithreading()
|
||||
if multithreading == False:
|
||||
multiprocess.pool_synchrosize()
|
||||
res_file = tmp_builder.compile(file,
|
||||
package_name,
|
||||
target,
|
||||
@ -426,6 +429,8 @@ class Module:
|
||||
name = self.name,
|
||||
basic_path = self.origin_path,
|
||||
module_src = self.src)
|
||||
if multithreading == False:
|
||||
multiprocess.pool_synchrosize()
|
||||
if res_file["action"] == "add":
|
||||
list_sub_file_needed_to_build.append(res_file["file"])
|
||||
elif res_file["action"] == "path":
|
||||
@ -440,7 +445,10 @@ class Module:
|
||||
#debug.info(" " + self.name + " <== " + file);
|
||||
fileExt = file.split(".")[-1]
|
||||
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,
|
||||
package_name,
|
||||
target,
|
||||
@ -450,6 +458,8 @@ class Module:
|
||||
name = self.name,
|
||||
basic_path = self.origin_path,
|
||||
module_src = self.src)
|
||||
if multithreading == False:
|
||||
multiprocess.pool_synchrosize()
|
||||
if res_file["action"] == "add":
|
||||
list_sub_file_needed_to_build.append(res_file["file"])
|
||||
elif res_file["action"] == "path":
|
||||
|
@ -36,6 +36,13 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
|
@ -37,6 +37,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
|
@ -36,6 +36,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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):
|
||||
out = []
|
||||
for elem in data:
|
||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
|
@ -33,6 +33,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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):
|
||||
depend = []
|
||||
for elem in src:
|
||||
|
@ -33,6 +33,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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):
|
||||
depend = []
|
||||
for elem in src:
|
||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
|
@ -35,6 +35,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
|
@ -38,6 +38,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
@ -94,7 +102,7 @@ def compile(file, binary, target, depancy, flags, path, name, basic_path, module
|
||||
# Create cmd line
|
||||
cmdLine=tools.list_to_str(cmd)
|
||||
# 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}
|
||||
tools.create_directory_of_file(file_dst)
|
||||
comment = ["m", name, "<==", file]
|
||||
|
@ -38,6 +38,14 @@ def get_input_type():
|
||||
def get_output_type():
|
||||
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.
|
||||
##
|
||||
|
@ -31,3 +31,11 @@ def get_input_type():
|
||||
##
|
||||
def get_output_type():
|
||||
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