Files
ci-emsdk/bazel/emscripten_toolchain/emscripten_config
Tim Talashok c1589b5564 Use emsdk as external bazel dependency (#766)
* Makes provided bazel rules look up @emsdk workspace instead of local workspace
* Uses system-specific emscripten binaries instead of defaulting to linux
* Provides macros for loading emsdk dependencies (nodejs and emscripten binaries)
* Unhardcodes paths in bazel rules and .sh wrappers
* `update_bazel_workspace.sh` now updates `revisions.bzl`
* `emscripten_deps()` can be fed with specific emscripten version
* Adds external usage test

Addresses #650 and #696
2021-03-24 16:50:44 -07:00

13 lines
402 B
Plaintext

import os
import platform
ROOT_DIR = os.environ["ROOT_DIR"]
EMSCRIPTEN_ROOT = os.environ["EMSCRIPTEN"]
BINARYEN_ROOT = ROOT_DIR + "/" + os.environ["EM_BIN_PATH"]
LLVM_ROOT = BINARYEN_ROOT + "/bin"
FROZEN_CACHE = True
system = platform.system()
nodejs_binary = "node.exe" if(system =="Windows") else "bin/node"
NODE_JS = ROOT_DIR + "/external/nodejs_{}_amd64/{}".format(system.lower(), nodejs_binary)