@@ -1208,28 +1208,6 @@ def build_ccache(tool):
12081208 return success
12091209
12101210
1211- # Emscripten asm.js optimizer build scripts:
1212- def optimizer_build_root (tool ):
1213- build_root = tool .installation_path ().strip ()
1214- if build_root .endswith ('/' ) or build_root .endswith ('\\ ' ):
1215- build_root = build_root [:- 1 ]
1216- generator_prefix = cmake_generator_prefix ()
1217- build_root = build_root + generator_prefix + '_' + str (tool .bitness ) + 'bit_optimizer'
1218- return build_root
1219-
1220-
1221- def uninstall_optimizer (tool ):
1222- debug_print ('uninstall_optimizer(' + str (tool ) + ')' )
1223- build_root = optimizer_build_root (tool )
1224- print ("Deleting path '" + build_root + "'" )
1225- remove_tree (build_root )
1226-
1227-
1228- def is_optimizer_installed (tool ):
1229- build_root = optimizer_build_root (tool )
1230- return os .path .exists (build_root )
1231-
1232-
12331211# Finds the newest installed version of a given tool
12341212def find_latest_installed_tool (name ):
12351213 for t in reversed (tools ):
@@ -1330,29 +1308,6 @@ def emscripten_npm_install(tool, directory):
13301308 return True
13311309
13321310
1333- def emscripten_post_install (tool ):
1334- debug_print ('emscripten_post_install(' + str (tool ) + ')' )
1335- src_root = os .path .join (tool .installation_path (), 'tools' , 'optimizer' )
1336- build_root = optimizer_build_root (tool )
1337- build_type = decide_cmake_build_type (tool )
1338-
1339- # Configure
1340- cmake_generator , args = get_generator_and_config_args (tool )
1341-
1342- success = cmake_configure (cmake_generator , build_root , src_root , build_type , args )
1343- if not success :
1344- return False
1345-
1346- # Make
1347- success = make_build (build_root , build_type )
1348- if not success :
1349- return False
1350-
1351- success = emscripten_npm_install (tool , tool .installation_path ())
1352-
1353- return True
1354-
1355-
13561311# Binaryen build scripts:
13571312def binaryen_build_root (tool ):
13581313 build_root = tool .installation_path ().strip ()
@@ -1757,9 +1712,7 @@ def is_installed(self, skip_version_check=False):
17571712 content_exists = False
17581713
17591714 if hasattr (self , 'custom_is_installed_script' ):
1760- if self .custom_is_installed_script == 'is_optimizer_installed' :
1761- return is_optimizer_installed (self )
1762- elif self .custom_is_installed_script == 'is_binaryen_installed' :
1715+ if self .custom_is_installed_script == 'is_binaryen_installed' :
17631716 return is_binaryen_installed (self )
17641717 else :
17651718 raise Exception ('Unknown custom_is_installed_script directive "' + self .custom_is_installed_script + '"!' )
@@ -1910,9 +1863,7 @@ def install_tool(self):
19101863 exit_with_error ("installation failed!" )
19111864
19121865 if hasattr (self , 'custom_install_script' ):
1913- if self .custom_install_script == 'emscripten_post_install' :
1914- success = emscripten_post_install (self )
1915- elif self .custom_install_script == 'emscripten_npm_install' :
1866+ if self .custom_install_script == 'emscripten_npm_install' :
19161867 success = emscripten_npm_install (self , self .installation_path ())
19171868 elif self .custom_install_script in ('build_llvm' , 'build_ninja' , 'build_ccache' ):
19181869 # 'build_llvm' is a special one that does the download on its
@@ -1962,9 +1913,7 @@ def uninstall(self):
19621913 return
19631914 print ("Uninstalling tool '" + str (self ) + "'.." )
19641915 if hasattr (self , 'custom_uninstall_script' ):
1965- if self .custom_uninstall_script == 'uninstall_optimizer' :
1966- uninstall_optimizer (self )
1967- elif self .custom_uninstall_script == 'uninstall_binaryen' :
1916+ if self .custom_uninstall_script == 'uninstall_binaryen' :
19681917 uninstall_binaryen (self )
19691918 else :
19701919 raise Exception ('Unknown custom_uninstall_script directive "' + self .custom_uninstall_script + '"!' )
0 commit comments