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

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

Merged
merged 1 commit into from
May 11, 2021

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented May 7, 2021

This allows emsdk to download the new ARM64 binaries from
the emscripten-releases builders.

This allows emsdk to download the new ARM64 binaries from
the emscripten-releases builders.
@dschuff
Copy link
Member Author

dschuff commented May 7, 2021

I'm not sure how to test this in the repo. If you have an arm64 mac you can test it manually by installing ./emsdk install a20c9d93a793e04161a85e13c8f455cfe389506a (other revisions won't be uploaded until the corresponding CL lands in the release builder, https://chromium-review.googlesource.com/c/emscripten-releases/+/2876181)

@dschuff dschuff requested review from sbc100, juj and kripken May 7, 2021 00:37
@sbc100
Copy link
Collaborator

sbc100 commented May 7, 2021

How have folks been installing the x64 pre-builts on arm64 so far? I though we did some hack to make that work but I can't find it now. @juj might know.

@sbc100
Copy link
Collaborator

sbc100 commented May 7, 2021

See #671

@sbc100
Copy link
Collaborator

sbc100 commented May 7, 2021

Ah, that hack didn't land yet so there is currently no way to easily install the x86 binaries on arm. See #771

"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...)

@juj
Copy link
Collaborator

juj commented May 9, 2021

How have folks been installing the x64 pre-builts on arm64 so far?

I think we did not land a solution for that yet. Maybe a emsdk install -x86 flag would work?

@dschuff dschuff merged commit b33aaaf into main May 11, 2021
@dschuff dschuff deleted the arm64-releases branch May 11, 2021 15:40
radekdoulik referenced this pull request in dotnet/emsdk May 20, 2021
This allows emsdk to download the new ARM64 binaries from
the emscripten-releases builders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants