Skip to content

Commit

Permalink
Set -march=compatibility for native-image builds
Browse files Browse the repository at this point in the history
This avoids CPU features that may not be available on all machines. Currently I'm seeing errors trying to run binaries built on the Github Actions machines locally on a M1.

PiperOrigin-RevId: 607847525
  • Loading branch information
cushon authored and google-java-format Team committed Feb 17, 2024
1 parent 571c2b6 commit 92c609a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
<buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</buildArg>
<buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</buildArg>
<buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</buildArg>
<buildArg>-march=compatibility</buildArg>
</buildArgs>
</configuration>
</plugin>
Expand Down

0 comments on commit 92c609a

Please sign in to comment.