Commit Graph

137 Commits

Author SHA1 Message Date
Sam Clegg
3e7e0ab8c3 Add prebuilt binaries of 3.1.7 for linux/arm64 (#1011) 2022-03-22 16:02:05 -07:00
Sam Clegg
433a2d1bc0 Remove some unused functions. NFC (#1007) 2022-03-18 19:12:58 +00:00
Sam Clegg
858f73d260 Consistent use of os.getenv. NFC (#1006)
Is slightly less typing than os.environ.get().

Followup to #1004.
2022-03-18 18:26:57 +00:00
Sam Clegg
bfcfad3a99 Remove unsed 'windows_install_path' (#1005) 2022-03-18 14:23:22 -04:00
Sam Clegg
82301254f7 Use second argument to os.getenv to simplify code. NFC (#1004) 2022-03-18 11:03:05 -07:00
Sam Clegg
7a09f8cc1c Add mechanism to override OS (for testing purposes) (#993)
Similar to `EMSDK_ARCH` which I added in #935.
2022-02-25 09:42:12 -08:00
Sam Clegg
fd08e9ad24 Error (don't just warn) on unknown architecture (#935)
Also, add tests for unknown architecture and wrong bitness and
add a mechanism (`EMSDK_ARCH`) to override the architecture assumed
by emsdk.
2022-02-25 00:44:14 -05:00
Sam Clegg
0f0ea34526 Add git submodule update when doing a git checkout (#974)
This is required to build binaryen since
https://github.com/WebAssembly/binaryen/pull/4466
2022-01-20 17:25:43 -05:00
Sam Clegg
447aa44d78 Remove download_even_if_exists argument to download_and_unzip (#964)
These days this argument really means `install_even_if_directory_exists`
(at least since #9300.

However by the time we call `download_and_unzip` we have already checked
that `is_installed()` is false so we know we want to install for sure.
If the installation directory already existed and contained the correct
contents we would never get as far as `download_and_unzip`.
2022-01-10 12:49:51 -08:00
Sam Clegg
82ad00499a Remove unused argument. NFC (#952)
The usage of this argument was removed in #838.
2022-01-05 06:00:44 -08:00
Greg Buchholz
060b48f0c6 Correct typo in "emsdk help" message. (#959)
When invoking "emsdk help", there is a typo/grammatical error in the second to last paragraph.
See also:

    https://github.com/emscripten-core/emsdk/issues/957
2021-12-26 15:26:51 -08:00
Sam Clegg
4764bfa848 Add test and remove unused args (#951)
Followup to #930: Add a tests, and remove newly-unused arguments
to unzip and untargz.
2021-12-22 16:21:07 -08:00
Jan-Marek Glogowski
bb9a6a326f Optionally keep the downloaded archives (#930)
Prevent downloading the tool archives all over again, if you
switch some emscripten or tool version.
2021-12-20 08:52:58 -08:00
Pavel Novikov
75ab7cf422 Fix typo (#950) 2021-12-19 09:13:25 -08:00
Jan-Marek Glogowski
eac57d992a Remove all vs-tool references (#931) (#931)
They were originally removed from emsdk_manifest.json in commit
12f1824ffb ("Remove Tools and SDKs
that do no longer work after migration from Mozilla to Google
hosting. (#395)").
2021-11-14 12:28:45 -08:00
Sam Clegg
69bc93a988 Revert "Update CMAKE_OSX_DEPLOYMENT_TARGET from 10.11 to 10.14 (#924)"
This reverts commit 99e5e0230d.
2021-11-01 15:00:45 -07:00
Sam Clegg
99e5e0230d Update CMAKE_OSX_DEPLOYMENT_TARGET from 10.11 to 10.14 (#924)
Apparently 10.11 is no longer good enough to run the latest version of
binaryen.  Specifically since binaryen switched to using std::variant it
now fails to build with this set to 10.11.

This is also the version used on the emscripten-releases CI which builds
the emsdk binaries:
https://chromium.googlesource.com/emscripten-releases/+/refs/heads/main/src/build.py#673
2021-11-01 14:59:30 -07:00
Sam Clegg
c60dd3bd4f Fix emscripten-version parsing (#902)
See https://github.com/emscripten-core/emscripten/pull/15144
2021-09-28 07:01:09 -07:00
juj
4d84356204 Fix passing -DLLVM_ENABLE_PROJECTS directive to CMake - it does not want to see double quotes in the field passed to it. (#898) 2021-09-25 07:19:55 -07:00
Matt Gucci
deb6453391 Fix error handling: untargz() in emsdk.py (#895)
Make untargz() in emsdk.py return False if tar command failed.
2021-09-20 10:02:01 -07:00
Sam Clegg
6a932246db Use .json extension for emscripten-releases-tags.json. NFC (#870) 2021-08-25 17:21:40 -07:00
Sam Clegg
0eae457cdb Point zsh and csh users to the correct startup script (#843)
Fixes: https://github.com/emscripten-core/emscripten/issues/14446
2021-06-17 10:36:50 -07:00
Sam Clegg
bb3189b941 Consistent error messages (#840) 2021-06-16 09:10:12 -07:00
Sam Clegg
c341e544a7 Error out on attempt to activate a missing tools (#838)
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.
2021-06-15 22:19:47 -07:00
Yulong Wang
9fca4702ac bugfix: allow to install SDK binaries alone (#834) 2021-06-08 10:57:29 -07:00
Sam Clegg
57b8067188 Improve emscripten-releases-tags.txt to support mutliple aliases (#837)
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'..
...
```
2021-06-08 10:08:01 -07:00
juj
d1b4543658 macOS and Linux backwards compatibility (#819)
* Disable optional LLVM and LLDB dependencies. Target macOS 10.11 at minimum.

* flake
2021-05-18 07:36:47 -07:00
juj
4dbc028cb0 Remove explicit closure install step, the first install command does already seem to install google-closure-compiler-windows at least. (#803) 2021-05-05 06:57:16 -07:00
Sam Clegg
dedf902193 Add newline at end of emscripten-version.txt (#812)
This file in in the repo itself contains a newline so we should match
that.  Also everybody knows that text files should end in a newline :)
2021-05-04 16:51:19 -07:00
Sam Clegg
33ce2bdf2c 2.0.19 (#811) 2021-05-04 15:25:01 -07:00
Sam Clegg
1284e37ab9 Switch emscripten-release from master to main (#804) 2021-05-03 08:38:11 -07:00
Sam Clegg
894c25b52a Switch to HEAD.zip when downloading archive from github. (#806)
This works regardless of the name of the primary branch so that
the code will continue to work if/when we rename `main` to `master`.

See: #805
2021-04-29 15:48:18 -07:00
Sam Clegg
b4c9194d81 Unset emsdk-related environment variable from inactive tools (#801)
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.
2021-04-29 08:43:20 -07:00
juj
3510ab2697 Add option --override-repository (#792)
* Add option --override-repository to allow controlling where git clones happen from.

* Address review
2021-04-29 03:32:43 -07:00
juj
16ee884464 Fix issues with npm install of google-closure-compiler installing all dev packages as well. (#793) 2021-04-26 14:38:00 -07:00
Sam Clegg
4282d5d44b Avoid setting EM_CACHE unless we really need to (#797)
This avoid polluting the global environment which makes
side-by-side installational of different emscripten version
harder.

See https://github.com/emscripten-core/emscripten/pull/13954
2021-04-26 06:29:01 -07:00
juj
bda6a0c5a5 Remove the use of a custom temp directory. That is a bad practice, we should reuse system temp directory instead, that is what it is there for. (#791) 2021-04-23 10:53:02 +03:00
Alon Zakai
fdda8524ce Simplify the notation for installing by hash to just emsdk install HASH (#767)
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
2021-03-22 14:07:34 -07:00
Jia Yuan Lo
b85548d0dd List "Release" as the default build option (#770)
This was set back in commit cea44f475a

Fixes #760
2021-03-22 11:36:54 -07:00
juj
9c65611d96 Ccache (#711)
* Add support for ccache.

* Simplify ccache activation.

* Fix macOS ccache build

* Make ccache executable

* Add Ninja build support. Change ccache name to git.

* Fix merge conflict
2021-03-15 09:15:26 +02:00
juj
772d397a55 Fix search of VCTargetsPath for VS2019 build. (#698) 2021-03-11 14:09:48 +02:00
Sam Clegg
9a70fe3688 Rename sdk-upstream-master SDK to sdk-upstream-main (#754)
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.
2021-03-10 21:54:29 -08:00
Sam Clegg
d342821195 Skip npm step if node_modules already exists (#640)
See https://github.com/WebAssembly/waterfall/pull/670
2021-03-09 16:56:27 -08:00
Sam Clegg
73183b5c30 Fix race between install tot and active tot (#749)
Since #732 we lookup tot release dynamically, but we don't
necessarily want to do this for the `activate` command otherwise
`install` followed by `activate` a can fail if a new build was
produced inbetween.
2021-03-08 14:26:03 -08:00
Sam Clegg
f0ee795014 Remove special version check for vs-tool. NFC. (#740)
As of #505 all tools write a check a version file so we don't need to
special case vs-tool anymore.
2021-03-08 08:02:38 -08:00
Sam Clegg
6e2873c834 Feedback from #741. NFC. (#742) 2021-03-05 13:32:33 -08:00
Sam Clegg
9d639b383a Fix for construct_env and list with tot build installed (#741) 2021-03-05 12:51:04 -08:00
Sam Clegg
8915c20b06 Always print debug info to stderr (#739) 2021-03-05 09:44:19 -08:00
Sam Clegg
9d00a82b6a Remove update-tags phase (#738)
Its not really very useful to cache the tot release in a local text
file.  Instead just fetch the revsion each time `install tot` is run.

This avoids folks accidentally installing "old" tot releases.

Also, make the output a little less chatty when looking up tot version.
2021-03-05 09:19:42 -08:00
Sam Clegg
53eacf405d Allow the install of any emscripten-releases build (#732)
This is done by detecting the 40 character git sha in the SDK version
and creating a new set of tools based on this SHA.  This works for any
command that uses expand_sdk_name (i.e. install activate and update) but
it wont show up in the output of `list`.

For example:

./emsdk install sdk-releases-upstream-b0cfdb236483b6828ee2e3f263fd94f011ed1863-64bit

Or just:

./emsdk install releases-upstream-b0cfdb236483b6828ee2e3f263fd94f011ed1863
2021-03-01 17:32:03 -08:00