So with some tinkering, I've managed to get it to work, at least for a small prototype in Dawn. Some things I want to get clarified before I try to push this any further.
While I was able to get emsdk to use the LLVM shipped with Chromium/Dawn, I was informed that other binaries that it may depend on could be problematic if we ever want to get these builds on CQ. Specifically, I would assume that the node and Binaryen binaries that ship with emsdk could be problematic? I think node is an easy fix as I could just point it to a node version/package that is downloaded from google storage, but for Binaryen, do I have to assume that I would need to build that from source to ensure that it's a "safe" binary? Moreover, if that's the case, I'm wondering whether I even need a dependency on emsdk, and could instead just depend on emscripten directly, setting the necessary envvars to make it work?...
For iterative development in the meantime, however, would it be fine to add emsdk as is, and use the Binaryen shipped with it? We don't need to have these builds on CQ right now, so maybe it's fine for local development, and if needed, we could try to get Binaryen building in gn and pointing to it later on?
- Loko