Skip to content

Create manifest SDK entries for ARM64 emscripten-releases builds #816

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

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions emsdk_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%';EMSCRIPTEN_ROOT='%installation_dir%/emscripten'",
"emscripten_releases_hash": "%releases-tag%"
},
{
"id": "releases",
"version": "upstream-%releases-tag%",
"bitness": 64,
"arch": "aarch64",
"macos_url": "https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/%releases-tag%/wasm-binaries-arm64.tbz2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a contextual difference between aarch64 and arm64? I see one in the URL and one in the arch field.

Best answer I found was this: https://stackoverflow.com/a/47274698/1176841

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my understanding it should be the same thing, but python reports the field using different strings on linux and mac M1 it looks like.

Copy link
Member Author

@dschuff dschuff May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are the same thing, and that's a pretty good summary of some reaasons the nomenclature varies. It was pretty amusing in LLVM during the time that ARM was developing their aarch64 backend upstream, while meanwhile it was the industry's worst-kept secret that apple was developing their own arm64 hardware for iOS devices and likely had their own private backend. Eventually they did merge the backends using some code and approaches from both (they also poached the engineer from ARM that led the upstream implementation; I'm sure that helped 😁 )
Anyway, in this patch I just kept aarch64 in the manifest since it was already there but most of the filenames have arm64 in them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use aarch64 in the filenames too.. given that we control them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm64 is more consistent with the binaries we don't control, e.g. python and node; and with other tools on mac (e.g. uname and Python's platform.machine()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying that we have to live with two names :( oh well..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had the same problem with amd64/x86_64... apparently we never learn from our mistakes. (Although to be fair, we do seem to have mostly converged on x86_64 over time, so maybe we will here too...)

"zipfile_prefix": "%releases-tag%-",
"install_path": "upstream",
"activated_path": "%installation_dir%/emscripten",
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%';EMSCRIPTEN_ROOT='%installation_dir%/emscripten'",
"emscripten_releases_hash": "%releases-tag%"
},
{
"id": "releases",
"version": "fastcomp-%releases-tag%",
Expand Down Expand Up @@ -597,6 +609,14 @@
"arch": "x86_64",
"custom_install_script": "emscripten_npm_install"
},
{
"version": "releases-upstream-%releases-tag%",
"bitness": 64,
"uses": ["node-14.15.5-64bit", "python-3.9.2-1-64bit", "releases-upstream-%releases-tag%-64bit"],
"os": "macos",
"arch": "aarch64",
"custom_install_script": "emscripten_npm_install"
},
{
"version": "releases-upstream-%releases-tag%",
"bitness": 64,
Expand Down