Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r #1410

Open
wants to merge 162 commits into
base: update_tests
Choose a base branch
from
Open

r #1410

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
85cf370
1.39.16 (#503)
sbc100 May 15, 2020
5613488
Properly report what is installed in "emsdk list" (#505)
kripken May 21, 2020
855c51d
Improve behaviour regarding "help" (#509)
orestisfl May 28, 2020
858b176
Use embedded configuration by default (#472)
sbc100 May 29, 2020
6b0d151
Properly sort versions in "emsdk list" (#508)
orestisfl Jun 1, 2020
ede26f1
Add host network for building image (#514)
trzecieu Jun 4, 2020
d371fb6
1.39.17 (#518)
kripken Jun 5, 2020
24d8848
Set up build-docker-image job build docker image for tags on Circle C…
Squareys Jun 5, 2020
01589e7
Updated tagging schema for docker images (#519)
trzecieu Jun 9, 2020
27b23d4
1.39.18 (#521)
kripken Jun 12, 2020
7241082
Build docker image as part of CI (#527)
sbc100 Jun 22, 2020
d50b1d8
Simplify docker image in several ways (#523)
sbc100 Jun 23, 2020
8dd51b4
Remove unused permanent in construct_env (#525)
sbc100 Jun 24, 2020
38a270f
Minor python cleanups. NFC. (#496)
sbc100 Jun 24, 2020
25416b8
Testing circleci auto-publish of docker image (#531)
sbc100 Jun 24, 2020
8e5b6d8
More circleci testing (sorry)
sbc100 Jun 24, 2020
618fcf3
More circleci testing
sbc100 Jun 24, 2020
dc74092
Revert testing changes
sbc100 Jun 24, 2020
c080151
Update nodejs to v12.18.1 (#529)
dschuff Jun 24, 2020
47c669a
Update node directory in Dockerfile (#532)
sbc100 Jun 24, 2020
eff1d2e
Drop "-upstream" suffix from docker image name (#530)
sbc100 Jun 24, 2020
7f77b61
Add standard workdir for Dockerimage (#534)
trzecieu Jun 26, 2020
92d512f
docs: change message when running emsdk_env.sh (#537)
Jul 2, 2020
819e95c
Cleanup emsdk_env scripts (#539)
sbc100 Jul 6, 2020
4f2daec
Fix running emsdk_env.sh outside of emsdk directory (#541)
sbc100 Jul 7, 2020
833dfdd
1.39.19 (#542)
kripken Jul 7, 2020
d37abed
Avoid writing to file in emsdk_env.csh / emsdk_env.sh (#544)
sbc100 Jul 11, 2020
c494899
Change EMSDK_SET_ENV to output correct filename for powershell. (#546)
Walt280 Jul 11, 2020
9f63f10
Fix fatal exception in "emsdk list" on unsupported platforms (#549)
bvibber Jul 12, 2020
96ba7f6
Remove bash-ism from emsdk_env.sh (#552)
sbc100 Jul 14, 2020
d4383f4
Fix docker build to not depend on emsdk_set_env.sh (#554)
sbc100 Jul 14, 2020
e5f63be
Update location emsdk_set_env.bat in emsdk.bat (#553)
sbc100 Jul 15, 2020
dec8a63
Remove emsdk_set_ene.bat from .gitignore (#550)
sbc100 Jul 15, 2020
3e9f04d
Remove support for non-embedded mode (#510)
sbc100 Jul 20, 2020
9d1b5b6
Cleanup and unify code for removing files. (#557)
sbc100 Jul 20, 2020
b504f0b
Cleanup legacy 'copy_pregenerated_cache' handling. NFC. (#558)
sbc100 Jul 20, 2020
3249417
1.39.20 (#556)
kripken Jul 20, 2020
d8984b2
Rename build_llvm_monorepo to just build_llvm. NFC. (#560)
sbc100 Jul 21, 2020
4aa0280
Use bundled/embedded python3 binary on OSX (#561)
sbc100 Jul 21, 2020
0e5f2d8
Rename osx -> macos (#563)
sbc100 Jul 21, 2020
4d4ae34
Improve activation message (#562)
sbc100 Jul 22, 2020
9b405d3
Add new python version of known versions in emsdk.bat (#565)
sbc100 Jul 22, 2020
56f5a2b
Cleanup emsdk.bat launcher (#566)
sbc100 Jul 22, 2020
b5077e4
Fix sanity file location within Dockerfile (#568)
kleisauke Jul 23, 2020
de08462
Cleanup Dockerfile. NFC. (#569)
kleisauke Jul 25, 2020
6dac5ae
Fail `update-tags` if not tot revision is found (#574)
sbc100 Jul 27, 2020
e3b0841
[powershell] fix emsdk.ps1 assuming emsdk_set_env.ps1 lives in the cu…
aardappel Jul 29, 2020
1dc9fde
1.40.0 (#577)
kripken Jul 30, 2020
147abfe
Make emscripten directory world writable (#578)
sbc100 Jul 31, 2020
e88a3c5
1.40.1 (#579)
kripken Aug 1, 2020
60e3a51
Split out `expand_sdk_name` function. NFC. (#580)
sbc100 Aug 5, 2020
16d4ec5
Disallow fastcomp in tot and 2.0.0+ (#584)
kripken Aug 7, 2020
1e5c650
Log warnings to stderr (#585)
sbc100 Aug 7, 2020
839c108
2.0.0! (#586)
sbc100 Aug 11, 2020
ff8a62a
Pre-bundle requests module with macOS bundles python (#589)
sbc100 Aug 11, 2020
6adb624
Error on trying to get latest-fastcomp (#590)
kripken Aug 11, 2020
721ef8f
2.0.1 (#596)
kripken Aug 21, 2020
c1f0ad9
Fix emsdk_env.sh for multiple shells (#594)
rwtolbert Aug 22, 2020
9c27544
Add stalebot (#601)
sbc100 Aug 25, 2020
f6c9e45
Fix `emsdk activate` breaking configuration file (#602)
reosablo Aug 31, 2020
645d276
Docker improvements (#571)
kleisauke Sep 2, 2020
2e73421
2.0.2 (#604)
kripken Sep 2, 2020
0eb40e1
Make emsdk_env.sh work under set -o nounset (#605)
nhooyr Sep 7, 2020
81dd223
Parse the releases info only once in emsdk.py. (#607)
j-jorge Sep 10, 2020
bfdfd61
Fix sanity file generation in Dockerfile (#610)
sbc100 Sep 10, 2020
e08b17c
Remove copy_pregenerated_cache (#609)
sbc100 Sep 10, 2020
def6e49
2.0.3 (#612)
kripken Sep 11, 2020
5f630de
add a wasm bazel toolchain (#603)
walkingeyerobot Sep 11, 2020
a94f2fe
update bazel workspace for emscripten 2.0.3 (#613)
walkingeyerobot Sep 12, 2020
edc53e7
Add missing python locations to emsdk.ps1 (#615)
aminya Sep 15, 2020
88b4ec6
2.0.4 (#619)
kripken Sep 16, 2020
843c195
Remove unused parameter (#611)
sbc100 Sep 16, 2020
f8e0b49
Clear PYTHONHOME when using bundled python (#600)
sbc100 Sep 17, 2020
42abe55
Remove native optimizer build from emscripten master install (#622)
sbc100 Sep 21, 2020
7e841b5
2.0.5 (#625)
kripken Sep 28, 2020
807e55c
Set user environment variables permanently by using `--permanent` + d…
aminya Sep 30, 2020
8ca8591
Fix ``The system cannot find the drive specified.`` due to ``::`` sty…
kudaba Sep 30, 2020
e899a6f
Fix issue where MSYS2 and MinGW mistaken for Linux (#628)
Oct 1, 2020
aec1e16
2.0.6 (#629)
kripken Oct 2, 2020
47b7f85
Skip installing optional npm deps, but manually install Closure Compi…
curiousdannii Oct 6, 2020
31f5f84
Revert "Skip installing optional npm deps, but manually install Closu…
kripken Oct 6, 2020
53c184e
Avoid pywin32 dependency on Windows (#635)
aminya Oct 7, 2020
107dc62
Skip installing optional npm deps, but manually install Closure Compi…
curiousdannii Oct 9, 2020
4fe6e49
Fix environment variables to be consistently set when using --system …
kudaba Oct 9, 2020
da9419f
2.0.7 (#641)
kripken Oct 13, 2020
10290f2
Update mac circleci environment (#644)
sbc100 Oct 24, 2020
f3e2e43
2.0.8 (#643)
kripken Oct 24, 2020
4a695be
circleci: Add explict version to `setup_remote_docker`. NFC. (#646)
sbc100 Oct 27, 2020
4078013
fix: emsdk swallows/overwrites parts of PATH (#642)
aminya Oct 31, 2020
8f2f5e3
Fix regression where reinstalling tools from git sources would not gi…
juj Nov 8, 2020
372fb50
2.0.9 (#653)
kripken Nov 16, 2020
aa5fedf
Increate download chunk size of 256k (#657)
sbc100 Nov 25, 2020
62fb171
Remove used arg in scripts/test.bat (#659)
sbc100 Dec 1, 2020
ec9c1c4
2.0.10 (#664)
sbc100 Dec 4, 2020
8234fb3
Add git-lfs package to emsdk Docker image (#665)
haraldreingruber Dec 11, 2020
5fd57ff
2.0.11 (#670)
dschuff Dec 17, 2020
4def4da
fix sln parsing form vs2019 (#679)
fzhangtj Jan 5, 2021
5ad9d72
2.0.12 (#680)
sbc100 Jan 9, 2021
6357c6d
Set binaryen's git branch to `main` in manifest. (#684)
Matthew-McRaven Jan 22, 2021
5fd6f03
fix: bazel/emscripten_toolchain/wasm_binary.py command output withou…
levenon Jan 26, 2021
02edc97
Set LLVM's git branch to `main` in manifest. (#693)
Matthew-McRaven Jan 29, 2021
2c086de
Remove redundant testing/downloading (#695)
sbc100 Jan 30, 2021
cfdcf13
Release 2.0.13 and update bazel toolchain (#694)
sbc100 Jan 30, 2021
45cd9df
Fix: wrong clang path in Bazel toolchain (#699) (#700)
Volcomix Feb 7, 2021
ba7fad3
make hello world simd a bit cleaner (#701)
walkingeyerobot Feb 8, 2021
8b32b7d
Cleanup handling of old prebuild SDK tags (#697)
sbc100 Feb 8, 2021
9e96410
Update node version to 14.15.5 (latest TLS release) (#708)
sbc100 Feb 13, 2021
2b720e5
2.0.14 (#710)
sbc100 Feb 14, 2021
57ebbbd
Avoid adding our java or python to the PATH (#706)
sbc100 Feb 15, 2021
ef638b3
Rename llvm-git-master -> llvm-git-main (#718)
sbc100 Feb 18, 2021
63b6cd2
Allow system npm in "emsdk install emscripten" (#723)
truboxl Feb 23, 2021
102e022
Move error reporting when git is not found during update-tags (#728)
sbc100 Feb 26, 2021
f9af08a
Remove unused run_emcc function. NFC. (#713)
sbc100 Feb 26, 2021
a79eadf
Fix crash attempting to install fastcmp SDK by hash (#730)
sbc100 Feb 26, 2021
fcf1bbe
Limit expansion of %releases-tag% for fastcomp (#731)
sbc100 Feb 26, 2021
c1883c7
Cleanup sys.argv handling. NFC. (#734)
sbc100 Feb 26, 2021
f788ca9
Remove unneeded try/catch (#733)
sbc100 Feb 26, 2021
0a84156
Avoid post-install when nothing is installed (#736)
sbc100 Mar 1, 2021
e08c153
Refactor test.py to use python unittest. NFC. (#735)
sbc100 Mar 1, 2021
53eacf4
Allow the install of any emscripten-releases build (#732)
sbc100 Mar 2, 2021
9d00a82
Remove `update-tags` phase (#738)
sbc100 Mar 5, 2021
8915c20
Always print debug info to stderr (#739)
sbc100 Mar 5, 2021
9d639b3
Fix for `construct_env` and `list` with tot build installed (#741)
sbc100 Mar 5, 2021
6e2873c
Feedback from #741. NFC. (#742)
sbc100 Mar 5, 2021
7cba2e0
2.0.15 (#743)
sbc100 Mar 6, 2021
f0ee795
Remove special version check for vs-tool. NFC. (#740)
sbc100 Mar 8, 2021
7d155f8
Move tests to "test" directory. NFC. (#745)
sbc100 Mar 8, 2021
226b548
Rename binaryen-master to binaryen-main (#746)
sbc100 Mar 8, 2021
73183b5
Fix race between `install tot` and `active tot` (#749)
sbc100 Mar 8, 2021
67dc4b4
Switch emscripten branch from master to main (#750)
sbc100 Mar 8, 2021
1fe8067
Missing update from #746 (#751)
sbc100 Mar 9, 2021
d342821
Skip npm step if node_modules already exists (#640)
sbc100 Mar 10, 2021
329423f
Remove "fastcomp-master" SDKs from emsdk_manifest.json (#752)
sbc100 Mar 10, 2021
cf2e337
Base on Ubuntu Focal. (#747)
MarkCallow Mar 11, 2021
9a70fe3
Rename sdk-upstream-master SDK to sdk-upstream-main (#754)
sbc100 Mar 11, 2021
772d397
Fix search of VCTargetsPath for VS2019 build. (#698)
juj Mar 11, 2021
96d7ee1
Fix support for Apple M1 (#753)
juj Mar 12, 2021
1a38787
Remove absl from wasm_binary (#756)
celentes Mar 12, 2021
1ee4a9c
Fix GitHub repo url in emsdk_manifest.json (#757)
akoeplinger Mar 14, 2021
9c65611
Ccache (#711)
juj Mar 15, 2021
0fe3d48
Update to python 3.9.2 on Windows as well. Mark old Python and Node p…
juj Mar 16, 2021
ac98ca3
Rename EMCC_CCACHE to _EMCC_CCACHE. (#762)
juj Mar 17, 2021
848260e
Bazel add html support (#765)
walkingeyerobot Mar 22, 2021
b85548d
List "Release" as the default build option (#770)
truboxl Mar 22, 2021
fdda852
Simplify the notation for installing by hash to just emsdk install HA…
kripken Mar 22, 2021
c1589b5
Use emsdk as external bazel dependency (#766)
celentes Mar 24, 2021
459f7c1
Update bazel readme (#774)
celentes Mar 25, 2021
6162e2e
2.0.16 (#773)
sbc100 Mar 26, 2021
2e7eaf7
Correct README.md about building arguments of docker image. Fixes #74…
trzecieu Mar 28, 2021
f03f1dc
2.0.17 (#786)
sbc100 Apr 11, 2021
bda6a0c
Remove the use of a custom temp directory. That is a bad practice, we…
juj Apr 23, 2021
e32410e
Add create_release.py script (#798)
sbc100 Apr 23, 2021
cee96f8
2.0.18 (#799)
dschuff Apr 24, 2021
4282d5d
Avoid setting `EM_CACHE` unless we really need to (#797)
sbc100 Apr 26, 2021
16ee884
Fix issues with npm install of google-closure-compiler installing all…
juj Apr 26, 2021
3510ab2
Add option --override-repository (#792)
juj Apr 29, 2021
b4c9194
Unset emsdk-related environment variable from inactive tools (#801)
sbc100 Apr 29, 2021
894c25b
Switch to `HEAD.zip` when downloading archive from github. (#806)
sbc100 Apr 29, 2021
05328c4
Add warning to those using `master` branch (#810)
sbc100 May 3, 2021
619a289
Remove explicit closure install step, the first install command does …
juj May 5, 2021
7e3c046
Error on the master branch, and direct people to main. See #805 (#823)
kripken May 24, 2021
c934d6f
Merge pull request #1 from emscripten-core/master
shivamc21 Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 137 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ jobs:
- checkout
- run:
name: Install debian packages
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless
- run: scripts/test.sh
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh
- run: test/test.sh
- run: test/test_source_env.sh
- run:
name: test.py
command: |
source emsdk_env.sh
scripts/test.py
test/test.py
test-mac:
macos:
xcode: "9.0"
xcode: "12.2.0"
environment:
EMSDK_NOTTY: "1"
# Without this, any `brew installl` command will result in self-update of
Expand All @@ -54,15 +55,12 @@ jobs:
- run:
name: Install cmake
command: brew install cmake
- run:
name: Install python 3
command: brew install python3
- run: scripts/test.sh
- run: test/test.sh
- run:
name: test.py
command: |
source emsdk_env.sh
scripts/test.py
test/test.py
test-windows:
executor:
name: win/vs2019
Expand All @@ -83,12 +81,125 @@ jobs:
- run:
name: Install latest
shell: cmd.exe
command: scripts\test.bat
command: test\test.bat
- run:
name: test.py
command: |
source emsdk_env.sh
python scripts/test.py
python test/test.py

- run:
name: flagless (process/shell) test
shell: powershell.exe
command: |
test/test_activation.ps1

- run:
name: --permanent test
shell: powershell.exe
command: |
$env:PERMANENT_FLAG="--permanent"
test/test_activation.ps1

- run:
name: --system test
shell: powershell.exe
command: |
$env:SYSTEM_FLAG="--system"
test/test_activation.ps1

- run:
name: Process/Shell PATH preservation test
shell: powershell.exe
command: |
test/test_path_preservation.ps1

- run:
name: User PATH preservation test
shell: powershell.exe
command: |
$env:PERMANENT_FLAG="--permanent"
test/test_path_preservation.ps1

- run:
name: System PATH preservation test
shell: powershell.exe
command: |
$env:SYSTEM_FLAG="--system"
test/test_path_preservation.ps1

build-docker-image:
executor: bionic
steps:
- checkout
- run:
name: install docker
command: apt-get update -q && apt-get install -q -y docker.io
- setup_remote_docker:
version: 19.03.13
# Build and test the tip-of-tree build of EMSDK
- run:
name: build
command: make -C ./docker version=tot build
- run:
name: test
command: make -C ./docker version=tot test

publish-docker-image:
executor: bionic
steps:
- checkout
- run:
name: install docker
command: apt-get update -q && apt-get install -q -y docker.io
- setup_remote_docker:
version: 19.03.13
- run:
name: build
command: make -C ./docker version=${CIRCLE_TAG} build
- run:
name: test
command: make -C ./docker version=${CIRCLE_TAG} test
- run:
name: push image
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
make -C ./docker version=${CIRCLE_TAG} alias=latest push

test-bazel-linux:
executor: bionic
steps:
- checkout
- run: apt-get install -q -y curl gnupg
- run: curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
- run: mv bazel.gpg /etc/apt/trusted.gpg.d/
- run: echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
- run:
name: install pip
command: |
apt-get update -q
apt-get install -q -y python3-pip
- run: pip3 install absl-py
- run:
name: install bazel
command: |
apt-get install -q -y bazel
- run: test/test_bazel.sh

test-bazel-mac:
macos:
xcode: "12.2.0"
environment:
EMSDK_NOTTY: "1"
HOMEBREW_NO_AUTO_UPDATE: "1"
steps:
- checkout
- run: brew install grep
- run:
name: install bazel
command: |
brew install bazel
- run: test/test_bazel_mac.sh

workflows:
flake8:
Expand All @@ -103,3 +214,18 @@ workflows:
test-windows:
jobs:
- test-windows
build-docker-image:
jobs:
- build-docker-image
- publish-docker-image:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
test-bazel-linux:
jobs:
- test-bazel-linux
test-bazel-mac:
jobs:
- test-bazel-mac
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ignore all subdirectories
*/*

# Allow to run the test script inside the Docker container
!/docker/test_dockerimage.sh

# Ignore unnecessary files inside top-level directory
*.bat
*.csh
*.fish
*.ps1
*.pyc
.emscripten
.emscripten.old
.emscripten_cache
.emscripten_cache__last_clear
.emscripten_sanity
.emscripten_sanity_wasm
.flake8
emscripten-releases-tot.txt
README.md
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ignore =
E121, # Continuation line under-indented for hanging indent
E722 # bare excepts
exclude =
./llvm
./gnu
./upstream
./fastcomp
Expand Down
18 changes: 18 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 365
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because there has been no
activity in the past year. It will be closed automatically if no further
activity occurs in the next 30 days. Feel free to re-open at any time if this
issue is still relevant.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ __pycache__
/.emscripten_sanity
/.emscripten_sanity_wasm

# Auto-generated by `active`
/emsdk_set_env.bat
/emsdk_set_env.sh

# Tags files that get generated at runtime
/emscripten-releases-tot.txt

Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ https://emscripten.org/docs/building_from_source/toolchain_what_is_needed.html.

### Mac OS X

- `python`: Version 2.7.0 or above.
- For Intel-based Macs, macOS 10.13 or newer. For ARM64 M1 based Macs, macOS
11.0 or newer.
- `java`: For running closure compiler (optional). After installing emscripten
via emsdk, typing 'emcc --help' should pop up a OS X dialog "Java is not
installed. To open java, you need a Java SE 6 runtime. Would you like to
Expand Down Expand Up @@ -117,8 +118,7 @@ SDK from the local hard drive completely.

`emsdk update` will fetch package information for all the new tools and
SDK versions. After that, run `emsdk install <tool/sdk name>` to install a new
version. The command `emsdk update-tags` obtains a list of all new tagged
releases from GitHub without updating Emscripten SDK itself.
version.

### How do I install an old Emscripten compiler version?

Expand All @@ -139,8 +139,8 @@ categories.
To obtain and build latest upstream wasm SDK from source, run

```
emsdk install sdk-upstream-master-64bit
emsdk activate sdk-upstream-master-64bit
emsdk install sdk-upstream-main-64bit
emsdk activate sdk-upstream-main-64bit
```

You can use this target for example to bootstrap developing patches to LLVM,
Expand All @@ -156,8 +156,8 @@ https://emscripten.org/docs/contributing/developers_guide.html?highlight=develop
### When working on git branches compiled from source, how do I update to a newer compiler version?

Unlike tags and precompiled versions, a few of the SDK packages are based on
"moving" git branches and compiled from source (e.g. sdk-upstream-master,
sdk-master, emscripten-master, binaryen-master). Because of that, the
"moving" git branches and compiled from source (e.g. sdk-upstream-main,
sdk-main, emscripten-main, binaryen-main). Because of that, the
compiled versions will eventually go out of date as new commits are introduced
to the development branches. To update an old compiled installation of one of
this branches, simply reissue the "emsdk install" command on that tool/SDK. This
Expand All @@ -176,9 +176,8 @@ reissuing `emsdk install`.

You can toggle between different tools and SDK versions by running `emsdk
activate <tool/sdk name>`. Activating a tool will set up `~/.emscripten` to
point to that particular tool. On Windows, you can pass the option `--global` to
the `activate` command to register the environment permanently to the system
registry for all users.
point to that particular tool. On Windows, you can pass the option `--permanent` to
the `activate` command to register the environment permanently for the current user. Use `--system` to do this for all users.

### How do I build multiple projects with different SDK versions in parallel?

Expand All @@ -199,11 +198,11 @@ where you directly interact with the github repositories. This allows you to
obtain new features and latest fixes immediately as they are pushed to the
github repository, without having to wait for release to be tagged. You do not
need a github account or a fork of Emscripten to do this. To switch to using the
latest upstream git development branch `master`, run the following:
latest upstream git development branch `main`, run the following:

emsdk install git-1.9.4 # Install git. Skip if the system already has it.
emsdk install sdk-upstream-master-64bit # Clone+pull the latest emscripten-core/emscripten/master.
emsdk activate sdk-upstream-master-64bit # Set the master SDK as the currently active one.
emsdk install sdk-upstream-main-64bit # Clone+pull the latest emscripten-core/emscripten/main.
emsdk activate sdk-upstream-main-64bit # Set the main SDK as the currently active one.

### How do I use my own Emscripten github fork with the SDK?

Expand All @@ -213,16 +212,16 @@ acquainted with working on multiple remotes in a git clone, these steps should
be familiar to you. This is useful in the case when you want to make your own
modifications to the Emscripten toolchain, but still keep using the SDK
environment and tools. To set up your own fork as the currently active
Emscripten toolchain, first install the `sdk-master` SDK like shown in the
Emscripten toolchain, first install the `sdk-main` SDK like shown in the
previous section, and then run the following commands in the emsdk directory:

cd emscripten/master
cd emscripten/main
# Add a git remote link to your own repository.
git remote add myremote https://github.com/mygituseraccount/emscripten.git
# Obtain the changes in your link.
git fetch myremote
# Switch the emscripten-master tool to use your fork.
git checkout -b mymaster --track myremote/master
# Switch the emscripten-main tool to use your fork.
git checkout -b mymain --track myremote/main

In this way you can utilize the Emscripten SDK tools while using your own git
fork. You can switch back and forth between remotes via the `git checkout`
Expand Down
44 changes: 44 additions & 0 deletions bazel/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package(default_visibility = ['//visibility:public'])

config_setting(
name = "linux",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "macos",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "windows",
constraint_values = [
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
)

alias(
name = "binaries",
actual = select({
":linux": "@emscripten_bin_linux//:all",
":macos": "@emscripten_bin_mac//:all",
":windows": "@emscripten_bin_win//:all",
}),
)

alias(
name = "node_modules",
actual = select({
":linux": "@emscripten_npm_linux//:node_modules",
":macos": "@emscripten_npm_mac//:node_modules",
":windows": "@emscripten_npm_win//:node_modules",
}),
)

Loading