Commit Graph

158 Commits

Author SHA1 Message Date
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
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