-
Notifications
You must be signed in to change notification settings - Fork 103
Linux ARM64 natives support #181
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
Open
k8ieone
wants to merge
11
commits into
Anuken:master
Choose a base branch
from
k8ieone:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c26afcb
Add ARM Linux target
k8ieone d97ccb2
Merge branch 'Anuken:master' into master
k8ieone 17516ae
Add ARM libraries to CI
k8ieone a5ccc5e
Add ARM dependencies
k8ieone 16a4b61
Fix ARM Freetype lib name
k8ieone baf9e2e
Add a Docker-based ARM SDL builder
k8ieone 9cb0711
Not the case
k8ieone 1978634
Add missing name
k8ieone e599371
Add missing dependency
k8ieone 96374a6
Add filedialogs build
k8ieone dd043b8
Delete extensions/filedialogs/jni/build-linuxarm64.xml
k8ieone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM docker.io/azul/zulu-openjdk:8-latest | ||
|
||
# Install dependencies | ||
RUN apt update && apt install -y libasound2-dev libdrm-dev libsdl2-dev libgbm-dev libglew-dev ant binutils g++ | ||
|
||
# Copy the repository | ||
COPY . /home/Arc | ||
WORKDIR /home/Arc | ||
|
||
# Run the SDL build | ||
RUN ./gradlew backends:backend-sdl:jnigenBuildLinuxARM64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k8ieone marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<project name="arc-filedialogs-Linux-arm64" basedir="." default="postcompile"> | ||
<!-- include the environment --> | ||
<property environment="env"/> | ||
<!-- output directory for temporary object files --> | ||
<property name="buildDir" value="../build/target/native/linuxarm64" /> | ||
<!-- output directory for the shared library --> | ||
<property name="libsDir" value="../libs/linuxarm64" /> | ||
<!-- the name of the shared library --> | ||
<property name="libName" value="libarc-filedialogsarm64.so"/> | ||
<!-- the jni header jniPlatform to use --> | ||
<property name="jniPlatform" value="linux"/> | ||
<!-- the compiler to use when compiling c files --> | ||
<property name="cCompiler" value="gcc"/> | ||
<!-- the compiler to use when compiling c++ files --> | ||
<property name="cppCompiler" value="g++"/> | ||
<!-- the command to use when archiving files --> | ||
<property name="archiver" value="ar"/> | ||
<!-- the compilerPrefix for the C & C++ compilers --> | ||
<property name="compilerPrefix" value="aarch64-linux-gnu-"/> | ||
<!-- the compilerSuffix for the C & C++ compilers --> | ||
<property name="compilerSuffix" value="" /> | ||
|
||
<!-- define gcc compiler, options and files to compile --> | ||
<property name="gcc" value="${compilerPrefix}${cCompiler}${compilerSuffix}"/> | ||
<property name="gcc-opts" value="-c -Wall -O2 -fmessage-length=0 -fPIC"/> | ||
<fileset id="gcc-files" dir="./"> | ||
<exclude name="target/"/> | ||
<include name="memcpy_wrap.c"/> | ||
<include name="tinyfiledialogs.c"/> | ||
|
||
|
||
</fileset> | ||
|
||
<!-- define g++ compiler, options and files to compile --> | ||
<property name="g++" value="${compilerPrefix}${cppCompiler}${compilerSuffix}"/> | ||
<property name="g++-opts" value="-c -Wall -O2 -fmessage-length=0 -fPIC"/> | ||
<fileset id="g++-files" dir="./"> | ||
<exclude name="target/"/> | ||
<include name="**/*.cpp"/> | ||
|
||
|
||
</fileset> | ||
|
||
<!-- define linker and options --> | ||
<property name="linker" value="${compilerPrefix}${cppCompiler}${compilerSuffix}"/> | ||
<property name="linker-opts" value="-shared"/> | ||
<property name="libraries" value=""/> | ||
|
||
<!-- define stripper --> | ||
<property name="stripper" value="${compilerPrefix}strip${compilerSuffix}"/> | ||
|
||
<!-- cleans the build directory, removes all object files and shared libs --> | ||
<target name="clean"> | ||
<delete includeemptydirs="true" quiet="true"> | ||
<fileset dir="${buildDir}"/> | ||
<fileset dir="${libsDir}" includes="**/*" excludes="**/.svn"/> | ||
</delete> | ||
</target> | ||
|
||
<target name="precompile"> | ||
<condition property="compiler-found"> | ||
<and> | ||
<or> | ||
<!-- Include both b/c Windows might be either --> | ||
<available file="${g++}" filepath="${env.PATH}"/> | ||
<available file="${g++}" filepath="${env.Path}"/> | ||
</or> | ||
<or> | ||
<!-- Include both b/c Windows might be either --> | ||
<available file="${gcc}" filepath="${env.PATH}"/> | ||
<available file="${gcc}" filepath="${env.Path}"/> | ||
</or> | ||
</and> | ||
</condition> | ||
<condition property="has-compiler"> | ||
<equals arg1="${compiler-found}" arg2="true"/> | ||
</condition> | ||
<condition property="stripper-found"> | ||
<or> | ||
<!-- Include both b/c Windows might be either --> | ||
<available file="${stripper}" filepath="${env.PATH}"/> | ||
<available file="${stripper}" filepath="${env.Path}"/> | ||
</or> | ||
</condition> | ||
<condition property="should-strip"> | ||
<and> | ||
<equals arg1="${stripper-found}" arg2="true"/> | ||
<equals arg1="${release}" arg2="true"/> | ||
<!-- Don't strip mac osx libs --> | ||
<not> | ||
<contains string="${libName}" substring="dylib"/> | ||
</not> | ||
</and> | ||
</condition> | ||
|
||
</target> | ||
|
||
<target name="create-build-dir" depends="precompile" if="has-compiler"> | ||
<!-- FIXME this is pretty nasty :/ --> | ||
<copy todir="${buildDir}"> | ||
<fileset refid="g++-files"/> | ||
<fileset refid="gcc-files"/> | ||
</copy> | ||
<delete> | ||
<fileset dir="${buildDir}"> | ||
<include name="*"/> | ||
<exclude name="*.o"/> | ||
</fileset> | ||
</delete> | ||
</target> | ||
|
||
<!-- compiles all C and C++ files to object files in the build directory --> | ||
<target name="compile" depends="create-build-dir" if="has-compiler"> | ||
<mkdir dir="${buildDir}"/> | ||
<apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true"> | ||
<arg line="${g++-opts}"/> | ||
<arg value="-Ijni-headers"/> | ||
<arg value="-Ijni-headers/${jniPlatform}"/> | ||
<arg value="-I."/> | ||
|
||
<srcfile/> | ||
<arg value="-o"/> | ||
<targetfile/> | ||
<fileset refid="g++-files"/> | ||
<compositemapper> | ||
<mapper type="glob" from="*.cpp" to="*.o"/> | ||
<mapper type="glob" from="*.mm" to="*.o"/> | ||
</compositemapper> | ||
</apply> | ||
<apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true"> | ||
<arg line="${gcc-opts}"/> | ||
<arg value="-Ijni-headers"/> | ||
<arg value="-Ijni-headers/${jniPlatform}"/> | ||
<arg value="-I."/> | ||
|
||
<srcfile/> | ||
<arg value="-o"/> | ||
<targetfile/> | ||
<fileset refid="gcc-files"/> | ||
<compositemapper> | ||
<mapper type="glob" from="*.c" to="*.o"/> | ||
<mapper type="glob" from="*.m" to="*.o"/> | ||
</compositemapper> | ||
</apply> | ||
</target> | ||
|
||
<!-- links the shared library based on the previously compiled object files --> | ||
<target name="link" depends="compile" if="has-compiler"> | ||
<fileset dir="${buildDir}" id="objFileSet"> | ||
<patternset> | ||
<include name="**/*.o" /> | ||
</patternset> | ||
</fileset> | ||
<pathconvert pathsep=" " property="objFiles" refid="objFileSet" /> | ||
<mkdir dir="${libsDir}" /> | ||
<exec executable="${linker}" failonerror="true" dir="${buildDir}"> | ||
<arg line="${linker-opts}" /> | ||
<arg value="-o" /> | ||
<arg path="${libsDir}/${libName}" /> | ||
<arg line="${objFiles}"/> | ||
<arg line="${libraries}" /> | ||
</exec> | ||
</target> | ||
|
||
<!-- strips the shared library of debug symbols --> | ||
<target name="strip" depends="link" if="should-strip"> | ||
<exec executable="${stripper}" failonerror="true" dir="${buildDir}"> | ||
<arg value="--strip-unneeded"/> | ||
<arg path="${libsDir}/${libName}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="postcompile" depends="strip"> | ||
|
||
</target> | ||
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move this somewhere else to avoid polluting the root directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing! I'd go for either the .github folder if GitHub doesn't mind or some other folder like .ci or something in that spirit.
Do you have a place in mind for it?