0b1209edfa
We either need GCC >= 4.9 or we need to link with libatomic:
https://github.com/microsoft/mimalloc/issues/443
Unfortunately, manylinux2014-cross ships with GCC 4.8.5:
https://github.com/rust-cross/manylinux-cross/blob/main/manylinux2014/aarch64/Dockerfile#L71
We already appear to override the compiler toolchain in CI for x86_64 to
use clang (which is why mimalloc works there), so let's go ahead and do
that here too. This at least means we're using the same compiler across
both architectures.
I'm leaving the aarch64-musl codepath the same (using gcc) because (1)
we don't use mimalloc there yet and (2) it's a bit harder for me to test
as thoroughly.
# Testing
## Local Compilation
Run bash inside the docker image (I also had to install rosetta2 inside
my Linux VM, as this is an x86_64 image used for cross-compilation to
aarch64):
```
podman run --platform=linux/amd64 -t -i ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2023-09-17-aarch64 bash -l
```
```
git clone https://github.com/vercel/next.js.git --filter=blob:none --branch canary --single-branch
cd next.js
git checkout
|
||
---|---|---|
.. | ||
build_and_deploy.yml | ||
build_and_test.yml | ||
build_reusable.yml | ||
cancel.yml | ||
code_freeze.yml | ||
issue_bankrupt.yml | ||
issue_lock.yml | ||
issue_stale.yml | ||
notify_release.yml | ||
popular.yml | ||
pull_request_stats.yml | ||
retry_deploy_test.yml | ||
retry_test.yml | ||
setup-nextjs-build.yml | ||
test_e2e_deploy_release.yml | ||
test_examples.yml | ||
triage.yml | ||
trigger_release.yml | ||
turbopack-nextjs-build-integration-tests.yml | ||
turbopack-nextjs-dev-integration-tests.yml | ||
turbopack-update-tests-manifest.yml | ||
turbopack-upload-tests-manifest.yml | ||
update_fonts_data.yml |