From d8984b2a9d526229e3bdb304981e6fa2ea928328 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 20 Jul 2020 17:33:54 -0700 Subject: [PATCH] Rename build_llvm_monorepo to just build_llvm. NFC. (#560) And build_llvm_fastcomp to just build_fastcomp (matches its name in the json file. --- emsdk.py | 19 ++++++++++--------- emsdk_manifest.json | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/emsdk.py b/emsdk.py index f680a63..dc6892a 100755 --- a/emsdk.py +++ b/emsdk.py @@ -1038,8 +1038,8 @@ def xcode_sdk_version(): return subprocess.checkplatform.mac_ver()[0].split('.') -def build_llvm_fastcomp(tool): - debug_print('build_llvm_fastcomp(' + str(tool) + ')') +def build_fastcomp(tool): + debug_print('build_fastcomp(' + str(tool) + ')') fastcomp_root = tool.installation_path() fastcomp_src_root = os.path.join(fastcomp_root, 'src') # Does this tool want to be git cloned from github? @@ -1123,9 +1123,10 @@ def build_llvm_fastcomp(tool): return success -# LLVM git source tree migrated to a single repository instead of multiple ones, build_llvm_monorepo() builds via that repository structure -def build_llvm_monorepo(tool): - debug_print('build_llvm_monorepo(' + str(tool) + ')') +# LLVM git source tree migrated to a single repository instead of multiple +# ones, build_llvm() builds via that repository structure +def build_llvm(tool): + debug_print('build_llvm(' + str(tool) + ')') llvm_root = tool.installation_path() llvm_src_root = os.path.join(llvm_root, 'src') success = git_clone_checkout_and_pull(tool.download_url(), llvm_src_root, tool.git_branch) @@ -1841,9 +1842,9 @@ class Tool(object): url = self.download_url() if hasattr(self, 'custom_install_script') and self.custom_install_script == 'build_fastcomp': - success = build_llvm_fastcomp(self) - elif hasattr(self, 'custom_install_script') and self.custom_install_script == 'build_llvm_monorepo': - success = build_llvm_monorepo(self) + success = build_fastcomp(self) + elif hasattr(self, 'custom_install_script') and self.custom_install_script == 'build_llvm': + success = build_llvm(self) elif hasattr(self, 'git_branch'): success = git_clone_checkout_and_pull(url, self.installation_path(), self.git_branch) elif url.endswith(ARCHIVE_SUFFIXES): @@ -1869,7 +1870,7 @@ class Tool(object): success = emscripten_post_install(self) elif self.custom_install_script == 'emscripten_npm_install': success = emscripten_npm_install(self, self.installation_path()) - elif self.custom_install_script in ('build_fastcomp', 'build_llvm_monorepo'): + elif self.custom_install_script in ('build_fastcomp', 'build_llvm'): # 'build_fastcomp' is a special one that does the download on its # own, others do the download manually. pass diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 9815cdf..970c0cb 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -7,7 +7,7 @@ "install_path": "llvm/git", "git_branch": "master", "url": "https://github.com/llvm/llvm-project.git", - "custom_install_script": "build_llvm_monorepo", + "custom_install_script": "build_llvm", "only_supports_wasm": true, "activated_path": "%installation_dir%/%fastcomp_build_bin_dir%", "activated_cfg": "LLVM_ROOT='%installation_dir%/%fastcomp_build_bin_dir%'", @@ -21,7 +21,7 @@ "install_path": "llvm/git", "git_branch": "master", "url": "https://github.com/llvm/llvm-project.git", - "custom_install_script": "build_llvm_monorepo", + "custom_install_script": "build_llvm", "only_supports_wasm": true, "activated_path": "%installation_dir%/%fastcomp_build_bin_dir%", "activated_cfg": "LLVM_ROOT='%installation_dir%/%fastcomp_build_bin_dir%'",