Skip to content

Commit 516906e

Browse files
committed
Also compile the binaries for arm64 Linux
1 parent b4d7efc commit 516906e

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
steps:
7070
- uses: ilammy/setup-nasm@v1
7171
- name: Install gcc-multilib
72-
run: sudo apt install gcc-multilib g++-multilib
72+
run: sudo apt install gcc-multilib g++-multilib gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
7373

7474
- uses: actions/checkout@v4
7575

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
33
# This project builds the test binaries for the debugger unit test. It does not run the test.
44
project(debugger-test-binaries C CXX)
55

6+
if (CROSS_COMPILE_LINUX)
7+
message("Cross compiling for Linux aarch64")
8+
SET(CMAKE_SYSTEM_NAME Linux)
9+
SET(CMAKE_SYSTEM_VERSION 1)
10+
SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
11+
SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
12+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
13+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
14+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
15+
SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
16+
endif()
17+
618
if (ARCH STREQUAL "x86_64")
719
add_definitions(-DARCH_IS_X64)
820
elseif(ARCH STREQUAL "x86")

build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def linux_build():
4848
if not run_cmd(build_cmd):
4949
return False
5050

51+
build_cmd = f"cmake -B build/arm64 -DARCH=arm64 -DCROSS_COMPILE_LINUX=ON . && cd build/arm64 && make"
52+
if not run_cmd(build_cmd):
53+
return False
54+
5155
create_archive()
5256
return True
5357

0 commit comments

Comments
 (0)