Error on trying to get latest-fastcomp (#590)

I think this is less surprising than continuing to support latest-fastcomp
with the last fastcomp release. That's technically correct - the last release
is 1.40.1, and always will be - but when a user asks for "latest" I think they
want something up to date. Instead, give a clear error that indicates how
they can get an actually up to date build, by using upstream.
This commit is contained in:
Alon Zakai
2020-08-11 15:10:43 -07:00
committed by GitHub
parent ff8a62a3fb
commit 6adb624e04
2 changed files with 23 additions and 17 deletions

View File

@@ -2636,12 +2636,13 @@ def error_on_missing_tool(name):
return 1
def expand_sdk_name(name):
if name in ('latest-fastcomp', 'latest-releases-fastcomp'):
# Since we no longer support fastcomp in ToT emscripten, the latest
# fastcomp release is fixed at 1.40.1.
name = 'sdk-fastcomp-1.40.1'
def exit_with_fastcomp_error():
exit_with_error('The fastcomp backend is not getting new builds or releases. Please use the upstream llvm backend or use an older version than 2.0.0 (such as 1.40.1).')
def expand_sdk_name(name):
if name in ('latest-fastcomp', 'latest-releases-fastcomp', 'tot-fastcomp', 'sdk-nightly-latest'):
exit_with_fastcomp_error()
if name in ('latest', 'sdk-latest', 'latest-64bit', 'sdk-latest-64bit'):
# This is effectly the default SDK
return str(find_latest_releases_sdk('upstream'))
@@ -2651,9 +2652,6 @@ def expand_sdk_name(name):
return str(find_tot_sdk('upstream'))
elif name == 'tot-upstream':
return str(find_tot_sdk('upstream'))
elif name in ('tot-fastcomp', 'sdk-nightly-latest'):
print('error: The fastcomp compiler is not available tot/nightly builds. Please use the upstream llvm backend or use an older version than 2.0.0.')
sys.exit(1)
else:
# check if it's a release handled by an emscripten-releases version,
# and if so use that by using the right hash. we support a few notations,
@@ -2670,8 +2668,7 @@ def expand_sdk_name(name):
backend = 'fastcomp'
fullname = fullname.replace('sdk-', '').replace('-64bit', '').replace('tag-', '')
if backend == 'fastcomp' and version_key(fullname) >= (2, 0, 0):
print('error: The fastcomp compiler is not available in 2.0.0+. Please use the upstream llvm backend or use an older version than 2.0.0.')
sys.exit(1)
exit_with_fastcomp_error()
releases_info = load_releases_info()['releases']
release_hash = get_release_hash(fullname, releases_info)
if release_hash: