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

Generic Linux ARM and Windows ARM64 Support #1854

Open
wants to merge 45 commits into
base: 8.3.0-Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3da126d
apply from patch
LilyRoss19 Oct 23, 2024
dc3b9e5
binary files
LilyRoss19 Oct 23, 2024
dcbf7a0
fix a sillly mistake
mcagabe19 Oct 23, 2024
4f2ed91
okay I'm stupid
mcagabe19 Oct 24, 2024
d26bcf2
we not need HXCPP_ARM64 on hidapi I think
mcagabe19 Oct 24, 2024
1cec861
forget about mobile
mcagabe19 Oct 24, 2024
4d09f72
I'd rather make like that
mcagabe19 Oct 24, 2024
720a9a2
Update LinuxPlatform.hx
mcagabe19 Oct 24, 2024
3d6898a
Update sdl-files.xml
mcagabe19 Oct 24, 2024
e5846e6
oops
mcagabe19 Oct 24, 2024
85a9148
Update sdl-files.xml
mcagabe19 Oct 24, 2024
68e6aaa
remove commented out code
mcagabe19 Oct 24, 2024
ca1b1f2
fix mac arm64
mcagabe19 Oct 24, 2024
7f3b7ca
don't use massive change on rebuilding rpi
mcagabe19 Oct 24, 2024
18a9f40
remove RPi64 and some rpi defines from file xml's
mcagabe19 Oct 24, 2024
5659aec
doesn't seem to be need?
mcagabe19 Oct 24, 2024
83cb7e7
oh well
mcagabe19 Oct 24, 2024
9486b29
I'm so sorry
mcagabe19 Oct 24, 2024
3ddd460
Update CommandLineTools.hx
mcagabe19 Oct 24, 2024
abb47df
Update SVGExport.hx
mcagabe19 Oct 24, 2024
9d2a6c8
Update SVGExport.hx
mcagabe19 Oct 24, 2024
2da8fef
Update sdl-files.xml
mcagabe19 Oct 26, 2024
65eda82
Update sdl-files.xml
mcagabe19 Oct 26, 2024
9670053
windows arm64 and linux armv7 patch
mcagabe19 Oct 26, 2024
b5cfdbb
whoops
mcagabe19 Oct 26, 2024
f77febb
Update Build.xml
mcagabe19 Oct 26, 2024
eafc0a0
Update sdl-files.xml
mcagabe19 Oct 29, 2024
e2c4bc7
fix m32 building I think
mcagabe19 Oct 31, 2024
2a5e7c1
oops
mcagabe19 Oct 31, 2024
13c3825
Update main.yml
mcagabe19 Nov 1, 2024
ad40513
Create .gitignore
mcagabe19 Nov 1, 2024
5eb923f
Delete ndll/Mac directory
mcagabe19 Nov 2, 2024
8b9cf6f
Update main.yml
mcagabe19 Nov 2, 2024
b544176
Update main.yml
mcagabe19 Nov 2, 2024
192f2ef
jesus
mcagabe19 Nov 2, 2024
fb3fe8b
Update main.yml
mcagabe19 Nov 2, 2024
1b5fd47
Update main.yml
mcagabe19 Nov 2, 2024
5147a43
Update main.yml
mcagabe19 Nov 2, 2024
b94ab23
Merge branch '8.3.0-Dev' into linux-aarch64
mcagabe19 Nov 11, 2024
c940cdd
Update LinuxPlatform.hx
mcagabe19 Nov 11, 2024
5fae4b9
Update HTML5Helper.hx
mcagabe19 Nov 11, 2024
205f3a5
Update LinuxPlatform.hx
mcagabe19 Nov 11, 2024
db3de87
Update RunScript.hx
mcagabe19 Nov 11, 2024
fb2ca7d
Update main.yml
mcagabe19 Nov 11, 2024
abab563
Update pixman-files.xml
mcagabe19 Nov 13, 2024
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
92 changes: 90 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,89 @@ jobs:
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio linux -release -verbose -nocolor

linuxarm64:
runs-on: ubuntu-20.04
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev libpulse-dev libmbedtls-dev libpng-dev libturbojpeg-dev libuv1-dev libvorbis-dev
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libd/libdrm/libdrm2_2.4.101-2_arm64.deb
sudo dpkg-deb -x libdrm2_2.4.101-2_arm64.deb /
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libd/libdrm/libdrm-dev_2.4.101-2_arm64.deb
sudo dpkg-deb -x libdrm-dev_2.4.101-2_arm64.deb /
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libg/libglvnd/libegl1_1.3.1-1_arm64.deb
sudo dpkg-deb -x libegl1_1.3.1-1_arm64.deb /
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libg/libglvnd/libegl-dev_1.3.1-1_arm64.deb
sudo dpkg-deb -x libegl-dev_1.3.1-1_arm64.deb /
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libg/libglvnd/libgles2_1.3.1-1_arm64.deb
sudo dpkg-deb -x libgles2_1.3.1-1_arm64.deb /
wget -q http://mirrors.ocf.berkeley.edu/ubuntu-ports/pool/main/libg/libglvnd/libgles-dev_1.3.1-1_arm64.deb
sudo dpkg-deb -x libgles-dev_1.3.1-1_arm64.deb /

- uses: krdlab/setup-haxe@v1
with:
haxe-version: ${{ env.HAXE_VERSION }}

- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV

- name: Install Haxe dependencies
run: |
# TODO: change this to release version when hxcpp releases the patch
haxelib git hxcpp https://github.com/mcagabe19/hxcpp 47526979c193c6659d053018fb178366b6ff6f72 --quiet
haxelib install format --quiet
haxelib install hxp --quiet

- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV

- name: Rebuild Lime tools
run: |
haxelib dev lime ${{ github.workspace }}
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime setup -alias -y -nocffi
lime rebuild hxcpp -nocolor -verbose -nocffi

- name: Rebuild Lime (Linux)
run: |
lime rebuild linux -64 -release -nocolor -verbose -nocffi
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ HXCPP_STRIP=aarch64-linux-gnu-strip lime rebuild linux -arm64 -release -nocolor -verbose -nocffi -D HXCPP_ARM64

- uses: actions/upload-artifact@v3
with:
name: LinuxArm64-NDLL
path: |
ndll/LinuxArm64/
!**/.gitignore
if-no-files-found: error

- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet

- name: Build HelloWorld sample
run: |
lime create HelloWorld -verbose -nocolor
lime build HelloWorld linux -arm64 -release -verbose -nocolor -D HXCPP_ARM64

- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage linux -arm64 -release -verbose -nocolor -D HXCPP_ARM64

- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio linux -arm64 -release -verbose -nocolor -D HXCPP_ARM64

macos:
runs-on: macos-12
steps:
Expand Down Expand Up @@ -196,6 +279,10 @@ jobs:
with:
haxe-version: ${{ env.HAXE_VERSION }}

- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: amd64_arm64

- name: Set HAXEPATH
run: |
echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV
Expand All @@ -221,6 +308,7 @@ jobs:
run: |
lime rebuild windows -32 -release -nocolor -verbose -nocffi
lime rebuild windows -64 -release -nocolor -verbose -nocffi
lime rebuild windows -arm64 -release -nocolor -verbose -nocffi -D HXCPP_ARM64
lime rebuild hl -clean -release -nocolor -verbose -nocffi

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -416,7 +504,7 @@ jobs:
lime build SimpleAudio ios -release -nosign -verbose -nocolor -eval

package-haxelib:
needs: [linux, macos, windows, android, ios]
needs: [linux, linuxarm64, macos, windows, android, ios]
runs-on: ubuntu-20.04
steps:

Expand Down Expand Up @@ -864,7 +952,7 @@ jobs:

notify:
runs-on: ubuntu-20.04
needs: [package-haxelib, docs, android, flash-samples, air-samples, hashlink-samples, html5-samples, ios, linux, macos, neko-samples, windows]
needs: [package-haxelib, docs, android, flash-samples, air-samples, hashlink-samples, html5-samples, ios, linux, linuxarm64, macos, neko-samples, windows]
if: ${{ github.repository == 'openfl/lime' && github.event_name != 'pull_request' }}
steps:
- name: Notify Discord
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions ndll/WindowsArm64/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 2 additions & 4 deletions project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

</section>

<section if="rpi">
<section if="linux HXCPP_ARMV7 || linux HXCPP_ARM64">

<compilerflag value="-I/usr/include/libdrm" />
<compilerflag value="-I/usr/include/dbus-1.0" />
Expand Down Expand Up @@ -500,14 +500,12 @@

</section>

<section if="rpi">

<section if="linux HXCPP_ARMV7 || linux HXCPP_ARM64">
<lib name="-ldl" />
<lib name="-ldrm" />
<lib name="-lm" />
<lib name="-lEGL" />
<lib name="-lGLESv2" />

</section>

