Commit Graph

656 Commits

Author SHA1 Message Date
Amin Yahyaabadi
807e55cbec Set user environment variables permanently by using --permanent + deprecate --global (#621) 2020-09-29 22:15:22 -07:00
Alon Zakai
7e841b59fc 2.0.5 (#625) 2020-09-28 15:25:14 -07:00
Sam Clegg
42abe55fd7 Remove native optimizer build from emscripten master install (#622)
This is still used for the legacy emscripten tags installation
but the native optimizer no longer exists on master.

This fixes `emsdk install emscripten-master-64bit`
2020-09-21 16:59:19 -07:00
Sam Clegg
f8e0b49c24 Clear PYTHONHOME when using bundled python (#600)
Fixes: #598
2020-09-17 15:38:54 -07:00
Sam Clegg
843c1955fa Remove unused parameter (#611) 2020-09-16 15:48:55 -07:00
Alon Zakai
88b4ec6592 2.0.4 (#619) 2020-09-16 08:14:41 -07:00
Amin Yahyaabadi
edc53e7a0a Add missing python locations to emsdk.ps1 (#615) 2020-09-15 15:14:52 -07:00
walkingeyerobot
a94f2fe06c update bazel workspace for emscripten 2.0.3 (#613)
* update bazel workspace for emscripten 2.0.3

* test to make sure WORKSPACE is up to date

* make it clear what happened when WORKSPACE is out of date

* intentionally add error to make sure circleci fails properly

* revert intentionally bad commit

* increase visibility of failure message

Co-authored-by: Mitch Foley <mitchfoley@google.com>
2020-09-11 20:15:19 -04:00
walkingeyerobot
5f630def2a add a wasm bazel toolchain (#603) 2020-09-10 18:42:46 -07:00
Alon Zakai
def6e4903a 2.0.3 (#612) 2020-09-10 18:28:21 -07:00
Sam Clegg
e08b17c8bf Remove copy_pregenerated_cache (#609)
Newer SDKs don't require this and removing it doesn't break
any older SDKs (it just slows down their first use).
2020-09-10 16:32:23 -07:00
Sam Clegg
bfdfd61656 Fix sanity file generation in Dockerfile (#610)
We no longer ship the sanify file as part of the SDK but
expect it be generated on first use:
  https://github.com/WebAssembly/waterfall/pull/656

Also remove the Dockerfile itself from the docker image if
we include it then whenever you change anything in the
Dockerfile it invalides all the layers and forces a
completely rebuild.  This makes iterating on the image
very slow.
2020-09-10 16:14:40 -07:00
j-jorge
81dd2232e1 Parse the releases info only once in emsdk.py. (#607)
Co-authored-by: Julien Jorge <julien.jorge@stuff-o-matic.com>
2020-09-10 06:29:19 -07:00
Anmol Sethi
0eb40e10a2 Make emsdk_env.sh work under set -o nounset (#605)
Closes emscripten-core/emscripten#6743
2020-09-07 07:32:22 -07:00
Alon Zakai
2e73421e60 2.0.2 (#604) 2020-09-02 11:14:15 -07:00
Kleis Auke Wolthuizen
645d276b5c Docker improvements (#571)
- Copy the current checkout to the Dockerfile.
- Add .dockerignore to exclude files while copying.
- Test tip-of-tree build within CI.
- Run the test suite outside the Docker image.
- Perform extra sanity tests.
- Switch to make commands for CircleCI.
- Improve Docker README.
2020-09-02 10:50:52 -07:00
Reo
f6c9e453f8 Fix emsdk activate breaking configuration file (#602)
Fixes: #587

> If nodejs is not installed by `emsdk`, the output ".emscripten" file by `emsdk activate` will look like this.
> 
> ```python
> NODE_JS = ''/usr/bin/nodejs''
> # too many quotes
> ```
> 
> `emcc` fails to execute by this syntax error.
> 
> I think fixing [this line](https://github.com/emscripten-core/emsdk/blob/1.40.1/emsdk.py#L1450) could be a solution.
> 
> ```python
> activated_config['NODE_JS'] = "'%s'" % node_fallback
> # the value will be quoted later again
> ```
2020-08-31 08:27:03 -07:00
Sam Clegg
9c27544f85 Add stalebot (#601) 2020-08-25 15:40:41 -07:00
Bob Tolbert
c1f0ad9fcd Fix emsdk_env.sh for multiple shells (#594)
This change allows sourcing emsdk_env.sh from bash, zsh and
ksh.

The script works out the true location of the emsdk directory,
even if it is a symlink or the script itself is a symlink.

Added a test in scripts/test_source_env.sh to try sourcing via
all the shells and with various paths.

Co-authored-by: Bob Tolbert <bob@tolbert.org>
2020-08-22 11:31:16 -07:00
Alon Zakai
721ef8f476 2.0.1 (#596)
Also fix the test - we can't activate fastcomp and call upstream's emcc to
even clear the cache, as it disallows fastcomp's LLVM.
2020-08-21 12:56:57 -07:00
Alon Zakai
6adb624e04 Error on trying to get latest-fastcomp (#590)
I think this is less surprising than continuing to support latest-fastcomp
with the last fastcomp release. That's technically correct - the last release
is 1.40.1, and always will be - but when a user asks for "latest" I think they
want something up to date. Instead, give a clear error that indicates how
they can get an actually up to date build, by using upstream.
2020-08-11 15:10:43 -07:00
Sam Clegg
ff8a62a3fb Pre-bundle requests module with macOS bundles python (#589)
The problem is that python can have trouble finding the default
certifcate set on macOS.  The actual bundle is installed by the certifi
package which the requests module uses under the hood.

Fixes: #588
2020-08-11 11:51:47 -07:00
Sam Clegg
839c108479 2.0.0! (#586) 2020-08-10 17:12:56 -07:00
Sam Clegg
1e5c650388 Log warnings to stderr (#585)
Its particularly important during `construct_env` where stdout
is directly interpreted by the shell.

See: #385
2020-08-07 11:26:32 -07:00
Alon Zakai
16d4ec5489 Disallow fastcomp in tot and 2.0.0+ (#584) 2020-08-07 09:06:46 -07:00
Sam Clegg
60e3a51c7b Split out expand_sdk_name function. NFC. (#580) 2020-08-05 10:03:41 -07:00
Alon Zakai
e88a3c5bbf 1.40.1 (#579) 2020-08-01 07:45:21 -07:00
Sam Clegg
147abfe46c Make emscripten directory world writable (#578)
Without this emscripten will default to using $HOME for the
emscripten cache rather than the embedded one.
2020-07-31 13:41:13 -07:00
Alon Zakai
1dc9fde175 1.40.0 (#577) 2020-07-30 09:34:46 -07:00
Wouter van Oortmerssen
e3b08413c9 [powershell] fix emsdk.ps1 assuming emsdk_set_env.ps1 lives in the current dir (#576)
This makes it fail when run from a project directory.
Thansks @sbc100 for finding the problem :)
2020-07-29 13:18:23 -07:00
Sam Clegg
6dac5ae712 Fail update-tags if not tot revision is found (#574) 2020-07-27 15:32:06 -07:00
Kleis Auke Wolthuizen
de08462b17 Cleanup Dockerfile. NFC. (#569)
- Remove unnecessary dependencies from build stage.
- Move binutils installation to first layer.
- Adjust indents and spacing.
- Merge ENV declarations into a single line.
- Split apt-get commands over multiple lines
2020-07-25 11:04:20 -07:00
Kleis Auke Wolthuizen
b5077e4642 Fix sanity file location within Dockerfile (#568)
Starting from 1.39.20 the .emscripten_sanity file has
been moved to upstream/emscripten/cache/sanity.txt.
2020-07-23 12:49:48 -07:00
Sam Clegg
56f5a2bcc5 Cleanup emsdk.bat launcher (#566)
TIL a couple of things about bat files. God help me.

- Use a single @echo off at the top rather than @ on every line
- Use lowercase names for builtin operation
- Use setlocal/endlocal rather than reseting EM_PYTHON at the end
2020-07-22 14:06:08 -07:00
Sam Clegg
9b405d313a Add new python version of known versions in emsdk.bat (#565) 2020-07-21 21:29:12 -07:00
Sam Clegg
4d4ae34365 Improve activation message (#562)
* Improve activation message

The activation message is now IMHO more informative and
actionable:

```
$ emsdk activate latest
Setting the following tools as active:
   node-12.18.1-64bit
   releases-upstream-e7e39da9c81faecd9ecf44065cee864d76e4e34d-64bit

Next steps:
- To conveniently access emsdk tools from the command line,
  consider adding the following directories to your PATH:
    $HOME/wasm/emsdk
    $HOME/wasm/emsdk/node/12.18.1_64bit/bin
    $HOME/wasm/emsdk/upstream/emscripten
- This can be done for the current shell by running:
    source "$HOME/wasm/emsdk/emsdk_env.sh"
- Configure emsdk in your bash profile by running:
    echo 'source "$HOME/wasm/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile
```

* .
2020-07-21 18:04:31 -07:00
Sam Clegg
0e5f2d8e11 Rename osx -> macos (#563) 2020-07-21 12:26:30 -07:00
Sam Clegg
4aa028017c Use bundled/embedded python3 binary on OSX (#561)
See https://github.com/emscripten-core/emscripten/issues/7198
2020-07-21 10:21:02 -07:00
Sam Clegg
d8984b2a9d Rename build_llvm_monorepo to just build_llvm. NFC. (#560)
And build_llvm_fastcomp to just build_fastcomp (matches its name
in the json file.
2020-07-20 17:33:54 -07:00
Alon Zakai
3249417955 1.39.20 (#556) 2020-07-20 15:36:09 -07:00
Sam Clegg
b504f0ba3a Cleanup legacy 'copy_pregenerated_cache' handling. NFC. (#558) 2020-07-20 14:47:25 -07:00
Sam Clegg
9d1b5b6d7d Cleanup and unify code for removing files. (#557) 2020-07-20 14:25:09 -07:00
Sam Clegg
3e9f04d467 Remove support for non-embedded mode (#510)
embedded mode as been the default since #472 and I included
`--no-embedded` as an option during the interim time, but to simply
the code and avoid have two modes of operation I think its safe
to now remove the non-embedded mode.
2020-07-20 13:39:21 -07:00
Sam Clegg
dec8a63594 Remove emsdk_set_ene.bat from .gitignore (#550)
This file should only ever exist momentarily.  Its written during
`emsdk construct_env` on windows, but emsdk.bat immediately uses
at deletes it before returning.

Having this file remain around on disk would be a bug so we shouldn't
ignore its presense.
2020-07-15 11:39:24 -07:00
Sam Clegg
e5f63be5a4 Update location emsdk_set_env.bat in emsdk.bat (#553)
The location of this file is now fixed to living inside the
emsdk directory, not the current working directory.
2020-07-14 17:32:47 -07:00
Sam Clegg
d4383f4767 Fix docker build to not depend on emsdk_set_env.sh (#554)
This was an internal script that we used to generate up
until #544.   Now we avoid writing that file at all and
emsdk_env.sh is instead sourced directly.

This should fix the docker CI issues we have been having.
2020-07-14 16:22:16 -07:00
Sam Clegg
96ba7f6a73 Remove bash-ism from emsdk_env.sh (#552)
This is a because its not possible to determine the location
of as script that is currently being sources under a POSIX shell
such as dash (the default ubuntu shell).  Only bash has this
special BASH_SCRIPT variable.
2020-07-14 15:58:42 -07:00
Brion Vibber
9f63f10ab6 Fix fatal exception in "emsdk list" on unsupported platforms (#549)
On platforms with no supported binary SDKs to download, find_sdk
can return None which caused a check in the "list" command to fail.
Checking for the return value before making method calls fixes this,
and allows Linux/ARM64 to run "emsdk list" and then build an SDK
from source.

Fixes https://github.com/emscripten-core/emsdk/issues/548
2020-07-11 20:44:40 -07:00
Walt
c494899c17 Change EMSDK_SET_ENV to output correct filename for powershell. (#546)
Rename write_set_env_bat to write_set_env_script.
2020-07-11 07:38:17 -07:00
Sam Clegg
d37abed2de Avoid writing to file in emsdk_env.csh / emsdk_env.sh (#544)
This is an alternative fix for
https://github.com/emscripten-core/emscripten/issues/9090 which recently
came up again after #539.

Tested with bash, tcsh and fish.
2020-07-10 17:49:16 -07:00