Commit Graph

34 Commits

Author SHA1 Message Date
Sam Clegg
ccd111fb1f Prefer curl for downloading files over urllib (#1355)
This is especially important on macOS where `urllib` can fail to
verify certificates.

See https://stackoverflow.com/questions/40684543/how-to-make-python-use-ca-certificates-from-mac-os-truststore

Fixes: #1207, #85, #1356, #1357, #1358
2024-03-14 13:19:45 -07:00
Sam Clegg
cc1b3efbd3 Error on unknown arguments passed to --activate (#1313)
See #1312
2023-12-08 10:30:37 -08:00
Derek Schuff
3391e039d6 Replace update_bazel_workspace.sh with a python script (#1271)
This script is (IMO) more readable, but the real reason for this change is that
it raises an error message when the binary package fails to download. (The shell
script silently generated a bogus hash instead, because the shell's `set -e`
builtin does not affect commands executing inside a $() context.
It seemed just as easy to rewrite the script in Python as to fix that.

This change also updates some outdated filename references.
2023-08-24 10:10:29 -07:00
Sam Clegg
4f2db9682c Rename zipfile to archive or download as appropriate. NFC (#1257) 2023-07-10 14:04:24 -07:00
Sam Clegg
c88612d6d3 Fix activated_path_skip on repeated running of emsdk_env.sh (#1250)
The first time around `node` was being correctly added to the PATH, but
the second time around this code was observing the emsdk copy of node
in the PATH and assuming it could be skipped.

Fixes: #1240
2023-06-27 16:37:22 -07:00
Sam Clegg
88ee963cba Add some basic testing of arm64 linux (#1247) 2023-06-27 13:50:25 -07:00
Derek Schuff
d7327b4850 Update node, 15.14.0 -> 16.20.0 (#1232)
This allows us to use the native ARM64 version on MacOS.
Also update the test scripts to work on ARM64 mac, and skip tests that aren't relevant.
2023-06-20 18:57:05 +00:00
Sam Clegg
dd8bbe5e82 Update node version 14.15.5 -> 15.14.0 (#829) 2023-04-11 18:17:46 +00:00
Sam Clegg
22ede2db8e Add activated_path_skip to node v14.18.2 packages (#1209)
This should have been part of #1189.  See #1183.
2023-04-10 13:54:35 -07:00
Sam Clegg
1eaaa4c5b4 Remove -upstream component of SDK names (#1166)
This name existed to distinguish the SDK from fastcomp, but as of #1165,
we no longer support fastcomp.
2023-01-13 20:11:55 -08:00
Sam Clegg
f3bb209b86 Remove fastcomp SDK and fastcomp build rules. NFC (#1165)
Folks that want to work with fastcomp will now need to use an older
checkout of emsdk.
2023-01-09 04:53:13 -08:00
Sam Clegg
3d87d5ea81 Avoid exporting EM_CONFIG for modern SDK versions (#1110)
Newer versions of emscipten, starting all the way back in 1.39.13, can
automatically locate the `.emscripten` config file that emsdk creates so
there is no need for the explicit EM_CONFIG environment variable.  Its
redundant and adds unnessary noisce/complexity.

Really, adding emcc to the PATH is all the is needed these days.

One nice thing about this change is that it allows folks to run
whichever emcc they want to and have it just work, even if they have
configured emsdk.   Without this change, if I activate emsdk and I run
`some/other/emcc` then emsdk's `EM_CONFIG` will still be present and
override the configuration embedded in `some/other/emcc`.

e.g. in the same shell, with emsdk activated, I can run both these
commands and have them both just work as expected.

```
$ emcc --version
$ /path/to/my/emcc --version
```
2022-10-06 14:13:13 -07: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
Kevin Lubick
600dc4d912 Add closure example for wasm_cc_binary (#941)
* Stub out addition of closure_externs_file option in wasm_cc_binary

* WIP

* args are passed, externs cannot be found

* try location

* update tests
2022-02-17 13:16:18 -05:00
Sam Clegg
24e78812e0 Minor node version update v14.15.5 -> v14.18.2 (#953)
The newer versions of eslint require 14.17.0 or above.  This
updates our node version to the latest in the 14.XX series.

I don't expect any user-visible changes.
2022-01-09 07:43:39 -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
Ezekiel Warren
774b871eca Bazel Windows Support (#929) 2021-12-20 14:24:56 -05:00
Sam Clegg
044d620ff2 2.0.33 (#922)
I add to temporarily disable the test_binaryen_from_source test
under macOS to work around:
https://github.com/WebAssembly/binaryen/issues/4299
2021-11-01 15:30:30 -07:00
Sam Clegg
1c420fd6e5 2.0.32 (#915) 2021-10-19 17:55:27 -07:00
Kevin Lubick
40882443a1 Update build_bazel_rules_nodejs to fix closure compiles (#912)
* Update build_bazel_rules_nodejs to fix closure compiles

* Fix spacing in update_bazel_workspace.sh script

* space
2021-10-19 14:44:48 -07:00
Kevin Lubick
773e4f955d Add embind example to Bazel docs (#910)
* Add embind example to Bazel docs

* address feedback
2021-10-14 13:49:36 -04:00
Sam Clegg
6a932246db Use .json extension for emscripten-releases-tags.json. NFC (#870) 2021-08-25 17:21:40 -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
Sam Clegg
33ce2bdf2c 2.0.19 (#811) 2021-05-04 15:25:01 -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
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
Tim Talashok
c1589b5564 Use emsdk as external bazel dependency (#766)
* 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
2021-03-24 16:50:44 -07: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
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
226b548c31 Rename binaryen-master to binaryen-main (#746)
This matches the branch name that was already updated/renamed.
2021-03-08 08:33:25 -08:00
Sam Clegg
7d155f8424 Move tests to "test" directory. NFC. (#745) 2021-03-08 08:03:07 -08:00