-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add support for Apple M1 build #382
base: master
Are you sure you want to change the base?
Conversation
I don't think this works.
|
Any progress? |
@Demogorgon314 I have a build running with these properties https://github.com/marschall/exception-counter/blob/master/src/nar/apple.arm.aol.properties |
898f108
to
d7e6ba9
Compare
@Demogorgon314 @marschall Updated the original suggested config from @mondain based on feedback, linker name I still don't have a mac to test it, but seems to be logically more on target now. |
d7e6ba9
to
8e4d842
Compare
I would like to be able to produce a Universal Binary on macOS, see: https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary I have an existing plugin configuration for building x86_64 on macOS x86_64 like this: <plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.10.2-SNAPSHOT</version>
<extensions>true</extensions>
<executions>
<execution>
<id>compile-native</id>
<phase>compile</phase>
<goals>
<goal>nar-validate</goal>
<goal>nar-compile</goal>
</goals>
<configuration>
<java>
<include>true</include>
<link>false</link>
</java>
<libraries>
<library>
<type>executable</type>
<run>false</run>
<linkCPP>false</linkCPP>
</library>
</libraries>
<c>
<clearDefaultOptions>true</clearDefaultOptions>
<options>
<option>-arch</option>
<option>x86_64</option>
<option>-mmacosx-version-min=10.9</option>
<option>-fobjc-exceptions</option>
<option>-std=c99</option>
<option>-DLIBJLI_DYLIB="${java.home}/jre/lib/jli/libjli.dylib"</option>
<option>-c</option> <!-- NOTE: compile only, don't link at this stage! -->
</options>
</c>
<linker>
<options>
<option>-framework</option>
<option>Cocoa</option>
<option>-mmacosx-version-min=10.9</option>
</options>
</linker>
</configuration>
</execution>
</executions>
</plugin> I am guessing that I should be able to have two compilation executions, one for Whilst it is easy to cross-compile for arm64 macOS on an x86_64 macOS machine, I can't seem to figure out how to do it using the <option>-arch</option>
<option>arm64</option> However I get the following errors:
However running file shows that an arm64 binary is produced, i.e.:
Any ideas? |
As per discussion on #371
@syhily @mondain