When linking with `-o filename` (such as in various CMake build checks), the parameter passed to the linker is a temporary file, and it is passed as a bare filename (i.e. relative path without a `'/'`). In such cases, `outdir` would have been the empty string, and the final `tar` command would fail (actually the call to `subprocess.check_call(…)` is what fails).
Previously if a tool (any part of an SDK) was not installed
we would issue a warning and continue to active without returning
non-zero.
This meant doing `emsdk install 2.0.0 && emsdk activate latest`
would appear to be work aside from the warning messages about
latest not being installed.
This is especially annoying since we dropped support for side
by side SDK installations. The following sequence is no longer
valid and we want to make that clear by erroring out:
```
$ emsdk install 2.0.1
$ emsdk install 2.0.2
$ emsdk activate 2.0.1
```
Since 2.0.2 replaces 2.0.1 on the filesystem the active here
could fail hard rather than just warning.
Also, improve reporting of version resolution. e.g.:
```
$ ./emsdk install sdk-latest
Resolving SDK alias 'latest' to '2.0.23'
Resolving SDK version '2.0.23' to 'sdk-releases-upstream-77b065ace39e6ab21446e13f92897f956c80476a-64bit'
Installing SDK 'sdk-releases-upstream-77b065ace39e6ab21446e13f92897f956c80476a-64bit'..
...
```
When we deactivate a tool we also want to remove its environment
variables. One driver for this is that modern sdks don't set
`EM_CACHE` whereas old ones did and we want to make sure that
`EM_CACHE` gets unset when folks upgrade (and then re-set if
they downgrade). See #797.
* 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
Previously this had to be
emsdk install sdk-releases-upstream-HASH
The only thing preventing using just the hash was that there was no
default for the backend, so defaulting to upstream fixes this. And then
we can do
emsdk install HASH
* allow the bazel toolchain to output html files
* allow for cc_binary rule names to end in .js
* fix python name
* continue to call emcc instead of em++ for now
* small cleanup
Co-authored-by: Mitch Foley <mitchfoley@chromium.org>
* Fix support for Apple M1. Node.js will still run via Rosetta 2 emulation since they do not yet have M1 support, but Python, LLVM, Emscripten and Binaryen will be native.
* Update M1 python version and URL
* Remove .gitignore additions
* Move python first in the manifest (#441)
* Use macosx-version-min when building python
* Update Intel macOS python package name
Now that all the components (binaryen, emscripten and llvm) use `main`
as the branch name is makes sense to give the SDK this name.
Keep backwards compat with the old name but issue a warning when its
used.