Commit Graph

182 Commits

Author SHA1 Message Date
mtb
fad40cf1f4 fix: improve Fish shell support (and Cshell) (#1429)
I faced the same issue mentioned in #1299, this PR fixes the issue by
taking in account specific `set` and `unset` syntax for Fish shell.

The post install instruction (i.e : `./emsdk activate latest`) provides
wrong instructions in Fish shell and Cshell cases.
This should be fixed by this PR too, although the code is a bit
redundant and it could be more cleaner.
2024-07-31 17:41:32 -07: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
Sam Clegg
176dec4875 arm64-linux binaries are now available for all releases (#1369) 2024-04-10 16:32:54 -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
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
f2baa2f56a Only pass -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON when building llvm. NFC (#1334) 2024-01-24 12:09:59 -08: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
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
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
Sam Clegg
4f2db9682c Rename zipfile to archive or download as appropriate. NFC (#1257) 2023-07-10 14:04:24 -07:00
Alon Zakai
3bde060365 Fix a typo (#1251) 2023-06-27 16:51:34 -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
098a3ffa2c Add a warning when trying to install linux-arm64 binaries (#1249)
See #547
2023-06-27 15:38:09 -07:00
Sam Clegg
1d59cd22bd Prefer arm64 over aarch64 internally. NFC (#1246)
This seems like more commonly known/used name for the architecture
these days.
2023-06-27 13:46:33 -07:00
Sam Clegg
c04b1bbb3a Only add node/bin to user's PATH if one is not already found (#1189)
If the user already has a version of node in their PATH don't clobber
it.  This doesn't effect emscripten since the version of node we use
there is controlled via the config file, not via PATH.

Part of fix for #705.
2023-03-03 07:37:33 -08:00
Radek Bartoň
90b4a16f05 Remove unused build_target_platform parameter from make_build (#1187) 2023-02-16 09:49:40 -08:00
Radek Bartoň
7bcf1449c0 Add Windows Arm64 support for compiling from source (#1186) 2023-02-15 13:10:41 -08:00
Sam Clegg
6305e91dee Improve ordering in emsdk list (#1180)
We have an existing `version_key` helper function for sorting versions.

It also does a better job, producing output like:

```
All recent (non-legacy) installable versions are:
         3.1.31
         3.1.31-asserts
         3.1.30
         3.1.30-asserts
         3.1.29
         3.1.29-asserts
```

Rather than:

```
All recent (non-legacy) installable versions are:
         3.1.31
         3.1.30
         3.1.29
         3.1.28
         3.1.27
```

(with -assert versions listed after 3.1.0)
2023-01-30 15:46:18 -08:00
juj
c678733d9e Remove support for building with Visual Studio 2017. Since Jan 29, 2022, upstream LLVM has required VS2019 or VS2022 to build. So it has not been possible to build emsdk from source with VS2017 for a year. 058c5dfc78 (#1178) 2023-01-30 17:46:04 +02:00
juj
592b7b74e4 Fix args ordering in LLVM build from previous commit (#1179) 2023-01-28 15:58:49 +02:00
juj
fa5f5f374f Add support for Visual Studio 2022 (#1177)
* Add support for Visual Studio 2022 and migrate to using cmake --build when building on Windows. Leverage the VS2019 MSBuild 'Multi-ToolTask' feature CL_MPCount to saturate project builds properly to 100% CPU usage so building LLVM builds different cpp files in parallel. Clean up some code duplication around Visual Studio support.

* flake

* Work around Linux bot not having 'cmake --build . -j' flag.
2023-01-28 13:08:17 +02:00
Sam Clegg
ae2664b48f Remove uneeded str. NFC (#1170)
These function already returns a string.
2023-01-13 20:14:55 -08: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
58904e9b74 Remove reference to fastcomp-latest. NFC (#1164)
fastcomp can only be install using explicit versions names so this name
doesn't work.
2023-01-05 09:17:17 -08:00
Sam Clegg
32fba7b7c4 Use constants for fixed paths. NFC (#1140) 2022-11-30 16:32:26 -08:00
Pierrick Bouvier
35358657b4 Use x64 version for Windows on Arm (#1115) 2022-10-08 17:17:19 -07: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
e456ebdd52 Add EMSDK_QUIET to make emsdk_env less chatting (#1091)
Without this the recommended way to silence emsdk_env was to pipe its
stderr to /dev/null.. but then you also loose potentially useful error
message.

Fixes: #946
2022-08-19 12:13:03 -07:00
Tim Ebbeke
5ad3ff05a7 Exclude msys from path fix function. (#1078)
Fixes: #911
2022-07-23 21:31:41 -07:00
Sam Clegg
b0a51b36ee Pin latest to a specific version for arm64-linux (#1065)
Fixes: #1040
2022-07-01 15:26:24 -07:00
juj
7978a62f2b Pass -DENABLE_WERROR=0 when building Binaryen (#1028)
* Pass -DENABLE_WERROR=0 when building Binaryen

We are experiencing an issue at our Unity CI with building Binaryen: https://github.com/WebAssembly/binaryen/issues/4588

It seems that for end users, disabling -Werror is a good general measure to enable wider chance of success to build. Emsdk installations are unlikely to be used by Binaryen developers to iterate on Binaryen development, so it is not necessary there?

* Flake
2022-04-13 19:48:00 +03:00
juj
c2147f3b87 Enable building LLVM with about-to-be deprecated toolchains (#1029)
* Enable building LLVM with about-to-be deprecated toolchains for best chance of succeeding with the build.

* Shorten line length

* Adjust to 80 columns
2022-04-13 19:44:14 +03:00
juj
7d5e3f3e45 Git clone desired target branch directly (#1030)
When doing a git clone of a branch, instead of doing a general git clone that first would check out the default (main/master) branch and then later doing a checkout to switch to the target branch, instead specify the `--branch` option to the clone command line to immediately clone and checkout the desired final branch.

This helps first checkout runtime performance on CIs, especially when using shallow clones (GIT_CLONE_SHALLOW option).

Also this sidesteps a really odd git clone issue we are currently seeing in our CI, where it is unable to `checkout` the googletest submodule in binaryen, but would fail saying "path not found".
2022-04-13 19:34:37 +03:00
juj
051d745e16 Fix native Closure Compiler to work. (#995)
* Fix native Closure Compiler to work. Reverts my earlier PR #803 which was a great mistake, as it caused Emscripten to silently fall back to Java version of the Closure Compiler. After this PR, Closure Compiler will work on user platforms that do not have Java installed. Also forcibly remove Java version of Closure Compiler on systems where installing the native version succeeds, in order to save on code size.

* Add note to bug

* Improve google-closure-compiler-java uninstall.

* Read Closure version from Emscripten repository

* Skip native google-closure-compiler install when it is not present in the emscripten branch in package.json

* Print error
2022-04-13 16:44:59 +03:00
juj
9498542d95 Cache git executable search into a variable. (#1021)
* Cache git executable search into a variable. This helps reduce noise in the verbose debug logging output messages when EMSDK_VERBOSE=1 is enabled.

* Flake

* Mark cached_git_executable global
2022-04-12 16:08:02 -07:00
百地 希留耶
714d434b1a Set environment for powershell on all platforms (#1017) 2022-03-28 08:41:40 -07:00
Sam Clegg
dd10e14bce Followup from #1013 (#1015) 2022-03-24 16:19:49 -07:00
Sam Clegg
1b1f5f24df Remove unused codepath for single-file tools. NFC (#1013)
We don't have any tools that are just one file, and indeed we
assume these days that tools install to their own directory.
2022-03-24 15:29:40 -07:00
Sam Clegg
2a68987f5e Remove non-ascii char from emsdk.py. NFC (#1014)
This was introduced by mistake in #996 and causes Emsdk.test_no_32bit to fail.
2022-03-23 16:26:39 -07:00
juj
497595e830 Fix macOS build (#996)
* Fix macOS build. See https://github.com/WebAssembly/binaryen/issues/4299

* Update comment
2022-03-23 09:32:54 +02:00
Sam Clegg
637777bd62 Minor python code cleanup (#1008)
Regarding the change to `content_exists`, we only support tools that
are directories full of files, there is no such thing as a tool that
is just a single file and not a directory.
2022-03-22 16:52:43 -07:00
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