Skip to content

Commit 31f01c2

Browse files
authored
Merge branch 'emscripten-core:main' into main
2 parents d9f78ac + 6305e91 commit 31f01c2

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

emsdk.py

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,6 @@ def vswhere(version):
257257
program_files = os.environ['ProgramFiles']
258258
vswhere_path = os.path.join(program_files, 'Microsoft Visual Studio', 'Installer', 'vswhere.exe')
259259
output = json.loads(subprocess.check_output([vswhere_path, '-latest', '-version', '[%s.0,%s.0)' % (version, version + 1), '-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', '-property', 'installationPath', '-format', 'json']))
260-
# Visual Studio 2017 Express is not included in the above search, and it
261-
# does not have the VC.Tools.x86.x64 tool, so do a catch-all attempt as a
262-
# fallback, to detect Express version.
263-
if not output:
264-
output = json.loads(subprocess.check_output([vswhere_path, '-latest', '-version', '[%s.0,%s.0)' % (version, version + 1), '-products', '*', '-property', 'installationPath', '-format', 'json']))
265-
if not output:
266-
return ''
267260
return str(output[0]['installationPath'])
268261
except Exception:
269262
return ''
@@ -288,24 +281,18 @@ def vs_filewhere(installation_path, platform, file):
288281
CMAKE_GENERATOR = 'Visual Studio 17'
289282
elif '--vs2019' in sys.argv:
290283
CMAKE_GENERATOR = 'Visual Studio 16'
291-
elif '--vs2017' in sys.argv:
292-
CMAKE_GENERATOR = 'Visual Studio 15'
293284
elif len(vswhere(17)) > 0:
294285
CMAKE_GENERATOR = 'Visual Studio 17'
295286
elif len(vswhere(16)) > 0:
296287
CMAKE_GENERATOR = 'Visual Studio 16'
297-
elif len(vswhere(15)) > 0:
298-
# VS2017 has an LLVM build issue, see
299-
# https://github.com/kripken/emscripten-fastcomp/issues/185
300-
CMAKE_GENERATOR = 'Visual Studio 15'
301288
elif which('mingw32-make') is not None and which('g++') is not None:
302289
CMAKE_GENERATOR = 'MinGW Makefiles'
303290
else:
304291
# No detected generator
305292
CMAKE_GENERATOR = ''
306293

307294

308-
sys.argv = [a for a in sys.argv if a not in ('--mingw', '--vs2017', '--vs2019', '--vs2022')]
295+
sys.argv = [a for a in sys.argv if a not in ('--mingw', '--vs2019', '--vs2022')]
309296

310297

311298
# Computes a suitable path prefix to use when building with a given generator.
@@ -314,8 +301,6 @@ def cmake_generator_prefix():
314301
return '_vs2022'
315302
if CMAKE_GENERATOR == 'Visual Studio 16':
316303
return '_vs2019'
317-
if CMAKE_GENERATOR == 'Visual Studio 15':
318-
return '_vs2017'
319304
elif CMAKE_GENERATOR == 'MinGW Makefiles':
320305
return '_mingw'
321306
# Unix Makefiles do not specify a path prefix for backwards path compatibility
@@ -2685,7 +2670,7 @@ def main(args):
26852670
purposes. Default: Enabled
26862671
--disable-assertions: Forces assertions off during the build.
26872672
2688-
--vs2017/--vs2019/--vs2022: If building from source, overrides to build
2673+
--vs2019/--vs2022: If building from source, overrides to build
26892674
using the specified compiler. When installing
26902675
precompiled packages, this has no effect.
26912676
Note: The same compiler specifier must be
@@ -2708,7 +2693,7 @@ def main(args):
27082693

27092694
if WINDOWS:
27102695
print('''
2711-
emsdk activate [--permanent] [--system] [--build=type] [--vs2017/--vs2019/--vs2022] <tool/sdk>
2696+
emsdk activate [--permanent] [--system] [--build=type] [--vs2019/--vs2022] <tool/sdk>
27122697
27132698
- Activates the given tool or SDK in the
27142699
environment of the current shell.
@@ -2722,7 +2707,7 @@ def main(args):
27222707
(uses Machine environment variables).
27232708
27242709
- If a custom compiler version was used to override
2725-
the compiler to use, pass the same --vs2017/--vs2019/--vs2022
2710+
the compiler to use, pass the same --vs2019/--vs2022
27262711
parameter here to choose which version to activate.
27272712
27282713
emcmdprompt.bat - Spawns a new command prompt window with the
@@ -2860,11 +2845,7 @@ def installed_sdk_text(name):
28602845
print('')
28612846

28622847
print('All recent (non-legacy) installable versions are:')
2863-
releases_versions = sorted(
2864-
load_releases_versions(),
2865-
key=lambda x: [int(v) if v.isdigit() else -1 for v in x.split('.')],
2866-
reverse=True,
2867-
)
2848+
releases_versions = sorted(load_releases_versions(), key=version_key, reverse=True)
28682849
releases_info = load_releases_info()['releases']
28692850
for ver in releases_versions:
28702851
print(' %s %s' % (ver, installed_sdk_text('sdk-releases-%s-64bit' % get_release_hash(ver, releases_info))))

0 commit comments

Comments
 (0)