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? |
| aarch64.MacOSX.gpp.fortran.includes=**/*.f **/*.for | ||
| aarch64.MacOSX.gpp.fortran.excludes= | ||
|
|
||
| aarch64.MacOSX.gpp.java.include=include |
| aarch64.MacOSX.gpp.fortran.compiler=gfortran | ||
| aarch64.MacOSX.gpp.fortran.defines=Darwin GNU_GCC | ||
| aarch64.MacOSX.gpp.fortran.options=-Wall -fno-automatic -fno-second-underscore | ||
| aarch64.MacOSX.gpp.fortran.includes=**/*.f **/*.for |
| aarch64.MacOSX.gpp.c.compiler=gcc | ||
| aarch64.MacOSX.gpp.c.defines=Darwin GNU_GCC | ||
| aarch64.MacOSX.gpp.c.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion | ||
| aarch64.MacOSX.gpp.c.includes=**/*.c |
| aarch64.MacOSX.gpp.cpp.compiler=g++ | ||
| aarch64.MacOSX.gpp.cpp.defines=Darwin GNU_GCC | ||
| aarch64.MacOSX.gpp.cpp.options=-Wall -Wno-long-long -Wpointer-arith -Wconversion | ||
| aarch64.MacOSX.gpp.cpp.includes=**/*.cc **/*.cpp **/*.cxx |
There was a problem hiding this comment.
Should be **/*.cc **/*.cpp **/*.cxx **/*.mm
8e4d842 to
89eb856
Compare
As per discussion on #371
@syhily @mondain