skia2/bin/activate-emsdk
Arman Uguray c987606ad2 Roll emsdk to 3.1.9
Rolled emsdk to the latest version to get the updated WebGPU wasm
bindings to fix deprecated WebGPU API usage in the ganesh Dawn backend.
The latest WebGPU headers also define the WGPU_WHOLE_MAP_SIZE constant
which is necessary to land a workaround for skia:13266.

* Roll emsdk to 3.1.9
* Fix Dawn backend to use the updated WebGPU API
* Fix -Wunused-but-set-variable warnings

Bug: skia:13220, skia:13266
Change-Id: I57ad39657c3013f384620302ab12a71ffc426c12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534945
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-04-29 22:31:29 +00:00

33 lines
790 B
Python
Executable File

#!/usr/bin/env python
# Copyright 2022 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
EMSDK_ROOT = os.path.join('third_party', 'externals', 'emsdk')
EMSDK_PATH = os.path.join(EMSDK_ROOT, 'emsdk.py')
EMSDK_VERSION = '3.1.9'
def main():
try:
subprocess.check_call([sys.executable, EMSDK_PATH, 'install', EMSDK_VERSION])
except subprocess.CalledProcessError:
print ('Failed to install emsdk')
return 1
try:
subprocess.check_call([sys.executable, EMSDK_PATH, 'activate', EMSDK_VERSION])
except subprocess.CalledProcessError:
print ('Failed to activate emsdk')
return 1
if __name__ == '__main__':
sys.exit(main())