See WebAssembly/waterfall#542
The builds now contain lib/wasm-obj/ or lib/asmjs/ which have some cache contents. This places those in the cache so the user doesn't need to build them on first run, which for libc at least can be quite slow.
The mechanism here is to run emcc a first time in the emsdk. That clears the cache (since the emsdk just updated the .emscripten file). We can then safely place the files in the cache.
Note that FROZEN_CACHE is not used, since we do want to leave the user the option to build other things to the cache - we'll never ship all possible system and ports builds in the emsdk downloads, probably.
This contains a test, which passes on tot-upstream. The last tagged release doesn't have this yet.
This verifies all builders successfully uploaded builds for a new version that we tag here.
This prevents a problem like happend on 1.38.35, where the mac and windows bots "skipped" the hash that we tagged - they built the one before, and I guess were too slow, so they skipped to the next commit after it? Which is expected I guess, but surprises me a little. Anyhow, with this fix we should avoid such problems in the future.
Tags 1.38.36 to verify things work and get people a working version.
Also check some other basic things: check the version built reports the right one in emcc -v, and that multiple emsdk updates still work.
The non-git case was not well documented and not tested, and it was broken since we switched the build infrastructure.
In the git case, an update is to do a git pull. In the non-git case, it downloads a zip and unpacks it. The old build infra apparently had builds created for this; instead, I made it download it directly from github. Perhaps we should consider creating builds for this as well eventually?
Also add a test for this, so we never break it again.
Also fix the can_be_installed which was always broken it seems - it returns True for success or a string for error, but didn't check if the output is True.
Includes a test, which hacks up emsdk to make it think it's on 32-bit, and verifies the error and message.
Keep the basic workflow test (checking what a user would do to get started) in bash, but otherwise it's more convenient for most tests to be in python.