<section if="tvos">
Expand Down
147 changes: 147 additions & 0 deletions project/lib/custom/openal/include/config-linux-arm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/* API declaration export attribute */
#define AL_API __attribute__((visibility("protected")))
#define ALC_API __attribute__((visibility("protected")))

/* Define any available alignment declaration */
#define ALIGN(x) __attribute__((aligned(x)))

/* Define a restrict macro for non-aliased pointers */
#define RESTRICT __restrict

/* Define if HRTF data is embedded in the library */
#define ALSOFT_EMBED_HRTF_DATA

/* Define if we have the posix_memalign function */
#define HAVE_POSIX_MEMALIGN

/* Define if we have the _aligned_malloc function */
/* #undef HAVE__ALIGNED_MALLOC */

/* Define if we have the proc_pidpath function */
/* #undef HAVE_PROC_PIDPATH */

/* Define if we have the getopt function */
/* #undef HAVE_GETOPT */

/* Define if we have SSE CPU extensions */
/* #ifndef RASPBERRYPI
#define HAVE_SSE
#define HAVE_SSE2
#define HAVE_SSE3
#undef HAVE_SSE4_1
#endif */

/* Define if we have ARM Neon CPU extensions */
#define HAVE_NEON

/* Define if we have the ALSA backend */
#define HAVE_ALSA

/* Define if we have the OSS backend */
#define HAVE_OSS

/* Define if we have the Solaris backend */
/* #undef HAVE_SOLARIS */

/* Define if we have the SndIO backend */
/* #undef HAVE_SNDIO */

/* Define if we have the QSA backend */
/* #undef HAVE_QSA */

/* Define if we have the WASAPI backend */
/* #undef HAVE_WASAPI */

/* Define if we have the DSound backend */
/* #undef HAVE_DSOUND */

/* Define if we have the Windows Multimedia backend */
/* #undef HAVE_WINMM */

/* Define if we have the PortAudio backend */
/* #undef HAVE_PORTAUDIO */

/* Define if we have the PulseAudio backend */
#define HAVE_PULSEAUDIO

/* Define if we have the JACK backend */
/* #undef HAVE_JACK */

/* Define if we have the CoreAudio backend */
/* #undef HAVE_COREAUDIO */

/* Define if we have the OpenSL backend */
/* #undef HAVE_OPENSL */

/* Define if we have the Wave Writer backend */
#define HAVE_WAVE

/* Define if we have the SDL2 backend */
/* #undef HAVE_SDL2 */

/* Define if we have the stat function */
#define HAVE_STAT

/* Define to the size of a long int type */
#if HXCPP_ARM64
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif

/* Define if we have GCC's format attribute */
#define HAVE_GCC_FORMAT

/* Define if we have dlfcn.h */
#define HAVE_DLFCN_H

/* Define if we have pthread_np.h */
/* #undef HAVE_PTHREAD_NP_H */

/* Define if we have malloc.h */
#define HAVE_MALLOC_H

/* Define if we have dirent.h */
#define HAVE_DIRENT_H

/* Define if we have cpuid.h */
/* #define HAVE_CPUID_H */

/* Define if we have intrin.h */
/* #undef HAVE_INTRIN_H */

/* Define if we have sys/sysconf.h */
/* #undef HAVE_SYS_SYSCONF_H */

/* Define if we have guiddef.h */
/* #undef HAVE_GUIDDEF_H */

/* Define if we have initguid.h */
/* #undef HAVE_INITGUID_H */

/* Define if we have GCC's __get_cpuid() */
#define HAVE_GCC_GET_CPUID

/* Define if we have the __cpuid() intrinsic */
/* #undef HAVE_CPUID_INTRINSIC */

/* Define if we have the _BitScanForward64() intrinsic */
/* #undef HAVE_BITSCANFORWARD64_INTRINSIC */

/* Define if we have the _BitScanForward() intrinsic */
/* #undef HAVE_BITSCANFORWARD_INTRINSIC */

/* Define if we have pthread_setschedparam() */
#define HAVE_PTHREAD_SETSCHEDPARAM

/* Define if we have pthread_setname_np() */
/* #undef HAVE_PTHREAD_SETNAME_NP */

/* Define if pthread_setname_np() only accepts one parameter */
/* #undef PTHREAD_SETNAME_NP_ONE_PARAM */

/* Define if pthread_setname_np() accepts three parameters */
/* #undef PTHREAD_SETNAME_NP_THREE_PARAMS */

/* Define if we have pthread_set_name_np() */
/* #undef HAVE_PTHREAD_SET_NAME_NP */
Loading