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

Support aarch64 Linux with page sizes >= 16k #6075

Closed
wants to merge 1 commit into from

Conversation

maximbaz
Copy link

@maximbaz maximbaz commented Oct 6, 2022

Description:

This adds support for aarch64 Linux with page sizes >= 16k, by compiling with jemalloc configured with largest possible page size.

It will still work for all other aarch64 Linux systems. To give you some confidence, I ran your Github actions in my fork, and compiled 1.5.1 release with this patch. You can grab the binaries and test for yourself!

https://github.com/maximbaz/swc/releases/tag/v1.5.1-1

I didn't touch Android as I don't have enough knowledge to confirm that this is needed for that platform or how to verify it.

Related issue (if exists):

Fixes #5967

I originally came to report this, because I wanted to fix Next.js swc plugin, which suffers from exactly the same issue and requires exactly the same fix. I can confirm that Next.js can finally be used on my aarch64 Linux machine with this patch.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@maximbaz
Copy link
Author

maximbaz commented Oct 6, 2022

I'm sorry, but I agree with this post:
https://drewdevault.com/2018/10/05/Dont-sign-a-CLA.html

My bad, I should have checked if you require CLA before opening a PR.
Feel free to take over getting the fix committed, if you want to support this CPU architecture 👍

@kwonoj
Copy link
Member

kwonoj commented Oct 6, 2022

Thanks for the contribution and sorry that you're stuck with our CLA policy. Unfortunately, we require CLA for the contributors for the various reasons, something we can't move it away. Let me close this PR since you'd like to avoid sign it. Still appreciate for taking time to contribute.

@kwonoj kwonoj closed this Oct 6, 2022
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Oct 12, 2022
Fixes #39311

Backport of upstream patch swc-project/swc#6075

More details are described in swc-project/swc#5967

I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine.

This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. 

And here's the compiled binary, if you want to give it a go!

[next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip)


Let me know if that makes sense! 🙂
Kikobeats pushed a commit to Kikobeats/next.js that referenced this pull request Oct 24, 2022
Fixes vercel#39311

Backport of upstream patch swc-project/swc#6075

More details are described in swc-project/swc#5967

I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine.

This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. 

And here's the compiled binary, if you want to give it a go!

[next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip)


Let me know if that makes sense! 🙂
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support aarch64 Linux with page sizes >= 16k
3 participants