Commit Graph

44 Commits

Author SHA1 Message Date
Sam Clegg
8dd51b45e9 Remove unused permanent in construct_env (#525)
This was only ever set to true if the user knew to pass an
undocumented extra argument called "perm".
2020-06-23 17:59:46 -07:00
Orestis Floros
6b0d151917 Properly sort versions in "emsdk list" (#508)
Split version to integers but avoid exceptions in case there is a
non-numerical character in some version.

Comparison:
    Before   |   After
    1.39.9       1.39.16
    1.39.8       1.39.15
    1.39.7       1.39.14
    1.39.6       1.39.13
    1.39.5       1.39.12
    1.39.4       1.39.11
    1.39.3       1.39.10
    1.39.2       1.39.9
    1.39.16      1.39.8
    1.39.15      1.39.7
    1.39.14      1.39.6
    1.39.13      1.39.5
    1.39.12      1.39.4
    1.39.11      1.39.3
    1.39.10      1.39.2
    1.39.1       1.39.1
    1.39.0       1.39.0
    1.38.48      1.38.48
    1.38.47      1.38.47
    1.38.46      1.38.46
    1.38.45      1.38.45
    1.38.44      1.38.44
    1.38.43      1.38.43
    1.38.42      1.38.42
    1.38.41      1.38.41
    1.38.40      1.38.40
    1.38.39      1.38.39
    1.38.38      1.38.38
    1.38.37      1.38.37
    1.38.36      1.38.36
    1.38.35      1.38.35
    1.38.34      1.38.34
    1.38.33      1.38.33
2020-06-01 15:15:41 -07:00
Sam Clegg
858b176f68 Use embedded configuration by default (#472)
This is part of a wider plan to remove the use of the user's HOME
directory completely:
  https://github.com/emscripten-core/emscripten/issues/9543
2020-05-29 09:49:51 -07:00
Orestis Floros
855c51d36d Improve behaviour regarding "help" (#509)
Also accept -h for help. 

This is the usual behaviour of most utils that accept --help.

Also, now an empty call to ./emsdk does not print the full help, as
discussed in #509.
2020-05-28 13:25:23 -07:00
Alon Zakai
5613488e75 Properly report what is installed in "emsdk list" (#505)
This expands on #460 which added a file in each install dir
with the version, that lets us know not to re-download it. That
didn't integrate with is_installed, so it wasn't reported properly,
which this PR fixes.

With this we can remove a hack for python, as we can simply
not install anything if it's already installed (see line 1859).

Also add the "INSTALLED" indicators on the main listings in
"emsdk list".

Bug was reported in #477
2020-05-21 10:35:48 -07:00
Sam Clegg
14c0a9ec21 Update default emscripten cache directory (#501)
See: https://github.com/WebAssembly/waterfall/pull/644

For the sake of older versions of emscripten explicitly set
EM_CACHE environment variable to point to the in-tree cache
directory.
2020-05-13 16:28:49 -07:00
Sam Clegg
7e22ab8ae0 Refactor such that Tool.activated_config returns a map. NFC (#502)
Split out from #501
2020-05-13 15:43:00 -07:00
Alon Zakai
4265173445 Remove legacy builds (#500)
"Legacy" here meaning anything using only < 1.38.0, and anything
using 'nightly' mozilla builds (which have not been done for years).

This also lets us remove node 4.1.1 (but not 8.9.1).
2020-05-13 08:10:23 -07:00
Sam Clegg
f5e21de6d6 Fix for parsing existing config in --embedded mode after #495 (#498)
Ooops, I guess even the most innocent-seeming change can have
unintended consequences. Switching to embedded by default will at
least make this path more tested in the future.

Fixed #497
2020-05-08 10:45:57 -07:00
Sam Clegg
88ae40037b Make installation errors fatal (#437)
If `is_installed` doesn't return true after install than something
serious went wrong so make this into a warning.

Also, clean up couple of places to make the python code more
readable.
2020-05-07 12:51:19 -07:00
Sam Clegg
683ceadc32 Add CACHE setting to config file (for embedded users) (#495)
See https://github.com/emscripten-core/emscripten/pull/11091
2020-05-07 12:12:52 -07:00
Sam Clegg
a8263f30af Allow EMCC_BASH to force bash during construct_env (#493)
This allows `emsdk_env.sh` to work under bash for windows even in the
absence of the `MSYSTEM` environment variable (which seems to be 
the setup on circle CI.
2020-05-07 08:31:02 -07:00
juj
7016bd60ce Drop Visual Studio 2015 build support and older (#482)
* Drop Visual Studio 2015 build support and older

* Flake
2020-04-28 17:25:19 +03:00
Dan Field
009ab2c77f Avoid re-downloading files that are already downloaded (#460)
* Writes a .emsdk_version file to output directories using the name (which contains a version number and/or hash) once all installation steps have completed successfully.
* If that file exists, skip downloading/installation hooks.
2020-04-01 13:46:22 -07:00
Alon Zakai
8a35734a47 Fix precompiled library support + testing (#444)
Support multiple libraries for precompiled things, as we use a
different one for LTO, etc.
2020-03-05 10:45:46 -08:00
Diego Casorran
50df5a2983 Fix ZIP extraction on Windows. (#438)
Meant to resolve #412 (comment)
2020-02-12 14:01:50 -08:00
Sam Clegg
deaa7e4bfd Hide npm output by default (#431)
Fixes: https://github.com/emscripten-core/emscripten/issues/10291
2020-01-28 17:12:31 -08:00
Sam Clegg
ba53d20e94 Use npm ci over npm install (#433)
Fixes: https://github.com/emscripten-core/emscripten/issues/10291

Also fix issue where an old/incorrect version of node could be used
during SDK install since we were preferring activated versions of node.
2020-01-28 14:32:36 -08:00
Sam Clegg
3532fd3924 Extract install_sdk and install_tool from install. NFC (#432)
This change simply splits this function into its two logical parts.
2020-01-28 10:36:16 -08:00
Sam Clegg
997b0a19ff Pass --no-audit to npm install (#426)
Fixes https://github.com/emscripten-core/emscripten/issues/10246
2020-01-21 09:22:15 -08:00
Sam Clegg
3631f0aac3 Remove use of incoming branches (#423)
See https://github.com/emscripten-core/emscripten/issues/10067
2020-01-14 13:59:15 -08:00
juj
d30ba160ed Add npm install step as post-build to Emscripten (#404)
* Add npm install step as post-build to Emscripten

* Address review

* Run npm install on releases-upstream and releases-fastcomp

* Fix node path

* Add node to PATH

* Only install production packages with npm

* Address review
2020-01-10 22:11:38 +02:00
Ron Wright
98ad15a3d7 Fix issue with Windows paths under MinGW versions of Python (#419) 2020-01-07 12:11:29 +02:00
juj
b7cde08f6c Remove old workaround that was there to restore %SystemRoot% in PATH on Windows systems that were affected by #4121. (#416) 2019-12-19 20:30:02 +02:00
juj
f72c6e9dec Add support for building with Visual Studio 2019 (#415) 2019-12-19 20:29:21 +02:00
juj
2546d5ab51 Build wasm master (#401)
* Build wasm upstream

* Fix lld build for wasm-ld. Add note about compiler-rt not working.

* Address review

* Address review

* Address review

* Address review

* If targeting fastcomp Clang, apply EMCC_WASM_BACKEND=0 so that previous leftover environment with EMCC_WASM_BACKEND=1 will not cause a conflict

* Add docs about setting up Emscripten
2019-12-16 23:59:15 +02:00
Sam Clegg
322c7aa727 Don't force re-download of all archives during install (#411)
Only do this for the new `emscripten-releases`.   These all install
the the same directory so we can't use the presence of the directory
to know if we have already installed them.
2019-12-11 16:55:06 -06:00
Sam Clegg
3c548d39f2 Clobber target directory before extracting SDK tools (#410)
With emscripten-releases all the SDKs install the same directory so
this is particularly important for them.
2019-12-11 15:15:45 -06:00
juj
cf90c72aba Do not attempt to reinstall python if it already exists (#394)
* Do not attempt to reinstall python if it already exists, since that python may be interpreting the current emsdk.py script that is being executed to do the installation.

* Add TODO comment about refactoring install scheme
2019-12-05 17:59:21 +02:00
juj
5b75fb38da Remove unused EMSDK_DEV option. (#393) 2019-11-25 19:56:28 +02:00
Sam Clegg
ae5044e779 Switch default backend from 'fastcomp' to 'upstream' (#373)
When users as for 'latest' or just '1.39.0' we now default to the
upstream llvm backend.

For versions before 1.39.0 we continue to default to fastcomp.

Fixes: https://github.com/emscripten-core/emscripten/issues/5488
2019-10-21 14:23:29 -07:00
Alon Zakai
6ac51b4275 Show a clear error when a tool is only 64-bit but the platform is 32. (#378) 2019-10-18 12:58:53 -07:00
Alon Zakai
e375d247f2 Strip the tot value. (#375)
Opening it and saving it in an editor can add a newline, and we have user
reports of this happening for users.

Fixes emscripten-core/emscripten#9651
2019-10-17 15:26:22 -07:00
Alon Zakai
7f9af7bd1a 1.38.48 (#371) 2019-10-11 09:13:44 -07:00
Nikolaos S. Papaspyrou
27d6233c80 Add support for constructing a t?csh environment (#370) 2019-10-10 14:55:27 -07:00
Sam Clegg
cf01b11c4e Fix for default NODE_JS in config file (#369)
This was broken in #362
2019-10-09 11:33:15 -07:00
Sam Clegg
6ab7f5829a Cleanup emsdk.py (#362)
- Remove some unneeded use of `global` keyword
- Use OrderedDict
- Add exit_with_error helper
- Remove SPIDERMONKY_ENGINE from emscripten config
2019-10-07 17:02:15 -07:00
Hills
29ad7fab7b Add a warning on old Python SSL/TLS certificates (#354)
The OSX message is [SSL: CERTIFICATE_VERIFY_FAILED] while trying to download files.
While, the Linux Python message is less descriptive.
Error downloading URL 'https://xxxx.xxx.xxx': <urlopen error unknown url type: https>.

This hopefully reduces the stream of common issues raised during installation as a result of the change of Python TLS certs to 2048 or greater.
This change relates to  #133 #136 #140 #176 #6275 #6548 #6723 #9036 … and possibly more.

Installation can be accomplished by installing the latest Python certificates (pip install certifi), symbolic linking a new python version, and relying on the python shebang line to run $ ./emsdk.py install latest.
2019-10-07 14:08:53 -07:00
Alon Zakai
a6c8e25a59 Remove some mozilla-games remnants (#360)
Remove obsolete docs links.

Remove downloading of the old releases list, and bundle the file in the repo.

Also the message in update-tags was wrong: we need git to do anything there now, as update-tags gets emscripten-releases using git currently (which is ok as update-tags is run by users that installed with git; otherwise they installed without git and just update the entire emsdk normally).
2019-09-23 10:37:49 -07:00
Sam Clegg
252410a7e8 Handle missing downloads gracefully (#353)
Previously we were asserting and generating a stack track if a
download failed.  However the assert is only relevant if the download
succeeds.

Also:

- Remove an unused function
- Remove extra braces from tuple destructuring
2019-09-13 14:53:04 -07:00
Sam Clegg
40495c0a31 Fix a bunch of flake8 warnings (#239)
Now that we have much better testing in CI this kind of change
should be much easier to make with confidence.
2019-08-29 12:15:39 -07:00
Sam Clegg
880be59788 Add circleci config with mac, windows and linux testing (#338)
- Add EMSDK_NOTTY variable which we can use on CI to prevent tty output.
- Add test.bat for windows which mirrors test.sh.
- Remove travis support
2019-08-29 00:35:36 -07:00
Sam Clegg
f68effe57e Update flake8 and fix warnings in .py files (#334) 2019-08-28 15:15:38 -07:00
Sam Clegg
a562ff7bda Use a wrapper script for running emsdk.py (#292)
This change moves the python code for emsdk into a file ending in .py.
This script is then run via emsdk.bat on windows or emsdk (a shell
script) on non-windows.

This avoid the #!/bin/sh at the top of the python script and the "exec"
hack on the first line that re-runs it under python.  Hopefully this
preserves the intent of #273 without jumping through so many hoops.
2019-08-27 14:02:50 -07:00