[infra] Add a conditional emscripten SDK to the SDK DEPS

This change makes third_party/emsdk/upstream/emscripten/emcc available
if the gclient variable `download_emscripten` is `True`.

Fixes: b/247449715
Change-Id: Ia57d75b7c74a811dc50c3ef6e37f2b35db7116d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260100
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
Alexander Thomas 2022-09-20 09:41:12 +00:00 committed by Commit Bot
parent 026f253075
commit 12756f55f3

24
DEPS
View file

@ -178,6 +178,11 @@ vars = {
"chrome_tag": "101.0.4951.41",
"download_firefox": False,
"firefox_tag": "98.0.2",
# Emscripten is used in dart2wasm tests.
"download_emscripten": False,
"emsdk_rev": "d0291b3216fbc9765d9cfc1a2103316b32a555c6",
"emsdk_ver": "3.1.3",
}
gclient_gn_args_file = Var("dart_root") + '/build/config/gclient_args.gni'
@ -270,6 +275,10 @@ deps = {
Var("dart_git") + "root_certificates.git" +
"@" + Var("root_certificates_rev"),
Var("dart_root") + "/third_party/emsdk":
Var("dart_git") + "external/github.com/emscripten-core/emsdk.git" +
"@" + Var("emsdk_rev"),
Var("dart_root") + "/third_party/jinja2":
Var("chromium_git") + "/chromium/src/third_party/jinja2.git" +
"@" + Var("jinja2_rev"),
@ -708,4 +717,19 @@ hooks = [
'action': ['python3', 'sdk/build/vs_toolchain.py', 'update'],
'condition': 'checkout_win'
},
# Install and activate the empscripten SDK.
{
'name': 'install_emscripten',
'pattern': '.',
'action': ['python3', 'sdk/third_party/emsdk/emsdk.py', 'install',
Var('emsdk_ver')],
'condition': 'download_emscripten'
},
{
'name': 'activate_emscripten',
'pattern': '.',
'action': ['python3', 'sdk/third_party/emsdk/emsdk.py', 'activate',
Var('emsdk_ver')],
'condition': 'download_emscripten'
},
]