Commit Graph

999 Commits

Author SHA1 Message Date
Michael Allwright
82d41a76d3 [Bazel] Support generating a secondary cache (#1405)
This is a working solution for generating a separate Emscripten cache.
Note that this requires an additional entry in the workspace as follows:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache()
```
When used like this, the default Emscripten cache will be used. However,
if the entry is as follows:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache(flags = ["--lto"])
```
Then embuilder will be called to build all system libraries and ports
(i.e., the `ALL` option to embuilder) with the LTO option enabled. This
can take awhile, so I have also made possible to specify which libraries
you want to build explicitly:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache(
    flags = ["--lto"],
    libraries = [
        "crtbegin",
        "libprintf_long_double-debug",
        "libstubs-debug",
        "libnoexit",
        "libc-debug",
        "libdlmalloc",
        "libcompiler_rt",
        "libc++-noexcept",
        "libc++abi-debug-noexcept",
        "libsockets"
    ]
)
```

Resolves #807, resolves #971, resolves #1099, resolves #1362, resolves
#1401
2024-07-01 09:23:07 -07:00
Alexander Köplinger
7fbd555dbe Use "command -v" instead of "which" to detect python executable (#1419)
On a Linux distro that doesn't have the `which` program installed we're
getting the following error:

    $ ./emsdk install latest
    ./emsdk: line 39: exec: python: not found

It's failing to detect the installed `python3` and falls back to using
`python`, but this distro doesn't provide a python -> python3 symlink so
we fail.

Fix this by using `command -v` instead which is a POSIX standard.
The same change went into emscripten a couple years ago:
https://github.com/emscripten-core/emscripten/pull/15071
2024-07-01 09:22:28 -07:00
Daniel Kalmar
a33daf378c Ensure temporary files have proper unique names for bazel builds. (#1415)
This attempts to fix #1386.
2024-06-27 13:50:03 -04:00
Sam Clegg
8caaa25afb Add some logging after download is finished. NFC (#1413)
Also move some code outside of the `using` block.
2024-06-25 13:04:03 -07:00
Sam Clegg
a6db8d2872 Add logging of sys.executable on startup. NFC (#1412) 2024-06-25 13:03:25 -07:00
Derek Schuff
4b9e83d629 Remove Intel mac CircleCI configuration (#1409)
Also switch bazel-mac to the arm64 config.
The CircleCI Intel mac config will be turned down soon.
2024-06-20 16:16:05 -07:00
William Izzo
0e8c5bb1e3 Sets wasm_worning_as_error disabled by default. (#1406)
This removes `-Werror` set by default, thus conforming with default
bazel cc toolchain.

Co-authored-by: William Izzo <william.izzo@hey.com>
2024-06-20 13:34:22 -04:00
William Izzo
d29161158e [Bazel] Let audio workout bootstrap js file be generated. (#1404)
* Allows generation of audio worklet bootstrap js file

In order to allow users to generate the file, the allowed extension list in `link_wrapper.py` has been updated accordingly.

* adds audio worklet js to wasm_cc_binary too

---------

Co-authored-by: William Izzo <william.izzo@hey.com>
2024-06-14 12:13:50 -04:00
Derek Schuff
ca7b40ae22 3.1.61 (#1394) 2024-05-31 22:11:07 -07:00
Yolanda-Chen
dd3b9c6208 Add feature to support WASM Relaxed SIMD (#1389) 2024-05-30 15:27:47 -04:00
Sam Clegg
4205979286 Remove setting of SSL_CERT_FILE from emsdk launcher script (#1391)
Since we use curl now (#1355) this should no longer be needed.
2024-05-28 15:12:09 -07:00
Sam Clegg
8c38d2f915 Upgrade node from v16.20.0 to v18.20.3 (#1387)
Node v18 is that current LTS release of node and v18.20.3 is the latest
release of v18.

This change means that emsdk is no longer installable on Ubuntu/Bionic
18.04, and we now require Ubuntu/Focal 20.04.

See: #1183
Fixes: #1173
2024-05-28 12:12:17 -07:00
冰雪殇璃陌梦
fc9146e09f Upgrade CI to Ubuntu 20.04 LTS (Focal) (#1183)
# Why
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
# What's changed.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
2024-05-28 11:34:36 -07:00
Derek Schuff
ce74ca2b1c 3.1.60 (#1385) 2024-05-20 23:41:54 +00:00
walkingeyerobot
399e5396df [bazel] add tarball as an optional output (#1383)
Usage would be something like:
```
filegroup(
    name = "hello-world-tarball",
    srcs = [":hello-world-wasm"],
    output_group = "_wasm_tar",
)
```
2024-05-15 17:20:54 -04:00
Sam Clegg
d52c465201 3.1.59 (#1377) 2024-04-30 07:56:18 -07:00
Anita Hammer
f58f80d3ba Update docker/README.md (#1375) 2024-04-27 20:25:02 -07:00
Sam Clegg
e0a6aa06b1 3.1.58 (#1372) 2024-04-23 10:13:28 -07:00
Ezekiel Warren
ad59642673 fix(bazel): use param file for compile (#1373)
* fixes issues on windows when dealing with many dependencies causing a
  'command line too long' error
2024-04-22 14:19:11 -04:00
Sam Clegg
176dec4875 arm64-linux binaries are now available for all releases (#1369) 2024-04-10 16:32:54 -07:00
Sam Clegg
229d83fc70 3.1.57 (#1367) 2024-04-10 10:11:44 -07:00
Damian
90d2168e72 (bazel) Set @platforms//os:emscripten for platform_wasm (#1363)
* (bazel) Set @platforms//os:emscripten for platform_wasm

* (bazel) Set @platforms//os:emscripten for platform_wasm

* (bazel) Set @platforms//os:emscripten for platform_wasm
2024-04-04 15:04:10 -04:00
Heejin Ahn
e10826f919 3.1.56 (#1360)
#1353 turned out to be broken, so this is the second try.
2024-03-14 17:25:09 -07:00
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
44bf7cfbe6 CI: Build latest docker image rather than tot (#1359)
This means that CI run that update `latest` actually test the thing
we are about to ship.

We recently had a case where `latest` was broken but `tot` was fixes
and we accidentally shipped a broken SDK version (#1353).
2024-03-14 09:45:41 -07:00
Heejin Ahn
da5a19215a 3.1.56 (#1353) 2024-03-13 22:34:27 -07:00
Sam Clegg
5726cccef5 Remove JS_ENGINES and COMPILER_ENGINE from config file (#1354)
`COMPILER_ENGINE` was completely removed from emscripten in
https://github.com/emscripten-core/emscripten/pull/9469.

`JS_ENGINES` is only used/needed for testing and is no longer needed
as of https://github.com/emscripten-core/emscripten/pull/9542.
2024-03-13 17:54:26 -07:00
Sam Clegg
7815dcaa5c 3.1.55 (#1350) 2024-03-01 10:59:26 -08:00
Sam Clegg
c18280c8f3 3.1.54 (#1343) 2024-02-15 21:46:38 +00:00
Sam Clegg
2aa7490715 3.1.53 (#1336) 2024-01-29 23:20:15 +00:00
Sam Clegg
4f0128ee77 [ci] Update to latest version of cicleci windows orb (#1339)
See https://github.com/emscripten-core/emscripten/pull/21110
2024-01-29 22:28:36 +00:00
Sam Clegg
f2baa2f56a Only pass -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON when building llvm. NFC (#1334) 2024-01-24 12:09:59 -08:00
Sam Clegg
96bd9f0c9a 3.1.52 (#1332) 2024-01-19 17:47:51 +00:00
Sam Clegg
0bbae74935 Restore npm install step removed in #1325 (#1329) 2024-01-03 10:25:06 -08:00
Тhоmаs Ll
9347bc393b Fix FileExistsError on subsequent bazel builds on Windows (#1326) (#1326)
Fixes #1181.
2023-12-27 16:21:55 -05:00
Sam Clegg
8822664a14 Remove logic build building native asm.js optimizer. NFC (#1325)
We no longer support building fastcomp-based SDKs
2023-12-18 11:40:24 -08:00
Sam Clegg
4e2496141e 3.1.51 (#1323) 2023-12-13 16:49:36 -08:00
Sam Clegg
cc1b3efbd3 Error on unknown arguments passed to --activate (#1313)
See #1312
2023-12-08 10:30:37 -08:00
Sam Clegg
ef77dcc2c0 Add suggestion to install using --permanent or --system on windows. NFC (#1308)
Fixes: #1307
2023-12-04 09:26:53 -08:00
Jamie
b54a6b662f Auto-publish Arm64 images when emscripten-releases-tags.json is updated (#1231)
Add job to conditionally build arm64 images when emscripten-releases-tags.json updated
2023-12-03 21:11:09 -08:00
Heejin Ahn
e2627e265d 3.1.50 (#1306) 2023-11-29 22:35:48 -08:00
Felix Kälberer
88c2c95955 Fix spelling in README.md (#1305) 2023-11-28 09:46:12 -08:00
Sam Clegg
bfda0d0756 3.1.49 (#1300) 2023-11-14 09:35:29 -08:00
Sam Clegg
f677ef9156 3.1.48 (#1297) 2023-11-05 17:05:00 -08:00
Attila Oláh
34e6772389 [Bazel] Add an :all target (#1295)
Having an :all target is the most future-proof way here.

Closes #1294.
2023-10-30 12:34:41 -07:00
Sam Clegg
40e9cd8fbc Update linux arm64 to 3.1.47 (#1288) 2023-10-10 23:30:01 -07:00
Sam Clegg
37b85e9eae 3.1.47 (#1286) 2023-10-09 19:57:37 -07:00
Sam Clegg
717174835a Use .tar.xz extension for arm64 linux binary upload (#1287) 2023-10-09 19:24:36 -07:00
Sam Clegg
8e82384f27 Update file extension used by create_release script (#1285)
This should have been part of #1235
2023-10-09 18:54:56 -07:00
Sam Clegg
d42c740aa5 Switch to .xz by default for SDK downloads (#1281)
This is a bit of a hack but I can't think of another way to do it.
Basically when downloading SDKs, we first try the new `.xz` extension.
If that fails, we fall back to the old `.tbz2`.  Both these first two
download attempts we run in "silent" mode.  If both of them fail we
re-run the original request in non-silent mode so that the error message
will always contain the original `.xz` extension.

See #1235
2023-09-21 15:16:34 -07:00