Re-land #200 : waterfall fastcomp support (#204)

(This was reverted by mistake. It had a bad commit message though, so relanding with a nicer one is nice anyhow.)

With this, we can do emsdk install latest-fastcomp and it installs fastcomp from the waterfall. That is, we then have 3 main sdks people might want to use:

* latest which installs fastcomp-llvm (plus emscripten etc.) from the mozilla infrastructure. (fetches the last emscripten version there)
* latest-upstream which installs upstream-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there)
* latest-fastcomp which installs fastcomp-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there)

The first and last are currently somewhat overlapping in that both fetch a build of fastcomp. However, as we transition away from the mozilla infrastructure, we could just make latest an alias for latest-fastcomp. (And later, when we're ready to switch to the wasm backend by default, the alias could switch to latest-upstream.)
This commit is contained in:
Alon Zakai
2019-01-08 13:46:53 -08:00
committed by GitHub
parent 3ef46e970d
commit 38dcc11b1d
3 changed files with 35 additions and 4 deletions

12
emsdk
View File

@@ -1527,12 +1527,18 @@ def find_latest_nightly_sdk():
else:
return find_latest_nightly_32bit_sdk()
def find_latest_upstream_sdk():
def find_latest_waterfall_sdk(which):
waterfall_lkgr = load_waterfall_lkgr()
if not waterfall_lkgr:
print('Failed to find an upstream lkgr')
sys.exit(1)
return 'sdk-upstream-%s-64bit' % waterfall_lkgr[0]
return 'sdk-%s-%s-64bit' % (which, waterfall_lkgr[0])
def find_latest_upstream_sdk():
return find_latest_waterfall_sdk('upstream')
def find_latest_fastcomp_sdk():
return find_latest_waterfall_sdk('fastcomp')
# Finds the best-matching python tool for use.
def find_used_python():
@@ -2225,6 +2231,8 @@ def main():
sys.argv[i] = str(find_latest_nightly_64bit_sdk())
elif sys.argv[i] == 'latest-upstream' or sys.argv[i] == 'latest-clang-upstream':
sys.argv[i] = str(find_latest_upstream_sdk())
elif sys.argv[i] == 'latest-fastcomp':
sys.argv[i] = str(find_latest_fastcomp_sdk())
if cmd == 'list':
print('')