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

Fix #1822 - Linux x64 executable not being able to run in macOS Docker on Apple Silicon #1831

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased

- Fix Linux native executables having low stack depth ([issue](https://github.com/dangmai/prettier-plugin-apex/issues/1809), [issue](https://github.com/dangmai/prettier-plugin-apex/issues/1733)).
- Fix Linux native executables not being able to run in macOS Docker on Apple Silicon ([issue](https://github.com/dangmai/prettier-plugin-apex/issues/1822)).
- Fix duplicate newlines after last trailing comment in document ([issue](https://github.com/dangmai/prettier-plugin-apex/issues/1777)).

# 2.2.2
Expand Down
4 changes: 4 additions & 0 deletions packages/apex-ast-serializer/parser/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ graalvmNative {
environmentVariables.put("PATH", file('../musl-toolchain/bin').absolutePath + ":" + System.getenv("PATH"))
buildArgs.add('--static');
buildArgs.add('--libc=musl');
// #1822 - By default, the native executable can't be run in Docker x64
// images on macOS with M-chips. We set the compatibility flag to ensure
// it can be run in that context, although it may not be as optimized.
buildArgs.add('-march=compatibility');
// #1733, #1809 - We need to manually increase stack size for musl static binary,
// otherwise we will run into stack overflow issues.
// https://github.com/oracle/graal/issues/3398
Expand Down